#development

1 messages ยท Page 44 of 1

forest sphinx
#

thank God for VMs

narrow furnace
#

why not use docker?

worthy dirge
#

This can be compiled in VS2019 but not g++

deep scarab
#

-std=c++17 ?

worthy dirge
little patrol
#

time for more of this

deep scarab
#

๐Ÿค”

upbeat folio
#

Me: โ€œHey, Senior Business Analyst, should the program do thing 1 or thing 2?โ€
Senior Business Analyst: โ€œthat is correct.โ€
Me: โ€œSo...thing 1?โ€
Senior BA: has signed off

upbeat folio
#

~10 minutes later~

#

Me: โ€œSo...thing 1?โ€
Senior BA: โ€œNo, thing 2.โ€

tight cobalt
#

SBA's and CMO's are the real issues you need to "debug"

proper saddle
limpid reef
#

at first i thought the link above was just a self promotion, but then went through the motions of clicking each of the links at the bottom of the page, and really love how the creator makes it progress, slowly adding more and more CSS each time.

queen zenith
#

Java for loops > Python for loops

proper saddle
#

foreach topping in pizza:

#

Yeah, for the brief time i used python, i don't remember using a regular for loop, just foreach

copper ginkgo
#

that's the same as for loop

proper saddle
queen zenith
#

I think so?

#

I'm taking a python class in college

#

not having open and close braces is so weird

#

switching to python after 2 years of java is hard

proper gale
#

you think that Java -> Python is hard, try C++ -> Python.

#

thats not what i was getting at

#

the style switch from C++ to python, fuck that

#

give curly brackets plz thx

worthy dirge
#

programming language without curly brackets is u g l y to look at

cosmic turtle
#

I'm not sure an editor defines how pretty/ugly a language's syntax is(or should be.

#

To me that sounds like "You're reading it wrong" which sounds like Apple's "You're holding it wrong"

vast echo
#

Python is beautiful

#

Fight me @worthy dirge

proper gale
vast echo
#

Just donโ€™t be bad

proper gale
#

yea, same applies to the other languages.

#

main difference, i can tell where shit end

vast echo
#

Python is the best scripting language

proper gale
#

@vast echo not in all circumstances

vast echo
#

Obviously thereโ€™s no best for all use cases language

#

But python is my go to at work for just about anything from data processing to API calls

proper gale
#

see, and i use C++ if i can because once compiled it requires no runtime that isn't always installed, so it can just be run.

#

yes, i use C++ for scripting

vast echo
#

Python is better for cross platform though

proper gale
#

ok, then i compile my C++ for that other platform, then it needs to runtime there.

#

besides that basically anything on windows is a dick

#

but at least you only need to deal with that dick to make the script with C++, where as with python you need it to run the damn thing.

vast echo
#

ya thats true

#

I have the luxury of rarely needing to use windows

#

and everything I use comes with python preinstalled

#

so even if I make something for someone else, I dont need to install python on their machine

proper gale
#

yea, im not actually saying that python is bad, i do use it myself, just that its not the best.

#

its actually really bad in a lot of ways that can really matter.

#

mostly looking at memory usage

vast echo
#

who needs memory

novel spear
#

Unused memory is wasted memory

worthy dirge
#

Why hitting Ctrl+f5 is pain in the ass for you

hazy summit
#

Can i get help with a syntax error I've been debugging for a while now? Been studying the python basics alone.

worthy dirge
#
elif n>=80 and n<=90:
...
#

And mind your identation

hazy summit
#

Sure, I'd try that. Thanks.

dim shard
#

@queen zenith Since u have had 2 yrs of Java

#

can u help me

queen zenith
#

Whats up

dim shard
#

so Im in Comp Sc 1 and im going ahead of the teacher bc she sucks

#

and I learned arrays and i was wondering how to put these 2 variables that are in a for loop and put them into one?

#

heres the java file

queen zenith
#

Alright gimme a minute

dim shard
#

its the two in the second for loop

queen zenith
#

Alright so first you cant declare variables inside of a loop

dim shard
#

why not

#

there's no syntax errors

#

oh bc u cant use it outside of the loop?

queen zenith
#

Because every time the loop executes the jdk tries to create an extra space in memory for the variable

#

if the loop runs 10 times it will try to make 10 priceForTopPicks variables

dim shard
#

ok

queen zenith
#

declare the variable outside of the loop then manipulate it within

dim shard
#

but if i do that then i cant use it like i wanted to

queen zenith
#

What is the program attempting to do

dim shard
#

ok so when i put the 2 variables out side of either loop it says that the variable i cant be resovled to a variable

queen zenith
#

alright so what is the input and expected output

#

@dim shard

dim shard
#

hold on ill be back

worthy dirge
#

I just notice ```C
float a=b=0;

#

in C , compare them == gives me a true result, isn't that supposed to be false?

#

No I didn't post python

vast echo
#

one line or its bad

proper gale
#

@last ingot thats not what i was arguing, it was more ease of running it.

#

also, there is a reason i dont write my C++ all that cross compatible.

vast echo
#

I do have a special place in my heart for C++

#

since it was the first language I did a project with

#

9/10 language

quick vortex
#

@last ingot how you like my version

#

grades = {90:"A",80:"B",70:"C",60:"D"}

score = next((grades[item] for item in grades.keys() if result >= item),"F")

worthy dirge
#

how do you like my version ```C++
vector<pair<unsigned, char>>grade{ {90,'A'},{80,'B'},{70,'C'},{60,'D'} };
unsigned score;
cin >> score;
cout << (score>=60? ((find_if(grade.begin(), grade.end(), [score](pair<unsigned, char>& a) {return score >= a.first; }))->second) : 'F');

novel spear
#

If I saw that in a code review I would reject it

#

Prefer clarity over cleverness

#

Could just break that into four lines with clearly named const bools

#

Const bool scoreIsFail equals.... If scoreIsFail...and so on

#

The compiler can and will optimize it for you

hazy summit
#

Thanks @last ingot , yours seems much easier to understand.

winged obsidian
#

Prefer clarity over cleverness
This lol, so many people disregard the importance of readability
A lot of code (especially python, and really any other strictly dynamically-typed languages) out there that need to be hit over the head with a style guide and conventions.

winged obsidian
#

I suppose there is a strong argument for complex or even hacky code in instances where it is:

  1. Very well documented
  2. Hides complexity elsewhere
  3. Improves performance in something that is performance critical
hazy summit
#

That's why I started with python. Read a lot about it.

dim shard
#

Hey can someone help me

#

wit jva

#

java*

proper gale
#

@dim shard stolen from another server's bot

Please just ask the question; don't test the waters for the real question. Instead, ask the full question so that others can better understand what you need, rather than creating an atmosphere of assumptions and discouraging people from wanting to help.```
dim shard
#

yeah i was mzking sure some one would help me

#

how would I add these 2 arrays

#

2 for loop

proper gale
#

add what?

dim shard
#

nvm

#

i got it

dim shard
#

If ur using the System.out.printf(); you cant add something else after the variable that you are formatting?

deep scarab
#

what do you mean?

worthy dirge
#

Is there a good way to increment multiple iterators at the same time in a loop in C++?

proper gale
#

@worthy dirge yes, comma operator

worthy dirge
#

I have some matrices to loop through using iterators. I know they are the same size but different types. I can't declare iterators in the first statement of a for loop so I have to write them outside, messing up my local names

#

So I have to put them in a curly brackets, looks pretty u g l y

dim shard
#

Hey does anyone know a good site for java exercises

proper saddle
#

hackerrank?

forest sphinx
#

@dim shard yes https://google.com

dim shard
#

really

dim shard
#

Thanks @remote dock

dim shard
#

But srsly does anyone know any good websites for exercises for java?

round dome
#

@dim shard yes https://google.com/

dim shard
#

really

vast echo
#

theres examples of different java things on this page

dim shard
#

Thank you @vast echo

tender torrent
#

@dim shard Here's a list of good questions to dohttps://leetcode.com/problemset/all/

dim shard
#

Thanks man

#

How could I make this file more efficient?

deep scarab
#

looks fine to me

#

maybe use printf instead of println for formatted output

worthy dirge
#

Any compiler or IDE supports C++20 modules?

proper gale
#

@worthy dirge im using Clion and SVN/GIT Clang-10, anything C++20 that ive used seems to work fine, given the compiler supports it.

worthy dirge
brazen sluice
#

anyone here who can make decent AHK scripts? I need some help

worldly moat
#

How do I publish a game on Steam once I make it?

vestal ravine
#

Greenlight?

#

If it still exists

dim shard
#

and tell me how to make it have a new line at every multiple of 30?

worthy dirge
#

@dim shard you change to if(i%30==0)

#

if you don't know what this % operator do, you can use another loop variable and reset it every 10 times

left pasture
#

Offt java

#

OOP flashbacks

#

Cries in design patterns

dim shard
#

ok thanks that was what my friend told me

#

ik what the % operator is

ember mica
#

any docker enthusiast here?

rugged beacon
#

@ember mica yup

cursive plume
#

Hello?

pulsar bough
#

Nah

cursive plume
#

Yes

#

Can you help me?

pulsar bough
#

With?

cursive plume
#

HTML & CSS possibly javascript

pulsar bough
#

And more specifically ?

cursive plume
#

heres the thread

#

if you wana read it

#

it has links to examples in it

pulsar bough
#

and?

cursive plume
#

..?

#

isnt the thread explaning most things?

#

is there something missing?

pulsar bough
#

Wheres the question?

cursive plume
#

updated it

pulsar bough
#

Oh

cursive plume
#

realized it was some bad explaning

pulsar bough
#

I assume you could make it not display until a button is clicked

cursive plume
#

reverse?

#

i want to trigger it when button is clicked

pulsar bough
#

Like have this.parentElement.style.display='none'; on a element in the div that is the callout

cursive plume
#

im a bit bad at this, your gonna have to eloborate

pulsar bough
#

When you define the callout have it hide it (style.display to none) then when the button is pressed unhide it

#

I don't really remeber js

#

its been a while

#

so just look up style.display in js, and triggering js when the element is loaded

cursive plume
#

your speaking chinese to me

#

i dont understand

#

i understand somewhat

pulsar bough
#

document.getElementsByClassName("callout");

#

use something like that to get the element

cursive plume
#

is see thats javascript, but im gona put that inside a <script> and then?

pulsar bough
#

then on button click do something like document.getElementsByClassName("callout").style.display='inline';

#

put that in a <onclick>

#

on the button

#

and I assume you can do something like that inside a <script> , just setting it to 'none' instead, so when it starts it will be hidden

cursive plume
#
  display: none;
}```
#

i assume

#

i can use css

pulsar bough
#

O yea

#

that makes more sense

#

as I said im kinda rusty

#

just use css to make it hidden and the button to make it visible

cursive plume
#

yeah

#

yeah but then im stuck in this problem how can i change it to block

#

when its clicked

pulsar bough
#

what? @cursive plume

cursive plume
#

im stuck,

#

i cant make a button change the css from none; to block;

pulsar bough
#

why block?

cursive plume
#
  display: block;
}```
#

change to this

#

when the button is clicked

pulsar bough
#

O wait

#

I meant do something like documents.getElementById("").

#

I think

cursive plume
#

<button class='button1' onclick="displayToggle1('callout')">Example</button>

#

like that?

#

@pulsar bough ?

pulsar bough
#

what?

#

why displayToggle1

#

just put the js in there

cursive plume
#

oh,

#

ok

pulsar bough
#

I think its something like that

#

I don't super remeber though

cursive plume
#

like this? <button class='button1' onclick="jsgoeshere">Example</button>

#

jsgoeshere is gone be replaced by js obviously

pulsar bough
#

yea

cursive plume
#

what js goes there?

pulsar bough
#

documents.getElementById("").style.display='inline';

#

something like that

#

not 100% sure

cursive plume
#

document.getElementsByClassName("callout").style.display='inline';

#

you metioned

#

that earlier

pulsar bough
#

Yea use ID

#

ID lets you get by Element

cursive plume
#

did you change your mind?

pulsar bough
#

Class only lets you get Elements

#

then you need to get it out of the array

#

you could use class

#

just modify it to something like this document.getElementsByClassName("callout")[0].style.display='inline';

cursive plume
#

<button class='button1' onclick="document.getElementsByClassName("callout")[0].style.display='inline';">Example</button> so like this?

nocturne galleon
#

anyone know where u can find config file for apache2 when running linux through wsl,

im lost at:
C:\Users\USER!\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\rootfs

ive looked everywhere to no avail,

#

nvm, i cant use linux for sht

sudo nano /etc/apache2/sites-enabled/000-default.conf

feral tide
#

You'll get the hang of it. :)

ashen sky
#

@nocturne galleon Linux on wsl is mostly like the same distro on real hardware, or virtual machines. So the same guides usually applies. ๐Ÿ™‚

nocturne galleon
#

ayy thx, guess experiance is what i need the most,

ashen sky
#

@nocturne galleon That will help a LOT, and takes a lot of time to get. I've been using linux professionally for like 10 years, and still have a LOT to learn. ๐Ÿ˜‰

nocturne galleon
#

^^ guess i got a long ways to go before ill be reomotely gud with it,

vast echo
#

different linux distros have different folders for websites

#

its annoying

ashen sky
#

@vast echo I don't remember them being THAT different. Somewhere in /var/ seems to be default.

#

@nocturne galleon Depends on how fast you learn. ๐Ÿ˜‰ I've started using linux about 20 years ago. But for desktop task, I know just about NOTHING. (Never really used Linux as a desktop OS.)

proper gale
#

@nocturne galleon if you are used to windows, it has a seemingly steep learning curve as simple things are different, even slightly. Really its just that you dont know what you are doing again, you get used to it, and you get better at it.

#

@ashen sky Linux for Desktop is basically the same as for servers, i actually run Ubuntu 19.04 Server on my desktop.

ashen sky
#

@proper gale I know, the basics are the same, but servers usually don't have any GUI installed, so the GUI specific things, are what I know almost nothing about. Only times I've used a linux GUI is whenever I forget to deselect it, during a manual installation. ๐Ÿ˜‰

ember mica
#

@rugged beacon hi, sorry for replying now. Is docker and kubernetes is the same thing or differ?

ashen sky
#

@ember mica They are NOT the same. docker is a container platform, kubernetes is a management system for a lot of docker instances.

quick vortex
#

@ember mica You run docker on kubernetes

proper gale
#

@ashen sky for the most part, unless you are doing GUI development, you dont really need to do much.

#

just, install it, and its a gui exactly how you would expect.

ember mica
#

ah

#

hmmmm so you can manage docker in kubernetes?

#

but basically in docker for each setting you will have a port right? it's actually managable without kubernetes right?

#

sorry i haven't done kubernetes but want some insight before doing it

ashen sky
#

@proper gale I'm aware of that, I was thinking along the lines of customizations, and troubleshooting.

#

@ember mica You can easily run docker without kubernetes, but if you have a lot of docker instances, on multiple servers, kubernetes makes manageing easier.

proper gale
#

i never do any GUI customization myself

#

wait, thats not right, i did actually do it on my one laptop, which is gonna get its OS yeeted in about 6 months.

#

and its pretty stable, so, if you need to do antyhing with linux desktop, its not really different from server linux

ashen sky
#

@proper gale As I said, mainly uses it, when I install by accident. ๐Ÿ˜‰

proper gale
#

you should try it sometime, not by accident

ashen sky
#

@proper gale Yeah, I will, whenever it just happes to be the right tool, and the software I need (Like MS Office, and the Adobe Creative Suite) is available.. Till then.. I'll stick with MacOS. ๐Ÿ˜‰

proper gale
#

ACS i can get, but why do you need MSO specifically?

ashen sky
#

Because I've never seen ANYTHING handle calender and mail in exchange/office365 better than Outlook, and I also need to support MS Office users, so without using office I would not know them well enough...

proper gale
#

fair nuff

nocturne galleon
#

Anyone know a good cheap (up to 45$) code source for Android for city travel guide and for multiple cities?

solar apex
#

soo i know this is not a place focus on this, but by any chance anyone know where I can find a set of Data for a homework that i have to do for PBI.

dim shard
#

What is PBI

storm plume
#

can anyone help me with c#

#

i need to take Operators(+,-,*,/) as a string input but it raises an exception

#

nvm i found out what what wrong

north sorrel
#

Hi, I have a little question, which may sound stupid. But I still don't understand why it does not work: So I'm programming in c++ on xcode and here is the code with the issue:
cpuHandler.hpp

#ifndef cpuHandler_hpp
#define cpuHandler_hpp

#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <Kernel/libkern/libkern.h>
#include <Kernel/i386/proc_reg.h>
#include <Kernel/mach/mach_types.h>

static void disable_tb(__unused void* param);

static void enable_tb(__unused void* param);

static void print_msr(__unused void* param);

#endif /* cpuHandler_hpp */

And the cpuHandler.cpp:

#include "cpuHandler.hpp"

const uint64_t disableTurboBoost = 0x4000000000LL;

static void disable_tb(__unused void * param_not_used) {
    wrmsr64(MSR_IA32_MISC_ENABLE, rdmsr64(MSR_IA32_MISC_ENABLE) | disableTurboBoost);
}

static void enbable_tb(__unused void * param_not_used) {
    wrmsr64(MSR_IA32_MISC_ENABLE, rdmsr64(MSR_IA32_MISC_ENABLE) & ~disableTurboBoost);
}

static void print_msr(__unused void * param_not_used) { // <-- here an error "expected function after funciton declarator"
    cout << "The MSR is: " << hex << rdmsr64(MSR_IA32_MISC_ENABLE) << endl;
}

I really don't understand why xcode says there is an error at the print_msr function. The declaration is exactly the same as the other 2 functions and yet this one does not want work. Any idea of what is going on?
Thanks a lot in advance ๐Ÿ™‚

round dome
north sorrel
#

My system does not show it :/

round dome
#

get yourself an editor that does

polar axle
#

^this, its a hardcoded space

#

usually from a copy/paste ๐Ÿ™‚

ashen sky
#

Usually that kind of space comes from hitting the ALT key together with space, quite normal on a mac, if you type { which is something like ALT+SHIFT+8 (With danish keyboard layout) When typing too fast, the alt key can be pressed too early.

shrewd siren
#

Wew lad

#

Compacting C/C++ memory pages

dim shard
#

Hey can someone help me and take a look at this java program and help me to find out the min and max of the user input?

sacred vault
#

If i somehow manage to open it with my phone sure

dim shard
#

Ok

#

๐Ÿ˜‚

sacred vault
#

Before i go through this headache,

#

Cant you post code here

#

Or is it just too large

#

Nvm got it working

#

So what kind of input are we expecting here @dim shard

dim shard
#

I need to know the maximum and the minimum of the values that were entered?

dim shard
#

hello?

dim shard
#

I GOT IT

#

๐Ÿ˜‚

worthy dirge
#

How hard is it?

nocturne galleon
#

Hi, I was wondering. I want to learn Python to have at least a bit of a basic grip on some coding language, I study ICT Management. What kind of text editor do you all use for Python? I have installed Python itself but it opens itself in CMD

north sorrel
#

@nocturne galleon You can install anaconda which has some built-in tutorial and as IDE you can use pycharm ๐Ÿ™‚

deep scarab
#

vs code ๐Ÿ™‚

nocturne galleon
#

VS as in Microsoft Visual Studio?

deep scarab
#

yeah

sacred pumice
#

@hazy summit

You'll need to fix your calculator function a little, since you aren't passing operation to it, so you should have

def calculator(a, b, operation):```

and when you call it you should pass operation to it

```python
print(calculator(first_number, second_number, operation))```

then to use it in other code, you can import it and use it like so

```python
from boleanfunc import calculator

print(calculator(1, 2, "addition"))```
sacred pumice
#

@hazy summit np

visual tapir
#

Does anyone know multithreading
Can you send some links where I can learn how this shit works
Specifically in C using pthread
I am having lots of trouble with mutex/locking, conditions and semaphores
Any resources greatly appreciated

worthy dirge
#

C doesn't have a standard multi-threading library

#

If you know C++, it is a standard library and you can find a tons of multi-threading programming tutorials

round dome
#

he mentioned posix thread though, so what's the problem? Just because C doesn't have std::thread doesn't mean he should switch over

#

Just use pthread_mutex_lock & pthread_mutex_unlock

worthy dirge
#

Isn't it obvious that he couldn't find resources about it?

visual tapir
#

i managed to find some resources for pthread

#

like the man pages for a few functions

worthy dirge
visual tapir
#

still clueless ๐Ÿ˜ฆ

#

like this

#

i have to use C, C++ is not an option - uni assignment

worthy dirge
#

I actually don't know this thread.h thing, seems too new from what I learned lol

visual tapir
#

i have figured out the basics like creating and joining threads, but I need to figure out thread synchronization using condition variables, mutexes for loxking etc, but it ain't working

proper gale
#

@worthy dirge C++11, sooo

#

@visual tapir i cant help with the api, but i can help with the general constructs.

#

well, cant help much.

worthy dirge
#

My C knowledge kind of stuck at C89, learned it freshman year

proper gale
#

i dont know C basically at all, but i do know modern C++.

cedar maple
#

do you have to do multi-threading or are subroutines also fine?

#

cause then you should just do callbacks. multi-threading in C is weird anyway with how C is structured.

#

as mentioned before in this answer, you see the example with threading, and alternatively one with a callback

proper gale
#

@visual tapir what is your assignment for?

cedar maple
#

huh didn't know pthread_t was part of the standard implementation

#

ought it was a lib

#

or later addition

#

imo

visual tapir
#

@proper gale Assignement is intended for us to learn thread synchronization, we have a program which will have tens or even hundreds of threads

#

we have one resource which needs to be accessed by many threads, and we need to make sure that stuff doesn't get messed up

proper gale
#

simple answer is a basic mutex, more complicated answer is a shared mutex

visual tapir
#

@cedar maple thanks for that, seems quite useful

#

what's the difference between those two

proper gale
#

basic mutex can only be locked by one thread at a time.

#

shared mutex can be locked by n readers and 1 writer

visual tapir
#

ok, so if I got it right, basic mutex once locked prevents other threads* from even reading, right?

proper gale
#

its not that it prevents the others from reading

#

its that it cant be locked.

#

in order to ensure that its not being written to and read from at the same time (which sometimes is ok) you would want to lock for both

#

the problem with a basic mutex here, is that only one thread can read from it at a time, even though there is no real reason for that

#

im guessing you are doing oop-like C, is that correct?

visual tapir
#

yeah

#

they gave us a vector

proper gale
#

is this C or C++? because a vector is a type in C++

visual tapir
#

C

#

if this was a std::vector i would have a lot less headache

#

this C vector is a void**, basically an array of pointers to structs

proper gale
#

ok, so, in the struct, add a pthread_mutex_t value,
init it with pthread_mutex_init which will take a pointer to that *_mutex_t
lock, unlock, and destroy are all basically the same.

#

before modifying or reading any value, lock it, after you are done, unlock it.

visual tapir
#

hmm

#

i'll try that

#

thx

proper gale
#

mind you, check the error code ofc

#

i usually do this in C++, so i use std::mutex, and std::unique_lock, which makes this all much easier

#

fuck, i have this macro just to make my life easier

#define ROGUELIB_SYNCHRONIZED_SCOPE static std::mutex syncMutex;std::unique_lock syncLock(syncMutex);
#

that a global lock on just that scope, which isn't optimal, but ehh, good nuff.

lone hornet
#

so i'm making a recursion menu for class and one of the options is to output x^y and x^-y. if i get something like 0^-12, do i just make it say something like "the answer is infinity"?

visual tapir
#

the answer is undefined maybe?

lone hornet
#

yeah, i'll probably have to make a case for that since we can't reasonably compute 0^-y

proper gale
#

@lone hornet zero to any power is zero

#

zero to a negative power though, is undefined

#

but usually with computers you go with the easy option, which is just give back zero.

lone hornet
#

yeah but instead of my program giving me back a zero, it's giving me a floating point exception when i do any negative power

#

so right now, the easiest thing for me to do is to slap on another else if for that case and calling it a day

#

so far that hasn't work for me yet

proper gale
#

well, first up, i have no idea what order that shit is going in

#

but, if you are putting in zero, that makes sense, you need a special case for it.

lone hornet
#

yeah I'm currently working on it

proper gale
#

also, fun exercise with a recursive power function, you can do it with approx sqrt(exp) recursions.

lone hornet
#

i'll check it out when i get the chance

proper gale
#

its a pretty simple to implement

#

you can even use bitwise magic to remove most branching too

#

@lone hornet actually, here is exactly what i was talking about

int __internal_power_recursive(int base, int exp){
    if(exp == 0){
        return 1;
    }
    auto partialPow = __internal_power_recursive(base, exp >> 1);
    partialPow *= partialPow;
    partialPow *= base * (1 | exp);
    return partialPow;
}

int power_recurse(int base, int exp){
    if(base == 0){
        return 0;
    }
    if(exp == 0){
        return 1;
    }
    if(exp > 0){
        return __internal_power_recursive(base, exp);
    }else{
        return 1 / __internal_power_recursive(base, exp);
    }
}```
lone hornet
#

that's actually pretty cool even with the bitwise black magic

worthy dirge
#

how do you get C++ syntax highlighting in discord

#

oh ok, instead of typing C++, it seems to need cpp

visual plank
#

I really need to learn bit manipulation

#

Seems like a very handy tool

visual tapir
#

i find that knowing how to convert hex to binary is really helpful with that

modest grove
#

Anyone know how to dev a discord bot like role reaction / YAGPDB but in French ?
Or did you have tutos etc ?

proper gale
#

@visual tapir this does binary -> hex, reverse it and it will do hex -> binary

        char nibble1Val = val & 0xF;
        nibble1Val += 6;
        nibble1Val += ((0x10 & nibble1Val) >> 4) * 7;
        nibble1Val += 42;

        char nibble2Val = (val >> 4) & 0xF;
        nibble2Val += 6;
        nibble2Val += ((0x10 & nibble2Val) >> 4) * 7;
        nibble2Val += 42;

        std::cout << nibble2Val << nibble1Val << ' ';```
#

8 bit here

#

and ascii hex from a char value, not ascii binary

#

this uses a specific bit alightment to conditionally do a multiplication without a branch, not sure if its faster or not.

raven kernel
quasi plover
#

hey i want to make a random number guessing game with limited number of trials
so i've put trials = 5 and and at the bottom i've put trials = trials -1 but it doesn't seem to work plz dm me if you can help
this is my whole code :
import random
x = random.randint(1,20)
tries = 5
def mainF():
inp = int(input('enter your guess: '))
if x != inp & tries > 1:
if x < inp:
print('too high')
#print('you have',y,'more tries')
else:
print('too low')
#print('you have', y, 'more tries')
mainF()
else:
if x == inp :
print('you won')
else:
print('you lost')
tries = tries - 1
mainF()

deep scarab
#

use a while loop

quasi plover
#

how

#

@last ingot how

sacred pumice
#

@quasi plover ```python
Your code here
```

#

my examples better ๐Ÿ˜›

quasi plover
#

'''awkward'''

sacred pumice
#

@quasi plover the button to the left of the 1 key on your keyboard, not '

#

So for example:

```python
def foo(a, b):
return a+b

print(foo(1, 2))
```

gets you:

def foo(a, b):
    return a+b

print(foo(1, 2))
#

@quasi plover repost your example like that, then we'll take a look ๐Ÿ™‚

quasi plover
#

yeah i got an azerty keyboard

sacred pumice
#

@quasi plover still should be the key to the left of 1

#

actually wait, azerty has a weird 2 up there

#

we'll let you off, but you need to figure out where your keyboards grave key is, it's actually useful :P

import random
x = random.randint(1,20)
tries = 5
def mainF():
    inp = int(input('enter your guess: '))
    if x != inp & tries > 1:
        if x < inp:
            print('too high')
            #print('you have',y,'more tries')
        else:
            print('too low')
            #print('you have', y, 'more tries')
        mainF()
    else:
        if x == inp :
            print('you won')
        else:
            print('you lost')
tries = tries - 1
mainF()```
#

@quasi plover so next up gotta improve that question, what doesn't work? ๐Ÿ™‚

dreamy finch
#

Rant:

#

So I'm wanting to write an app that manages my media server for me by auto populating it with new movies, tv shows and things like that from the Amazon Prime service and other sources in the future.
My problem is that the companies that I need to use their resources in order to get this to work, have THE WORST documentation on their API's that I need to use in order to get this to work.
The summarized idea is actually quite simple, "If you have enough money in a PayPal account, and no other movie has a higher priority, then buy the highest priority rank movie in the priority queue and then download it and import into Plex." Pretty simple right?
The issue is that PayPal has so many API's to figure out which to use and it doesn't easily document something as simple getting the balance of an Account. Amazon also has so many API's that it's a bit difficult to figure out which one I need to use to trigger a purchase, and then another API to download it.
This looks like it might become a fun Winter project or something, but just throwing a quick Python script together has shown me that this will be a tad annoying to get up and running with the API's. I just find it really funny that multi-billion dollar companies have worse documentation on their developer API's than small hobbyist developers over on GitHub.

ionic hull
#

@dreamy finch just use torrents....

#

Use yts api and download the torrents to your server

#

With the provided IMDb id you can get the movie's information

sacred pumice
#

to be fair, you are pirating if you rip content from Amazon anyway ๐Ÿคท

dreamy finch
#

I was trying to be legit about it, but yeah... torrents seem like a better idea. And I didnโ€™t know it was pirating if I got them from Amazon. I though that if I purchased them, that itโ€™d be legit and I was okay to download them to my server.

#

Iโ€™ll just try to only torrent what I legally own, but still itโ€™s annoying to hunt for good quality torrents.

dim shard
#

Hey can someone tell me what my teacher wants? She is being really confusing๐Ÿ˜‚

#

Write a for or while loop that will initialize the variables value1 to 11 and value2 to 19. Create a test section of the while or for statement that will test if value1 is greater than 10 and value2 is less than 20. Finally, end the while or for statement by incrementing value1 by 1. In the loop body, write a println statement that will display the contents of value1

#

Its java

deep scarab
#

using a loop to initialise variables

dim shard
#

yeah i did that

#

but its an inifite loop

deep scarab
#
while (value1 != 11) value1 = 11;
#

that's some sketchy code

dim shard
#

and i dont think she wants an infinite loop

#

๐Ÿ˜‚

deep scarab
#

yeah idk what the point of this exercise is

dim shard
#

thats what i said

#

shes

#

CRAZY

#

๐Ÿ˜‚

worthy dirge
#

how about c do{value1=11;} while(false);

proper gale
#

@dim shard its actually not an infinite loop, i just have no idea what the point is

#

end result will be value1 = -(2^31) and value2 = 20 assuming int types.

#

but thats a technicality, while in theroy its not infinite, in practice it may as well be.

little patrol
#

Trying to learn WebRTC

#

pls kill me xD

proper saddle
dim shard
#

@proper gale well her controlling statements said value 1 which is = 11 > 10, and value 2 which is = 19 is < 20 and only incrementing value1 the statements will always be true

worthy dirge
#

Even g++ 9.2 still needs a compiling flag for using std::thread

proper gale
#

@dim shard integer rollover

dim shard
#

I got it thanks

#

Oh and also can someone give me some java exercises?

proper gale
#

google coding excercises, langauge doesnt really matter.

dim shard
#

ok thanks

lapis sedge
#

If i have this json file "profiles" : { "26319dbce72587bce41deb9f32f2bb76" : { "icon" : "Grass", "lastUsed" : "2019-10-01T09:07:42.162Z", "lastVersionId" : "latest-release", "name" : "", "type" : "latest-release" }, "OptiFine" : { "created" : "2019-08-04T12:21:35.243Z", "gameDir" : "C:\\Users\\Joshua\\AppData\\Roaming\\.minecraft", "icon" : "Furnace", "lastUsed" : "2019-10-20T00:44:31.862Z", "lastVersionId" : "1.14.4-OptiFine_HD_U_F2", "name" : "OptiFine", "type" : "custom" }, "fdb5ee805568880a88c8a39e754e5c22" : { "icon" : "Crafting_Table", "lastUsed" : "1970-01-01T00:00:00.000Z", "lastVersionId" : "latest-snapshot", "name" : "", "type" : "latest-snapshot" }, "forge" : { "lastUsed" : "2019-10-04T00:17:17.490Z", "lastVersionId" : "1.14.4-forge-28.1.26", "name" : "forge", "type" : "custom" } How do I get the object "26319dbce72587bce41deb9f32f2bb76" with out using it name or string just by a number python json

deep scarab
#

you should be able to access it by index?

lapis sedge
#

how would i do that @deep scarab

deep scarab
#

keys() probably

lapis sedge
#

@deep scarab like this print(minecraft_launcher_profiles["profiles"].keys()[1]) doesnt work

deep scarab
#

items()[0] probs?

#

i haven't used the python json library but that's what i found after googling it

#

@lapis sedge played around with the json library and this works

list(minecraft_launcher_profiles["profiles"].items())[0]
lapis sedge
#

thanks

opaque terrace
#

Anyone familiar with Google Load Balancer? We have 2 GCC instances in a single zone in a group, but the balancer does not round-robin the requests at all . All the googling and docs point to that it jsut should, and I looked through the settings and it looks correct, but one of my VM's is at 100% and the other just sits idle...

vale hollow
#

Hi guys,
Is there anything that come close to an API documentation (design), but with online editing like wordpress?

#

I'm currently using Slate but I would love to be able to edit text with an admin panel

vale hollow
#

I found flokia for wordpress but not free..

merry heart
#

so... there's an (kind of) API, that returns a PNG. The PNG is different based on the URL's parameters. I cannot see any javascript if I look at the source of the page. How/where are the parameters parsed? Is there actually a javascript, but it removes itself, after it has ran? URL: https://optifine.net/showBanner?format=paepmK

brave tendon
#

Hey can anybody help me out to fix WordPress project for some reason all pages aren't discoverable (404 error )

2019/10/24 17:21:37 [error] 11826#11826: *6208 "/var/www/html/activate/index.php                                                 " is not found (2: No such file or directory), client: 78.57.134.221, server: ww                                                 w.ejwork.me, request: "GET /activate/ HTTP/2.0", host: "ejwork.me", referrer: "h                                                 ttps://ejwork.me/"
2019/10/24 17:35:38 [error] 11826#11826: *6208 "/var/www/html/hello-world/index. ```
spare mason
#

wordpress lol

deep scarab
#

@merry heart it's probably done server side

willow silo
#

Anyone here do web

ionic hull
#

@willow silo just write what you need, you will get more replies

worthy dirge
#
    pair<int, bool> temp[3];
    vector<decltype(temp)> a;```
#

I want to push the temp into the vector, how do I do that

proper gale
#

@worthy dirge a.insert(a.end(), temp, temp + 3);

worthy dirge
#

@proper gale I actually mean the whole temp array, but seems I can't

proper gale
#

that does

#

it inserts the items from temp to temp + 3 at a.end()

worthy dirge
#

it is strange that I can declare something likevector<pair<int, bool>[3]>

proper gale
#

you can

#

oh, that

#

yea, you still can, just not in the same way

worthy dirge
#

No, I mean the [3] thing as a whole

proper gale
#

easiest way is std::vector<std::vector<std::pair<std::uint32_t, bool>>>

#

but, there is std::vector<std::array<std::pair<std:uint32_t, bool>, 3>> which is exactly what you are asking for.

worthy dirge
#

Yeah, but I am worrying the cost. I choose to make a new struct anyway

proper gale
#

dont worry about that minimal of cost when first writing anything

#

if its a problem, come back and fix it later.

#

besides, you probably wont do a better job than the people who made the standard library

#

considering that they are the same people that wrote the compiler

worthy dirge
#

Now I am curious what is vector<int[3]> , why it can pass compiling

#

Never seen this, or I just come up with it myself

proper gale
#

@worthy dirge std::vector<int*>

worthy dirge
#

But I can't push a int* to it.

proper gale
#

thats because you really aren't supposted to do that

round dome
#

Go back to C if you think the type of int[3] is int*

proper gale
#

@round dome i dont use arrays much, so if im wrong about that being what it was, then ok.

worthy dirge
#

@round dome It should be const int*

round dome
#

Just use std::array if you don't want the decaying to happen, still isn't const int* tho

visual plank
#

How do I import Windows forms from a different project?

#

I've tried a bunch of things but none of them seem to work

visual plank
#

As I said, I tried it

#

Doesnt work. The thing is this new set of forms were sent by my friend who doesn't use git. I have to manually import all the files

proper gale
#

@round dome what is it then?

round dome
#

int[3]

worthy dirge
native shoal
#

@worthy dirge if anything, that should be why csharp is so slow

muted dragon
#

Anyone here good with Python sockets would be able to help me with debugging something?

cursive plume
#

who won the giveaway

#

the sff console killer thing

plain cosmos
#

Any SQL advance people around who can assist me?

ashen sky
#

@plain cosmos Sometimes you get a better response by just posting the actual question, instead of asking if someone might know something about something. Also you would avoid attracting people who knows, in this case, SQL, but nothing that can actually help solve your problem.

plain cosmos
#

I just been banging my head for about 7+ hours and can't figure it out ... :S

#

CREATE PROCEDURE todo (IN todo CHAR(3), IN todo DATE)
BEGIN
DECLARE todo BOOLEAN DEFAULT FALSE;
todo
DECLARE todo CURSOR FOR
SELECT todo FROM module WHERE todo;
DECLARE CONTINUE HANDLER FOR NOT FOUND
SET todo = TRUE;

-- NOTE : check if course exists !
IF (todo) THEN
  SIGNAL SQLSTATE '45000'
    SET MESSAGE_TEXT = ' todo';
END IF;

-- NOTE : check if start date is >= month in future !
IF (todo) THEN
  SIGNAL SQLSTATE '45000'
    SET MESSAGE_TEXT = ' todo';
END IF;

OPEN todo;

todo: LOOP
  FETCH NEXT FROM todo INTO todo;

  IF (todo) THEN
    LEAVE todo;
  END IF;

  -- NOTE : Check Saturday / Sunday & Skip using WEEKDAY & DATE_ADD functions respectivly in MySQL . . Google !

  INSERT INTO `session` . . todo . . todo etc.

  SET todo = DATE_ADD(todo, INTERVAL 1 DAY);
END LOOP;

CLOSE todo;

END$$

DELIMITER ; <>

#

Anyone know how to create a procedure in sql?

#

todo = need replacing with appropriate code.

ashen sky
#

What exactly is the procedure supposed to do? Or is it just creating procedures in general?

plain cosmos
#

o Produce a procedure that assigns a new schedule for a given course. The procedure should accept a course code & start date as arguments then schedule each of the given courseโ€™s modules on consecutive (working / week) days. The start date must be at least a month in the future otherwise, a suitable error should be raised.
o Tips . . CURSOR, LOOP, SIGNAL

#

Am kind of understanding the logic and not at the same time...

ashen sky
#

That seems to be more than my SQL skills can do. But perhaps someone else knows how to do it. However, as I see it you already have the skeleton ready, which in my head seems to be

  • Verify course code, and get modules
  • Verify the start date is 1 month in the future, and it's a working day. (Or weekday)
  • Loop through the modules
    • Schedule the course at start day plus loop counter skipping non weekdays.

If you are allowed to do so, it might be a good idea to put some of the code in separate procedures, instead of just one, and call them in correct order.

plain cosmos
#

this is what i have so far

#

and I can't understand the flow of it .

#

you are right, that is a skeleton that just needs expanding. and logically thinking it makes sense but implementation for me does not.

#

I understand it and I don't at the same time ๐Ÿ˜ฆ

ashen sky
#

Do you have a table with the course and the required modules for each course?

plain cosmos
#

Yes I have build the tables and imported the data into it.

#

I feel stupid right now, as am not understanding it fully

ashen sky
#

Then you can get the modules required, and thereby the number of loops to perform, in one step. So get the modules for the course, if 0 rows are returned, the course code is invalid, otherwise it's valid and you do not need to load the modules later. ;)

I would consider that step one.

#

Step two would be date verification. I don't know how detailed you need to do it, but I suppose you either just have to exclude weekends, or have a table with excluded dates. The code looks like MSSQL, but most of the SQL dialects have a function that allows you to take a valid date and get the weekday, either in numeric or textual form. So either select from the table with excluded dates 0 rows go, more than 0 means no. Or if you are just excluding weekdays, get the weekday from the date, and compare. For MSSQL DATEPART seems to be your friend.

#

Last assign the start date to a variable, as a date or datetime variable, then use DATEADD to add a day at the end of each loop.

#

But without actually solving the task in practice, and spending more time than I like at 22.30, I think this is the most help I can give.

plain cosmos
#

That's okay at least some help, am trying to slowly figure it out.

#

Thank you ๐Ÿ™‚

ashen sky
#

You're welcome. ๐Ÿ™‚

willow silo
#

Anyone can make me a modern dark gradient website for a telecom company!

distant thicket
#

Hello, so i dont post much but im at desperation stage at uni, and ive been trying to figure this coursework out for a while, and it seems simple, rather new to RPi, Linux and C, even being 4th Year Uni, however i am struggling to figure out the GPIO Pins on the RPi Zero, i have the imagery from the documentation, however mine doesnt seem to want to work how i want it to, with on and off control, just either powers straight on, without it going off on control, partly because i dont really know 100% if its the right pin im typing to turn off, but im pretty sure it should mostly be off by default as it is and im pretty sure im somehow using purely power and ground without GPIO pin controls

Initial help if anyone could be as to what way the numbering is on it having it this way (below, in following message)

Also if anyone knows more about how to use shell_exec, also would be great if there was help once i had this wiring actually sorted and figured out ๐Ÿ™‚ any help will be gratefully appreciated ๐Ÿ™‚

worthy dirge
distant thicket
#

Thats actually alot more helpful than the one i had

#

Atleast i know i was somewhat right with the wiring, thank you

Although now its still my issue of the command not working for pin control

This doesnt turn it on, not sure if im completely doing that wrong xD

worthy dirge
#

There is a command you can use to monitor all gpio

#

gpio readall

distant thicket
#

๐Ÿ‘Œ

distant thicket
#

Thanks for the help, got the first hurdle working, i had all the modes at in instead of out, all along i probably had it working except that

visual plank
#

In java, how would I generate two random strings such that the length of addition of two is less than a certain value?

main root
#

i thought about something complicated but its awful practice...

like generate number convert it into string using utf8 throwing the strings together and if its too long try again

worthy dirge
#

That's actually a do-able idea

visual plank
#

I thought of something similar but i'd like a non-brute force algorithm

#

if it exists that is

worthy dirge
#

No need to brute force. You should be able to generate one random number within a certain range once at a time.

proper gale
#

@visual plank do you need randoms strings whose cumulitive length is under a specific value, or do you need numbers that when added and converted to a string is under a specific length?

visual plank
#

Nah the first one

#

Forgive me for not giving an example,
Say the magic number is 5.
So I want two random strings which when concatenated are of length less than or equal to 5

proper gale
#

so, not gonna help with generating random characters, but make a random number less than 5, make a random number less than 5 minus your first number, make random strings of those lengths, done

#

substitue 5 for whatever your magic number is

upbeat folio
#

Hypothetically speaking, if you had to build a good system for developing for big data projects in Spark/Scala, what would your configuration be? Would you favor thread count, core speed, or a balance? How much RAM, and how much would the speed of that RAM matter?

visual plank
#

@proper gale holy shit I didn't think of that. Thanks dude

proper gale
#

@upbeat folio when you say system, do you mean the computer or the program architecture?

#

but, based on that its big data, you are going to want lots of ram, fast storage, and lots of threads.

#

what CPUs depends on what the data is.

wheat dock
#

Anyone know of a cheap RISC-V board that can be used for learning RISC-V?

worthy dirge
#

How to assign a named lambda with a ternary operator in C++? Like:cpp auto some_lambda= expression? lambda1 : lambda2;

round dome
#

use std::function

dim shard
#

I'm bored af can someone give me a java exercise?

worthy dirge
#

Leetcode is your friend

dim shard
#

what is that?

quaint summit
#

@dim shard make a very low size delta encoder

dim shard
#

ummm

#

yeah im not that advanced

#

๐Ÿ˜‚

tidal mural
#

Learn some Firebase or electron :p

dim shard
#

again not that advanced!

simple lagoon
#

firebase is kinda sad, because market monopolisation

dim shard
#

Hey ok so how would I make this display 1 instead of 49?

#

im trying to do this

#

look at this before the java file

main root
#

build 2048 ๐Ÿ‘€

#

i tend to get stuck in testing it ๐Ÿค”

#

but its a fun and not too hard exercise

dim shard
#

could somone help me wit that java file? pls

main root
#

meh android refuses to open java files :/

ashen sky
main root
#

you enter a integer > convert it into a string > and then get the char at position 0 of the string.

[nvm im blind]

id make it easier and enter a string in the first place

#

i think its like scanner.nextLine()

#

but task wants it like that

#

ye if you want to continue with the calculation its the thing you got to turn the char into a numbertype again and do the maths. and add the xto the string IF it's 10 at the end

#

took a bit until i understood the task i hope i understood it correctly

#

and it gives you a wrong number because you save a char in an int

#

and the char 1 is 49 in utf8

#

yep im definitely blind

#

@dim shard

hope i helped

worthy dirge
dim shard
#

@main root

#

@main root but when its back in a int its still in its in ASC II

#

vakue

#

value

proper gale
#

@worthy dirge ive been using C++17 this whole time, and didnt know i could use auto there

quasi plover
#

can i make gui apps with python ?

raven kernel
main root
#

@dim shard
You have the String, get the (n) char of it, then you can convert it to an Integer with the second-last line, and with that number you can calculate again.

If you just make Int = bla.charAt(n); you end up with the UTF-8/ASCII value what makes me curious what happens if you have a char with something with A-F in as UTF-value. Idk if i got you problem right but. thats what i'd do

visual tapir
#

Does anyone have any idea how to do this

#

I managed to get a solution which I think is O(n**2)

#

wikipedia says O(nlogn) is possible but I have no clue how to og about that

visual tapir
#

scrap that, my n**2 idea doesn't work

shy helm
#

Hmmm haven't thought about this deeply, but perhaps using 2D range trees?

#

Gives you O(n log n) construction and O(s + log n) search time

#

(so here n == r)

thin gorge
gusty girder
#

Does anyone know how if it's possible to use tab to escape a semicolon in Visual Studio Code? I know it's possible to escape brackets and quotes by using the TabOut extension by Albert Romkes, but what about semicolons?

#

I'm just really annoying when writing CSS, as the intellisense puts
color: <mycursorhere>;
and I can't just press enter to go to a new line, as my cursor is in front of the semicolon.

Alternatively, maybe a way to stop intellisense from putting the semicolon there?

#

okay so apparently I'm blind as a <insert blind creature>

ashen sky
#

Why would you prevent the semicolon from being put at the end? You need it there, to make the CSS valid...

simple lagoon
#

because typing a semicolon is faster than reaching for an arrow key

proper gale
#

@thin gorge no, thats 16GB of virtual memory, until you write to most values, its not actually using 16GB of ram.

#

yes you can do a memcpy from itself to itself and it will allocate it physically

thin gorge
#

Alright, thankfully the real structures are closer to half a megabyte than that

proper gale
#

also, why the fuck do you need 4 billion int values?

thin gorge
#

That's just the limit before it exceeds the maximum size of an integer array

proper gale
#

no its not

thin gorge
#

MSVC's default limit maybe

proper gale
#

yea, clang 10 has no problem accepting 20 billion ```cpp
int* ptr = new int[20'000'000'000];

thin gorge
#

thank goodness

#

do the dashes affect anything?

jolly pelican
#

nah

worthy dirge
#

single quote delimiter is good

lusty echo
#

hi! I was wondering, do you have to use swift to make an ios app? can i use another language so i can program on my pc and also deploy it to android?

round dome
#

You can also use Objective C, but Swift is newer it's probably a better idea to use Swift. If you want to make a cross platform app, you can use a cross platform language (like C) for the core code / logic, and then build a front end with supported languages (Swift/Obj C for iOS [like Cocoa Touch] and Kotlin/Java/DART for Android [like Google's Flutter])

lusty echo
#

Is there an easy free way to use swift on my PC?

worthy dirge
#

If you need swift to develop app, the only way will be hackintosh

ashen sky
#

@simple lagoon Ahh.. Maybe I'm just used to PHPStorm, where typing the semicolon at the end of the line, will just make the cursor move over it, if you haven't done other navigation after autocompleting. ๐Ÿ˜‰

sage vector
#

@round dome Flutter is cross-platform and can be used both on iOS and Android.

round dome
#

true FeelsOkayMan

brazen axle
#

I wanna write code for lmg

shy helm
#

@thin gorge @proper gale if you want the answer for whatever compiler you're using you can check std::numerical_limits<size_t>::max()

proper gale
#

Yea, 32bit vs 64bit pointers

shy helm
#

It's not exactly that straight forward, technically it's implementation defined and thus is not required to adhere to any specific value

#

But traditionally size_t is a typedef for an unsigned long long ๐Ÿ˜‰ (on a modern compiler)

proper gale
#

Yea, i just never run into this limit, so i don't really care

#

I'ma be honest, i use std::uint64 instead of size

shy helm
#

oof

#

whyyyy

#

๐Ÿ˜›

proper gale
#

idk

thin gorge
#

Seems pretty niche

#

The Wii is 32 bit, right?

bitter notch
#

@lusty echo an older comment i know, but if you are still looking for an answer you can also use cross-platform tooling such as Xamarin or many other similar tools to develop an app for iOS on your PC. Even some mostly-code-free options these days for basic stuff. Just need a mac to do the final signing and pushing to their app store with an apple dev licence though iirc

formal pond
#

I don't know if I can ask here or #tech-support but I want to move files one directory up so to clear it out:
D:\Shows\showname1\Season 1\files D:\Shows\showname2\Season 1\files D:\Shows\showname3\Season 1\files
to
D:\Shows\showname1\files D:\Shows\showname2\files D:\Shows\showname3\files
The subfolder of the show is always 'Season 1' but it's more than 150 folder so I want to find a way to automate it

ashen sky
#

You should be able to do it with powershell. Unfortunatly my console experience is mostly from linux, and Powershell is not that big there..

But the basic flow would be something like this:

  1. Make a list of "Season 1" folders with their full path.
  2. Loop the folders, and move all files to the folder above it. You can even change the name, eg. add a S1 prefix, if needed.
  3. Remove all the, now empty, "Season 1" folders.
#

In powershell land, I think you have a directory iterator to assist you on the job. But as I said, I've not done a lot of powershell scripting, so far I've only done some VMWare automation, like doing snapshots of production servers, before releasing new code to them. ๐Ÿ˜‰

vast echo
#

the file sorting part of sonarr could do this really easily

deep scarab
#
Dim FSO, parent_dir
Set FSO = CreateObject("Scripting.FileSystemObject")
parent_dir = FSO.GetParentFolderName(WScript.ScriptFullName)

Sub move_files(curr_dir)
    Dim folder, subfolder, file
    Set folder = FSO.GetFolder(curr_dir)

    For Each subfolder in folder.SubFolders
        move_files subfolder.Path
        For Each file in subfolder.Files
            FSO.MoveFile file.Path, parent_dir & "/" & file.Name
        Next
    Next
End Sub

move_files(parent_dir)
#

here's a vbscript to move all the files to parent_dir

#

shouldn't be hard to change it to move it into a specified folder

lusty echo
#

thanks @bitter notch

craggy patrol
#

Any Regex masters that can help me with match?

#

i want to match this string .A021.

#

the numbers are random but always only 3 digits

#

My brain can never get around how Regex works

craggy patrol
#

I tried this and it works:

#

''s/.E([0-9]{3})././g'

#

`'s/.E([0-9]{3})././g'

#

's/.E([0-9]{3})././g'

#

's/.A([0-9]{3})././g'

#

Failed attempts to get formating to work instead...

#

Is there a more elegant solution than mine?

deep scarab
#

^\.A[0-9]{3}\.$

craggy patrol
#

thank you

#

That editor is just what i needed

main root
#

that regex101 site is so good ๐Ÿค”

glossy forum
#

Haha I use that site at least once a week!

nocturne galleon
#

is using webflow even considered coding?

#

All you do is drag and drop different things that turn into a website and I feel like its not even on the same level as actual coding

#

i feel like its the alice 3 of java

naive terrace
#

the customizations would be the ability to toggle "types" of nodes

#

different icons

#

and when clicked, instead of the thing showing up below, it'd show up somewhere else in the UI I'm building

#

along with viewing extra metadata on a sidepanel

limpid reef
#

Sounds like you need to hire a developer. (Either that, or I'm thinking it's more complicated than it is.)

naive terrace
#

I am the hired developer xDDD Working on a broader project, and not sure how to implement this piece

#

going into details of what was needed just so people here can see some of the scope of it

#

the biggest part is being able to embed that square with the graph into another webpage, and get clickable events out of it

limpid reef
#

Ah, so you're looking to hire a sub-contractor to help with the project.

naive terrace
#

at this point, just some advice or pointers

nocturne galleon
#

int *ptr;

worthy dirge
#

Is there some black magic macros to make int main(int argc, char** argv) to int main(int argc, std::string argv[]) linusKappa

proper gale
#

@worthy dirge not that im aware of, but i can give you one that will do it to that, or int main(std::vector<std::string>> args)

#

but, you will need to add a return value.

worthy dirge
#

@proper gale It's just my random stupid thinking. I ended up doing like ```cpp
int my_main(int argc, string argv[]);
#define func main
int func(int argc, char** argv) //the real main()
{
return my_main(argc, &(vector<string>(argv, argv + argc).begin().operator*()));
}

#define main my_main
int main(int argc, string argv[]) //fake main()
{
cout << argc << "\n";
for (int i = 1; i < argc; ++i)
cout << argv[i] << "\n";
return 0;
}```

proper gale
#

that will break

worthy dirge
#

It ended up working as I want linusKappa

proper gale
#

yea, but its undefined behavior

#

that vector goes out of scope after you grab its pointer, so you have no idea whats actually at that memory, and it can segfault

worthy dirge
#

damn, I forgot this part. How about new string[argc] and then initialize it in real main

#

Oh I can simply declare that vector as a named object in real main and call my fake main

proper gale
#

yea

naive terrace
#

update to my question above, got it figured out. What I needed was "network graphs", what instead I was searching for was "spider graphs" in case anyone comes across this

#

using a library called vis-js

gloomy coyote
#

alrihgt quick question
anyone here use clickteam fusion 2.5?

kind portal
#

Heyy anyone here use Godot? If yes, what language do you use?

worthy dirge
#

I am impressed. MinGw GCC -O0 heap allocation using smart pointer is even faster than MSVC Debug mode stack allocation.

dim shard
#

Hey ok so i am trying to learn with .txt files how do i get java to read it in?

dim shard
#

Im lost

#

my teacher is telling me to use the import

#

import textio.TextIO; but the IDE says it doesnt exist

deep scarab
#

well where are you getting the TextIO library from?

dim shard
#

go to section 2.4

narrow fulcrum
#

looks like its a 3rd party library that you have to add to your project

novel spear
#

I think your teacher would have provided it

#

"Along these lines, I've written a class named TextIO th"

#

See that phrasing there?

kind portal
#

Hey lads, odd question, and I don't want answers like "just learn vim", but how the fuck do I get c++ running on a mac with VScode

#

IIRC I have command line tools installed so the compiler is clang..? Whenever I type in g++ in terminal something with clang comes up

#

Keep in mind I'm quite new to C++

#

and the mac terminal

deep scarab
#

what's the exact message?

visual tapir
#

linux virtual machine

#

and you'll likely resolve all issues

kind portal
#

Yeah no, a VM is not an option

#

120Gb SSD :p

#

@deep scarab

clang: error: no input files```
#

IIRC command line tools are installed

deep scarab
#

well you need to specify the source files you want to compile

kind portal
#

Oh I know, just wondering why I see clang as an answer

#

and not g++ like the numerous tutorials that I've seen hahahah

deep scarab
#

what's the version?

kind portal
#

of?

deep scarab
#

g++ --version

#

g++

kind portal
#

ah one sec

#
Target: x86_64-apple-darwin18.7.0
Thread model: posix```
deep scarab
#

๐Ÿค”

#

maybe g++ is just an alias for clang?

kind portal
#

possibly

#

but hey

#

is this can compile my code

#

then I'm happy

#

So the next question is how does one compile and run in terminal

#

Because I've never done that

deep scarab
#

g++ -Wall -Werror -o output_name source.cpp

#

i'd recommend you use an ide tho

#

like clion

kind portal
#

vim isn't an IDE is it

deep scarab
#

c++ build system isn't very user friendly

#

no vim is just a text editor

kind portal
#

Aha I see

#

right

#

I get that but atm VScode is all I need. Code::blocks seems to be alright though?

#

clion looks nice as well

deep scarab
#

i used code blocks for a bit

#

but then went to visual studio on windows

kind portal
#

It's just that I'm using VS2019 on my Windows machine

#

I'm using the mac at school and such

deep scarab
#

the debugger is the best

kind portal
#

Mate, no idea what that thing is hahahah

#

(the debugger)

#

Or I think I have an idea of what it is?

deep scarab
#

helps you find bugs in your code

kind portal
#

Wait so is it the thing that tells me where I fucked up in the code whenever I try and run?

deep scarab
#

steps through your code line by line

#

no?

#

the compiler will find anything syntactically wrong with your code

kind portal
#

Aha ok

#

Well now I know

#

Thanks

#

Well

#

it compiles

#

and it runs

#

that's all I really need hahahahhah

kind portal
#

hey uhh

#

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit

#

whats this

#

I only added #include <iostream>

dim shard
#

How do i read in a file?

#

in java

dim shard
#

nvm i got it

worthy dirge
#

@kind portal VSCode has C++ intellisense extension. It detects system include automatically after you install it so there won't be include error. You only need to compile by hand without using any build system.

proper gale
#

@kind portal take a look at the cmake build system, it takes care of most of the details for you, its very nice.

deep scarab
#

yeah but why is the command g++ not clang?

proper gale
#

because its a mac.

#

macs use clang

#

its like that for compatability

#

there are a lot of things that you can just compile on mac from linux, where gcc is a thing, so those build scrips are compatable by just making g++ a symbolic link to clang

dim shard
#

hey ok so i am trying to learn how to make a triangle in java

#

what am i doing wrong

fickle galleon
#

anyway to time the execution of a command in cmd?
ie
Timer starts xcopy /s I:\DCIM\100GOPRO\*.* "J:\IMPORT\Drone\%year%\%month% - %day% %name%\" timer ends echo copy took %time%

#

nvm, got it sorted thanks to stackoverflow :D

spare mason
#

Wonder what stack over flow Devs used to make the site

worthy dirge
#

What's the difference between stackoverflow and a normal website

main root
#

id guess some php but im too lazy to look it up ๐Ÿคท

main root
#

hmmm ๐Ÿค”

fringe oasis
#

Anyone know c++?

working on a school project, simple file IO and sorting a list?

I know about c++ but due to my crap memory and my procrastination to practice, I might need some guidance

worthy dirge
#

@fringe oasis Your best guidance: www.cppreference.com

fringe oasis
#

I know>.>
but im super slow in forgetting things and i have to re reasearch evrything and its due tommarow

#

its fine

thanks for the help (not sarcasm)

nocturne galleon
#

i run my own mc server its a 2b2t clone called 6b6t i was super happy when i saw ltt was making a server

#

i live in edmonton lmao

spiral barn
#

Anyone familar with Apple Swift

nocturne galleon
#

nah

#

@spiral barn i like ur acc pic

#

mr rossmann

nocturne galleon
#

Could anyone help answer this for me,

Seeing translucentTB, would it be possible to apply custom blur effects to the start menu and right-click context menu using SetWindowCompositionAttribute (api part of user32.dll) by using the handles,

runic widget
#

Does anyone here have experience using the asyncio module in python? I'm trying to write a minecraft server proxy/load balancer, and I'm confused about how asyncio handles closed connections.

ashen sky
#

Can Minecraft be load balanced?

nocturne galleon
#

Anyone help? So I need three 5V pins on an Arduino and only have one. Can I use any regular port to get 5V or am I fucked?

worthy dirge
#

@nocturne galleon If you know a thing called a bread board

runic widget
#

@last ingot Ok, so my question is about dealing with closed connections. Let say I make a TCP server using asyncio.start_server.

#

Here is a little example code:

import asyncio

async def echo_callback(reader, writer):
    while True:
        message = await reader.read(100)
        if len(message) == 0:
            # this means the connection was closed by the client right?
            break
        else:
            writer.write(message)
            await writer.drain()

asyncio.start_server(echo_callback, host='', port=6969)
proper gale
#

i really dont recommend doing it that way, at all.

runic widget
#

With a normal socket server, you would shutdown and close the socket if you detect a closed connection, but idk how to tell asyncio to do that to the connection

proper gale
#

if asyncio works anything at all remotely similar to boost::asio, which considering they both stand for asyncio, then you are probably gonna break something like that.

runic widget
#

@proper gale how do you do this in boost? They are probably similar in design.

proper gale
#

if it was boost, i could actually answer your questions.

#

i mean, you would do it similarly, but with readsome and asio::write.

runic widget
#

Do you know how coroutines work Python with asyncio?

proper gale
#

i also know how multithreading works with boost::asio, so i could pull it off with much higher performance.

#

though, all you need is a transparent forwarding proxy, which already exists.

#

if you wanted to integrate with the minecraft server, so stuff like ipban still works, i can see why you would want to then.

runic widget
#

Well the problem to me seems to be that Minecraft servers can not be bound to the same port on the same machine. So my idea is a simple python proxy, where a bunch of proxy processes are started and are bound to the same external network facing port, but each proxy forwards data to whatever port a specific minecraft server is bound to locally.

proper gale
#

yea, port translation is nothing special

#

pfsense can do that

#

there are also existing solution for minecraft (bungeecord)

runic widget
#

But I want to do it on one machine, without having to have a pfsense router.

#

Also, the video that LTT put out about load testing the minecraft server used some "Waterfall" thingy that was supposed to do this, but it seemed to fail.

#

That is actually what inspired me to work on this, because it doesn't seem like this should be difficult to do on Linux.

proper gale
#

i mean, python doesnt give a fuck what OS its on

#

and if you are on linux, you can use iptables rules afaik.

runic widget
#

That isn't really true. Sockets don't work the same way in Python on different OSes.

proper gale
#

then someone fucked that module up, real bad.

runic widget
#

Also idk what iptables is lol.

proper gale
#

because boost manages to make it identical on all platforms, from C++

runic widget
#

In windows there is no SO_REUSEPORT option I think, which is the option required to bind multiple sockets to one port.

proper gale
runic widget
#

Actually, I think the difference is that Windows doesn't have separate SO_REUSEADDR and SO_REUSEPORT, they only have the former which allows for both?

#

Oh, I wonder if iptables will work for forwarding to different internal ports? It looks like it should

#

If iptables will work then I wonder why they didn't just use that? lol

proper gale
#

it will

dim shard
#

I have tried everything literally

peak mica
#

hmm

runic widget
#

@dim shard does adding an int to a string turn the int into a string first

#

?

dim shard
#

no i dont think so

peak mica
runic widget
#

So what does this do?

for (int l = 1; l < i; l = l * 2)                                                                                                                         
                                                                                                                                                                                  
                                System.out.print(l + "\t");  
#

You should describe what the output should look like

peak mica
#

While easy, I'm not a fan of single letter variables. Been burned by that more than once

#

Try checking the pastebin to see if that might work for getting the triangle/pyramid you're looking for. It's public code (i.e. not something I made)

dim shard
#

nvm got it

proper gale
#

@dim shard brackets, use them

nocturne galleon
#

neat, so I've got an UNO onto a breadboard but now I'm drawing too much power from usb lol

deep scarab
#

๐Ÿค”

novel spear
#

when the code is so bad you just call it haunted

#

"I dont wanna work on that code, its haunted'

worthy dirge
potent oxide
#

Hey all. Is anyone here familiar with android development with ViewPagers and VideoViews? I have been trying to figure this problem out in which my video does not want to play. The video plays without the ViewPager and the ViewPager I have works for TextViews and for ImageViews. I am unable to figure out what is causing the video not play. If you would like to see the code, just tell me. Thanks for any advice.

deep scarab
#

might have a better chance over at the android devs discord

potent oxide
#

Thanks you

deep scarab
#

the docs?

hidden patrol
#

Opinions anyone: BS in CS w/ a concentration in Software Engineering or BS in IT w/ a concentration in Software Development. The latter I only need 90 credits to complete and the former I need 99 to complete. Interested to hear what those that write code for a living think would be a better track to go with.

visual tapir
#

the fomer will be probably be harder, but if you can take some courses for stuff like AI / Databases / security / whatever you are interested in, and get a job in that field, i think it can be worth it

elder ivy
#

Go with the first one if you can survive it

nocturne galleon
#

I am looking into replacing my rubberduck, anyone got suggestions for breeds, types and colours? I mainly deal with UnrealEd Goblins, so I am not sure if there are specific rubberducks for this use case?

ashen sky
#

@nocturne galleon Lots of rubberduck debugging wearing it out?

nocturne galleon
#

It stopped listening. :/

ashen sky
#

Damn... We call that an apprentice. ๐Ÿ˜‰

nocturne galleon
#

๐Ÿ˜‚

#

My main development things aren't actual code, but, dabbling enough in Blueprint to get frustrated at times. Over all it's enjoyable though. But sometimes.... ouf.

ashen sky
#

Once they've been with us for some time, and gotten wiser, they think they know everything, and tends to stop listening. That is, until they get a problem, and we can just look and say "Told ya so!" ๐Ÿ˜›

nocturne galleon
#

๐Ÿ˜„ So what you are saying is, that the Rubberduck thinks it has become the master.

ashen sky
#

Exactly... Until it realizes, that the master was right all along...

nocturne galleon
#

Well... I've watched enough Star Wars to know that this is not a good situation, think we'll have to pull a good old George on poor Lennieduck.

ashen sky
#

Anyway, colleagues, wearing headphones, also tends to be excelent rubberduck substitutes...

nocturne galleon
#

Well... they might be offended ๐Ÿ˜‚

ashen sky
#

Not where I work. ๐Ÿ˜‰

nocturne galleon
#

๐Ÿ˜„ I work remote so, lucky in that sense I suppose.

ashen sky
#

They usually have noise canceling, and loud music. ๐Ÿ˜‰

nocturne galleon
#

I got a 9 week old daughter, but all she does is blowing raspberries

#

She might be trying to tell me something.

ashen sky
#

In my case they seem to be more offended, when talking to me, and not realizing I can't hear ANYTHING with the music playing. ๐Ÿ˜›

#

Haha.. Yeah.. And not smart enough to just grab your clothes, until you react. ๐Ÿ˜‰

nocturne galleon
#

I might be weird, but I have no music when working. It kills me.

ashen sky
#

Well, it helps shutting out the noise of the office.. But when working at home, on my own projects, I also tend to prefer silence.

#

(Which I ain't getting with the computer fans. ๐Ÿ˜‰ )

nocturne galleon
#

What do you work with/at?

ashen sky
#

I work as a developer and systems administrator, at a small telephone company.

#

Developing mainly on our PBX solutions.

nocturne galleon
#

I work within game development, serious games. Unreal Engine. Currently medical project.

#

(and a small side project at home that I am not sure what will end up as).

ashen sky
#

Games are not something I consider serious. ๐Ÿ˜‰ (However, I am aware of the complexity involved in the development. ๐Ÿ˜‰ )

nocturne galleon
#

Serious games are games intended for other purposes than entertainment. It is a genre. In our case rehabilitation.

ashen sky
#

Ok. Don't know if I would consider that games, even though it's designed as a game. But I guess if designed the right way, they will actually work, and save man hours for the medical staff.

nocturne galleon
#

It's a bit more complicated. We have to build with patient limitations in mind , then develop the experience. We know that VS traditional training you get vastly better results and adherance in training, than without games. Same amount of medical staff though, mostly.

ashen sky
#

VS Training?

nocturne galleon
#

@ashen sky *versus.

ashen sky
#

@nocturne galleon Ahh.. Thought it was a perticular type of training. ๐Ÿ˜‰

dim shard
#

Hey what do u guys think?

#

about this java program?

#

Make sure when you find the path of the file to put double backslashes between drives and folders and the name of the file (\)

nocturne galleon
#

Sorry, I don't think a lot of people will run random java scripts ๐Ÿ˜„

nocturne galleon
#

I assume you're a beginner in programming. Considering this fact, this program is quite neat, but lacks several issues regarding coding style and best practices.

String concatenation in Java is best be done by using StringBuilder for example.
Also, checking for a true/false value using == seems awkward (but works too, of course, so this is more a personal opinion).

Naming your method "RWE" is considered bad style as well, just write "checkForFlags" for example or simply "readWriteExecuteCheck" to make things more clear.

And instead of declaring the variables as static class members, it would be more readable to just declare them inside your main method and pass them as parameters to the other methods.

#

To make a long story short: Just keep going, read more tutorials and read other's people code to learn from it (and don't start copying code from SO, you're learning nothing from that).

And another tip: Post your code as a GitHub Gist f.e. instead of uploading it, so people can just hit the link and read the code instead of downloading it and open it inside an editor ๐Ÿ™‚

dim shard
#

how do i pass them as parameters

nocturne galleon
#

I strongly recommend reading about Java methods and how to use them properly.
To make a long story short:

public static void main(String args[]) {
int foo = 3;
mySuperDuperMethod(foo);
}

public void mySuperDuperMethod(int foo) {
// Now use can use foo
}

vast echo
#

If you declare foo again in the method that takes precedent

#

So donโ€™t do that

#

Thatโ€™s not a comment about the above code, just an additional point on top of that

#

Also depending on the language you need to pay attention to pass by value as compared to pass by reference

true field
proper gale
#

@nocturne galleon dont forget about java's use of static, that code almost works

#

also, @dim shard what the fuck is this? i dont think ive seen this style before. ```java
}

        else {```
vast echo
#

thats not uncommon

proper gale
#

that specifically, i havent seen before

#

ive seen it split a lot, but not that

#

main way ive seen that on multiple lines is like this

}
else
{```
dim shard
#

I like water falling it

#

and

#

its just looks more pleasing to me

worthy dirge
#

๐Ÿ˜† wtf is that else

#

Makes it reads like another block of logic, which actually should be following if closely

quasi plover
#

hey how to do greater than ">" in kotlin

#

it returns an error

#

`while ((x != c) and (v <= b) ) {
val c = findViewById<View>(R.id.user_input)

        validate.setOnClickListener{
            result.setText("")
            if (x < c)
                textview2.setText("give a smaller number")
            else
                if (x >= c)
                    textview2.setText("")`
amber glen
#

oh man kotlin is still alive

quasi plover
#

first time using it

#

i'm only a python beginner

vast echo
#

Your problem is not using braces

#

When you do an if/else without braces only the immediate line is included in that statement

#

So at the bottom when you have any else with an if in it, the line after the if isnโ€™t included in the else and is instead run in the main body

#

Meaning that you have an if without curly brackets or and immediately indented line to the compiler

#

Even though there is an immediately indented line after

#

Because that line isnโ€™t included because the if is the immediately indented line of the else

#

Hopefully what I said makes sense

#

Bottom line, itโ€™s technically possible to use ifโ€™s without braces but just donโ€™t

#

Also in the future post the error you got

#

Makes it easier to figure out whatโ€™s wrong

olive elm
#

Another thing- please name your text view variables

proper gale
#

@vast echo no, thats not hte problem here

#

@quasi plover Kotlin does a lot of null safety at the compilation level, its probably yelling about that, or the types of x and c, without the full code cant say exactly

dim shard
#

any one have any practice problems for reading files in ?

#

(java)

undone parcel
#

hi folks
good evenign
evening /*
does anyone knows java (jsp) and Tomcat ?

burnt bay
#

guys what do i do i cant seem to run this btw the code is what it is cause im learning c#

deep scarab
runic widget
round flame
#

Why does Dell have to be soo silly

#

Locking you from using pci cards in certain slots with an editable hex variable stored on the card (storage HBA)

olive current
#

@burnt bay not sure if anyone answered you, but you need to open Visual Studio Installer (search on Start menu) and add the relevant module for your Visual Studio IDE. Look at the Getting Started docs on Visual Studio's website

burnt bay
#

the thing is tho i have not done anything to it it was fine before

burnt bay
#

what module would that be for c#

#

or is it .net desktop development

proper saddle
#

It would be desktop

#

since you're making a console app

burnt bay
#

it would be what

proper saddle
#

You should have .Net Desktop Development installed

burnt bay
#

the odd thing is tho i didnt do anything with it and it was working before

#

screw it ill install all of them

#

there we go

burnt bay
#

please help ive done it but its not showing do i need to reinstall visual studio entirely

#

the thing to test it is not showing up

#

run it not test it

hidden patrol
#

Anyone proficient with NodeJS? I am able to establish a connection to my server using NodeJS, however when I try to write to the socket to log in, it doesn't seem to work. All incoming data from the server is terminated with \n. I feel as if I'm missing something simple. Several lines are sent from the server before the "LOGIN" is sent. Sample code below:

var net = require('net');

var cclient = new net.Socket();

cclient.connect(8000,'myserver.mydomain.com', function() {
        console.log('Connected');
});

cclient.on('data', function(data) {
        console.log('Received: ' + data);
        //cclient.destroy(); // kill client after server's response
fromsrv(data);

});

cclient.on('close', function() {
        console.log('Connection closed');
});

function fromsrv(indata){
if (indata ===  'LOGIN'){
        cclient.write('connect USER PASS\n');

}

}

Any ideas as to what I am missing here?

#

Feel free to DM me

burnt bay
#

any idea why i dont have a button to launch the code to test it

hidden patrol
#

Did you try F5

#

It looks like your toolbox that has that control was removed.

burnt bay
#

how do i re add it

deep scarab
#

@burnt bay try making a new project?

burnt bay
vernal marsh
#

hey... I am not sure but can some get why this is occuring when installing npm i argon-dashboard-react?

#

but for sanity check .. i defenitly have vs 2019 and 2017 build tools for c++

main root
#

i hate myself...
i had the genius idea of a js frontend
and a java backend

aaaaaaand i hate it but i want it