jcl

Linux Experts
  • Content Count

    1299
  • Joined

  • Last visited

Everything posted by jcl

  1. Gah, I was looking at the ActivePython win32api.MoveFileEx.
  2. Compiler and platform? Builds here with Visual C++ and almost with G++.
  3. win32file.MoveFileEx("...", None, win32file.MOVEFILE_DELAY_UNTIL_REBOOT)
  4. If you really mean two months that'll put you right around the release (or at least announcement) of the mobile Core 2 line.
  5. Wow. You were suspended for the one thing you've posted that wasn't flame bait No one is going to think you're making it up. We all know what G4 is like. This wouldn't be the first time that a rule was modifed or invented by a mod or admin for personal reasons.
  6. Neat little article in American Scientist about the proliferation of programming languages and the resulting holy wars. Written for the layperson but still interesting. Intro:
  7. Not a whole lot. I have a relatively heavy Ubuntu install and it's only using about 5 GiB plus another 1.5 GiB or so for the swap and boot partitions.
  8. I'd be more worried about dust and lint than static electricity.
  9. Sigh. This is why I don't read /.. A program is Open Source if its license conforms to the Open Source Definition. It's Free Software if its license conforms to the Free Software Definition.
  10. Yeah, well, that might not have been a good example. Windows really is hard to fix regardless of your skill level. I know a fair bit about the NT internals but I'd be scared to attack a broken WinXP box the same way I do a Linux box. Even the nominal Windows techs tend to do voodoo support. Update your AV definitions, hit Windows Update, post a HJT log, sacrifice a chicken.... It's a shame too. NT really is a neat system. It's the blasted Win32 subsystem that's the problem. Oh God don't remind me. I had to do a W2k reinstall over the phone a couple weeks ago. There was a bit of adware that du
  11. In the interest of fairness, I'll qualify that a bit. There are Linux projects that take human factors very seriously. GNOME is possibly the best example and KDE is moving in that direction. It's the community as a whole that suffers from the engineering obsession. (More fairness: Serious Windows users have the same engineering focus. Look at gamers. How many of them would be willing to trade 10 FPS for a more a user-friendly UI? Half of them would probably go back to Win3.1 if they thought it would boost their framerates.) Same here. I don't even try to explain things. When possible I try t
  12. Little sample, simpler than what I posted above. import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Blink { static class ColorChanger implements ActionListener { private Color[] colors_; private Container pane_; private int state_; public ColorChanger(Container pane, Color[] colors) { pane_ = pane; colors_ = colors; state_ = 0; } public void actionPerformed(ActionEvent e) { pane_.setBackground(colors_[state_++]); if (state_ >= colors_.length) { ((Timer)e.getSource()).stop(); } } } public static void main(Strin
  13. Something like this (from memory, haven't tested it): class C implements ActionListener { private int state = 0; public void actionPerformed(ActionEvent e) { switch (state) { case 0: // set color // increment state break; case 1: // set color // increment state break; case // last state // set final color // disable timer. ((Timer)e.getSource()).stop() might work. } } } // elsewhere int interval = // update frequency in milliseconds Timer t = new Timer(interval, new C()); t.start() That's a classic procedural state machine. There are more object-oriented
  14. Ah, but did she want to convert? If she was really interested in what you told her its not hard to believe that she would have been willing to adjust to the Mac. She became, however briefly, a Real User. It's the people who aren't interested that are the problem. But can he maintain it? It's no problem using a computer if you're using it like the black box I mentioned earlier. I've converted normal people to Linux and while they're completely comfortable I know that they couldn't maintain the systems themselves. Christ, I know people who can't maintain OS X. Hitting the menu item to pull in u
  15. Indeed. The problem is familiarity. People want to use what they know. The Windows user-experience is by most standards inferior to OS X and at best on par with Linux but the fact remains that Windows users know Windows and don't know OS X or Linux. It takes effort for them to learn the new system and to unlearn the old system. It's reasonable to expect a serious User to expend that effort but for most people the computer simply isn't important enough. Every hour they spend learning is an hour they aren't doing what they want to do. But are those really benefits from their POV? And more impor
  16. javax.swing.Timer. Write the animation object as a little state machine, set the timer interval to the update frequency of the animation. Each tick the timer calls actionPerformed() on the object, the object changes the background color and transitions the next state. When it exits the final state it stops the timer.
  17. So, am I going to end up being the token member who doesn't feel contempt for the great unwashed?
  18. The enums, you mean? The enum declaration is syntactic sugar for a class decl. The generated Operation class looks like this, sans method bodies and private members: public abstract class Operation extends java.lang.Enum { public static final Operation PLUS; public static final Operation MINUS; public static final Operation TIMES; public static final Operation DIVIDE; public static final Operation[] values(); public static Operation valueOf(java.lang.String); abstract double eval(double, double); Operation(java.lang.String, int, Operation$1); } A static block initializes the constants
  19. But they're different. \n is a literal Unicode linefeed, %n is a printf conversion specifier that's replaced with a platform-specific line terminator.
  20. There'll probably be some differences between the config files on the two systems. You could rig up your .profile to modify the environment based on the current system. A while back I experimented with storing all of my dot files in a tree under ~/config (or something) and symlinking them back into ~. You could do something similar, storing per-system config files and then having the login script link them into the place. (This would be easier if Linux supported the variant symlinks (I think that's what they're called) planned for Dragonfly, where the symlinks can contain shell variables that