Friday, December 31, 2010

Sample code, convert hex to bin ENJOY.








import javax.swing.JOptionPane;

class J{
static String[] hex={"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};
static String[] binary={"0000","0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"};
 static String input1, input2;
static String result1 ,result2;
public static void main(String[] arguments) {

input1 = JOptionPane.showInputDialog(null, "ist digit");
input2 = JOptionPane.showInputDialog(null, "Sseond digit x");

result1=fun1();
result2=fun2();
JOptionPane.showMessageDialog(null, "Hex to Bin = " + fun1() + fun2());
System.exit(0);
}

 static String fun1(){
 for(int i=0; i < input1.length(); i++)//LOOP USER INPUT
 {

char tempa=input1.charAt(i); //decl var temp to hold uiScan   for casting string ;              charAt(i) handles every char
String temp1=""+tempa+"";    //tempObj cast string to hex 
for(int j=0;j<hex.length;j++)  // loop global hex EQUIVALENTS with the converted strin
    {
   if(temp1.equalsIgnoreCase(hex[j])) //nice body
    {
    result1=binary[j];               //result into bin[get j ]
    }
  }
 }
return result1 ;
}

 static String fun2(){
 for(int i=0; i < input2.length(); i++)//LOOP USER INPUT
 {
 
  char tempb=input2.charAt(i  ); //
charAt(i) handles every 
  String temp2=""+tempb+"";     
  for(int j=0;j<hex.length;j++)// loop global hex EQUIVALENTS with the converted strin
    {
   if(temp2.equalsIgnoreCase(hex[j])) //nice body
    {
    result2=binary[j];          //result into bin[get j ]
    }
  }
 }
return result2 ;
}
}



Thursday, December 30, 2010

Music child Ona


It is 6am and Chill, still with her accompaniment wraps her of prose, embracing .
An augments of goddess in the celesltial realm, the Deities of sound seems mad.
OUR Father thou art in heaven , a force of never lost and bueaty now cast the admirers. Is it the other side of the moon? Deity of death make a face.
Its about time a perfect segs about to depart, to write you a song of dances .
Thank you Ona for being an inspiration and a freind.


[Ona Baliukienė]
3:22am
Good evening
Send me your song, if you must have saved
[You]
3:24am
still
[Ona Baliukienė]
3:28am
I look forward to
[You]
3:30am
health is wealth
[Ona Baliukienė]
3:34am
Thanks,
But I'm climbing the mountain every day, snapping snowbank.
[You]
3:39am
snow ?
[Ona Baliukienė]
3:41am
Same
Served?
Watch "The wall"
Write your own language, perhaps a translator
[You]
3:49am
?
i like your prose
i lke your blog
[Ona Baliukienė]
3:52am
The fate of our people is very similar
[You]
3:52am
how Ilike to know
?
[Ona Baliukienė]
3:55am
My country has been for 150 years without a title, only to Russia.
[You]
3:56am
russians served the people
intelectuals
[Ona Baliukienė]
3:57am
This is the price of occupation
No, They deported us, murdered
It was even banned a letter to assimilate
[You]
4:02am
im sorry
see my picture song
[Ona Baliukienė]
4:06am
Where?
[You]
4:07am
hmmmm the wall
[Ona Baliukienė]
4:12am
Do you still a child, friend, and I try to tell you a lot
I look forward to the song
[Ona Baliukienė]
4:29am
Silent, read my friend the truth
Mel was nice, and many believed
Ona is offline.4:32am
Ona is online.4:32am
[Ona Baliukienė]
4:33am
We are free only for 20 years
Ona is offline.4:35am
[You]
4:35am
Freedom is Gods intimate force (send as a message)
Your chat message wasn't sent because Ona is offline.
you tell me abstractions (send as a message)
Your chat message wasn't sent because Ona is offline.
I tell you I love
Ona is online.4:37am
[Ona Baliukienė]
4:37am
I even doubt that you believe in me, that's a true tear.