Click here to Skip to main content
11,438,782 members (75,274 online)

Comments by CPallini (Top 200 by date)

CPallini at 11 hrs ago View
   
Thank you very much.
CPallini at 11 hrs ago View
   
Thak you.
I tried my best in order to remove them. In fact they don't even appear in the code while I'm editing, I see them only after the submit.
CPallini at 12 hrs ago View
   
Thank you.
You are right. Using static methods is a practical way to do it.
CPallini at 15 hrs ago View
   
5.
CPallini at yesterday View
   
5.
CPallini at yesterday View
   
5.
CPallini at yesterday View
   
5
CPallini at 2 days ago View
   
Thank you.
CPallini at 2 days ago View
   
Little balancing here, my 5.
CPallini at 2 days ago View
   
5.
CPallini at 2 days ago View
   
:-)
CPallini at 2 days ago View
   
Why shouldn't it work?
CPallini at 29-Apr-15 15:35pm View
   
Arrays don't provide such bookkeeping, you have to implement yourself (or use a container class).
CPallini at 29-Apr-15 15:34pm View
   
True, 5.
CPallini at 29-Apr-15 15:34pm View
   
5.
Yes, expecially C++ standard library containers are much better than MFC ones.
CPallini at 29-Apr-15 15:31pm View
   
Someone :-) gave you the right link. Study the algorithm and implement it yourself.
CPallini at 29-Apr-15 12:51pm View
   
I think I used that, once.
CPallini at 29-Apr-15 9:00am View
   
5.
CPallini at 29-Apr-15 5:04am View
   
You possibly are having troubles with the Integrated Development Environment.
CPallini at 29-Apr-15 5:03am View
   
5.
CPallini at 29-Apr-15 5:03am View
   
BTW, My 5.
CPallini at 29-Apr-15 5:03am View
   
5.
CPallini at 29-Apr-15 5:03am View
   
"You're unlikely to find a C compiler that doesn't also do C++."
LCC, PellesC, TCC, for instance.
CPallini at 27-Apr-15 5:50am View
   
5.
CPallini at 24-Apr-15 11:59am View
   
Thank you Sergey.
CPallini at 24-Apr-15 11:59am View
   
Then it's time to learn. You cannot limit yourself to Visual Basic.
CPallini at 23-Apr-15 3:25am View
   
5.
CPallini at 22-Apr-15 3:07am View
   
Good catch, my 5.
CPallini at 22-Apr-15 3:06am View
   
You are welcome.
CPallini at 19-Apr-15 10:59am View
   
Uh?! What are you talking about?
CPallini at 17-Apr-15 9:11am View
   
And what is the logical rule, behind this ordering?
CPallini at 17-Apr-15 2:57am View
   
What is the expected output (from given input)?
CPallini at 15-Apr-15 12:50pm View
   
5.
Didn't know about the article. Time to read. :-)
CPallini at 15-Apr-15 6:27am View
   
Deleted
What do you see on the scope? There should be a single pulse, like:
<pre>
______ _______________________________________________
|_____|
</pre>
that is high->low transition, 25 msec low (start bit + 4 zero-bits) and then low->high transition ( 4 one-bits, stop bits and line idle)
See:
http://en.wikipedia.org/wiki/Asynchronous_serial_communication
CPallini at 15-Apr-15 5:57am View
   
And what are the problems?
CPallini at 14-Apr-15 8:51am View
   
What do you mean, exactly, with 'C#'s Graphics library not able to create HD image' ?
CPallini at 14-Apr-15 5:53am View
   
5.
CPallini at 13-Apr-15 7:42am View
   
Hence go on, go on..
What is your doubt?
CPallini at 10-Apr-15 5:53am View
   
What is 'tick interval' in your expectations?
CPallini at 9-Apr-15 7:50am View
   
5.
CPallini at 9-Apr-15 6:20am View
   
5.
CPallini at 9-Apr-15 5:18am View
   
5.
CPallini at 9-Apr-15 3:46am View
   
5.
CPallini at 9-Apr-15 3:13am View
   
5.
CPallini at 8-Apr-15 12:57pm View
   
5.
CPallini at 8-Apr-15 12:35pm View
   
You are welcome.
CPallini at 8-Apr-15 12:26pm View
   
My 5.
CPallini at 8-Apr-15 12:26pm View
   
My 5.
CPallini at 8-Apr-15 12:26pm View
   
Thank you.
CPallini at 8-Apr-15 12:26pm View
   
Thanks.
CPallini at 8-Apr-15 3:30am View
   
Indeed. :-)
CPallini at 8-Apr-15 3:29am View
   
Check if the CurrencyTBL actually exists. You might have mistyped it.
CPallini at 8-Apr-15 2:57am View
   
My 5.
CPallini at 8-Apr-15 2:53am View
   
It is not clear, could you please elaborate?
CPallini at 7-Apr-15 3:11am View
   
What is 'one time password program'?
CPallini at 1-Apr-15 8:42am View
   
What is expected as 'read data'? Have you a loopback?
CPallini at 31-Mar-15 13:06pm View
   
5
CPallini at 31-Mar-15 11:55am View
   
5.
CPallini at 31-Mar-15 11:47am View
   
Thank you. :-)
CPallini at 31-Mar-15 8:58am View
   
People are not willing to learn anymore...
Have my 5.
CPallini at 31-Mar-15 4:11am View
   
Beacuse abstract class is not enough abstract (or, put in another way, interfaces are sexy).
CPallini at 31-Mar-15 4:10am View
   
5.
CPallini at 31-Mar-15 3:50am View
   
5.
CPallini at 30-Mar-15 8:54am View
   
5.
CPallini at 30-Mar-15 5:51am View
   
Of course it is possible. However it is not clear what do you really want to do.
CPallini at 29-Mar-15 10:17am View
   
My virtual 5.
CPallini at 29-Mar-15 10:17am View
   
Exactly, 5.
CPallini at 28-Mar-15 17:50pm View
   
5.
CPallini at 25-Mar-15 4:40am View
   
5.
CPallini at 24-Mar-15 7:58am View
   
You are welcome.
CPallini at 24-Mar-15 2:55am View
   
You are welcome.
CPallini at 22-Mar-15 4:44am View
   
That doesn't look C++.
CPallini at 19-Mar-15 9:02am View
   
5.
CPallini at 19-Mar-15 6:33am View
   
You can also directly fill the combo box items with CString values. However what is your trouble about?
CPallini at 18-Mar-15 16:29pm View
   
Very strange, I tested the code using g++.
CPallini at 18-Mar-15 5:45am View
   
You are welcome.
CPallini at 18-Mar-15 4:55am View
   
5.
CPallini at 18-Mar-15 4:55am View
   
5.
CPallini at 17-Mar-15 9:01am View
   
5.
CPallini at 16-Mar-15 16:43pm View
   
Way too good man, thank you anyway :-)
CPallini at 16-Mar-15 13:42pm View
   
5.
CPallini at 16-Mar-15 10:07am View
   
Nice. :-)
CPallini at 16-Mar-15 10:07am View
   
Have my 5 :-)
CPallini at 16-Mar-15 6:05am View
   
5.
CPallini at 15-Mar-15 10:56am View
   
Thank you.
CPallini at 15-Mar-15 7:45am View
   
Stated that way, it doesn't make sense. Load a fragment of the file the user (and your text box) is able to deal with.
CPallini at 15-Mar-15 7:42am View
   
My 5.
CPallini at 15-Mar-15 7:39am View
   
Please note, your second point is incorrect.
CPallini at 12-Mar-15 17:10pm View
   
Thank you.
CPallini at 12-Mar-15 14:52pm View
   
I suppose you are also wasting a huge amount of your (and our) time.
CPallini at 11-Mar-15 13:15pm View
   
Well, the requirements are pretty clear, have fun with the actual implementation.
CPallini at 10-Mar-15 7:11am View
   
You are welcome.
CPallini at 10-Mar-15 6:51am View
   
According to the documentation,
https://www.sqlite.org/lang_droptable.html
you should write
private static final String DROP_TABLE= "DROP TABLE IF EXISTS " + TABLE_NAME;
CPallini at 10-Mar-15 6:18am View
   
you didn't do what I suggested. You have to put a trailing blank in the first string, that is you should write "CREATE TABLE ". The underlying reason is keywords MUST be separated from identifiers.
CPallini at 9-Mar-15 17:27pm View
   
What is, in your intentions, the purpose of the addNodeBottom function? It is not clear to me (and as it stands, it is probably wrong).
CPallini at 9-Mar-15 12:44pm View
   
Thank you, Sergey.
CPallini at 7-Mar-15 15:11pm View
   
5.
CPallini at 7-Mar-15 15:11pm View
   
(virtual) 5.
CPallini at 5-Mar-15 13:54pm View
   
Thank you, Sergey.
CPallini at 5-Mar-15 3:21am View
   
Silly question: are the two environments equivalent?
CPallini at 3-Mar-15 6:45am View
   
Well, aren't you happy when your function succesfully terminates?
CPallini at 3-Mar-15 6:37am View
   
Nope. CopyFile should do its useful stuff and terminate. If it must run continuosly (e.g. copying an infinite list of files) then it should implement an infinite loop.
CPallini at 3-Mar-15 6:37am View
   
Deleted
Nope. CopyFile should do its useful stuff and terminate. If it must run continuosly (e.g. copying an infinite list of files) then it should implement an infinite loop.
CPallini at 3-Mar-15 6:10am View
   
You don't like infinite loops, do you?
CPallini at 2-Mar-15 7:04am View
   
Well, did you have a look at the xlslib test files?
CPallini at 1-Mar-15 10:20am View
   
Please elaborate.
CPallini at 27-Feb-15 2:24am View
   
5.
Of course you don't need std::string to do
char string[] = "Programming is EPIC";
string[0] = 'K';
BTW you should replace the underscore with the scope operator ::
CPallini at 27-Feb-15 2:23am View
   
5.
The second one is far better, in my opinion.
CPallini at 26-Feb-15 13:35pm View
   
What information do you want to store in the array?
CPallini at 26-Feb-15 13:24pm View
   
Simple and to the point, 5. :-)
CPallini at 26-Feb-15 13:13pm View
   
5.
CPallini at 26-Feb-15 13:10pm View
   
What do you want to share?
CPallini at 26-Feb-15 6:31am View
   
Could you please elaborate?
CPallini at 26-Feb-15 4:07am View
   
I see a pattern there...
CPallini at 26-Feb-15 2:47am View
   
5.
CPallini at 26-Feb-15 2:30am View
   
Correct, 5.
CPallini at 26-Feb-15 2:29am View
   
It works like a charm on my system. Could you please provide the original bitmap?
CPallini at 26-Feb-15 2:28am View
   
Thank you.
CPallini at 25-Feb-15 15:43pm View
   
Right. Thank you.
CPallini at 25-Feb-15 15:43pm View
   
5.
CPallini at 24-Feb-15 5:06am View
   
You are trying to read the end of line in a binary file. That's not a good idea.
CPallini at 24-Feb-15 3:36am View
   
Thank you.
CPallini at 24-Feb-15 3:36am View
   
You are welcome.
CPallini at 23-Feb-15 15:41pm View
   
5.
CPallini at 23-Feb-15 15:41pm View
   
5.
CPallini at 22-Feb-15 10:35am View
   
Thank you, Sergey.
CPallini at 22-Feb-15 10:21am View
   
My code doesn't handle edge conditions (for instance it fails if a word has no vowels). This is left to you as an exercise. :-)
CPallini at 22-Feb-15 10:20am View
   
Because is faster. Passing an object (like a std::string instance) by value (like you did) is slower than passing it by reference (using the '&' operator). Adding the 'const' specifier means you are not going to modify the passed object.
Please note the performance difference is irrelevant in such a simple case.
CPallini at 22-Feb-15 6:49am View
   
My function transforms 'i love you' into 'iay ovelay ouyay'. This is your requirement, isn't it?
CPallini at 22-Feb-15 6:48am View
   
Deleted
My function transforms 'i love you' into 'iay ovelay ouyay'. This is your requirement, isn't it?
CPallini at 21-Feb-15 13:32pm View
   
5.
CPallini at 20-Feb-15 7:34am View
   
Well, thank you very much for having balanced.
CPallini at 19-Feb-15 12:08pm View
   
What do you mean with 'gets corrupted'? I mean you cannot expect nice characters after applying the xor.
CPallini at 19-Feb-15 11:48am View
   
It shouldn't. Are you sure sSentence[o] is actually alphabetic letter?
Please note you could have written just:
else if ( ! isalpha(sSentence[o])) cout << sSentence[o];
CPallini at 18-Feb-15 12:07pm View
   
From the linked page:
"Return value:
the position of the first character that matches.
If no matches are found, the function returns string::npos."
CPallini at 18-Feb-15 11:46am View
   
std is the namespace of the standard C++ library. If you want to use any of the classes of the library then you have to prefix it with std:: (or alternatively, write the
using namespace std;
statement, see:
http://www.cplusplus.com/doc/tutorial/namespaces/
)
CPallini at 18-Feb-15 11:26am View
   
If you cannot use str::find_first_of (because your teacher wouldn't like it) then you have to separately call str::find for each of the vowvels and then take the minimum result (or, alternatively, write your own implementation of find_first_of function).
CPallini at 18-Feb-15 3:18am View
   
Exactly: garbage collector is useful if you rarely have to deal with it.
5.
CPallini at 13-Feb-15 12:52pm View
   
5.
CPallini at 13-Feb-15 12:51pm View
   
Exactly, my virtual 5.
CPallini at 13-Feb-15 9:01am View
   
Have my 5.
CPallini at 13-Feb-15 3:08am View
   
You are supposed to provide the solution. We can provide a little help (this is called 'quick answers' after all.
CPallini at 12-Feb-15 7:00am View
   
Oh, never mind.
Hope the OP got it all.
CPallini at 12-Feb-15 5:35am View
   
The same output you got.
CPallini at 12-Feb-15 4:56am View
   
Here the same: compilers cannot cheat on that.
CPallini at 12-Feb-15 4:24am View
   
I guess not.
By the way, you are welcome.
CPallini at 12-Feb-15 4:22am View
   
Are you using the g++ (not gcc) command to compile, right?
CPallini at 12-Feb-15 3:06am View
   
5. The 'data driven' solution.
CPallini at 12-Feb-15 3:05am View
   
5. Short and to the point. :-)
CPallini at 12-Feb-15 2:57am View
   
Both of the above programs produce "Hello", compiled with Visual Studio 2013 Express.
CPallini at 9-Feb-15 15:56pm View
   
Well, you should detail your scenario.
CPallini at 9-Feb-15 3:44am View
   
There is no create_process in Linux. There are the functions suggested by Jochen Arndt in his solution.
CPallini at 6-Feb-15 6:52am View
   
Deleted
My 5. However, you cannot derive and provide accessors to private members of the base class (you could do that only for protected members).
CPallini at 6-Feb-15 4:00am View
   
I saw that page. Anyway you are using a table, there's no table sample code in such a page.
CPallini at 6-Feb-15 3:01am View
   
What algorithm are you using? Could you please post a reference to?
CPallini at 5-Feb-15 11:49am View
   
Exactly, 5.
CPallini at 5-Feb-15 8:07am View
   
(iTerm % 2) result can be 1 or 0. We have to transform 1 into 4 and 0 into -4. So:
8*1-4 = 4
8*0-4 = -4
CPallini at 5-Feb-15 2:54am View
   
Thank you.
CPallini at 4-Feb-15 12:18pm View
   
Thank you (your asnwer had my 5 as well). :-)
CPallini at 4-Feb-15 12:16pm View
   
You are welcome.
CPallini at 4-Feb-15 12:14pm View
   
I used the following program, it compiles and runs fine both on Windows (Visual Studio 2012) and on Linux (g++ 4.7):

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
char dat[] = "012ABC";
long exp = 2;
long modl = 5;
dat[0] = (long)pow((double)dat[0], exp) % modl;
cout << (int) dat[0] << endl;

}
CPallini at 4-Feb-15 6:29am View
   
It is working fine on my system.
CPallini at 4-Feb-15 5:47am View
   
You are welcome.
CPallini at 4-Feb-15 5:38am View
   
You are welcome.
CPallini at 3-Feb-15 3:14am View
   
My 5.
Note the explicitely mentioned the release build the question. Possibly he/she is deploying a not properly configured release build.
CPallini at 2-Feb-15 3:24am View
   
Thank you.
CPallini at 31-Jan-15 7:42am View
   
:-)
Thank you very much.
CPallini at 31-Jan-15 6:06am View
   
Why do you need a thread per sensor? It doesn't look efficient, after all.
CPallini at 30-Jan-15 15:57pm View
   
Yes, I fully agrre.
By the way, thank you.
CPallini at 30-Jan-15 5:42am View
   
5.
CPallini at 30-Jan-15 2:59am View
   
How are you going to decrypt a 'random encrypted' string? :-)
CPallini at 29-Jan-15 3:28am View
   
Thank you, Bruno.
CPallini at 28-Jan-15 13:34pm View
   
Copying old code?
Yes, he actually wrote it (missed in my translation).
By the way, thank you.
CPallini at 28-Jan-15 13:33pm View
   
Deleted
Copying old code?
Yes, he actually wrote it (missed in my translation).
By the way, thank you.
CPallini at 28-Jan-15 9:23am View
   
Of course. Have my 5.
CPallini at 28-Jan-15 5:42am View
   
You are very welcome.
CPallini at 28-Jan-15 5:30am View
   
Yes.
CPallini at 28-Jan-15 4:59am View
   
See, for instance, here:
http://stackoverflow.com/questions/3162030/difference-between-angle-bracket-and-double-quotes-while-including-heade
CPallini at 28-Jan-15 4:58am View
   
You are welcome.
CPallini at 28-Jan-15 4:24am View
   
Why do you want to do that? Existing systems don't fit your needs?
CPallini at 28-Jan-15 3:13am View
   
5.
CPallini at 28-Jan-15 3:13am View
   
So?
CPallini at 28-Jan-15 3:01am View
   
What is your doubt about? You know, you need to build a new string satisfying your requirement and assign it to the TextBox.Text property.
CPallini at 26-Jan-15 9:21am View
   
Thank you.
CPallini at 25-Jan-15 8:49am View
   
Most likely, have my 5.
CPallini at 24-Jan-15 19:53pm View
   
Yes, I think so :-)
By the way, thank you.
CPallini at 23-Jan-15 17:35pm View
   
Well, two loops are enough.
CPallini at 23-Jan-15 17:33pm View
   
5.
CPallini at 23-Jan-15 6:21am View
   
What is SubArray?
CPallini at 23-Jan-15 2:45am View
   
Well, like you I never met one who learned using courses. However, my persona experience is simply irrelevant (I communicate with very few people) and I know, at least one, very, very good self-taught developer.
CPallini at 22-Jan-15 17:11pm View
   
Yep, "I cannot think of any way do to this" is at least discouraging, in such a case.
CPallini at 22-Jan-15 17:06pm View
   
5.
CPallini at 22-Jan-15 16:38pm View
   
You don't need sample code. How do you represent the sum of the two signals? Is it inside an array? Is it an analytic function, e.g. s(t) ?
CPallini at 22-Jan-15 16:35pm View
   
Simulated annealing is actually a simple algorithm. However you need to know very well the problem domain in order to shape appropriately the energy function. What are your doubts about?
CPallini at 22-Jan-15 16:25pm View
   
Thank you very much, Sergey.
CPallini at 22-Jan-15 16:09pm View
   
Uhm...Practising OOP?
(just kidding)
CPallini at 22-Jan-15 16:05pm View
   
Thank you.
CPallini at 22-Jan-15 16:04pm View
   
You just need to know the time interval between two array items in order to know the sampling frequency (assuming the sample rate is constant).
e.g. suppose mix_sig[0] is the value of mix_sig at time t=0 and mix_sig[1] is the value of mix_sig at t = .0001 sec then you have a sampling frequency of 10 khz.
CPallini at 22-Jan-15 15:58pm View
   
"To play the signal, it's enough to play the sum of the two, as WAV"
OK, I guess you eventually put the focus on the right button. This is what the OP is asking: "I have a sum of two signals, how can I play it with the sound function? It requires the sampling frequency as parameter and I have no idea...". Probably he/she has the signal (samples, hehe) inside an array. Sometimes questions are really naive.
CPallini at 22-Jan-15 15:40pm View
   
Yes, it is boring, I agree.
I try to put myself in the OP scenario. If I have to play the signal via the sound function then I need to provide the sampling frequency, that's all.

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