|
(Stifled laughter). Still can't quite bring myself to believe that's real. Perhaps it's not, this is the Google-sphere, after all.
Paul Sanders.
Some of my best work is in the undo buffer.
|
|
|
|
|
Oh it's real! YouTube[^]
"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!
|
|
|
|
|
Just another of God's little jokes then. What a card he is.
Paul Sanders.
Some of my best work is in the undo buffer.
modified 17-May-22 18:59pm.
|
|
|
|
|
Maybe "C# on a grain of rice" would be more to your liking?
|
|
|
|
|
Page 1 has 1 grain
Page 2 has 2 grains
Page 3 has 4 grains
Page 4 has 8 grains
Page 5 has 16 grains
...
Page 64 has <see <a="" href="https://en.wikipedia.org/wiki/Wheat_and_chessboard_problem">Wheat and chessboard problem - Wikipedia[^]> grains
|
|
|
|
|
|
Quote: Hmm, 1024 pages...do you think that number was a coincidence? Yes, 256 of them where blank
|
|
|
|
|
It's one more proof, if one was needed, how simple is C#, in a Nutshell!
Seriously, I love C#, I do think it's simple and elegant. But as I reflect on my.... 20 years opf working with.. I realized, over time, well.. there is so much to learn to really master it! :/
However, while the syntax had lots of additional complexity added since the day of C# 1.0 (generics, auto enumerable with yield, async/await, LINQ, lambda, pattern matching) the pure syntax is still relatively simple.
What really gets you is the numerous essential API to do various task, such as Web App, Desktop APP (like 4 type of Windows desktop app?), console app, phone app, game, etc...
|
|
|
|
|
edit - You lost an opportunity to say "It is a bit over a byte long!"
|
|
|
|
|
And it's probably (almost) outdated with C# 11 coming out now.
- Not so much outdated as not including the latest features / syntax.
|
|
|
|
|
I used to have a copy of (I think) "C# 3 In a Nutshell" and believe that was about half the size of your book...
Remember when C# was simple and easy to use before the CS nerds got their claws into it? sigh...
|
|
|
|
|
Slow Eddie wrote: It is 1024 pages long!!!! Wow!
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Yes. And I am trying to get through it in a couple of weeks.
Like trying to take a drink out of a firehose.
|
|
|
|
|
It is wonderful having exactly 2^10 pages, isn't it?
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Actually, it's about 20 pages or so of C#; the rest is the "framework" / class libraries.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I've reported a _problem_ with my HP win10 laptop. I would shut the system down (Start...Shut down) with the system 100% charged. a few days later I would return to the laptop & find that the battery was drained to 80% or so. What?
I wrote a program that shows wear-leveling (Open Source code at my github GitHub - raddevus/wearlevel: wearlevel project that checks 1) how long OS has been running, 2) how many bytes read and written during uptime.[^] ). It'll show you number of bytes read/written since PC turned on & will display how long OS been running (GetTickCount64() ).
Anyways, I had shut down my computer 1 week before. Then I returned to it, started it up & ran the wear-leveling app. It told me that the computer had been running for over 1 week.
I was shocked.
I talked to my son about it and he said, "there's a weird setting under power options" and we started picking around. He found it. Check out this snapshot[^].
It's shown turned off in the image, because I turned it off when my son showed me.
Notice that the option is grayed out until you choose the Admin option [Change settings that are currently available].
After turning the option off, I shutdown my computer.
I went back and ran my wearleveling app & it said my computer had only been running a bit over 1 minute now.
I searched around a bit for an explanation and found this:
How Fast Startup Works
Fast Startup combines elements of a cold shutdown and the hibernate feature. When you shut down your computer with Fast Startup enabled, Windows closes all applications and logs off all users, just as in a normal cold shutdown. At this point, Windows is in a state very similar to when it’s freshly booted up: No users have logged in and started programs, but the Windows kernel is loaded and the system session is running. Windows then alerts device drivers that support it to prepare for hibernation, saves the current system state to the hibernation file, and turns off the computer.
Still Curious
I'm curious if my laptop has a bug or if keeping the system running in this very low state is actually the way it works. I may never know, but hopefully I've resolved it since I turned this off.
|
|
|
|
|
I would suspect a bug. Windows has had issues for decades with power management and/or stupid decisions, most of which are not advertised. For example, with the release of Windows 10 (may have been earlier) Microsoft decided to start turning power off to usb devices - by default. I currently have about a dozen devices - mostly ethernet and serial ports - connected to usb for development. It was maddening why I was losing connections or connections were non-responsive until a friend of mine mentioned to check the power settings.
Many times, Windows 10 will roll out a major update and reset the defaults.
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.
|
|
|
|
|
charlieg wrote: I currently have about a dozen devices - mostly ethernet and serial ports - connected to usb for development.
I too have created USB-powered devices & suffered the same challenges. So annoying.
charlieg wrote: Many times, Windows 10 will roll out a major update and reset the defaults.
I've griped about this for a long time. My laptop also has a fingerprint reader. One of the (RIDICULOUSLY STUPID) features of the fingerprint reader driver is a setting that allows the OS to "turn the power off to save energy". Numerous times, I've turned off the feature -- making it so it cannot turn the power off on the fingerprint device.
I will leave my laptop on over night and return to it to find the fingerprint sensor will not read and log me in. Once again, a windows update has run & switched the option back so it can turn off the power to the fingerprint sensor. OY!!!
|
|
|
|
|
lol. So a few weeks ago I updated my development laptop. The camera now scans my eyes and logs me in. So, see? You need a new laptop!
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.
|
|
|
|
|
Somehow, I suspect it's not actually keeping the system running; it's just not resetting the "startup" timestamp. When you query how long it's been running, it takes the current timestamp, subtracts the startup timestamp, and gives you the difference.
There are other ways to get the system uptime:
c++ - GetTickCount values on Windows 10 - Stack Overflow[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
No, that's incorrect, because when I do a Restart the value changes.
Plus, my laptop battery deplets.
Plus, the reads / writes values goes into the billions while the laptop is supposedly off.
It's not reading something incorrect.
Either the laptop has a problem -- which has been confirmed at HP -- Here's an entry of a bunch of people mentioning this problem on hp laptop: Pavilion 15z-eh000 has a power drain issue even at s5 state - HP Support Community - 7929731[^] .
Or there is a laptop and OS issue which is a Perfect Storm of bugs which keeps the laptop slightly powered up.
modified 17-May-22 14:14pm.
|
|
|
|
|
> No, that's incorrect, because when I do a Restart the value changes.
Actually, that's also correct. The "fast startup" causes it to not reset uptime when doing a shutdown, but restart actually does reset uptime.
It is thoroughly confusing.
|
|
|
|
|
|
|
It seems to me replacing the CMOS battery is, if not the first thing to do after a computer malfunction, always a good idea if you can't recall the last time you performed such routine maintenance. That said, in all the years that I favored my DELL Inspiron ... I couldn't even say whether it had a CMOS battery (because I certainly never consciously reupped one).
Just for FAILSAFE purposes, pull the CMOS battery ... to see that the BIOS resets. You really couldn't go wrong "testing" that, right? If not for running up the "Fast Startup" colors, just to refresh your own non-routine routine Windows use behavior.
|
|
|
|