|
Pub gets cheers, for new ideas. (10).
|
|
|
|
|
Too easy!
INN
...OVATION
(and I spelled right today!)
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Well done, you lead tomorrow.
I need more than 24 hours to create a difficult one.
|
|
|
|
|
Peter_in_2780 wrote: Too easy! Words I have never uttered when looking at these things.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Sometimes they just leap off the screen. PUB is often INN. New things starting with INN...
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Nice one!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Greetings and Kind Regards In the unlikely case the following is as much of a wonderment to anyone here as it is to me I present a simple little debugging/tracing/logging technique which effortlessly permits presenting the entry and all exits of any function i.e. a class which upon construction stores and displays the current function name so that upon destruction it can do likewise. - Cheerio
|
|
|
|
|
So present it!
Have you considered an article (if you go into enough details) or a tip (if it's just a quick document)?
They are pretty easy to do, and provide a permanent record that is easily found by others: Submit a new Article[^] - and you get rep points as well!
Before you do, look at some of the existing articles here to get an idea of the standard we expect.
Here's one of mine: Using struct and class - what's that all about?[^]
And here's a tip which is a lot more "code focussed": Creating a Simple "scratch card" Control in WinForms[^]
It will have to be moderated, but that's generally a painless process that doesn't take too long, unless it needs changes to fit the "house style" or improve the content. And all the moderators are article writers, so we know what it's like!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I took your suggestion and attempted to write a tip via the on-line editor but could not for the life of me figure out how to format a code block. I assumed I merely had to highlight the code text and press a button but could not find any "code" button and any other button I pressed affected the entire article text not just the text I have highlighted so until I learn to utilize the on-line editor I will not be posting the tip unless I post it here as the Lounge editor works as expected but I do not know if this is the correct venue for such. Kind Regards - Cheerio
|
|
|
|
|
It's pretty easy when you are used to it - this may help: Using the Article Editor (without losing your hair in handfuls)[^]. It has a section on code blocks.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Thank you for the article however its suggestion as to code block formatting is precisely what I have attempted and doing so results in the entire article being so formatted not only the highlighted portion. Kind Regards - Cheerio
|
|
|
|
|
|
Yes that is my article You may go at it as you please Thank You I would be happy to learn how to properly format if such instruction is not too much trouble Thank You again - Cheerio
|
|
|
|
|
I have gone in and fixed it.
Basically you want to hit the Source button in the top-right of the editor, and change this
struct cpreamble<br />
{<br />
std::string m_func;<br />
cpreamble(const char* func) : m_func(func) { std::cout << fg_yellow << func << fg_white << " entry" << std::endl; }<br />
~cpreamble() { std::cout << fg_cyan << m_func << fg_white << " exit" << std::endl; }<br />
};<br />
#define PREAMBLE cpreamble _cpreamble(__func__);<br />
So one can utilize it as below.<br />
void foobar()<br />
{<br />
PREAMBLE // first line in function<br />
// full body of function ...<br />
}<br />
To this:
<pre lang="C++">struct cpreamble
{
std::string m_func;
cpreamble(const char* func) : m_func(func) { std::cout << fg_yellow << func << fg_white << " entry" << std::endl; }
~cpreamble() { std::cout << fg_cyan << m_func << fg_white << " exit" << std::endl; }
};
#define PREAMBLE cpreamble _cpreamble(__func__);
So one can utilize it as below.
void foobar()
{
PREAMBLE // first line in function
// full body of function ...
}</pre>
Or, you want to leave that Source button alone, paste in your code exactly like this:
struct cpreamble
{
std::string m_func;
cpreamble(const char* func) : m_func(func) { std::cout << fg_yellow << func << fg_white << " entry" << std::endl; }
~cpreamble() { std::cout << fg_cyan << m_func << fg_white << " exit" << std::endl; }
};
#define PREAMBLE cpreamble _cpreamble(__func__);
So one can utilize it as below.
void foobar()
{
PREAMBLE // first line in function
// full body of function ...
}
Then select it all and go to the Formatted dropdown, and select "Formatted"
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
FIY: @PaltryProgrammer
Sean, can you let me know what he did, if possible - I'd like to update my guide to prevent it happening again?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I think he was trying to find a button to format the code, but the option was actually in a drop down menu.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Greetings and Kind Regards. Several times per day while working in Visual Studio (VS) the keyboard stops responding and the keyboard cursor is nowhere to be seen so I must reach for the mouse and click within the editor to bring the cursor back. This has been going on over many previous VS versions. It may be related to the speed of typing though am not completely certain. I find it difficult to believe it only occurs on my system and does not occur to the developers of VS as well and so always wonder why they do not repair it as it must be as much of a nuisance to them as to myself. May I please ask if this occurs to anyone of you? Also I am fascinated in wondering just how many developers work on VS. If any of you know I would appreciate being informed. Thank You Kindly. Finally I am glad I am not one of the VS developers as it seems amazingly complex. Incidentally I just discovered the nice feature whereby VS presents my own macro arguments when writing same. A nice touch. - Cheerio
PS The disappearing keyboard cursor only occurs in VS and no other editor I utilize.
|
|
|
|
|
Does it only happen with VS, or does it also happen with others editors (e.g., Word, Notepad)? If not, I would lean toward a video or keyboard driver, but I'd just be guessing.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
It may be one of your installed extensions or the analysers, try switching them off and see if it still happens. I get something similar in VS code where it freezes for a few seconds.
|
|
|
|
|
The man has no limits when it comes to making "coin".
Quote: Tesla has been ordered by a Norwegian court to pay more than 30 customers $16,000 each for slashing the battery life and charging abilities of older Tesla Model S vehicles with a software update.
Tesla owners win legal fight after software update crippled older Model S batteries • The Register
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
|
You can hate him all you want, I like the guy for the most part.
He has done more good for mankind than not, and is continuing to do great things for space travel and exploration, among other things.
|
|
|
|
|
True, but he's also one of the biggest corporate welfare queens, so it's a wash for me.
|
|
|
|
|
I'm not saying he is an angel, but hell, I wish I was getting multi-billion dollar contracts from the Government.
modified 24-May-21 21:04pm.
|
|
|
|
|
I prefer not to receive stolen goods.
|
|
|
|