olli
one of the few points i like about web-dev, you change something in html, save the file and the browser reflects that change instantly. Without the need to recompiling an executable
BinaryByter
looks like you'll hate webcpp :P
olli
No, that's not correct. I fail to see the use-case and the advantages that webcpp offers
BinaryByter
what i meant was that you will likely hate webcpp since its compiled :P
olli
There's no hate involved - only curiosity
olli
another thing, is the executable run each time a user visits the site?
BinaryByter
yes yes
BinaryByter
There's no hate involved - only curiosity
ikik ;) dw, i'M hard to get mad
BinaryByter
yes yes
thats how CGI works
olli
isn't that inefficient as well? In general you spawn a service that runs indefinately, but spawning a new process for every requests seems to add a lot of overhead
BinaryByter
"service that runs indefinitely" how does that service then react to requests?
olli
e.g. registering functions for the various endpoints
BinaryByter
huat?
olli
e.g. as boost asio does
BinaryByter
how does that work?
BinaryByter
I just expose some functions and the server sees which funciton to call?
Anonymous
Please I want to write a program for waste management, I need help
BinaryByter
those requirements get more and more specialised everyday
Anonymous
Hi, can anyone tell me strange behavior of my program?
Anonymous
I'm trying to output a matrix but I'm getting different output
𝐅𝐤𝐫𝟔𝟓
Hey
BinaryByter
Hi, can anyone tell me strange behavior of my program?
hey I have a problem can you help me?
BinaryByter
thats the problem
BinaryByter
without giving us inrofmation we won't be able to help
Anonymous
Oh, yeah I'm just trying to figure out how to take a screenshot 😅
barungh
😂😂😂
Hayk
Hi, can anyone tell me strange behavior of my program?
Hey I have a problem. Could anyone help me? The problem is that I am making a program,but it doesn't work!!!
Anonymous
why i got seg fault ? fprintf(stdout, "UDP Flooder v1.2.8 FINAL by ohnoes1479\nUsage: %s <target IP/hostname> <port to be flooded> <throttle (lower is faster)> <packet size> <number threads to use> <time (optional)>\n", argv[0]);
Hayk
Dude it was a joke. Send us the code...
Anonymous
Anonymous
is there anything wrong? ^
BinaryByter
what is your problem?
Anonymous
Anonymous
this is the o/p i'm getting
BinaryByter
what do you expect?
BinaryByter
what do you set your matrix to?
Anonymous
matrix was an array of integers
Anonymous
i expect 1 2 803 to be printed only once
Anonymous
no idea why it's printed so many times
BinaryByter
why do you expect that?
BinaryByter
well you have loops, so its normal that its printed a lot
Anonymous
because m=1 n=2 occurs only once
BinaryByter
well, what is the content of the matrix?
Anonymous
it has some random integers
BinaryByter
show me your random number generation
olli
*code
Anonymous
I actually took it from a file, but I'm interested to know why this kind of behavior depends on the value of integers in the matrix at all
Anonymous
Any ideas??
olli
can you share your code?
olli
Any ideas??
Your loop looks correct, although not well formated. However we do not know what is executed before and after the loop, without the code we could only guess
Sudhakar
Kk
olli
depending on the size, it is prefered to use sites like pastebin. if the code is not that big (~25 lines) and you decide to post it here please emplace it in ```
Anonymous
Anonymous
did anyone know how to run this program
Anonymous
https://paste.ofcode.org/dbgESAuv2GuJVvtXAxj6PA
Anonymous
it doesn't depend on the matrix it seems somehow the program keeps running 01 etc multiple times
olli
it doesn't depend on the matrix it seems somehow the program keeps running 01 etc multiple times
the for loops are executed multiple times since they are inside this statment for(i = 1;i<30; i+=4){ You basically do for(i = 1;i<30; i+=4) { // // omitted // for (int m = 0; m < 3; m++) { for (int n = 0; n < 3; n++) { printf("%d\t%d\n", m, n); } } }
Avezy
The stuff you print will always be the same as far as I can tell you do Not use the data you read anywhere
olli
The stuff you print will always be the same as far as I can tell you do Not use the data you read anywhere
he reads to arr and uses it in line 35-37 to set values at specific coordinates in the matrix
olli
Got it thx
great 👍🏻
Avezy
Yeah He sets it just thought He actually wants to print the matrix to. Debug it
Ayan
Ayan
Someone plz explain what will be the output
Ayan
Yes when I run the code the answer I am getting is x<=y
Avezy
Implicit type conversion
olli
Yes when I run the code the answer I am getting is x<=y
so the issue here is that one value is signed, whereas the other is unsigned. When you compare them the signed value will be converted to an unsigned one. Since -1 is most likely represented as all bits set, this is the largest unsigned number and hence larger than 1 The following applies in this case http://eel.is/c++draft/expr.rel#3 http://eel.is/c++draft/expr.arith.conv#1.5 http://eel.is/c++draft/conv.integral#2
Anonymous
I have another problem
Anonymous
I have a file which has content of the format
Anonymous
a 12526 3536 726272 a 2526 3636 463637 .. And so on
Anonymous
So each line of the file has starting char 'a' followed by three integers of varying magnitudes
Anonymous
How do I extract the integers from each line?