Reputation
1,191
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
4 7
Newest
 Good Answer
Impact
~97k people reached

  • 0 posts edited
  • 0 helpful flags
  • 4 votes cast
Aug
25
answered What is the maximum amount of ram a 64bit machine can theoretically address?
Jul
31
comment What does hyphen mean in Windows batch file?
What if the quoted argument contains spaces?
Jul
31
comment What does hyphen mean in Windows batch file?
The only way %1 will expand to something containing spaces will be if the argument contains quote marks. In that case, surrounding %1 with quote marks will yield broken behavior, and surrounding it with something else should work.
Jul
24
comment 65536 +1 Connection on a system
I implemented a TCP server which could accommodate 65,534 connections from every possible IP address simultaneously. It doesn't do much--it simply echos incoming text with a few character substitutions--but it runs on a very small hardware platform. I don't think it's quite RFC-compliant, but it seems to work pretty well, despite neither knowing nor caring how many TCP connections are open on most of its ports.
Jul
9
comment Size of files in Windows OS. (It's KB or kB?)
@JamieHanrahan: Drive storage has historically used sectors with a power-of-two size, and allocation chunks that were a power-of-two number of sectors. A 360K floppy held 720 sectors of 512 bytes each; a "1.44MB" floppy was 2,880 such sectors [the "megabyte" was 1,024,000 bytes]. Only after drive capacities got larger did the megabyte shrink.
Apr
21
comment Why does emptying disk space speed up computers?
@JasonC: I think the simplest way to describe GC and the trim command is to say that in GC a page becomes garbage when a new version of that page is written, but the act of writing a new version of that page will consume a formerly-blank page. Trim allows a page to become garbage without requiring that a new version be created.
Apr
20
answered Why does emptying disk space speed up computers?
Mar
29
comment Can I connect a USB 1.1 hub to a wall outlet and charge devices?
@user20574: Why would that be a problem under my proposed scheme? If a supply that's good for 1.5A feeds a hub which has two devices plugged into it which would each "like" to draw an amp, then if the devices ramp up their current demands at the same speed, both devices would get 0.75A. If the devices ramp up at unequal speeds, the distribution would be unequal but they would end up distributing about 1.5 amps between them in some fashion.
Mar
29
comment Can I connect a USB 1.1 hub to a wall outlet and charge devices?
@user20574: My wondering was about what would have happened if something such as described had been in the spec from the get-go. While some power-supply designs will respond to an excessive current demand by overheating while remaining in regulation, many common topologies will "naturally" sag under such cases, and most supply topologies can be made to sag under such cases by limiting their range of feedback. A switching supply that is limited to 5.2 watts and 5.2 volts, for example, will supply 5.2 volts at 1.0 amps, or 5.0 volts at 1.04 amps.
Mar
28
comment Can I connect a USB 1.1 hub to a wall outlet and charge devices?
I wonder if there would have been any problem with defining the USB spec to say that if the supply is between 5.0 and 5.5 volts, any device is allowed to draw up to (V-5V)*5 amps provided that its current demand doesn't increase faster than a certain rate, and provided that its current demand will be immediately reduced if the voltage falls? All one would need to make that would be a power supply whose output voltage would fall as it approached its current limit, which is something many supplies do naturally.
Mar
28
revised Why does a CPU have a clock?
added 1485 characters in body
Mar
27
comment Why does a CPU have a clock?
...if SI is available when the time comes to execute the first instruction then it should likely go first. If the SI value becomes available at the exact moment that the system is trying to decide which instruction should go first, resolving that in an asynchronous system may be very hard. Allowing out-of-order execution of some parts of the code while ensuring that things which need to be sequenced, are, is much easier in a synchronous system than in an asynchronous one.
Mar
27
comment Why does a CPU have a clock?
@MichaelKjörling: I'm aware that many programs contain a lot of instructions that may be arbitrarily sequenced, but if an architecture is going to be used to run non-trivial programs correctly, it needs to be capable of properly sequencing groups of instructions where sequence matters. Further, the question of whether an instruction should proceed without waiting for an earlier instruction must itself be sequenced. Given mov ax,[si] / mov bx,[1234], if the value of si isn't available when the first instruction is reached, it may be beneficial to run the second one first, but...
Mar
27
comment Are CPU clock ticks strictly periodic?
In some cases, the capture clock may be the second or later cycle rather than the next. Some designs assume that data will always take at least some minimum amount of time (e.g. if propagation delay is known to be between 2.1 and 2.9 cycles, data could be output and results sampled on every cycle; each sampled result would reflect the data from 3 cycles before); other more conservative designs change the output data more slowly, and ignore the result until it is guaranteed to be stable.
Mar
27
comment Why does a CPU have a clock?
@MichaelKjörling: It is common for a program to contain some instructions whose proper function won't depend on the immediately-preceding instruction, but any non-trivial program will also contain groups of instructions which must be executed in precise sequence. There are ways of ensuring consistent sequencing without using a system-wide clock, but a lot of circuitry is generally required to pass around all the necessary timing signals, and the speedup obtained would be less than could be obtained by using that same amount of circuitry for some other purpose in a clocked system.
Mar
27
answered Why does a CPU have a clock?
Mar
18
comment Why I have to press keys two times to get the ^ or ´ or ` symbol in Windows 7 and how can I fix it?
@DavidMulder: Since I installed my keyboard layout, I'm happy with the way the keyboard works. I can type résumé, l'hôtel, etc. much more nicely than with the US layout, but all of the "normal" keys work as they should. It just seems that people wanting a sensible keyboard layout should have an easier course of action available than downloading the keyboard creator, editing the keyboard "source" file, and compiling it to an installation application.
Mar
17
comment Why I have to press keys two times to get the ^ or ´ or ` symbol in Windows 7 and how can I fix it?
@DavidMulder: This question seems to have come up so often that I wonder if there's any "trusted entity" who could compile and host a utility to install a fixed keyboard layout (since the only way to install a new keyboard layout is to run an installer created by the keyboard-editor software!). I'm not claiming any special skill at layout design, but I'd say the things mine switches a few things MS just plain got backward.
Mar
17
comment Why I have to press keys two times to get the ^ or ´ or ` symbol in Windows 7 and how can I fix it?
@DavidMulder: altGR is harder to hit, but most people in the US type apostrophes and quote marks a lot more often than they type aigus and umlauts; many (esp. programmers) type carets and backticks more often than circumflex and grave accents. Using one layout all the time and hitting altGR when accents are needed seems much easier and safer than having to worry about what layout is active at any given time.
Mar
17
comment Why I have to press keys two times to get the ^ or ´ or ` symbol in Windows 7 and how can I fix it?
Any idea why MS didn't make altGR+quote, altGR+shift+quote, altGR+shift+6, and altGR+grave work as dead keys, while leaving the normal ASCII-generating keys alone? Apple figured out how to do that in the 1980s. The deadkey behavior is horrible, especially given that deadkeys remain pending after cursor moves.