|
I really can't stand the nay-sayer, consequently I have been very vocal about my, errmm... 3? goto statements in the last 20 years, haha!
Not that I care much... I am just annoyed by the anti goto bigotry!
A few cool use for goto I can think of right away, one that doesn't break logical flow or understanding, is escaping multiple nested loops, ... also maybe goto in switch statement too? although that one might be confusing...
|
|
|
|
|
|
Depending on the types, why not simply:
foreach (string str in currentPossibilities) {
isPossibility = !p1NonChar.Contains(str[0])
&& !p2NonChar.Contains(str[1])
&& !p3NonChar.Contains(str[2])
&& !p4NonChar.Contains(str[3])
&& !p5NonChar.Contains(str[4]);
if (isPossibility) reducedPossibilities.Add(str);
} If the non-char values are strings, and you're using .NET Framework which doesn't have the Contains(char) overload[^], you can use IndexOf instead:
foreach (string str in currentPossibilities) {
isPossibility = p1NonChar.IndexOf(str[0]) == -1
&& p2NonChar.IndexOf(str[1]) == -1
&& p3NonChar.IndexOf(str[2]) == -1
&& p4NonChar.IndexOf(str[3]) == -1
&& p5NonChar.IndexOf(str[4]) == -1;
if (isPossibility) reducedPossibilities.Add(str);
} The && operator is short-circuiting, so it will stop testing when it reaches the first non-char.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: why not simply: ... Did not know about those functions. If they are inline, great! And they can eliminate the boolean 'isPossibility' variable! Thanks for sharing!
|
|
|
|
|
I attempted to read this article. Talk about hogwash interspersed with issues relating to the misuse of language features. As far as I could tell the bottom line of this article was a sales attempt for a new "functional" language.
|
|
|
|
|
Study suggests quantum processes are part of cognitive and conscious brain functions. That explains why I can only rub two or three thoughts together some days
|
|
|
|
|
My newest scientific excuse for anything that goes wrong: "I'm sorry. I've became entangled with the dummy that lives down the street."
|
|
|
|
|
As I responded, why not? We already know that chlorophyll uses quantum effects to convert photon energy into chemical energy. Our brains are a lot more complex so it stands to reason that if a relatively simple biological system uses quantum effects a far more complex system would also use them.
|
|
|
|
|
Elon Musk’s plan to purchase Twitter would bring with it massive cuts to the social media company’s workforce, according to a report Thursday by The Washington Post. Why not go for the full 100% and save us all?
Because nothing says "friendly acquisition" or "I really want you to succeed" like, "you're almost all fired"
|
|
|
|
|
Just some more blatant stock manipulation for the SEC not to take any action on...
God, this is getting old.
|
|
|
|
|
Microsoft has created a PC Manager app for Windows 10 and above computers. It works a lot like CCleaner to boost PC performance and clean up systems. They do know where all the cruft is stored
And of course CCleaner is like CCleaner for your computer...
It's kind of odd that the website is all in Chinese, but the app is all in English. I guess the website leaked before they were ready to launch?
|
|
|
|
|
|
Yeah, now I can stop worrying about my VS 2017 constantly upgrading.
|
|
|
|
|
These dicks, it's a dang joke. Dear Chris, maybe time for an emoticon.
Here's the lie: "We want to keep you secure when using Visual Studio."
The problem is that everything Microsoft is wedded to the OS. If you're worried about support, you sure as hell shouldn't expect a MS update to help you.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
|
Which part of the courts ruling are you concerned about?
Srinivasa Ramanujan was locked into poverty. There are many more examples. Forgiveness of student debts and education for everyone seems beneficial to me.
Some of our citizens are being being held back, let us open the doors for them.
|
|
|
|
|
You're welcome. I love it when other people are generous with my money.
So, for those that actually had a clue, worked their ass off and paid for college, do *they* get any money? I mean, hell, since we're handing it out...
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Bailing out those who make bad decisions, from students through to-big-to-fail banks, perpetuates bad decision making. Student loans can't be discharged in bankruptcy, which should have been a big hint to those taking them. Without that special provision, there wouldn't have been nearly as many student loans propping up the university complex and its advocacy of wokeism and other idiocies. It has joined the military-industrial and medical complexes as a sink for taxpayer money.
|
|
|
|
|
Greg Utas wrote: which should have been big hint to those taking them
To be fair, they're kids who are making their first decisions as adults and don't entirely know what they're doing. They're mostly doing as they're advised while trying to make sense of the adulthood they've suddenly been thrown into.
The whole institution of college/university administration and their finances (at least in the US) needs to be rebuilt, especially considering that most of the money doesn't go to professors, who are performing (or should be performing) the primary function of universities
|
|
|
|
|
I have no grounds for objection when one uses their own money to remedy other's bad choices. I strongly object when one does so using my money.
Make no mistake - I can and do give charity, but the recipients and the amounts given are my decision, using my money, not the Government's, using public monies.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Sorry, but if your degree isn't able to get you a job sufficient to pay it back, why should I have to pay for your mistake.
If we really want to do this right, the flip side is that any university/college with say, more than 10% of their students applying for relief should immediately become ineligible for Federal student loans and Pell grants as a waste of taxpayer dollar. Those with sufficient incomes should be denied - period!
|
|
|
|
|
I guess it will come as no surprise that the replies to this thread seem to be rapidly deteriorating into Soapbox territory.
One for @chris-maunder and @sean-ewington to keep an eye on at least.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Everyone here is being great. Thanks for keeping this open and civil and not personal.
cheers
Chris Maunder
|
|
|
|
|
Internal developer platforms might be part of the solution by reducing repetitive and manual work and cognitive load. Then you can burn out on that
Yeah, "sponsored", but I mostly wanted to post it as I've been hearing "Platform Engineering" mentioned a lot lately.
|
|
|
|
|
... would this platform happen to have a thick vertical wooden post and be surrounded by a large pile of smaller sticks?
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
modified 24-Oct-22 9:44am.
|
|
|
|