topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 25, 2025, 3:32 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 304 305 306 307 308 [309] 310 311 312 313 314 ... 364next
7701
I've played with virtual desktops on several occasions, and my shell of choice (blackbox for windows) supports it as well... but I've never been able to get used to the stuff. I've tried, but... no.

Instead, I have two physical monitors, and move "junk" on one, and the stuff I work with on the other. For instance an editor and a shell on the primary monitor, and msn+irc+API reference+firefox on the other.
7702
Living Room / Alternative way to play music
« Last post by f0dder on January 20, 2007, 04:55 PM »
This is pretty cool :-*

music.jpg
7703
General Software Discussion / Re: Scripting vs. Programming
« Last post by f0dder on January 20, 2007, 11:20 AM »
Also, compiled doesn't necessarily mean "machine code" - think java, dotNET, perl/parrot et cetera.

Scripting languages can be compiled rather than interpreted, and traditional compiled languages can be interpreted as well (though not very fun for something like C++).

I still haven't seen a decent description of the difference between "script" and "program", or what distinguishes "scripting language" from other languages. In my mind it has to do with how the "environment" feels like, and how it's typically used. But it's hard to draw any lines... A thing like Python can be (and is) used for anything from little scripts to applications (MusicBrainz picard) to games (EVE online), etc.

7704
Living Room / Re: password-protect external HD (USB)?
« Last post by f0dder on January 20, 2007, 10:13 AM »
If you reinstall windows or really wish to have access to those files in another computer, if you didn't unencrypt (does that word exist?) the files first, you're screwed.
decrypt :)

And you don't need to decrypt, you just need to export the keys from the registry.

But yeah, I'd personally prefer truecrypt or a similar protection, you know what you get there - which includes Rijndael instead of DES/whatever.
7705
Living Room / Re: password-protect external HD (USB)?
« Last post by f0dder on January 20, 2007, 08:39 AM »
NTFS supports encryption, but if you want to access encrypted files from another box than your own, afaik you'll have to export some stuff from your own box and import it on the other - bother. TrueCrypt seems like a decent option.
7706
Living Room / Re: moving operating system from one partition to another?
« Last post by f0dder on January 19, 2007, 09:21 AM »
Paths are going to be a problem - boot.ini, registry entries, etc. Fresh install is a lot safer, even if bothersome.

7707
Living Room / Re: can a file or folder structure make a pc crash at random?
« Last post by f0dder on January 19, 2007, 04:17 AM »
Hmm.

I'd try moving the drive to another controller, and see if the problems still show up. Also, I'd try putting another drive on the controller your "faulty drive" is on - better be a spare drive though; even if I think it's unlikely that a flaky controller could damage a drive, you don't want to take any chances.
7708
Dropping Win9x support? - nice. Perhaps the rest of us can get away with it too, then :up:
7709
Living Room / Re: can a file or folder structure make a pc crash at random?
« Last post by f0dder on January 19, 2007, 03:37 AM »
Which brand is the drive?

You might at least be able to get it RMA'ed...
7710
Post New Requests Here / Re: IDEA: to Shred a file already in Recycle Bin
« Last post by f0dder on January 19, 2007, 03:36 AM »
Just make sure that if you drag something from the recycle bin, drag it somewhere on the same partition the file was deleted from - otherwise the file data on the original partition will not be shredded, and you'll have a copy of the data on the partition you drag to.
7711
Living Room / Re: a 3D game that is only 97kb!
« Last post by f0dder on January 19, 2007, 03:34 AM »
Sound is procedurally generated too :)

Works pretty well in fr-08 imho, but you have to like that kind of music, of course.
7712
Finished Programs / Re: IDEA: Replacement Power Options applet
« Last post by f0dder on January 18, 2007, 06:52 PM »
I'm not sure the SetAffinity() is required - can't remember if GetTickCount() is affected by the TSC weirdness. Heading off to bed, so don't have time for testing either right now :) - don't think it's necessary in this case, though.
7713
Living Room / Re: The Funniest Graph Contest Winner Announced
« Last post by f0dder on January 18, 2007, 05:56 PM »
Haha cranioscopical, that one is wonderful :)
7714
Living Room / Re: wanted: quiet external HD (case) (not wanted: crying children)
« Last post by f0dder on January 18, 2007, 05:53 PM »
If you have motherboard support for it, I'd get an eSATA enclosure... faster & more stable than usb/firewire stuff.
7715
Post New Requests Here / Re: IDEA: to Shred a file already in Recycle Bin
« Last post by f0dder on January 18, 2007, 05:52 PM »
Just restore the file and then shred it.

When you "delete" a file to the recycle bin, it's not actually deleted, but moved to a special hidden folder on your harddrive. If you restore the file, it's just moved back to it's old location. This moving back and forth doesn't move the actual file data, just the "name that points to it".

So: restore, shred, (shift+)delete :)
7716
Finished Programs / Re: IDEA: Replacement Power Options applet
« Last post by f0dder on January 18, 2007, 05:43 PM »
np, couldn't sleep anyway - long live insomnia ;)

EDIT: why do you use the loop thing to construct the idletime variable, instead of just doing DllCall("Kernel32.dll\GetSystemTimes", "*UInt64", idletime, "*Uint64", dummy1, "*Uint64", dummy2) and getting it directly?
7717
N.A.N.Y. Challenge 2007 / Re: Cody Mug for NANY Participants
« Last post by f0dder on January 18, 2007, 05:42 PM »
Wow, what do you do at work, skwire? :)
7718
Finished Programs / Re: IDEA: Replacement Power Options applet
« Last post by f0dder on January 18, 2007, 10:16 AM »
Okay, let me try... you were in the right direction, Farmsteader :)

the code runs once every second, and measures:

1) how many miliseconds elapsed since it last run (tick-tick0). This might seem superfluous, but it CAN vary a bit, since the code runs at normal priority.

2) how much time the CPU was idle (the value from GetSystemTimes) (again, a relative timing, idletime-idletime0).

Thing is, GetSystemTimes returns totals for all CPUs - so on a 2-core system, although only one second has elapsed, 2 "cpu-seconds" could be spent idle, and this is why we have to divide by NUMBER_OF_PROCESSORS.

The affinity thing is anyother problem, and I'm not sure it applies here (can't remember if it affects GetTickCount(), or only the RDTSC CPU instruction and the win32 api QueryPerformanceCounter()). But that problem happens on AMD dualcore CPUs, because their internal time-stamp counters aren't synchronized (while on intel dualcores it seems like either there's a single TSC, or the TSCs are synchronized).
7719
Living Room / Re: HushedCrush: When Talking to Someone is the Wrong Thing to Do
« Last post by f0dder on January 17, 2007, 10:30 PM »
Always nice to see the authors around here. Sorry that we're always so suspicious, but considering (as you mention yourself) the viral nature, as well as the multitude of spam mails from sites with a similar idea... ;D
7720
Finished Programs / Re: IDEA: Replacement Power Options applet
« Last post by f0dder on January 17, 2007, 09:00 PM »
Hm, some things... unless I pass parameters for all three variables to GetSystemTimes, it doesn't return anything - the following code would simply print fluff! with SysInternals' dbgview. Adding "dummy1" and "dummy2", I get some garbage output, indicating that there's output.
lala = %idleticks% + "fluff!"
DllCall("kernel32.dll\OutputDebugString", "uint", &lala)
(christ, AutoHotKey is a weird language).

I still get -100% usage, though - and I'm pretty sure affinity isn't the problem, GetSystemTimes shouldn't be affected by that (rdtsc, GetTickCount() and QueryPerformanceCounter() are, though - I originally thought you were using one of those).

What the heck is going on in the loop in GETCPULOAD?

EDIT: oh, A_TickCount probably translates to a call to GetTickCount(), so affinity might be necessary after all. And the Loop seems to be necessary because of AHK's weird "everything is a string, but we don't translate API output" philosophy. Hm.

EDIT2: I've modified the GETCPULOAD() function somewhat...
GETCPULOAD() ;originally made by shimanov
{
  Global
  idletime0 = %idletime% ; Save previous values
  tick0 = %tick%

  DllCall("Kernel32.dll\GetSystemTimes", "*UInt64", idletime, "*Uint64", dummy1, "*Uint64", dummy2)

  tick := A_TickCount
  dIdle := (idletime - idletime0)
  dTick := (tick - tick0)

  load := 100 - 0.01 * dIdle/dTick

  outstr = Spent time: %dIdle%/%dTick%
  DllCall("kernel32.dll\OutputDebugString", "str", outstr)

  Return,load
}
With dbgview, I get values like...
Spent time: 20000000/1000
Spent time: 20000000/1000
Spent time: 19843750/1000
Spent time: 20000000/1000
Spent time: 19843750/1000
Spent time: 20000000/1000
Spent time: 19687500/1000

EDIT 3: Okay, I should have seen this earlier. Quoting MSDN for GetSystemTimes, emphasis is mine: "Retrieves system timing information. On a multiprocessor system, the values returned are the sum of the designated times across all processors.".

So, for NT systems, add a EnvGet, NumCpu, NUMBER_OF_PROCESSORS near the top of the script, and do dIdle := (idletime - idletime0) / NumCpu. Feels somewhat hacky, but works. Probably better using GetSystemInfo() and checking the dwNumberOfProcessors field, but I dunno how AHK handles structs. If you do the environment thing, check for 9x and assign 1 to NumCpu.
7721
Living Room / Re: HushedCrush: When Talking to Someone is the Wrong Thing to Do
« Last post by f0dder on January 17, 2007, 08:25 AM »
Hmm... sounds like one of those things that collects mail addresses and sells them to spammers  :(
7722
Announce Your Software/Service/Product / Re: Page Headers by Veign
« Last post by f0dder on January 17, 2007, 03:04 AM »
That's a pretty cute idea, Veign!

Linking to the HTTP RFC is cute, and it's nice that redirects are followed :)
7723
Living Room / Re: WikiSeek, the new long-tailed search engine
« Last post by f0dder on January 17, 2007, 03:01 AM »
Cool, it finds hits for 'f0dder' - and relevant ones all of them, none of those counterstrike kiddies ^_^

7724
text/hyperlink works fine here, I use <url=http://blah>text</url> - with square brackets instead of angular ones, of course.
7725
Developer's Corner / Re: Need some help with VB5
« Last post by f0dder on January 16, 2007, 04:56 PM »
Shouldn't be necessary to do threading to have multiple sounds playing at once, anyway. Not sure if PlaySound (in async mode) will do it, but you should be able to use DirectSound from VB if all else fails...

Veign: which OS do you use? And which sound card? Ever since win2k, multiple apps have been able to do sound at once (and have windows/drivers mix it) for me :)
Pages: prev1 ... 304 305 306 307 308 [309] 310 311 312 313 314 ... 364next