Anonymous
https://pastebin.com/TnxgrJEr
Anonymous
whats wrong in array rotation algorithm
Anonymous
practicing juggling algo.
Nils
I'll definitely try that
Harsh
https://pastebin.com/TnxgrJEr
If i rotate by 8 what'll happen?
Mohammad
Hello friends Does anyone have a php programming group? Thank you for sending me
Mohammad
Why was I reported?
Asuna 🍓
Why was I reported?
because offtopic :(
Harsh
k <= n
Use %7 in case
Anonymous
Use %7 in case
oh! but shouldn't presented algo have to work for k=3
Anonymous
rude
I already told him that it's offtopic like an hour ago
Harsh
oh! but shouldn't presented algo have to work for k=3
TBH i didn't understand the algorithm I've a simpler one that I used in codemonk
Anonymous
can get that
Engineer
Would a Qt C++ GUI library question here be valid?
M.Khorram
Would a Qt C++ GUI library question here be valid?
Also, there is another dedicated group for Qt
Engineer
I'll check it out thanks!🤓
Anonymous
Can you send your clients code?
My problem is if i restart server, but clients still work, then when server starts, it have too many connections, and I cant identify client with its id... void __fastcall Tfm::FormClose(TObject *Sender, TCloseAction &Action) { try { if(client->Active) client->Socket->Disconnect( client->Socket->SocketHandle ); } catch (...) { } client->Active=0; } //--------------------------------------------------------------------------- void __fastcall Tfm::FormCreate(TObject *Sender) { client->Address="127.0.0.1"; client->Port=8000; client->Active=1; } //--------------------------------------------------------------------------- void __fastcall Tfm::Timer1Timer(TObject *Sender) { if (!client->Active) client->Active=1; }
Anonymous
id==SocketHandle
Anonymous
Talula
kind of
What do you mean Kind of? So what is it?
Anonymous
What do you mean Kind of? So what is it?
This is Embarcadero C++ Builder Tokyo 10.4
Talula
This is Embarcadero C++ Builder Tokyo 10.4
That is what I said C++ Builder.
Talula
You should have a way to detect connection, if it's not connection, have a global object and disconnect it.
Talula
It'll never get signal of disconnect because it doesn't time out at all, make sure you force disconnect if there is no communication established in a certain time... or check if there is any property for timeout.
أسامة
what its task anyway, the timer in your client?
Anonymous
Talula
This is a problem with C++ Builder, Delphi and Lazarus.
Anonymous
when i finish this project I'll move to visual!
Anonymous
Visual what? C#?
Probably Studio
Anonymous
Visual what? C#?
visual c++!
Talula
Probably Studio
But if he thinks Visual Studio C++ is like C++ Builder... then I think he's gonna be in a big shock.
Talula
visual c++!
VS C++ is nothing like C++ Builder, there is nothing Visual about Visual C++
Talula
visual c++!
Use C#, which is like C++ Builder.
Anonymous
Use C#, which is like C++ Builder.
I very appreciate your advice, thank you.
Nils
What is a bus error? 🤔
Aniket
Means you are trying to access memory which is not allocated in your process
Luk
/warn
Arsenii
/warn
Arsenii
Oops)
Dima
Bruh
Dima
klimi
hf
Anonymous
Hi my friends
Anonymous
Can i create rest api with c?
Andrew
Can i create rest api with c?
yes but it would be complicated, better with c++
Anonymous
yes but it would be complicated, better with c++
I'm looking for a higher speed
Andrew
C++ is okay , no much diffrence
Andrew
but if you want C
Andrew
https://github.com/babelouest/ulfius
olli
no, an array of T can decay into a pointer to T, dereferencing yields T and not T[]
olli
you pass char by value but not array of char Sorry, but I thought the question was whether an array can be passed by value?
olli
Yes, I think his point was that you can't pass an array by value.
olli
That's why we should use std::array
you could also do struct Dummy { int array[20]; };
Anonymous
No
olli
Yes, int can be passed by value, you provided a good example of passing a char by value.
Anonymous
int holds sizeof(int) bytes of memory
olli
on your system most likely it does, but it depends
Anonymous
It's a char array
Anonymous
sizeof(char[4]) == 4
Anonymous
Arrays are stupid
Anonymous
Kernighan and Ritchie decided so
Anonymous
It's a design flaw or feature of C