Friday, January 21, 2011

From int to Binary to float

Quiet afternoon at work (which is quite rare), so I wrote a little java program that converts from integer to binary to float.

public class PracticeMain {

public static void main(String[] args) {

int number = 26;
int remainder;
String output = "";

while(number > 1)
{
remainder = number%2;
output = (Integer.toString(remainder)) + output;
number = number/2;
}

output = (Integer.toString(number)) + output;
System.out.print(output);

StringBuffer outputString = new StringBuffer(output);
outputString.reverse();
output = outputString.toString();

double floatnum = 0;

for(int i= output.length(); i > 0 ; i--)
{
if(output.charAt(i-1) == '1')
{
floatnum = floatnum + Math.pow(2, (i-1));
}
}

System.out.println();
System.out.println(floatnum);

}

}

Wednesday, January 12, 2011

Parts and Structure

"Knowing only the composition (the parts that compose a system) and the structure (the way those parts are connected), we can learn a lot about a complex system." -Prof. Ruths, TEDxMcGill

Monday, December 20, 2010

Blue Sky, Black Death

"If you think about it, it's not easy to keep from just wandering out of life. It's like someone's always leaving the door open to the next world. If you aren't paying attention you can just walk through it and then you die."

Tuesday, December 7, 2010

Blah blee blah

Sabotage often comes from rethinking your decisions. You're not fully committed in those instances where you open yourself up to negotiation.

Make a decision and stick with it, then you don't have to deal with the bullshit of being torn between doing one thing or the other.

Friday, November 26, 2010

From the mouths of Dis.

If you (barely) knew Di like I do (she's a tough chick, operates a sniper rifle), you'd be touched, too. (And I'll admit, taken by surprise!)


Mia:
I have an eidetic memory.
..
No I don't. But hey I'd just watched that episode.

Diana:
It would have been unfair to the rest of us if you'd had an eidetic memory. A single person should not have musical talent, beauty, good taste in fiction AND an eidetic memory!

Monday, October 25, 2010

Everything has a Price / Everything has a Place

I'm feeling more Zen these days, more okay with the untenable nature of what I currently have.

Monday, October 18, 2010

This is not for the faint of Heart

There's a blanket of euphoria wrapping all around me today. From the most important things, like being in love, to the small things, like preparing for work's pumpkin carving contest... everything feels enchanting.

Upcoming stuff:
-I'll be seeing Nick on November 13th when he comes home from China for the first time in almost 3 years
-Halloween party, whether or not I can get everyone on board, it'll be grand

I've been experimenting in the kitchen this weekend. From blogger "Kirsten's Kitchen", I've made the vegan pumpkin lasagna, the sweet potato and red pepper soup, and some burned veggie pâté (got a little side-tracked with my baby, didn't hear the ringer).

Fun, but my creative hunger is still giving me a pounding ache.

I finally have a tangible idea for a painting, but I need to get started asap because it's a fall-season theme.

So much I want to do. So little time.

Anyway, back to work.


"We're the fast and elite
The young and the vigorous"