|
When I got my first PC without a floppy unit, I bought an external USB one. It was surprisingly cheap, somewhere around USD 10. It has come to use a few times, but last time is so long ago that I cannot date it.
It has one disadvantage, though: In the DOS age, lots of 'preformatted' floppies were sold, but they hadn't the format code (360kb, 720kb, 1.44Mb, ...) written into the boot sector. It really was redundant, as DOS tried to read the floppy in one format after another until it found one that worked.
At some stage of development - I think it was when going from 16-bit Win98 to 32-bit WinXP, but correct me if I am wrong - MS said: This is silliness; the boot sector shall have the format code! The standard alway said so! So we will no longer do any lengthy, repetitive trial-and-error procedure!
The result is that lots of pre-formatted floppies from before this time is no longer readable. If you formatted the floppy yourself, whether running under DOS or Windows, the format code was all right; there is a problem only with floppies bought pre-formatted. For several years, most of them were, and a great part of them without the proper format code.
The main reason why I kept a Win95 machine (with no internal floppy unit, but using my USB one) running for many years was to read old floppies that WinXP would not accept, due to a missing format code in the boot sector.
|
|
|
|
|
It’s hard to learn, but your code will produce fewer nasty surprises Won't you take me to func-y town?
|
|
|
|
|
Quote: Back then, this was a radical idea, and many programmers resisted the loss of a statement that they had grown to rely on. The debate went on for more than a decade, but in the end, the GOTO went extinct, and no one today would argue for its return. That's debatable. Here's some code from my Wordle solver that loops through the letters of a word, and if one of those letters matches a list of letters at that position which have been eliminated from the running it skips to the next word using a goto . I'm certain it could be done with another construct, but the time to figure out that other construct is a waste when this approach is so simple and directly mirrors the problem's solution:
foreach (string str in currentPossibilities) {
isPossibility = true;
for (int i=0; i<p1NonChar.Length; ++i) {
if (p1NonChar[i] == str[0]) {
isPossibility = false;
goto breakout3;
}
}
for (int i=0; i<p2NonChar.Length; ++i) {
if (p2NonChar[i] == str[1]) {
isPossibility = false;
goto breakout3;
}
}
for (int i=0; i<p3NonChar.Length; ++i) {
if (p3NonChar[i] == str[2]) {
isPossibility = false;
goto breakout3;
}
}
for (int i=0; i<p4NonChar.Length; ++i) {
if (p4NonChar[i] == str[3]) {
isPossibility = false;
goto breakout3;
}
}
for (int i=0; i<p5NonChar.Length; ++i) {
if (p5NonChar[i] == str[4]) {
isPossibility = false;
goto breakout3;
}
}
breakout3:
if (isPossibility) reducedPossibilities.Add(str);
}
Of course I would never go back to the spaghetti-code goto use, and don't use it often. But when it comes to mind first, and is simple, use it and get on to the next problem.
|
|
|
|
|
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
|
|
|
|