Intensive Purposes

Archive for the 'Science' Category



Kinesis Classic MPC on Mac via PS/2 -> USB adapters 

The tricky part about this is getting the apple key where you want it. The apple key is hidden in the embedded layer of the keypad. I found statements like that all over the web.

For anyone who was annoyed like me, i’ll actually document where they are:

the ‘H’ and ‘N’ keys are the left and right apple keys. I’m assume H is left and N is right, but it doesn’t really matter to me.

Also, you can’t map Keypad-H and Keypad-N to the correct spots in one remap session. I guess remapping an embedded key confuses the keyboard. I had to remap one of them, exit remapping mode, and then remap the other (or i’d have an apple key that generated N’s or H’s!)



Two Column CSS layout 

When people ask me how to make a standard two column layout using CSS, i often tell them to just use a background image that makes it look like both columns stretch the entire height of the page (while in reality the column with the shortest content actually stops first, you can’t tell because the background image is designed to line up with the columns)

Tonight, in boredom, and since i was in the CSS mode from looking at my students HTML homework (we do xhtml 1.0 strict, baby!) i created a much better solution that doesn’t require the ghetto background image smoke and mirrors.

you do the same thing as usual: create two divs and float one to the left of the other.

but on the right div, you actually give it the background you want for the left div
then you give the right div a padding-left equal to the width of the left div

next you put another div inside the right div with the background you really want for the right side

finally, you put one big div around it all with a background the same as the the one for the right side.

that way the padding on the “right” div makes sure the left side has background that spans the whole length of the right div.

and the big div that wraps around it all makes sure the right side has background all the way down if the left side happens to be longer.

check out the code



BroadRelay Rack 

This post is coming to you from inside the BroadRelay rack cage!



Really Funny Post 

Damn this has got to be the funniest blog post i’ve ever read. It starts out as a tounge in cheek jab at the movie industry for blaming all their troubles on kids with BitTorrent and just goes off from there in every direction.

Definitely read it:

read on

from Gizmodo



Patience… 


Its been running for a few days now… almost there… almost there…



I fixed my phone!!!! 

my motorola V3 razr screen is finally fixed!



Apple and Intel, really? 

Well, according to C|Net we’ll hear an announcement from Apple tomorrow about them leaving IBM and switching to Intel.

Everyone one of course is speculating what the Mac world will be like running on x86 chips… Will there be a version of OS X that runs on PCs? and so on.

Our very own redvision has mentioned to me a much more feasible possibility, which i’d like to write here, so you can all give him props if he’s right (but not blame me if he’s wrong)

What if Apple is just working on a deal to have Intel produce powerpc compatible chips? Apple does own some of the rights to the powerpc design. Wouldn’t that be more likely than a switch to x86?

I say its either this, or nothing.



Evenly Spaced on Ellipse 

Ok, this one goes beyond what i remember from geometry classes (appologies to Mrs. Gay, my high school geo. teacher)

I’m trying to evenly space a bunch of items (we’ll use dots for this example) around an ellipse. I can do it for a circle, but when transform it to an ellipse, it gets distored. I might be using the wrong equations to generate an ellipse, or maybe its more complicated. Here’s what i get, and notice how the points on the extremes of the x-axis are pushed closer together:

ellipse

Update: Actually, it would be better to calculate a polygon of n sides that fits in the elipse. The sides must all be equal length, but the shape doesn’t need to be regular (all angles the same). That way, i’ll have n items on an ellipse, with equal space between each item (instead of equal distance on the circumference, which could make them closer together in linear space)

Sorry if you’re not a geek, but many of you are, and some of you even have prestigious geek friends who handle this sort of stuff in their sleep, whilst dreaming of mirrors curved in just such a way to calculate all sorts of intense math by reflecting light properly. Here’s my code:


// X radius
var XR:Number = 200;

// Y radius
var YR:Number = 50;

// number of points to plot
var n:Number = 45;

// an object to paint on
var mc:MovieClip = _root.createEmptyMovieClip("canvas", 1);

for (var r=0; r<2*Math.PI; r=r+(2*Math.PI/n)) {
// calculate x and y
var x = XR * Math.sin(r) + XR;
var y = YR * Math.cos(r) + YR;

// draw a 2x2 'point'
canvas.moveTo(x, y);
canvas.beginFill(0x000000, 100);
canvas.lineTo(x+2, y);
canvas.lineTo(x+2, y+2);
canvas.lineTo(x, y+2);
canvas.lineTo(x, y);
canvas.endFill();
}



Apple and Intil 

Everyone with a website is talking about the latest Apple using Intel processors rumor. I’ve been a mac user for years, and an Apple ][ user before that. I think this is the standard cycle of rehashing old Apple rumors. The revival of the newton rumor is too similar to the iPhone rumor that was spread last month, so lets go back to an old favorite: Apple using Intel.

My guess is that this won’t happen any time soon, and Apple is merely trying to put some heat on IBM, who have failed to deliver a 3Ghz processor to date.

Thoughts?



Are Avatars Lame? 

Do you all think avatars are lame? I played with them a while back when i had xoops installed. My first reaction was that they are kinda silly. I mean, why would you want a picture of bart simpson or whatever next to everything you write?

While i used xoops i guess i accepted them, and it was funny to see what other users chose as their avatars.

now that i’m done with xoops, i think the site is a while lot cleaner without them.

QUESTION: do you think avatars add to the discourse, or are they just lame?



Sunpipes 

I love to see progress in clean and renewable energy technologies and this one takes the cake. Imagine running actual sunlight directly to your dreary, windowless office space or to the basement of your house. Not only that… if it’s the summer time, just filter out the IR to keep the place cool and instead of letting it float off into space, direct the infrared at some solar cells that charge batteries to help power your lights when it’s dark outside. If this thing really works and gets adopted on a large scale, it can save a whole crap load of grid energy.

Plus, I can’t wait to get one and hack it into a heat laser to shoot at unsuspecting penn students.



ATI Radio 9600 XT or 9800 XT? 

Does anyone have any insight about the two radion xt cards that Apple offers on its store with the G5?

I’m trying to decide if getting the 9800 is worth the extra 300 bucks, and will i see the difference in doom 3, for example…

I’m not a 3d graphics guy or anything, so this is all about ego.



The evolution debate 

This is an interesting article. It talks about how people are confused about evolutions status as a “theory”. I hear people all to often voice their lack of support for evolution because it is “only a theory”. This article more lcearly explains why it is a theory and why it is also a set of facts.

http://www.talkorigins.org/faqs/evolution-fact.html



I’ll be Teaching Flash! 

I accepted a part time position teaching Macromedia Flash to Digital Media students at Drexel University (my old school).

It’s pretty exciting, because i’ve always been a wanna-be creative type, and now i’ll get to teach students in a design school at Drexel just enough programming to handle ActionScript and do cool things with it in Flash.

My old Professor Jervis from the class I’ll be teaching recommended me for the job.