Nick George

Ranch Hand
+ Follow
since Apr 04, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nick George

Originally posted by Arvind Birla:
I would sleep around a bit.



I like this idea
11 years ago
Anyone else REALLY miss tree browsing?!

I just got a laptop, with every intention of downgrading it to XP, but apparently there's no driver support for some of the hardware. And just to rub salt in a still very open wound, it turns out this means I finally have to give up and start using WMP 11. I really hate the user interface.

Tree browsing just makes so much sense! You pick the artist, you pick the album, and it plays it. WMP 11 jumps directly from artist to songs, so you can't browse albums except by scrolling through the songs. If you have 52 Bob Dylan albums, this is no easy task! Then, you have to do another search by that album name if you only want it to play that album.

I tried switching to iTunes, but without even considering anything else, I don't think I could ever get over not having a 'now playing' list. That's just too stupid for words. If you browse away from the currently playing album, it won't go to the next song?! Really?!

Is anyone with me on this? They should at least make tree browsing an option.
11 years ago
I want the JFileChooser to open wherever the jar file for the program is located. I feel like I remember this being really easy on a PC, but I can't get it to work on Mac. The irritating thing is that I can get it so that the selected file is right where I want it, but the thing itself opens elsewhere.

The Code:



It prints a file in the correct directory, but just starts the filechooser in the default, I guess because the selected file doesn't exist. I guess I could make a dummy file in there, but that seems silly. I've also tried
setCurrentDirectory( file.getParentFile() ), but that doesn't seem to do anything different.

Thanks,
Nick
11 years ago
I just reread my inital post, and, it stands to reason that I didn't get much answer. Let me explain myself a bit better:

KeyListeners are wonderful and easy to use. The problem is that they rely on focus, which apparently is very hard for frames. I can't add the listener directly to my panel, because I need it to respond any time the whole JFrame is focused. You can't add listeners to JFrames, because there are too many different panes that the odds of the right one being focused is low. Thus, I've found many recommendations to use input/action maps in a component. The problem seems to be that the input maps only recognize control as a mask for other keystrokes. I've done a lot of googling on this, and I'm amazed that I'm seemingly the first to run into this problem (and whine about it on the internet).
11 years ago
Sorry to bump myself here, but it seems very strange that you just can't know when the user has hit control in a JFrame. Anyone?
[ June 19, 2008: Message edited by: Nick George ]
11 years ago
If you request focus on one button, you'll get a little blue circle around it. Macs also seem capable of making one button pulse blue, usually the OK button. As an example that is (I think) done in java, look at file -> properties in eclipse. Anyone know how to pulse like that?

Thanks,
Nick
[ June 17, 2008: Message edited by: Nick George ]
11 years ago
Is this really not possible?! I see how to get things like control and shift as modifiers, but what if I just want to know when the user hits control?!

getInputMap().put( KeyStroke.getKeyStroke( KeyEvent.VK_SPACE , 0 ), "what a crock" );
getActionMap().put( "what a crock" , action );

works fine, but with KeyEvent.VK_CONTROL (or ("CONTROL" , 0)), nothing.
[ June 19, 2008: Message edited by: Nick George ]
11 years ago
Can you elaborate a little on the "right way?" If you're just looking for a jerk, a threshold ought to do (you could also try my boss).

If you're worried about getting a noise jerk accidentally (which from my testing doesn't seem to be much of a problem), I've been working on a manager for binning together groups of signals, but that's mainly because I'm outputting a LOT of data to files, and I don't really need 125 Hz for my application.

As far as signal processing, you can always do stuff like take the peak height relative to recent averages, and find stuff like the full width at half maximum, and that'll give you a pretty good idea what the pulse looked like. I'm not really sure what I'd do with it, but it'd be an interesting puzzle to work at.
[ June 10, 2008: Message edited by: Nick George ]
11 years ago
I've been getting into it recently (see my other MD post!). The WiiRemoteJ api is astonishingly powerful and easy to use. I'm working on it both as a job, and making dopey little games on the side. If I get a good idea, I want to start a bigger game project with it soon...
11 years ago
yeah, bumping two cars together to determine mass ratios is a sure one.
11 years ago
So I'm working for a couple of weeks for my physics department writing a WiiSuiite that lets the user talk to a wii remote. The idea is to design nifty intro labs using the remotes as bluetooth accelerometers. Here are my ideas for labs so far:

-Group A puts wiimote on a RC car, drives it around recording data. Gives data to group B, who has to integrate the data to determine where the car ended up, given a known start location.

-Spin the wiimote on a very smooth surface (ice?). By recording the centrifugal acceleration, determine how far off the center of gravity the force detector is. Measure out and add silly putty onto end of wiimote to make it spin without recording any centripetal forces.

I was also thinking it'd be neat if there was some sort of General Relativity lab that could be done, since the wiimote is the perfect demonstrator of the equivalence principle.

What ideas can the ranch come up with?
11 years ago
Hey fellas,
I know roughly how to do it in unix, but does anyone know how to talk to a db25 with windows? I guess if it were possible in java, that'd be the best, but, that seems pretty unlikely.

Alternatively, if anyone knows any clever ways to trick their computer into acting like a voltage source that can be turned on/off programmatically, maybe even with variable voltage, that'd also be awesome.

-Nick
11 years ago
Thanks, but I'm not planning on going down the applet path... is that just for testing purposes?
13 years ago
I don't know beans about applets, never made one in me life.

Honestly, I don't even really think it's an Applets question, I wonder if people will be annoyed if Icrosspost
[ April 16, 2006: Message edited by: Nick George ]
13 years ago
Dvorak keyboard?! That's cheating! I learned DVORAK the honest way, on a QWERTY keyboard with a diagram.

Now I really wish I could go back, it's such a pain in the ass to have to hunt and peck on every other computer, not to mention I have to change my programs so other people can use them.

Bottom line: it's stupid, you type no faster, and it's a real pain in the ass. Stay away!

(It is kind of nice when people try to use my computer)
13 years ago