Click here to Skip to main content
12,246,735 members (55,200 online)

Comments by CPallini (Top 200 by date)

CPallini 9hrs 15mins ago View
   
Thank you.
CPallini 13hrs ago View
   
I guess your culture is right.
CPallini 16hrs ago View
   
You know, great minds... :-)
CPallini 16hrs ago View
   
5.
CPallini 22hrs ago View
   
5.
CPallini 22hrs ago View
   
5.
CPallini 22hrs ago View
   
5.
CPallini 4 days ago View
   
Yes, I know that. My code is just a quick fix of the OP one. Not meant to be a reference.
CPallini 4 days ago View
   
You are right. I just did a bit of clean up.
CPallini 5 days ago View
   
vi.
CPallini 22-Apr-16 2:55am View
   
5.
CPallini 22-Apr-16 2:46am View
   
5.
CPallini 20-Apr-16 3:48am View
   
Thank you.
CPallini 20-Apr-16 3:09am View
   
It is the range-based for (similar to other languages foreach construct), see
http://en.cppreference.com/w/cpp/language/range-for
CPallini 19-Apr-16 16:30pm View
   
5.
CPallini 19-Apr-16 4:54am View
   
Why not? That is just an array.
CPallini 19-Apr-16 3:50am View
   
OK, you tried various libraries. Why are they failing?
CPallini 19-Apr-16 3:09am View
   
5.
CPallini 19-Apr-16 2:46am View
   
You should post the exact error message, in order to get help.
CPallini 18-Apr-16 6:45am View
   
Low level code might be inelegant, however it usually is more efficient than higher level one. Why do you think your code is inefficient?
CPallini 16-Apr-16 12:14pm View
   
Almost 4 years later? :-)
You are welcome.
CPallini 15-Apr-16 10:29am View
   
My 5.
CPallini 14-Apr-16 15:50pm View
   
5.
CPallini 13-Apr-16 16:29pm View
   
5.
CPallini 13-Apr-16 3:19am View
   
Thank you!
CPallini 12-Apr-16 17:20pm View
   
5.
CPallini 12-Apr-16 16:30pm View
   
You are welcome.
CPallini 11-Apr-16 10:23am View
   
Thank you.
CPallini 11-Apr-16 4:49am View
   
You think right. Thank you Richard.
CPallini 7-Apr-16 2:45am View
   
Thank you.
CPallini 6-Apr-16 15:25pm View
   
Thank you.
CPallini 6-Apr-16 15:25pm View
   
Thank you.
CPallini 6-Apr-16 4:21am View
   
You should tell us more about the info available in your list.
CPallini 5-Apr-16 16:34pm View
   
Could you please show some code?
CPallini 5-Apr-16 12:57pm View
   
You are welcome.
CPallini 4-Apr-16 15:54pm View
   
5.
CPallini 31-Mar-16 11:39am View
   
Thank you. :-)
CPallini 25-Mar-16 4:03am View
   
More recent than QBasic?! :-)
My 5.
CPallini 25-Mar-16 3:47am View
   
My 5.
CPallini 25-Mar-16 3:42am View
   
5.
CPallini 21-Mar-16 4:45am View
   
5.
CPallini 21-Mar-16 4:19am View
   
Thank you.
CPallini 17-Mar-16 14:01pm View
   
Thank you.
CPallini 17-Mar-16 6:54am View
   
You are welcome.
CPallini 17-Mar-16 6:01am View
   
See my updated solution.
CPallini 12-Mar-16 4:32am View
   
'Grazie, signore!' :-)
CPallini 11-Mar-16 12:51pm View
   
LOL!
Thank you.
CPallini 11-Mar-16 11:33am View
   
5.
CPallini 10-Mar-16 16:00pm View
   
5.
CPallini 10-Mar-16 4:50am View
   
Please don't give wrong info.
In C++ programming language the ONLY difference between structs and classes is their default access specifiers: structs have public access by default while classes have private access by default.
CPallini 6-Mar-16 5:54am View
   
5.
CPallini 29-Feb-16 12:46pm View
   
My 5.
CPallini 26-Feb-16 2:54am View
   
Sending to... What?
CPallini 23-Feb-16 5:50am View
   
Coding...
Seriously, the question, as it stands, doesn't make sense. What are you searching for?
CPallini 22-Feb-16 3:33am View
   
Good catch, my virtual five.
CPallini 20-Feb-16 9:22am View
   
5.
CPallini 19-Feb-16 18:09pm View
   
It is 'masked C/C++' a sort of meta-language translated to C/C++. String is an object, += is the 'append operator'.
From the FAQ:
"Can I program the Arduino board in C?"
"In fact, you already are; the Arduino language is merely a set of C/C++ functions that can be called from your code. Your sketch undergoes minor changes (e.g. automatic generation of function prototypes) and then is passed directly to a C/C++ compiler (avr-g++). All standard C and C++ constructs supported by avr-g++ should work in Arduino. For more details, see the page on the Arduino build process."
CPallini 19-Feb-16 16:36pm View
   
See here:
https://www.arduino.cc/en/Reference/HomePage
CPallini 19-Feb-16 15:55pm View
   
5.
CPallini 19-Feb-16 15:26pm View
   
Thank you.
CPallini 19-Feb-16 12:44pm View
   
Thank you!
CPallini 19-Feb-16 2:33am View
   
:-)
CPallini 17-Feb-16 16:07pm View
   
5.
CPallini 17-Feb-16 11:31am View
   
My five, because you quoted such an authoritative source. :-D
CPallini 17-Feb-16 11:30am View
   
Thank you.
CPallini 17-Feb-16 5:39am View
   
My 5.
CPallini 17-Feb-16 5:34am View
   
You should report the exact exception message.
CPallini 17-Feb-16 3:00am View
   
Sorry, what are 'columns under a header'?
CPallini 17-Feb-16 2:44am View
   
5.
CPallini 15-Feb-16 4:52am View
   
5.
CPallini 15-Feb-16 2:28am View
   
OK, but you should check, at runtime, using the debugger the actual value of row.Cells["paid"].Value.
CPallini 14-Feb-16 9:29am View
   
I rated five stars his solution.
CPallini 14-Feb-16 9:09am View
   
5.
CPallini 14-Feb-16 9:08am View
   
Your iterative algorithm uses both the array and the array length. A recursive function would need thoese two arguments too.
CPallini 14-Feb-16 6:03am View
   
I would stop using turbo C, it is an obsolete compiler, you are writing non-standard C++ code. There are better free alternatives (for instance Visual Studio Community Edition) or g++ (see http://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows/ for installing g++ on Windows).
Debugging with Visual Studio is very very simple, you don't even need a tutorial. Debugging with gdb is simple too, just read a tutorial.
CPallini 14-Feb-16 5:51am View
   
Yes, you are right.
CPallini 14-Feb-16 5:21am View
   
It is tricky, indeed.
You are welcome
CPallini 14-Feb-16 4:56am View
   
5.
CPallini 14-Feb-16 4:28am View
   
5.
CPallini 14-Feb-16 3:43am View
   
Thank you.
CPallini 13-Feb-16 16:18pm View
   
5.
CPallini 13-Feb-16 15:44pm View
   
Thank you, Sergey.
CPallini 12-Feb-16 15:06pm View
   
Do you really think the OP wishes to compute the angle betweeen two points in the same line? :-)
CPallini 12-Feb-16 4:25am View
   
5.
CPallini 12-Feb-16 3:06am View
   
5.
CPallini 11-Feb-16 15:58pm View
   
5.
CPallini 11-Feb-16 3:24am View
   
5.
CPallini 11-Feb-16 3:24am View
   
5.
CPallini 10-Feb-16 16:52pm View
   
Thank you.
CPallini 10-Feb-16 5:58am View
   
What kind of data is it? As already pointed out, big endian <-> little endian conversion makes sense only for multi-byte data size.
CPallini 10-Feb-16 5:01am View
   
Thanks :-)
CPallini 10-Feb-16 3:30am View
   
Your code has many errors, also, in my opinion your requirement is not stated clearly (or at least your code doesn't seem to fulfill it). Could you please give us more details (possibly an I/O example)?
CPallini 9-Feb-16 18:19pm View
   
You are welcome.
CPallini 9-Feb-16 3:03am View
   
See my updated solution.
CPallini 9-Feb-16 2:37am View
   
Oooooooooooooops :-)
CPallini 8-Feb-16 16:35pm View
   
5.
CPallini 8-Feb-16 16:32pm View
   
See here
http://stackoverflow.com/questions/835753/convert-grayscale-value-to-rgb-representation
The only difference is your image is 16-bit greyscale, so you have to perform an additional preliminary step:
grey = grey >> 8
CPallini 6-Feb-16 15:31pm View
   
Sorry, I cannot understand what your requirement is. Could you please give more details?
CPallini 6-Feb-16 15:14pm View
   
As already suggested by others, C++ doesn't allow to re-define operators on builtin data types. Why don't you use an ordinary function for the purpose?
CPallini 6-Feb-16 4:07am View
   
5.
CPallini 6-Feb-16 4:07am View
   
Thank you.
CPallini 5-Feb-16 2:33am View
   
5
CPallini 4-Feb-16 11:48am View
   
Thank you. :-)
CPallini 3-Feb-16 3:43am View
   
You should describe in greater detail your scenario, in order to get help.
CPallini 2-Feb-16 12:06pm View
   
5.
CPallini 2-Feb-16 12:00pm View
   
You know, your question sounds like: "they gave me the canvas, the brushes, the colors, now, how can I paint the masterpiece?".
CPallini 2-Feb-16 11:56am View
   
5.
CPallini 2-Feb-16 11:56am View
   
5.
CPallini 2-Feb-16 3:21am View
   
5.
CPallini 2-Feb-16 2:54am View
   
What problem do you have with
fs.WriteLine(String.Format(format, CReadConfig.ReadConfigtarget("D:\Projects\MQA_Remap_CSV\config.csv").ToArray()))
?
It should work, actually.
CPallini 1-Feb-16 16:09pm View
   
You are welcome
CPallini 1-Feb-16 16:08pm View
   
Thank you.
CPallini 1-Feb-16 15:37pm View
   
You don want to use any synchronization API, so, what is your idea for achieving synchronization?
CPallini 1-Feb-16 5:37am View
   
Your question is not clear. What do you want to do?
CPallini 1-Feb-16 3:09am View
   
Why aren't you able to debug it? What kind of error are you getting? What is the offending line?
CPallini 29-Jan-16 4:04am View
   
Why don't you use C++ std containers (string and vector)?
CPallini 28-Jan-16 15:58pm View
   
5.
CPallini 26-Jan-16 4:55am View
   
5.
CPallini 22-Jan-16 3:13am View
   
Thank you.
That's a 'Led Mike' (a no more active contributor) quote.
http://www.codeproject.com/Members/led-mike
CPallini 21-Jan-16 16:17pm View
   
5.
CPallini 21-Jan-16 12:14pm View
   
The function is recursive.
CPallini 21-Jan-16 11:56am View
   
You are wrong, the function does return only if a==0 holds.
CPallini 21-Jan-16 3:50am View
   
5.
CPallini 21-Jan-16 2:50am View
   
5.
CPallini 20-Jan-16 12:42pm View
   
Could you please show the code you use for checking the value?
CPallini 20-Jan-16 12:03pm View
   
So, what is the problem?
CPallini 20-Jan-16 12:01pm View
   
Thank you.
CPallini 20-Jan-16 11:39am View
   
5.
CPallini 20-Jan-16 11:39am View
   
Yes, I see.
Thank you.
CPallini 20-Jan-16 6:59am View
   
5.
CPallini 19-Jan-16 16:24pm View
   
5.
CPallini 19-Jan-16 16:23pm View
   
Indeed, 5.
CPallini 19-Jan-16 7:47am View
   
5.
CPallini 19-Jan-16 4:58am View
   
Well, that's another matter, solved by class forward declaration
https://en.wikipedia.org/wiki/Forward_declaration
CPallini 19-Jan-16 4:24am View
   
What is the offending line? What are the input values? Details, details, we need details, after all.
CPallini 19-Jan-16 2:44am View
   
My 5.
CPallini 18-Jan-16 16:17pm View
   
5.
CPallini 18-Jan-16 16:12pm View
   
'Quick and dirty' is a good description, I suppose.
CPallini 15-Jan-16 16:09pm View
   
the data type is for the l-value, the type of the r-value (the expression on the right of the '=' operator) is given by the literal (in this case). If you specify a double literal then a (possibly unintended) implicit cast happens.
CPallini 14-Jan-16 15:59pm View
   
Sorry, fixed now.
CPallini 14-Jan-16 15:47pm View
   
9.81 is a double literal, 9.81f is a float literal, see
en.cppreference.com/w/cpp/language/floating_literal
CPallini 14-Jan-16 15:44pm View
   
My 5.
CPallini 14-Jan-16 13:57pm View
   
5.
CPallini 14-Jan-16 13:56pm View
   
Because you should call fabs (you have to include math.h) instead of abs. See the updated solution.
CPallini 14-Jan-16 11:45am View
   
Thank you.
CPallini 14-Jan-16 7:02am View
   
MODBUS RTU is the serial implementation of the protocol.
CPallini 14-Jan-16 2:39am View
   
Solve what?
CPallini 13-Jan-16 16:27pm View
   
5.
CPallini 13-Jan-16 12:56pm View
   
Have my 5.
CPallini 13-Jan-16 12:50pm View
   
5.
CPallini 13-Jan-16 12:49pm View
   
Thank you.
CPallini 13-Jan-16 7:03am View
   
You are welcome. Don't forget to delete any new-ed object:
https://en.wikipedia.org/wiki/New_and_delete_(C%2B%2B)
CPallini 13-Jan-16 7:02am View
   
Thank you.
CPallini 13-Jan-16 3:37am View
   
Thank you.
CPallini 12-Jan-16 11:52am View
   
You are welcome.
CPallini 12-Jan-16 10:51am View
   
You cannot create a parser in a day (unless you already know how to do it and the grammar is trivial).
CPallini 12-Jan-16 10:48am View
   
Thank you.
CPallini 12-Jan-16 8:48am View
   
As it stands, it cannot crash, in my opinion. What about posting the actual code?
CPallini 12-Jan-16 6:11am View
   
Subtitle to... What?
CPallini 12-Jan-16 4:10am View
   
5.
CPallini 12-Jan-16 3:12am View
   
Thank you.
CPallini 12-Jan-16 2:32am View
   
:-)
5.
CPallini 11-Jan-16 3:55am View
   
You got an exception because you have allocated NO memory for temp.
If you want to show each received character then you have to do something like
int itemp = recbuf[k]; // itemp is 0..255
char temp[3]; // two hexadecimal digits plus string terminator
itoa(itemp, temp); // now temp holds the string representation of recbuf[k].
CPallini 8-Jan-16 16:06pm View
   
Thank you!.
CPallini 8-Jan-16 5:51am View
   
Thank you, Maciej.
CPallini 7-Jan-16 15:57pm View
   
Alternative to GetCursorPos, of course.
CPallini 7-Jan-16 3:58am View
   
My 5.
CPallini 7-Jan-16 3:37am View
   
Did you see this SO question?
http://stackoverflow.com/questions/4210316/opensource-net-jabber-xmpp-server
CPallini 7-Jan-16 3:37am View
   
Deleted
Did you see this SO question?
http://stackoverflow.com/questions/4210316/opensource-net-jabber-xmpp-server
CPallini 7-Jan-16 3:37am View
   
Thank you.
CPallini 5-Jan-16 12:00pm View
   
WOW, thank you!
Happy New Year to you, Sergey!
CPallini 5-Jan-16 8:37am View
   
What do you mean with 'working'? You have to send an e-mail and then receive the answer back to be sure, you know.
CPallini 5-Jan-16 5:51am View
   
5.
CPallini 5-Jan-16 5:39am View
   
Fine. And what is the problem?
CPallini 5-Jan-16 5:24am View
   
You just concatenate (into a new string) the Text property of the textboxes.
CPallini 5-Jan-16 5:10am View
   
5.
CPallini 5-Jan-16 5:09am View
   
5.
CPallini 5-Jan-16 3:48am View
   
I suppose you should provide more details (and code) to get help.
CPallini 5-Jan-16 2:51am View
   
So, what's the question?
CPallini 23-Dec-15 4:04am View
   
You cannot click two buttons at the same time, can you?
CPallini 23-Dec-15 3:04am View
   
Thank you.
CPallini 23-Dec-15 3:02am View
   
And there's nothing wrong, in both solutions. :-)
CPallini 22-Dec-15 4:38am View
   
What kind of error are you getting? What is the offending error line?
The java compiler is way more informative than you.
CPallini 22-Dec-15 3:54am View
   
Tell your operator.
CPallini 18-Dec-15 3:44am View
   
I don't see the mysql_fetch_array call in the posted code.
CPallini 17-Dec-15 5:27am View
   
What is an 'alphanumeric number'?
CPallini 17-Dec-15 3:58am View
   
5.
CPallini 17-Dec-15 3:24am View
   
Naaaaaaaaaaah, it is properly escaped...
Now.
:-)
CPallini 16-Dec-15 5:20am View
   
5.
CPallini 14-Dec-15 13:32pm View
   
Do you realize that your classes 'Knight' and 'Enemy' are identical?
CPallini 14-Dec-15 5:36am View
   
See my updated solution.
CPallini 14-Dec-15 5:33am View
   
In the executable 'current directory'. If you are using Visual Studio, the default is the folder wherein your sources are (you can change that).
CPallini 14-Dec-15 2:48am View
   
5.
CPallini 13-Dec-15 15:36pm View
   
Thank you.
CPallini 11-Dec-15 2:44am View
   
You are reading datat into the array correctly (you have just to handle possible array overrun), you are doing wrong the output job.
CPallini 11-Dec-15 2:32am View
   
Thank you.
CPallini 11-Dec-15 2:32am View
   
My 5.
CPallini 10-Dec-15 3:03am View
   
Ho, code dump. What is the question?
CPallini 9-Dec-15 7:05am View
   
QString provides the toLongLong method.
CPallini 9-Dec-15 6:56am View
   
:-) :thumbsup:

Advertise | Privacy | Mobile
Web01 | 2.8.160426.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid