Sometimes, much too often these days, I feel my emotions overwhelming.
My curse is that I care too much.
Tuesday, June 14, 2011
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);
}
}
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.
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!
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.
Subscribe to:
Posts (Atom)
