Timothy
This message was written in the present moment - as you are reading it you will observe it is from the past, and I will see you again in the future. Happy 2020.
MᏫᎻᎯᎷᎷᎬᎠ
Dima
Dima
Nah I thought about date epochs, nevermind
Silvestr
Silvestr
I think it is revolution changes in language
Silvestr
of course if it will be implemented;)
MᏫᎻᎯᎷᎷᎬᎠ
Pattern matching in 23❤️
Silvestr
MᏫᎻᎯᎷᎷᎬᎠ
Modular std
Epochs
Silvestr
I think I miss this feature
MᏫᎻᎯᎷᎷᎬᎠ
what is that?
Read about it
It's like a switch statement level 99999998
MᏫᎻᎯᎷᎷᎬᎠ
Silvestr
ahahah this code looks to crazy:))
MᏫᎻᎯᎷᎷᎬᎠ
...
wat
Anonymous
I'm creating a priority queue of pair<int,string> which stores the elements based on the value of int and if they are equal then compare the string
Anonymous
Here is the code:
``
class cmp
{
public:
bool operator()(pair<int, string> &x, pair<int, string> &y)
{
if (x.first != y.first)
return x.first < y.first;
return x.second < y.second;
}
};
priority_queue< pair<int,string>, vector<pair<int,string>>, cmp> q;
q.push({1, "coding"});
q.push({2, "love"});
q.push({2, "i"});
q.push({1, "leetcode"});
while(!q.empty()){
pair<int,string> p = q.top();
q.pop();
cout<<p.second<<endl;
}
``
Anonymous
Output:
love
i
leetcode
coding
Anonymous
Why is "love" and "i" coming first in the output
Anonymous
My comparator should put the element first which has smaller int and if that clashes then put the smaller string(lexicographically) first
Ghost🔥
Hey does anyone know to properly interface a c++ program with Arduino via serial communication?? I have done it but it is not accurate the tx and rx pins blink when am sending data through the serial port but most of the time the Arduino doesn't do anything I programmed it to do!!
klimi
do you use correct band?
Ghost🔥
Yes!
Mohan
Got it
Angelo
why I didn't find on the internet the bubble sort algorithm fully optimized like this?
I implemented it but everywhere it's half-optimized, this should be fully optimized isn't it?
Angelo
the problem with this optimization is that if we have for example an array long 1000 and the last half [500-999] is already sorted, this algorithm will still check if it's sorted, ye?
instead with mine I put a wall where the last swap has taken place and I check all before that, am I right?
Silvestr
Guys I need a little help, I have a couple of static libraries that I want to merge into one static library. I have write add_library(name STATIC) and then target_link_libraries(name ....). But new library doesn't created
Silvestr
What I am missing?
Ak
Silvestr
I_Interface
Dima
Silvestr
Silvestr
As I understood target_link_libraries doesn't link library immediately into .a file.
Silvestr
For example if I call from some top level Cmake with add_executable(some) then I write target_link_libraries(some mylib) and Cmake for mylib was the next add_library(mylib sources...) target_link_libraries(mylib libs)
Silvestr
So this libs will be linked into some executable not into mylib
Silvestr
Am I right?
Kobby
Thanks Rose
Dima
lol
Amir
Hi,
I'm new to WPF, and this question really bugs me. While there is TableBindingSource and TableAdapter in WinForm, why is there no TableBindingSource in WPF? It makes thing difficult when I could do it easier with TableBindingSource.MoveFirst, etc. Is there any particular reason?
Thanks.
klimi
Anonymous
https://pastebin.com/Ssf4tCGc
Anonymous
Hi. One doubt, I do not understand anything, in the case id_produtor [0,1,2 ...] the id_cons is always 3 and should alternate between 0 and 3. While in the case of consumer cases the id_cons prints well, SOMEONE KNOW?
Anonymous
Ligne 39
Anonymous
Should print between 0 and 3 for the for that is on line 19
Raaj
Pls help ....
I can't understand prims algorithm of shortest path using c language. ....
Pls some one help me...🙏🏻🙏🏻🙏🏻🙏🏻
{CSA}
Hi
{CSA}
I'm an intermediate C programmer
I'm happy to help u guyz
Anonymous
Григорий
Anonymous
Someone can help me?
.
.
Anonymous
{CSA}
{CSA}
It is written in French
Variable names etc...
Anonymous
No, in spanish
{CSA}
So It's hard for me to understand what's going on
Anonymous
😂
{CSA}
If u want translate it, or ask a more specific question
Anonymous
Ligne 51 alwais print me 3
{CSA}
Anonymous
I don't know why.
cout << "ID CONSUMIDOR ----->" << id_cons << endl;
{CSA}
Alright
Anonymous
Why id_cons is always 3 ?!
Григорий
Rather you use two different variables. i and j, for instance.
Anonymous
True ...
{CSA}
I tried to understand the code but no luck...i hope someone helps u
Anonymous
https://pastebin.com/MX3mYpQz
Anonymous
I fixed it but the bug remain. In ligne 7 print well but in 27 not!
Григорий
What is wrong in line 27?
Anonymous
Alwais print 3 number, and need to alternate from 0 to 3
Anonymous
In ligne 39 print well the "ID_CONSUMIDOR"