Click here to Skip to main content
12,754,391 members (30,662 online)

Comments by CPallini (Top 200 by date)

CPallini 13hrs ago View
   
5.
CPallini yesterday View
   
5.
CPallini 2 days ago View
   
No, I didn't realize. Is it important?
CPallini 2 days ago View
   
5.
CPallini 2 days ago View
   
Why do you need C++ for such a task? You could stick with VB, in my opinion.
CPallini 5 days ago View
   
Thank you!
CPallini 5 days ago View
   
Why don't you post ALL the relevant code?
CPallini 16-Feb-17 5:19am View
   
As F-ES Sitecore already suggested, you have to post the full details of the error message, in order to get help.
As a matter of fact, just reading yourself the full details of the error message could put you on the right track.
CPallini 10-Feb-17 4:04am View
   
It looks to me you've already made all the possible steps.
CPallini 10-Feb-17 3:31am View
   
5.
CPallini 10-Feb-17 2:51am View
   
Simply collect the data coming from the serial line, call the Hexdump method and then display the result in the TextBox. you need to se it multiline, see, for instance:
https://msdn.microsoft.com/en-us/library/a5hcydxx(v=vs.110).aspx
CPallini 8-Feb-17 5:41am View
   
The result of the IndexCaln function call would be 5, in such a scenario.
CPallini 7-Feb-17 3:53am View
   
Why should such a method return an int? Is more appropriate to return a DataTable, isn't it?
CPallini 7-Feb-17 3:24am View
   
5.
CPallini 3-Feb-17 4:29am View
   
5.
CPallini 3-Feb-17 4:29am View
   
Yes, it's called cron, see, for instance:
https://www.pantz.org/software/cron/croninfo.html
CPallini 3-Feb-17 3:20am View
   
You should provide us more info about the exception.
CPallini 3-Feb-17 2:58am View
   
Sorry I'm not able to get you. Could you please explain further?
CPallini 2-Feb-17 12:45pm View
   
You are welcome.
CPallini 2-Feb-17 5:57am View
   
Thank you.
Well, usage of redundant values is also a matter of personal taste. Anytime there is a stored dependent value, there is also the potential danger of going 'out-of-sync'. However I acknowledge its debugging usefulness. Another possible use of redundant values, is, of course, for improving execution speed. I consider such a scenarios a bit 'advanced', though. Hence my simple rule for the beginner is 'avoid redundant variables'.
CPallini 2-Feb-17 3:14am View
   
5.
CPallini 20-Jan-17 8:19am View
   
You are welcome.
CPallini 20-Jan-17 3:17am View
   
5.
CPallini 19-Jan-17 13:26pm View
   
Well, of course it is not valid for the general case. However, if you know what you are doing, i.e. you know in advance the operands are bounded, you may safely use it.
CPallini 19-Jan-17 3:02am View
   
You have Googled for. Didn't you get satisfactory answers? Why not?
CPallini 18-Jan-17 4:57am View
   
Find the offending line (use the debugger or simply read carefully the whole error message) and then try to understand why the expected item is missing.
CPallini 18-Jan-17 4:42am View
   
Soooooooooooo lazy, is waiting for an answer for more than 6 years :-D
CPallini 18-Jan-17 3:10am View
   
Please explain better. What is the exact error message (if any)? What is the offending line of code?
CPallini 17-Jan-17 3:20am View
   
It is not clear to me what do you intend to achieve. Could you please elaborate?
CPallini 17-Jan-17 3:11am View
   
How do you 'convert' from std:.string to CString? Are you using a UNICODE build?
CPallini 16-Jan-17 4:24am View
   
5.
CPallini 12-Jan-17 2:56am View
   
I know that.
I just pointed out what I found wrong in the OP code.
CPallini 12-Jan-17 2:55am View
   
Deleted
So?
CPallini 11-Jan-17 8:30am View
   
5.
CPallini 10-Jan-17 6:20am View
   
5.
CPallini 10-Jan-17 6:09am View
   
You are welcome.
CPallini 9-Jan-17 6:49am View
   
5.
Sorry, couldn't resist.
CPallini 30-Dec-16 4:46am View
   
5.
CPallini 30-Dec-16 4:45am View
   
5.
CPallini 30-Dec-16 4:45am View
   
5.
CPallini 30-Dec-16 4:45am View
   
5.
CPallini 29-Dec-16 8:45am View
   
Which is the offending line?
CPallini 29-Dec-16 3:35am View
   
5.
CPallini 28-Dec-16 15:57pm View
   
You question is not clear. Could please detail your scenario?
CPallini 28-Dec-16 15:55pm View
   
Exactly. 5.
CPallini 28-Dec-16 6:51am View
   
Then you need at least 120000 baud. I suppose 230400 baud would do the trick. Assuming the device at the other side of the serial line is able to communicate at such a speed.
CPallini 28-Dec-16 6:38am View
   
Assuming your message is 96 bytes you need a at least a 960000 baud serial communication.
You have also to check the acquisition speed of your sensors.
CPallini 28-Dec-16 6:38am View
   
Deleted
Assuming your message is 96 bytes you need a at least a 960000 baud serial communication.
You have also to check the acquisition speed of your sensors.
CPallini 28-Dec-16 6:28am View
   
See my updated solution.
CPallini 28-Dec-16 3:20am View
   
5.
CPallini 28-Dec-16 2:59am View
   
5.
CPallini 27-Dec-16 5:26am View
   
5.
CPallini 27-Dec-16 5:26am View
   
5.
CPallini 27-Dec-16 3:28am View
   
And...... What is the problem?
CPallini 27-Dec-16 3:11am View
   
5.
CPallini 27-Dec-16 3:10am View
   
5.
CPallini 27-Dec-16 2:54am View
   
Thank you.
CPallini 24-Dec-16 11:14am View
   
On my system 5.6 is 0x40b33333, which problably resembes 5.5999..
However 5.6*10 is 0x42600000 which is 56 (exponent 6, mantissa = 0.111B)
That is, according to IEEE754 rules, the result is rounded.
CPallini 24-Dec-16 11:06am View
   
In the expression, the computation shall happen this way:
an implicit conversion to float
http://en.cppreference.com/w/c/language/conversion
of all the operands is performed. Eventually the result is cast to int.
CPallini 22-Dec-16 5:02am View
   
"i have a code but not run correctly"
It is poorly informative. Please detail the problem.
CPallini 22-Dec-16 3:44am View
   
5.
CPallini 21-Dec-16 3:09am View
   
5.
CPallini 20-Dec-16 2:27am View
   
You should try harder, in my opinion.
CPallini 20-Dec-16 2:26am View
   
Sorry, I've updated my answer. 'n' was a mistype for 'next'. 'r' is, together with 'p' and 'q', an auxiliary pointer.
CPallini 19-Dec-16 5:22am View
   
I don't get you: the floor has heights, good. There is a sphere coming down, good. What's the role of the cubes?
CPallini 18-Dec-16 13:06pm View
   
Short and to thew point. :-)
CPallini 18-Dec-16 11:40am View
   
See my updated solution.
CPallini 15-Dec-16 17:25pm View
   
Thank you.
CPallini 15-Dec-16 17:25pm View
   
5 as well. :-)
CPallini 15-Dec-16 9:24am View
   
:-D
CPallini 15-Dec-16 5:40am View
   
5.
CPallini 14-Dec-16 2:42am View
   
How could we possibly help, without actually seeing your code?
CPallini 14-Dec-16 2:21am View
   
Inside an if-else if chain conditions are mutually exclusive.
Yes I keept it simple. For anything but a bare return statement, you need to change the array type as you suggested.
CPallini 14-Dec-16 2:21am View
   
Deleted
Inside an if-else if chain conditions are mutually exclusive.
Yes I keept it simple. For anything but a bare return statement, you need to change the array type as you suggested.
CPallini 13-Dec-16 5:54am View
   
Thank you.
CPallini 13-Dec-16 2:27am View
   
You should shouw the offending line of code as well.
CPallini 12-Dec-16 16:35pm View
   
Exactly!
My virtual 5.
CPallini 12-Dec-16 8:44am View
   
To see another console you have to launch a new process.
CPallini 12-Dec-16 8:42am View
   
5.
CPallini 12-Dec-16 6:10am View
   
There is no 'next screen' in a console application. What is wrong with your current program?
CPallini 12-Dec-16 4:55am View
   
5.
CPallini 10-Dec-16 16:13pm View
   
Well, I know that.
In my blundering mind I assumend it was a requirement (return 0 if no GCD > 1 was found). I read all the revisions of the requirements and can confirm there is no trace of such a costraint. Probably I should stop taking hallucinogens :-D
CPallini 10-Dec-16 5:12am View
   
Well, I just misunderstood the requirements. A return 1; fixed it, thanks.
CPallini 9-Dec-16 15:45pm View
   
Good points. :thumbsup:
CPallini 9-Dec-16 7:56am View
   
I'm pretty sure that wasn't exactly the question.
CPallini 9-Dec-16 7:45am View
   
What?!
Could you please explain it better?
CPallini 9-Dec-16 5:22am View
   
I see no alternative to looping.
CPallini 9-Dec-16 2:48am View
   
Wow, you are using 'goto' in a C++ program.
CPallini 9-Dec-16 2:41am View
   
I strongly doubt the first version is correct. Both pieces of your code looks flawed to me.
CPallini 9-Dec-16 2:38am View
   
Thta's it. 5.
CPallini 8-Dec-16 16:26pm View
   
You have to be sure. Should the divider be included or not in the checksum computation?
CPallini 8-Dec-16 15:42pm View
   
What does the dot ('.') stand for? What does the pipe ('|') stand for?
CPallini 7-Dec-16 5:30am View
   
5.
CPallini 7-Dec-16 3:16am View
   
Thanks.
CPallini 6-Dec-16 15:51pm View
   
5.
CPallini 6-Dec-16 4:23am View
   
As before, you should investigate further, looking at the inner exceptions.
Probaly you used a duplicate value (I do not see the value you assigned to newCustomer.customer_id in your code).
CPallini 6-Dec-16 4:10am View
   
No problem at all.
CPallini 6-Dec-16 4:10am View
   
It depends on its definition. If it is automatically added by the database engine (e.g. an auto-increment field) then you have to leave it out. On the other hand, if it is not automatically assigned by the DB then you have to pass it as parameter (properly: you have to meet primary key costraints, e.g. uniqueness).
CPallini 6-Dec-16 4:01am View
   
5.
CPallini 6-Dec-16 3:40am View
   
Well that makes sense. You didn't provide such a parameter. You either provide it or drop it from the command text (if it is automatically assigned by the database engine).
CPallini 6-Dec-16 3:25am View
   
Are you sure no more details (e.g. inner exception messages) are provided?
Could you try to run the same command in the MySQL client console?
CPallini 6-Dec-16 2:51am View
   
That's it. 5.
CPallini 4-Dec-16 3:39am View
   
5.
CPallini 3-Dec-16 16:11pm View
   
Indeed. 5.
CPallini 2-Dec-16 13:54pm View
   
Indeed lex & bison were (are) fascinating.
:-)
CPallini 2-Dec-16 9:27am View
   
syntax is not 100% correct (comments should written %{ ... %})
However the major problem of your code, is that it replaces every instance of a tab with four space. This is not the requested behavior (as far as I understand).
CPallini 2-Dec-16 8:59am View
   
5.
CPallini 2-Dec-16 3:05am View
   
There is NO question in your post.
CPallini 2-Dec-16 2:59am View
   
5.
CPallini 1-Dec-16 8:55am View
   
Why do you have to implement it in the header file?
CPallini 1-Dec-16 8:48am View
   
what is the actual type of patientDiagnosisCode?
CPallini 1-Dec-16 5:50am View
   
5.
CPallini 28-Nov-16 5:47am View
   
PASCAL triangle written in C++?
That's heresy. I suppose you are allowed to refuse doing such a homework.
CPallini 23-Nov-16 2:57am View
   
5.
CPallini 22-Nov-16 16:14pm View
   
5.
CPallini 22-Nov-16 5:31am View
   
As far as I know, in the client/server architecture there is no 'gateway application': the client(s) send requests remotely (but directly) to the server. What is the purpose of such a 'gateway application' in your scenario?
CPallini 22-Nov-16 3:23am View
   
5.
CPallini 21-Nov-16 12:07pm View
   
5.
CPallini 21-Nov-16 11:55am View
   
See, for instance
http://stackoverflow.com/questions/19775851/ability-to-find-winform-control-via-the-tag-property
CPallini 21-Nov-16 11:15am View
   
5.
CPallini 21-Nov-16 11:05am View
   
:-) 5.
CPallini 18-Nov-16 8:52am View
   
You are welcome.
CPallini 17-Nov-16 10:51am View
   
My virtual 5.
CPallini 16-Nov-16 15:52pm View
   
5.
CPallini 16-Nov-16 13:10pm View
   
"What good's a computerized nose" :-)

See
http://www.cplusplus.com/reference/ios/ios/good/
CPallini 14-Nov-16 4:25am View
   
The code you posted doesn't shed light on your question.
CPallini 12-Nov-16 13:26pm View
   
5.
CPallini 12-Nov-16 13:26pm View
   
5.
CPallini 10-Nov-16 14:03pm View
   
Yes thrusted, you know, boosted, weaponed :-D
CPallini 9-Nov-16 9:07am View
   
My 5.
CPallini 9-Nov-16 8:13am View
   
As stated, the problem is very tricky. Are you sure you reported the exact requirements? What kind of libraries and functions are you allowed to use?
CPallini 9-Nov-16 5:20am View
   
Sorry?!
CPallini 9-Nov-16 4:25am View
   
Technically, all you need is to add the prototype. :-)
CPallini 9-Nov-16 4:15am View
   
5.
CPallini 7-Nov-16 5:38am View
   
5.
CPallini 7-Nov-16 4:39am View
   
Don't mix C++ streams with C stdio, unless you really know what you are doing, see, for instance:
http://www.drdobbs.com/the-standard-librarian-iostreams-and-std/184401305
CPallini 7-Nov-16 4:38am View
   
5.
CPallini 3-Nov-16 9:19am View
   
5.
CPallini 2-Nov-16 10:45am View
   
Because x,y are integer variables.
CPallini 24-Oct-16 5:14am View
   
5.
CPallini 21-Oct-16 3:31am View
   
What is your platform (usually a PC doesn't have a SPI peripheral, AFAIK)?
CPallini 20-Oct-16 8:06am View
   
You are welcome.
CPallini 20-Oct-16 5:52am View
   
I acknowledge your superior solution.
CPallini 20-Oct-16 5:51am View
   
Thank you.
CPallini 20-Oct-16 5:51am View
   
Well, Knowledge brings a superior solution, have my 5.
CPallini 20-Oct-16 5:50am View
   
Right! Thank you.
CPallini 20-Oct-16 3:49am View
   
Your code runs fine on my Lubuntu 16 box. I can happily move the '#' in the blank area.
CPallini 19-Oct-16 16:25pm View
   
What do you didn't understand, exactly?
Did you understand the requirements?
CPallini 19-Oct-16 6:34am View
   
5.
Experimental evidence :-)
CPallini 19-Oct-16 6:07am View
   
5.
CPallini 19-Oct-16 6:07am View
   
5.
CPallini 19-Oct-16 6:07am View
   
5.
CPallini 19-Oct-16 3:17am View
   
5.
CPallini 18-Oct-16 11:50am View
   
You are welcome.
CPallini 18-Oct-16 4:40am View
   
5.
CPallini 18-Oct-16 4:39am View
   
5.
CPallini 17-Oct-16 3:15am View
   
5.
CPallini 14-Oct-16 17:39pm View
   
Thank you, Maciej!
CPallini 14-Oct-16 17:00pm View
   
Thank you!
CPallini 14-Oct-16 16:50pm View
   
5.
CPallini 14-Oct-16 16:41pm View
   
5.
CPallini 14-Oct-16 15:53pm View
   
What do you mean for binary to octal conversion?
Is it, for instance 00100111->047?
Note: binary and octal are just number representations (that is a string should be expected by the user).
CPallini 14-Oct-16 8:09am View
   
"i try using java but not runing"
Is poorly informative. You should better detail your scenario, in order to get help.
CPallini 14-Oct-16 5:48am View
   
5.
CPallini 13-Oct-16 7:40am View
   
Google.
https://www.google.co.uk/#q=android+app+how+to+retrieve+data+from+a+server
CPallini 13-Oct-16 4:23am View
   
5.
CPallini 13-Oct-16 3:23am View
   
5.
CPallini 12-Oct-16 5:38am View
   
My virtual 5.
CPallini 12-Oct-16 4:06am View
   
You are welcome.
CPallini 12-Oct-16 4:06am View
   
Thank you.
CPallini 12-Oct-16 4:01am View
   
5.
CPallini 10-Oct-16 5:21am View
   
In your code. :-)
CPallini 8-Oct-16 13:32pm View
   
:-)
CPallini 8-Oct-16 13:16pm View
   
Distance, usually, is defined as commutative.
CPallini 8-Oct-16 9:29am View
   
5.
CPallini 8-Oct-16 9:23am View
   
:-)
Hey Richard, why did you post two solutions?
CPallini 7-Oct-16 16:50pm View
   
Nice.
CPallini 7-Oct-16 15:54pm View
   
That means you have to consider wrap around. See my solution.
CPallini 7-Oct-16 10:51am View
   
I tried your program
input: W, A
output: 22
It looks correct, to me.
CPallini 7-Oct-16 10:40am View
   
What's exactly your trouble with?
Aren't you able to collect the user input in the bidimensional array?
Aren't you able to find the minim length of the entered strings?
CPallini 7-Oct-16 10:37am View
   
5.
CPallini 7-Oct-16 10:37am View
   
5.
CPallini 7-Oct-16 10:28am View
   
Exactly! :-)
CPallini 7-Oct-16 6:34am View
   
OOOOOOOOOOOOPS!
Thank you.
CPallini 7-Oct-16 3:29am View
   
Why would you use two columns of a table for storing the same information?
CPallini 4-Oct-16 9:26am View
   
Deleted
By the way, though correct, the following line:
Age = Age++;
is pretty ugly.
CPallini 4-Oct-16 9:24am View
   
You should run your code against the sample input and check why it doesn't work as expected. That is, please debug your code.
CPallini 3-Oct-16 15:38pm View
   
:-)
CPallini 3-Oct-16 6:59am View
   
I would start trying to generate the required random IDs (step 0).
CPallini 3-Oct-16 6:21am View
   
OOOOOOOOOOOOOOOOPS.... :-O
Thank you.
CPallini 3-Oct-16 4:26am View
   
In fact, there's a recursive call.
CPallini 3-Oct-16 3:58am View
   
What is the problem?
CPallini 3-Oct-16 3:13am View
   
5.
CPallini 30-Sep-16 16:23pm View
   
Thank you.
CPallini 29-Sep-16 7:26am View
   
Thank you!
CPallini 29-Sep-16 3:44am View
   
5.
CPallini 28-Sep-16 4:24am View
   
5.
CPallini 23-Sep-16 3:33am View
   
Sorry?!
Please elaborate.
CPallini 23-Sep-16 3:10am View
   
Could you please elaborate? For instance what OS are you developing for?
CPallini 22-Sep-16 8:33am View
   
5, of course.

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