jcl

Linux Experts
  • Content Count

    1299
  • Joined

  • Last visited

Everything posted by jcl

  1. From the Python FAQ: "Some Windows machines also have Python installed. At this writing we're aware of computers from Hewlett-Packard and Compaq that include Python. Apparently some of HP/Compaq's administrative tools are written in Python."
  2. Functions with variable-length argument lists are sometimes called variadic functions but I don't know if that term has been adopted by any language. The Python docs don't seem refer to the feature by name. Common Lisp uses the term 'rest parameter' to refer to the parameter that takes the 'rest' of the arguments. Bit nicer than Python's "[identifier] initialized to a tuple receiving any excess positional parameters". Python also allows you to use to double-asterisk parameters to collect keyword arguments into a dictionary.
  3. def summ(*args): args is a tuple containing all of the arguments.
  4. Try help() to enter the help system and then 'yield' at the prompt. Edit: Or put in quotes, I guess
  5. def ssum(list): def scan(): acc = 0 for elt in list: acc += elt yield acc return sum(scan())
  6. jcl

    Assembly

    You'll want the IA-32 Architecture Software Developer's Manual (2/3rds down the page). Volume 1 covers the basic architecture and Volumes 2A and 2B are the instruction set reference. Volumes 3A and 3B are interesting but you shouldn't need them unless you're doing operating system work. Chapters 2, 3, and 4 of Volume 1 give a good overview of IA-32 without requiring any knowledge of assembly. If you have an AMD processor the Athlon/Opteron optimization guides include a nice overview of the AMD microarchitecture to supplement the Intel manuals. MASM is fairly potent macroassembler. Neither NAS
  7. Gmail and Google Talk merged today. There might have been interruptions in service while Gmail was being updated.
  8. You have to use Python later on.
  9. And congratulations MVP Bill Leavy!
  10. That was the generalized 'FUBAR': tenseless and both nouned and verbed. The increased expressiveness is worth the incompatibility.
  11. PXE is the firmware network boot facility. The E61 error is produced by the network card. The most probable explanation is that the BIOS can't find any bootable devices and is falling through to the network boot. If that's the case you can either boot off a Linux live CD (the Ubuntu install disc, maybe) and use fdisk to set a bootable partition or you can reinstall. It's also possible that HDD failed or the BIOS is FUBARed.
  12. You can use wall to send a warning message before booting him.
  13. You can disable logins (to keep him out) and then kill all of his processes.
  14. D'oh. Okay, I figured it out. The sfc utility is nothing but a front-end to the WFP component of winlogon.exe. The utility activates WFP and exits immediately. This could be very difficult unless the system provides a way to determine whether an WFP scan is in progress. You wouldn't believe what I went through figuring this out :-/ Hooray for overlooking the obvious. .
  15. Windows automatically detaches graphical apps from the console. sfc is effectively running as a background process right off the bat (no pun intended). AFAICT there's no easy way to wait for an arbitrary process to terminate from a batch file. I fiddled with WSH (Windows Scripting Host) last night and couldn't find an obvious way to wait with it either. WSH is supposed to let you wait so you can capture the exit status of a process but it didn't work with sfc. Go figure.
  16. Curious. The crashes with the AVIs sounds like a problem with a component shared between those video players. If there's a broken (set of) codec(s) shared between them it could cause all of them to crash. Real is perverse enough that they might ship their own version(s) of the codec(s). Not sure how to check without manually replacing the potentially broken codecs. (It doesn't have to be the codecs -- there might other shared components -- but if it is I may or may not have a link to a site with a large collection of probably not-broken Win32 codecs of dubious legality.) The Explorer crashes c
  17. IBM celebrated the 50th anniversary of the invention of the hard disk drive Firday. The IBM 350 Disk Storage Unit shipped in Sept. 1956 as part of the IBM 305 RAMAC (Random-Access Method of Accounting and Control). The HDD unit was 60 x 68 x 29 inches, contained 50 24-inch discs spinning at 1200 RPM, total capacity of 5 million characters (4,272 KiB), 600 ms average seek time. Pictures in the second and third links. (Hat tip to a.f.c.)
  18. I tested it with IE, Firefox, Opera, Konqueror, and elinks. Didn't work. Did you take the behavior I noted at the bottom of my last post into account when you were testing? You have to block or delete the session cookie the site uses to see the ad more than once.
  19. That won't work in this case. The 'pop-up' is nothing but an absolute-positioned div. The page only uses JavaScript to hide it when you 'close' it: disable JS and you're stuck with it. I suspect it's designed to thwart pop-up blockers. If anyone wants to fiddle with it be aware that the server seems to include the div in only the first page served in a session.
  20. Hmm. That's not actually pop-up. It's a normal part of the page styled to look like a pop-up with a bit of Javascript to hide it when you click Close. If you're using Firefox you can block it with the RIP extension or by editing userContent.css by hand.
  21. Agreed. The physics is more complicated at the steeper angles. The shape of the truck, the truck's suspension, etc become increasingly important as the angle between the ramp and ground approaches 90 degrees. OTOH if the angle is very close to 90 degrees the math becomes a lot easier: the truck will whack the surface, stop, and maybe fall over without going anywhere
  22. The turnout seems about right to me. Figure that the people most likely to vote are the regulars who have significant time invested in the forum -- people just stopping by to ask questions wouldn't care if we have a political forums. We don't have anywhere near 1000 regulars. The real turnout could be 30+% once you factor out the staff and passers-by. We really should do a census before the next vote
  23. jcl

    Current Time

    cmd.exe > date /t (*sh are shorter of course but AFAIK none of them have date as a built-in command.)