Sunday, February 16, 2014

Top Sci-fi

1 - Ender's Game - Orson Scott Card - 1985
2 - Dune - Frank Herbert - 1965
3- Foundation - Isaac Asimov - 1951
4 - Hitchhiker's Guide to the Galaxy - Douglas Adams - 1979
5 - 1984 - George Orwell - 1949
6 - Stranger in a Strange Land - Robert A Heinlein - 1961
7 - Fahrenheit 451 - Ray Bradbury - 1954
8 - 2001: A Space Odyssey - Arthur C Clarke - 1968
9 - Starship Troopers - Robert A Heinlein - 1959
10 - I, Robot - Isaac Asimov - 1950
11 - Neuromancer - William Gibson - 1984
12 - Do Androids Dream of Electric Sheep - Philip K Dick - 1968
13 - Ringworld - Larry Niven - 1970
14 - Rendezvous With Rama - Arthur C Clarke - 1973
15 - Hyperion - Dan Simmons - 1989
16 - Brave New World - Aldous Huxley - 1932
17 - The Time Machine - H G Wells - 1895
18 - Childhood's End - Arthur C Clarke - 1954
19 - The Moon is a Harsh Mistress - Robert A Heinlein - 1966
20 - The War of the Worlds - H G Wells - 1898
21 - The Forever War - Joe Haldeman - 1974
22 - The Martian Chronicles - Ray Bradbury - 1950
23 - Slaughterhouse Five - Kurt Vonnegut - 1969
24 - Snow Crash - Neal Stephenson - 1992
25 - The Mote in God's Eye - Niven & Pournelle - 1975

Wednesday, February 12, 2014

Code coverage

http://www.ibm.com/developerworks/java/library/j-cq01316/index.html?ca=drs

There are different types of coverage measurements, but most tools focus on line coverage, also known as statement coverage. In addition, some tools report branch coverage. A test coverage measurement is obtained by exercising a code base with a test harness and capturing data that corresponds to code having been "touched" throughout the lifetime of the test process. The data is then synthesized to produce a coverage report. In Java shops, the test harness is commonly JUnit and the coverage tool is usually something like Cobertura, Emma, or Clover, to name a few. 

....

Tuesday, February 11, 2014

save screen buffer to file

screen -r myscreen

Go to copy mode
Ctrl + a [

Go to the beginning of the line that you want to copy (use arrow keys or Pg Up)

then press Spacebar to initiate copying of current line

Go to the end of the line that you want to copy

press Spacebar again to stop copying of the current line

go to command mode
Ctrl + a :

then Save the selected text to the file by:
writebuf /home/bla/screen.log

Ubuntu can't get on the internet

http://answers.yahoo.com/question/index?qid=20090501233741AAN97hi 

Okay connects to lan. check. 
has local IP address... check. 
can't connect to internet... 


ping google.com
PING google.com (173.194.33.130) 56(84) bytes of data.
64 bytes from sea09s17-in-f2.1e100.net (173.194.33.130): icmp_req=1 ttl=54 time=12.0 ms

try this in a browser: 

http://173.194.33.130

Got Google? 
The problem is in your DNS settings. 
try this: open a terminal and type: 
sudo cp /etc/resolv.conf /etc/resolv.conf.bak 
(password) 
sudo echo "nameserver 208.67.222.222" > /etc/resolv.conf 
sudo echo "nameserver 127.0.0.1" >> /etc/resolv.conf 
sudo /etc/init.d/networking restart

Thursday, February 6, 2014

Embed image to HTML by encoding it in base64

http://www.base64-image.de

<img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4Q1hRXhpZgAATU0AKgAAAAgACgEOAAIAAAALAAAAhgEP">