For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
Replace all the vowels of the given input string with a single digit number.
String of length L and all lower-case letters.
Input String replaced with the digit.
Replace all the vowels in the given input string with a single digit number you get after all the below
Step 1: Get the index of the vowel in the given input.
Step 2: Multiply the index with 100.
Step 3: Sum all the prime numbers between 1 and the resulting number from last step.
Step 4: Add the digits of the number you getfrom the last step until you get a single digit.
Step 5: Now, Replace the vowel with the digit from the last step.
Step 1: First vowel found at index 1.
Step 2: 1 * 100 = 100
Step 3: Sum of prime numbers between 1 and 100 is 1060
Step 4: Sum of each digit until we get single digit:
= 1 + 0 + 6 + 0
Step 5: Replace e with 7
Output now: h7llo
Step 1: Next vowel found at index 4.
Step 2: 4 * 100 = 400
Step 3: Sum of prime numbers between 1 and 400 is 13887
Step 4: Sum of each digit until we get single digit:
= 1 + 3 + 8 + 8 + 7
= 2 + 7
Step 5: Replace o with 9
Final output: h7ll9
Input : replace this
Output. : r7pl9c1 th5s
This is another one of (mine) silly and academical ( no problem to resolve ) question.
And I am posting it here instead of in Qt forum , by choice.
You have a chose too - ignore the post if you feel like it...
I am using Qt creator "feature " SUB-DIRS which manages multiple application source code under "supervision" of Qt version of "make".
By design these are independent applications , no commonality between them.
My desire is to have a cleaner way to have one main project /application and be able to select / run another project / application. I have it sort-of working by starting another process. It is pretty convoluted and I am looking for a cleaner way.
Something like "application and library" relations.
I feel I should be able to accomplish using "make" / "qmake".
Or on C/C++ "level"?
Qt documentation has decent notes for "qmake" but I am clueless what to look for to extend the current options to "link" applications.
FYI -Qt is "event driven" system (IDE) implementing Qt version of "callback".
PS I still cannot use my "old - few years " account.
OK, the post generated "administrative response" and I got no issue with that,hopefuly it gets resolved.
I create four CAsynSocket Classes in four CwinThread classes When I first create them Socket (with notification events) bind ioctl, setsockopt. I follow the CASynSocket::Socket call to sockcore.cpp and
has a valid Hwnd Value. The context of the creation of sockets in the CwinApp after my main CFrameWnd has been created.
I then start a conversation with the server (connect send and then receive). It is at a point that I would like to give the work over to a modeless dialog. this is where things go wrong. After getting a message
from the server I try to do a detach which goes to
Since I was debugging this in release mode I never got the subsequent assert on this.
First off in the documentation for CAsynSocket there is no mention that i need a Hwnd to process the class when I first did the CAsynSocket::Socket call with the event notification that I wanted to be informed on
I did notice that
had a valid window
When I first started using CAsyncSocket I know very little about TCPI/IP or OO
at this point looking at Winscok API it has much more flexability so much so it seem I dont necessary need a valid Hwnd but a kernel object such as that from CreateEvent will do
more so It seems if I want to pass notification to a different windows I just do another call to
It's probably not fair to send you down a different path, but many years ago I had similar problems and, having some spare time, I decided to make my own set of wrappers for Windows Sockets API. Over time it has grown into a quite capable set of objects that allow you to work with sockets just like you work with C++ streams.
He has a detach on the server side more so before any conversation gets going
My scenario involves the main windows looks if anyone wants to start a conversation with the server if I see it happens a conversation with the server is initiated I want to pass off that socket to a mode less dialog
You don't specify what kind of number it is (floating point, integer), nor how it is provided.
Is the number coming in as a string, for example from argv passed to main? Is the number passed in to a function as a parameter? Does the function need a particular name? Is the number allowed to be negative? Is there a maximum value for the number? Will there be decimal points? Is the number base 10, or base 2, or base 16, or is there a prefix at the front that specifies the radix?
What should the result be if no number is given, or an invalid number is given?
Are there any unit test cases that would provide a good example of how this is supposed to work?