- ps -elf: Filter Results Effectively and See if a Linux Process is Running
- Display the Ubuntu Linux Version Number from the Command Line
- Using tar to Archive, Extract, Compress, and Uncompress Files
- Using scanf_s APIs with char Types without Newline Problems
- C and C++ Pointer Tutorial
- Windows Internals: Determining WOW64 and if Windows and Processes are 32 bit or 64 bit
- A Tour of C++: Arrays, Pointers, and References Under the Hood
- A Tour of C++: Range Based For Loop
In Windows Internals, I came across the following statement as I was reading (chapter 5, page 485):
'Finally, when a region of address space is reserved, Windows ensures that the size and base of the region is a multiple of the system page size, whatever that might be. For example, because x86 systems use 4 KB pages, if you tried to reserve a region of memory 18 KB in size, the actual amount reserved on an x86 system would be 20 KB. If you specified a base address of 3 KB for an 18 KB region, the actual amount reserved would be 24 KB.'
I had a hard time figuring out the math and picturing this in my head, so I made a diagram and that solidified my understanding. I am sharing that diagram and explanation here with you...
To avoid pesky newline (\n) characters from previous inputs messing up a `scanf_s` of a `char` type, put a space in front of the `%c` in the format string.
Instead of the following code:
scanf_s("%c", &c); // note no space in front of % in format string
Use the following:
scanf_s(" %c", &c);
I found this gem on Stack Overflow (the answer by Sourav Ghosh) here...
This is the first in a tutorial series on C and C++ pointers. It is written for beginning programmers to clarify pointer concepts, but is a great refresher for all programmers. It includes code snippets, diagrams, and discussion text. For a more advanced, under-the-hood deep dive on arrays, pointers, and references, see this post. Let's dive right in...
Continuing in my series on Bjarne Stroustrup's A Tour of C++, 2nd Edition, I elaborate in-depth on his treatment of arrays, pointers, and references. Many aspects of arrays, pointers, and references that need to be internalized by the developer are discussed in-depth from first principles, then illustrated in exercises by code, program output, and diagrams...
I have bought another book, A Tour of C++, 2nd Edition by Bjarne Stroustrup. Stroustup is the original creator of C++ and the author of many books on it that have been well received.
Published in July of 2018, he does a 256 page whirlwind tour of C++, concentrating on C++17 (the current standard), and including some forward looking material for C++20 (draft). Much is backward compatible with the C++11 and C++ 14 standards and before. It is part of the The C++ In-Depth Series, whose authors were chosen by Bjarne Stroustrup...
I am following along in Windows Internals, Part 1, Edition 7 by Mark Russinovich, et. al. The book uses Sysinternals Process Explorer application heavily and discusses how to enable debugging symbols downloads via the Microsoft symbol server to enable resolution of raw address offsets in executables to symbolic names, for instance, in the Threads tab of a process's Properties dialogue box or in stack traces.
However, I was not having much success getting it to work. His screenshot was correct, but the link he gave for information had an old windbg.dll path, and other articles on the web were also outdated or did not give the windbg.dll path at all. That is what threw me...
Today's home and home office networks are miracles of modern technology: fast, reliable, and convenient (and safe if you inform yourself and keep up with security precautions).
If the diagram below does not look familiar to you, and its components do not make sense, you have come to the right place. This is Home Networking 101, teaching the basics of understanding and working with your home network to keep it humming, and equipping you to make the most out of your computing experience...