|
So something like this:
if (GetRandomBool())
{
ChangeLane();
}
else
{
TurnBlinkerOn();
ChangeLane();
}
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
It's more like this
if (model == "BMW")
{
ChangeLane();
}
else
{
TurnBlinkerOn();
ChangeLane();
TurnBlinkerOff();
}
|
|
|
|
|
I think this covers all cases:
bool Car::TrySwitchLane(Driver const& driver, Direction direction)
{
bool succeeded = false;
if (driver.propertyExists("maniac") || (Model() == "BMW"))
{
SwitchLane(direction);
succeeded = !CrashState();
}
else
{
if (LaneClear(direction)
{
SetBlinkerState(direction);
if (LaneClear(direction))
{
SwitchLane(direction);
succeeded = true;
}
ResetBlinkerState();
}
}
return succeeded;
}
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
At a hearing in the European Parliament today, Facebook CEO Mark Zuckerberg faced a barrage of questions ranging from privacy concerns to the rise of fake news. Seems to be a trend with Facebook
|
|
|
|
|
Kent Sharkey wrote: Subject: ... was mostly a waste of time
Seems to be a trend with Facebook with many politicians too, regarding the waste of time
The structure of the meeting was a disaster... helping Zuckerberg to avoid the hot topics.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
modified 23-May-18 6:01am.
|
|
|
|
|
Industrial robots are typically all about repeating a well-defined task over and over again. Usually, that means performing those tasks a safe distance away from the fragile humans that programmed them. Robot see, robot do
|
|
|
|
|
Cameras—especially phone cameras—are terrible at taking pictures in the dark. The tiny image sensors in most modern cameras can only absorb a small amount of light, which often results in dark, grainy images. "I see you on a dark night"
|
|
|
|
|
Documents obtained by the ACLU of Northern California have shed new light on Rekognition, Amazon’s little-known facial recognition project. People who committed this crime also liked...
|
|
|
|
|
The number of open source components in the codebase of proprietary applications keeps rising and with it the risk of those apps being compromised by attackers leveraging vulnerabilities in them, a recent report has shown. But I thought open source didn't have bugs? (More eyes and all that)
|
|
|
|
|
Kent Sharkey wrote: (More eyes and all that) I prefer quality over quantity.
But seeing the Q&A lately... it is no wonder... it looks like 90% of the "programmers" in the world just use copy+paste of snippets and modify just the needful to make it "work" (at least in their machines).
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
We use Emscripten to compile Qt into something that runs in a web browser from a web server. Cute
|
|
|
|
|
Kent Sharkey wrote: Cute
Here's a WordPad clone written in C++ converted to WebAssembly:
textedit[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Word!
Okay, that doesn’t work as well. I’m still not sure if Webassembly will be the next Flash, or the next Citrix. I’m still waiting to see something substantial with it.
TTFN - Kent
|
|
|
|
|
It looks terrible... I can't see while anyone would like to work with such an UI...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
Hi,
Kornfeld Eliyahu Peter wrote: It looks terrible... I can't see while anyone would like to work with such an UI...
Yes, I understand. Many people don't like the way QT widgets look.
But the fact that the C++ language is compiling to something running in a web browser is simply amazing... and something I didn't think I would ever see in my lifetime.
Best Wishes,
-David Deaune
|
|
|
|
|
something something that Jurassic Park quote everyone's always tossing about.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
When I mentioned that one of my now-retired colleagues was responsible for maintaining Notepad, commenter Neil noted, "I can't imagine there's much actual maintenance." "Almost all quality improvement comes via simplification of design, manufacturing… layout, processes, and procedures"
|
|
|
|
|
Hmmm,
Kent Sharkey wrote: Old New Thing[^]:
I love reading all of the comments in programming blogs. I observe that some of the commenters are marveling at notepads ability to read locked files using the CreateFileMapping[^] function.
Someone should probably tell them that you can also read exclusively locked files simply by opening the file with the FILE_FLAG_BACKUP_SEMANTICS from a process with SE_BACKUP_NAME/SE_RESTORE_NAME privileges.
From outside the box,
-David Delaune
|
|
|
|
|
BGP is the glue of the internet. For a protocol that was produced on two napkins in 1989 it is both amazing and horrifying that it runs almost all of the ISP to ISP interactions and is now a very fundemental part of the internet. It's all fun and games until someone loses their battleship
|
|
|
|
|
The cloud, IoT and AI are turning the whole world into one great big computing opportunity, says Microsoft's chief executive. Where's the reboot switch?
|
|
|
|
|
Microsoft announced plans last week to block Flash, Shockwave, and Silverlight content from activating in Office 365. What's Flash?
|
|
|
|
|
Kent Sharkey wrote: What's Flash?
A comic book and TV show.
What Office has to do with either is beyond me.
|
|
|
|
|
You’re likely a developer and have used a code editor to debug and analyze your application failures. Few developers know or understand the “old school” way of troubleshooting to uncover additional details; enter the WinDbg debugger. "And I'm never going back to my old school"
|
|
|
|
|
Let's pretend we're using gdb
|
|
|
|
|
Console.WriteLine ("Here 1");
|
|
|
|