<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-16077594</id><updated>2012-01-26T20:20:42.224Z</updated><category term='Ireland job'/><category term='Tenerife'/><category term='movies'/><category term='latex'/><category term='Austria'/><category term='Haider'/><category term='cheat'/><category term='freedom'/><category term='Lausanne'/><category term='USA'/><category term='ebook'/><category term='ASP.NET'/><category term='North Korea'/><category term='grammar'/><category term='galway ireland'/><category term='software engineering'/><category term='sheet'/><category term='Mono'/><category term='c++'/><category term='training'/><category term='Fuentesauco Spain Bull Tradition'/><category term='xml'/><category term='final degree proyect'/><category term='Corrib'/><category term='lego'/><category term='threads'/><category term='java'/><category term='SOCCER EUROCUP 2008'/><category term='ESA ireland'/><category term='video games'/><category term='maths'/><category term='programming'/><category term='politics'/><category term='dom4j'/><category term='graphics'/><category term='music'/><category term='xslt'/><category term='Salamanca'/><category term='book'/><category term='Switzerland'/><category term='french'/><category term='POSIX'/><category term='running'/><category term='Gaway'/><category term='ireland'/><category term='docks'/><category term='history'/><category term='OOP'/><category term='music myspace'/><category term='Object Oriented Design'/><category term='.NET'/><title type='text'>Sin noticias de Dios (No news from god)</title><subtitle type='html'>My thoughts, my life, me.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tritanic.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default?start-index=101&amp;max-results=100'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>211</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-16077594.post-4283657870301059912</id><published>2012-01-26T20:12:00.002Z</published><updated>2012-01-26T20:20:42.237Z</updated><title type='text'>The future of education begins today (UDACITY)</title><content type='html'>&lt;div style="text-align: justify;"&gt;After the success of the "Introduction to Artificial Intelligence" course (&lt;a href="www.ai-class.org"&gt;www.ai-class.org&lt;/a&gt;), &lt;a href="http://robots.stanford.edu/"&gt;Sebastian Thrun&lt;/a&gt; and a team of professors, engineers, designers, etc want to turn upside down higher education as we understand it today.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="www.udacity.com"&gt;UDACITY&lt;/a&gt; is an open online university. Imagine the possibilities of a world with billions of educated humans. How many new ideas that could make our live better get lost because some genious does not have access to education.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Say hello today to the future of education.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="www.udacity.com"&gt;www.udacity.com&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4283657870301059912?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4283657870301059912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4283657870301059912'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2012/01/future-of-education-begins-today.html' title='The future of education begins today (UDACITY)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5226839364050481065</id><published>2012-01-21T20:45:00.003Z</published><updated>2012-01-21T20:55:10.230Z</updated><title type='text'>Find all the pairs in an array of integers which sum X (in C)</title><content type='html'>&lt;pre&gt;/*&lt;br /&gt;* main.c&lt;br /&gt;*&lt;br /&gt;* Created on: Jan 21, 2012&lt;br /&gt;* Author: julio&lt;br /&gt;*/&lt;br /&gt;#include&lt;br /&gt;&lt;br /&gt;void findPairsAdding(int array[], int size, int sum){&lt;br /&gt;&lt;br /&gt; // Assuming the array is sorted&lt;br /&gt; int i = 0, j = size -1;&lt;br /&gt; while(i &amp;lt; j){&lt;br /&gt;  if(array[i] + array[j] == sum){&lt;br /&gt;   // We have found a pair, now let's take care of duplicates&lt;br /&gt;   int k = i, l = j;&lt;br /&gt;   // From i to k duplicated values of the lower value&lt;br /&gt;   while(k &amp;lt; l &amp;amp;&amp;amp; array[k] == array[k +1])&lt;br /&gt;    k++;&lt;br /&gt;   // from k to l duplicated values of the higher value&lt;br /&gt;   while(k &amp;lt; l &amp;amp;&amp;amp; array[l] == array[l -1])&lt;br /&gt;    l--;&lt;br /&gt;   int aux1 = i, aux2 = j;&lt;br /&gt;   for(aux1 = i ; aux1 &amp;lt;= k ; aux1++){&lt;br /&gt;    for(aux2 = j; aux2&amp;gt;=l; aux2--){&lt;br /&gt;     printf("i: %d, j: %d, (%d, %d) = %d\n",aux1,aux2,&lt;br /&gt;       array[aux1],array[aux2],sum);&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;   i = aux1-1;&lt;br /&gt;   j = aux2+1;&lt;br /&gt;  }&lt;br /&gt;  if(array[i] + array[j] &amp;gt; sum)j--;&lt;br /&gt;  else i++;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main(int argc, char ** argv){&lt;br /&gt; int a[] = {1,2,8,9};&lt;br /&gt; findPairsAdding(a,4,10);&lt;br /&gt; return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5226839364050481065?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5226839364050481065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5226839364050481065'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2012/01/find-all-pairs-in-array-of-integers.html' title='Find all the pairs in an array of integers which sum X (in C)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5298967178897030845</id><published>2012-01-15T20:43:00.004Z</published><updated>2012-01-15T20:58:41.663Z</updated><title type='text'>Is your machine little or big endian? Find it out!!</title><content type='html'>&lt;div style="text-align: justify;"&gt;Little endian is a multibyte hardware storage scheme where the most significant byte (the one whose bits contribute a bigger amount to the resulting number) is stored in the lower address. For instance, if an integer is represented with 4 bytes, the number 1 will be represented as:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;memory address  0        1        2        3   &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Value           00000000 00000000 00000000 00000001&lt;/div&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;Big endian stores the most significant byte in the highest address. So, again our integer with decimal value 1 will be stored as the following binary number:&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;memory address  0        1        2        3   &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Value           00000001 00000000 00000000 00000000&lt;/div&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Do you want to know if your machine stores numbers in Little or Big endian? The following C code will give you the answer:&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;div style="text-align: justify;"&gt;#include &lt;/div&gt;&lt;stdio.h&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;int isLittleEndian(){&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       // Create an integer with the least significant byte set to 1&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       int x = 0x0001;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       //  Get a pointer to the integer, interpret it as a byte, and see&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       //  what it contains. So we are giving a look to the contents of the&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       //  lowest memory address. If it contain the LSB then it is not &lt;/div&gt;&lt;div style="text-align: justify;"&gt;       //  little endian&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       if(*(char*)(&amp;amp;x)==1) return 0;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       else return 1;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;}&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;int main(){&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       printf("Is Little Endian: %s",(isLittleEndian())?"True":"False");&lt;/div&gt;&lt;div style="text-align: justify;"&gt;       return 0;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;}&lt;/div&gt;&lt;/stdio.h&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Again, do not forget that endianness is a characteristic of the hardware.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5298967178897030845?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5298967178897030845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5298967178897030845'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2012/01/is-your-machine-little-or-big-endian.html' title='Is your machine little or big endian? Find it out!!'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5018782587506391137</id><published>2012-01-08T08:05:00.005Z</published><updated>2012-01-08T09:58:41.476Z</updated><title type='text'>"Private" corporation's space age</title><content type='html'>&lt;div style="text-align: justify;"&gt;Sending things to the space is an extremely expensive &lt;span class="J-JK9eJ-PJVNOc" original="bussiness"&gt;business&lt;/span&gt; (around 8000$/Kg), and one of the reasons maybe the fact that &lt;a href="http://www.blogger.com/www.umsl.edu/~naumannj/.../economies%20of%20scale.ppt"&gt;economies of scale&lt;/a&gt; don't apply. As more and more activity takes place in &lt;a href="http://www.sccs.swarthmore.edu/users/08/ajb/tmve/wiki100k/docs/Low_Earth_orbit.html"&gt;low Earth orbit&lt;/a&gt;, the costs tend to decrease, but the reduction is slow if there is no competition between private corporations.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Next February the 7th an amazing milestone is going to be achieved; the first ever private spaceship is going to be launched to the &lt;a href="http://www.esa.int/esaHS/iss.html"&gt;International Space Station&lt;/a&gt;. It is an unmanned vehicle that will bring a few supplies to our fellow humans whose residence lays in the boundaries of our home Earth. The mission and type of vehicle brings to mind the European Space Agency's ETV missions. Once more our American fellows are much more dynamic and innovative (and probably cheaper). The unmanned &lt;a href="http://www.spacex.com/dragon.php"&gt;Dragon capsule&lt;/a&gt; has been designed and built by &lt;a href="http://www.spacex.com/"&gt;SpaceX&lt;/a&gt;, and will be launched by a &lt;a href="http://www.spacex.com/falcon9.php"&gt;Falcon 9 booster&lt;/a&gt;, also designed and built by SpaceX, from &lt;a href="http://www.nasa.gov/centers/kennedy/home/index.html"&gt;Cape Canaveral space center&lt;/a&gt; in Florida.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://www.enjoyspace.com/uploads/news/novembre_2009/falcon/falcon9-musk.jpg"&gt;&lt;img src="http://www.enjoyspace.com/uploads/news/novembre_2009/falcon/falcon9-musk.jpg" border="0" alt="" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 640px; height: 480px; " /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;I truly believe that paving the way for private capital and profit based research and engineering into the space industry will accelerate its development, and that we will see much more activity our there in the near future than we are used to. Now, these things don't come without &lt;a href="http://www.businesspundit.com/the-worlds-worst-environmental-disasters-caused-by-companies/"&gt;risks&lt;/a&gt;.Thus, if a company is granted permission to mine the moon, control mechanisms have to be put in place, otherwise we as humans will end up destroying yet another celestial object.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Exciting times ahead of us!!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5018782587506391137?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5018782587506391137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5018782587506391137'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2012/01/private-corporations-space-age.html' title='&quot;Private&quot; corporation&apos;s space age'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5210089339587215716</id><published>2012-01-04T19:13:00.003Z</published><updated>2012-01-04T19:17:04.706Z</updated><title type='text'>Perpetual Motion :)</title><content type='html'>&lt;a href="http://n3ri.com.ar/wp-content/uploads/2011/01/Troll_Science_Perpetuum.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 350px;" src="http://n3ri.com.ar/wp-content/uploads/2011/01/Troll_Science_Perpetuum.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5210089339587215716?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5210089339587215716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5210089339587215716'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2012/01/perpetual-motion.html' title='Perpetual Motion :)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8292831338990450076</id><published>2011-12-18T21:54:00.004Z</published><updated>2011-12-18T21:59:54.232Z</updated><title type='text'>Shifting decipher (probability based)</title><content type='html'>A little experiment using probability to find out the shifting applied to encrypt a message.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre&gt;dicctionary = ['the', "and","by","to", "in", "out"]&lt;br /&gt;message = "Esp qtcde nzyqpcpynp zy esp ezatn zq Lcetqtntlw\&lt;br /&gt;Tyepwwtrpynp hld spwo le Olcexzfes Nzwwprp ty estd jplc."&lt;br /&gt;&lt;br /&gt;separation_characters =[' ','.']&lt;br /&gt;&lt;br /&gt;score = []&lt;br /&gt;&lt;br /&gt;m = [x.lower() for x in message]&lt;br /&gt;m = "".join(m)&lt;br /&gt;for i in range(27):&lt;br /&gt;  sh = []&lt;br /&gt;  for x in m:&lt;br /&gt;      if x in separation_characters:&lt;br /&gt;          sh.append(x)&lt;br /&gt;      else:&lt;br /&gt;          sh.append(chr(((ord(x)+i-97)%26 + 97)))&lt;br /&gt;  sh = "".join(sh)&lt;br /&gt;  words = sh.split(" ")&lt;br /&gt;  print words&lt;br /&gt;  found = 0&lt;br /&gt;  for w in words:&lt;br /&gt;      if w in dicctionary:&lt;br /&gt;          found = found + 1&lt;br /&gt;  print found/len(words)&lt;br /&gt;  score.append(found/float(len(words)))&lt;br /&gt;print score&lt;br /&gt;maxval = 0&lt;br /&gt;maxindex = 0&lt;br /&gt;for i in range(len(score)):&lt;br /&gt;  if score[i] &amp;gt; maxval:&lt;br /&gt;      maxval = score[i]&lt;br /&gt;      maxindex = i&lt;br /&gt;print "SHIFT%d"%(maxindex)&lt;br /&gt;sh = []&lt;br /&gt;for x in m:&lt;br /&gt;  if x in separation_characters:&lt;br /&gt;      sh.append(x)&lt;br /&gt;  else:&lt;br /&gt;      sh.append(chr(((ord(x)+maxindex-97)%26 + 97)))  &lt;br /&gt;print "".join(sh)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8292831338990450076?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8292831338990450076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8292831338990450076'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/12/shifting-decipher-probability-based.html' title='Shifting decipher (probability based)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1900354729151317110</id><published>2011-12-18T21:47:00.002Z</published><updated>2011-12-18T21:53:17.135Z</updated><title type='text'>Hanoi Towers solver (python)</title><content type='html'>This is not the most elegant of efficient piece of code, but it was quite fun to write (&lt;a href="http://www.ideone.com/g6Zhb"&gt;http://www.ideone.com/g6Zhb&lt;/a&gt;):&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre&gt;def print_game(board):&lt;br /&gt; for l in board:&lt;br /&gt;  print l&lt;br /&gt; print "----"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;def initial_state(board,count):&lt;br /&gt; board[0] = range(count,0,-1)&lt;br /&gt; board[1] = []&lt;br /&gt; board[2] = []&lt;br /&gt; &lt;br /&gt;def goal_state(board,count):&lt;br /&gt; board[0] = []&lt;br /&gt; board[1] = []&lt;br /&gt; board[2] = range(count,0,-1)&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;def children(board):&lt;br /&gt; children = list()&lt;br /&gt; if board[0] != []:&lt;br /&gt;  val = board[0][-1]&lt;br /&gt;  if len(board[1]) == 0 or board[1][-1] &amp;gt; val:&lt;br /&gt;   #print_game(board) &lt;br /&gt;   child = list([[],[],[]])&lt;br /&gt;   child[0] = board[0][0:-1]&lt;br /&gt;   child[1] = board[1][:]&lt;br /&gt;   child[1].append(val)&lt;br /&gt;   child[2] = board[2][:]&lt;br /&gt;   children.append(child)&lt;br /&gt;   #print_game(child)&lt;br /&gt;  if len(board[2]) == 0 or board[2][-1] &amp;gt; val:&lt;br /&gt;   #print_game(board)&lt;br /&gt;   child = list([[],[],[]])&lt;br /&gt;   child[0] = board[0][0:-1]&lt;br /&gt;   child[1] = board[1][:]&lt;br /&gt;   child[2] = board[2][:]&lt;br /&gt;   child[2].append(val)&lt;br /&gt;   children.append(child)&lt;br /&gt;   #print_game(child)&lt;br /&gt; if board[1] != []:&lt;br /&gt;  val = board[1][-1]&lt;br /&gt;  if len(board[0]) == 0 or board[0][-1] &amp;gt; val:&lt;br /&gt;   #print_game(board)&lt;br /&gt;   child = list([[],[],[]])&lt;br /&gt;   child[0] = board[0][:]&lt;br /&gt;   child[0].append(val)&lt;br /&gt;   child[1] = board[1][0:-1]&lt;br /&gt;   child[2] = board[2][:]&lt;br /&gt;   children.append(child)&lt;br /&gt;   #print_game(child)&lt;br /&gt;  if len(board[2]) == 0 or board[2][-1] &amp;gt; val:&lt;br /&gt;   #print_game(board)&lt;br /&gt;   child = list([[],[],[]])&lt;br /&gt;   child[0] = board[0][:]&lt;br /&gt;   child[1] = board[1][0:-1]&lt;br /&gt;   child[2] = board[2][:]&lt;br /&gt;   child[2].append(val)&lt;br /&gt;   children.append(child)&lt;br /&gt;   #print_game(child)&lt;br /&gt; if board[2] != []:&lt;br /&gt;  val = board[2][-1]&lt;br /&gt;  if len(board[0]) == 0 or board[0][-1] &amp;gt; val:&lt;br /&gt;   #print_game(board)&lt;br /&gt;   child = list([[],[],[]])&lt;br /&gt;   child[0] = board[0][:]&lt;br /&gt;   child[0].append(val)&lt;br /&gt;   child[1] = board[1][:]&lt;br /&gt;   child[2] = board[2][0:-1]&lt;br /&gt;   children.append(child)&lt;br /&gt;   #print_game(child)&lt;br /&gt;  if len(board[1]) == 0 or board[1][-1] &amp;gt; val:&lt;br /&gt;   #print_game(board)&lt;br /&gt;   child = list([[],[],[]])&lt;br /&gt;   child[0] = board[0][:]&lt;br /&gt;   child[1] = board[1][:]&lt;br /&gt;   child[1].append(val)&lt;br /&gt;   child[2] = board[2][0:-1]&lt;br /&gt;   children.append(child)&lt;br /&gt;   #print_game(child)&lt;br /&gt; return children&lt;br /&gt;&lt;br /&gt;def isInExplored(explored,state):&lt;br /&gt; for s in explored:&lt;br /&gt;  if s == state:&lt;br /&gt;   return True&lt;br /&gt; return False&lt;br /&gt; &lt;br /&gt;def main():&lt;br /&gt; board = list([[],[],[]])&lt;br /&gt; goal = list([[],[],[]])&lt;br /&gt; initial_state(board,7)&lt;br /&gt; goal_state(goal,7)&lt;br /&gt; frontier = []&lt;br /&gt; level = []&lt;br /&gt; currentLevel = 0&lt;br /&gt; explored = []&lt;br /&gt; path = []&lt;br /&gt; parent = [0]&lt;br /&gt; frontier.append(board)&lt;br /&gt; level.append(currentLevel)&lt;br /&gt; while len(frontier) &amp;gt; 0:&lt;br /&gt;  state = frontier.pop(0)&lt;br /&gt;  currentLevel = level.pop(0)&lt;br /&gt;  father = parent.pop(0)&lt;br /&gt;  #print currentLevel&lt;br /&gt;  #print_game(state)&lt;br /&gt;  if state == goal:&lt;br /&gt;   print "GOAL FOUND:"&lt;br /&gt;   print currentLevel&lt;br /&gt;   print_game(state)&lt;br /&gt;   for i in range(currentLevel):&lt;br /&gt;    print_game(explored[father])&lt;br /&gt;    father = path[father]&lt;br /&gt;   &lt;br /&gt;  explored.append(state)&lt;br /&gt;  path.append(father)&lt;br /&gt;  for child in children(state):&lt;br /&gt;   if isInExplored(explored,child) == False and isInExplored(frontier,child) == False:&lt;br /&gt;    frontier.append(child)&lt;br /&gt;    level.append(currentLevel + 1)&lt;br /&gt;    parent.append(len(explored)-1)&lt;br /&gt; print len(explored)&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1900354729151317110?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1900354729151317110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1900354729151317110'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/12/hanoi-towers-solver-python.html' title='Hanoi Towers solver (python)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8691449508611188740</id><published>2011-12-03T11:58:00.002Z</published><updated>2011-12-03T12:01:11.348Z</updated><title type='text'>Mars rover Curiosity landing tests</title><content type='html'>My last post included a video with a simulation of the Curiosity rover landing in Mars. Well, you may guess that a multi million dollar machine is not sent to Mars before a little bit of real testing. So, wait no more, here you a video with actual testing footage:&lt;div&gt;&lt;br /&gt;&lt;iframe width="480" height="296" src="http://www.ustream.tv/embed/recorded/18282924" scrolling="no" frameborder="0" style="border: 0px none transparent;"&gt;    &lt;/iframe&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8691449508611188740?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8691449508611188740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8691449508611188740'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/12/mars-rover-curiosity-landing-tests.html' title='Mars rover Curiosity landing tests'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1358696715478554666</id><published>2011-11-20T22:42:00.003Z</published><updated>2011-11-20T22:47:35.902Z</updated><title type='text'>Spirit and Opportunity big brother "Curiosity"</title><content type='html'>&lt;div&gt;After the huge success of the little Mars rovers Spirit and Opportunity, the excitement is building up for Curiosity, a much more powerful, autonomous and versatile rover. Watch the following amazing video. The landing in Mars is just stunning!!!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;iframe width="560" height="315" src="http://www.youtube.com/embed/P4boyXQuUIw" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For more information and thrill visit &lt;a href="http://www.nasa.gov/mission_pages/msl/index.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Nasa's&lt;/span&gt; website section dedicated to the mission&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1358696715478554666?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1358696715478554666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1358696715478554666'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/11/spirit-and-opportunity-big-brother.html' title='Spirit and Opportunity big brother &quot;Curiosity&quot;'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/P4boyXQuUIw/default.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-4988578828053243340</id><published>2011-10-23T18:33:00.003Z</published><updated>2011-10-23T18:40:50.369Z</updated><title type='text'>Sending mail through gmail using Python</title><content type='html'>&lt;div&gt;The more I use Python the more I like it. Thanks to its immense user base there are libraries available to do practically anything you can think of. For instance, the following very simple code snippet sends mail using an existing gmail account:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre&gt;import smtplib&lt;br /&gt;&lt;br /&gt;fromA = 'your_account@gmail.com'&lt;br /&gt;to = raw_input("Destination Mail: ")&lt;br /&gt;&lt;br /&gt;username="your_account@gmail.com"&lt;br /&gt;password=raw_input("Introduce your password: ")&lt;br /&gt;&lt;br /&gt;msg="Subject: Test Subject\n\n"&lt;br /&gt;msg=msg+raw_input("Message: ")&lt;br /&gt;server=smtplib.SMTP("smtp.gmail.com:587")&lt;br /&gt;server.starttls()&lt;br /&gt;server.login(username,password)&lt;br /&gt;server.sendmail(fromA,to,msg)&lt;br /&gt;server.quit()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4988578828053243340?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4988578828053243340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4988578828053243340'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/10/sending-mail-through-gmail-using-python.html' title='Sending mail through gmail using Python'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1334937635714664673</id><published>2011-10-23T17:16:00.002Z</published><updated>2011-10-23T17:19:59.775Z</updated><title type='text'>AI applets</title><content type='html'>I am following the online &lt;a href="https://www.ai-class.com/home/"&gt;Introduction to AI&lt;/a&gt; course provided by &lt;a href="http://www.stanford.edu/"&gt;Stanford University&lt;/a&gt;. At the moment we are "playing" with Bayesian Networks, a very interesting and powerful probabilistic tool. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have found a very interesting set of applets that let you play with different concepts related to AI, including Bayesian Networks:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.aispace.org/bayes/index.shtml"&gt;http://www.aispace.org/bayes/index.shtml&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy the ride!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1334937635714664673?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1334937635714664673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1334937635714664673'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/10/ai-applets.html' title='AI applets'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-430916505513993630</id><published>2011-10-23T10:11:00.005Z</published><updated>2011-10-23T10:16:42.731Z</updated><title type='text'>Running pictures collection</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/-2Geul1RfMro/TqPpfuVmy-I/AAAAAAAAASc/sU6zTTIeou8/s1600/running2.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 210px; height: 320px;" src="http://2.bp.blogspot.com/-2Geul1RfMro/TqPpfuVmy-I/AAAAAAAAASc/sU6zTTIeou8/s320/running2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5666629487386086370" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-0-_9cilMo98/TqPojWk2bcI/AAAAAAAAASE/45wbqHWEBw4/s1600/running_.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 211px; height: 320px;" src="http://1.bp.blogspot.com/-0-_9cilMo98/TqPojWk2bcI/AAAAAAAAASE/45wbqHWEBw4/s320/running_.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5666628450215423426" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-Hk1-oZX9XQU/TqPodFYeL_I/AAAAAAAAAR4/QPimynoaPOA/s1600/running1.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 214px; height: 320px;" src="http://4.bp.blogspot.com/-Hk1-oZX9XQU/TqPodFYeL_I/AAAAAAAAAR4/QPimynoaPOA/s320/running1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5666628342520885234" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-430916505513993630?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/430916505513993630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/430916505513993630'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/10/running-pictures-collection.html' title='Running pictures collection'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-2Geul1RfMro/TqPpfuVmy-I/AAAAAAAAASc/sU6zTTIeou8/s72-c/running2.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5843940541715280658</id><published>2011-10-13T20:49:00.002Z</published><updated>2011-10-13T20:53:15.964Z</updated><title type='text'>R.I.P. Dennis Ritchie</title><content type='html'>&lt;a href="http://cm.bell-labs.com/who/dmr/"&gt;http://cm.bell-labs.com/who/dmr/&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://en.wikipedia.org/wiki/Dennis_Ritchie"&gt;http://en.wikipedia.org/wiki/Dennis_Ritchie&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://herbsutter.com/2011/10/12/dennis-ritchie/"&gt;http://herbsutter.com/2011/10/12/dennis-ritchie/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are may kinds geniuses but I praise those who make &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;visionary's&lt;/span&gt; visions possible. We need more engineers and scientists like Dennis Ritchie to make the world a better place for everyone.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5843940541715280658?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5843940541715280658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5843940541715280658'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/10/rip-dennis-ritchie.html' title='R.I.P. Dennis Ritchie'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5724022548203362356</id><published>2011-10-07T20:28:00.002Z</published><updated>2011-10-07T20:31:34.900Z</updated><title type='text'>Online Audio Converter</title><content type='html'>I needed to convert a wav file to mp3 format, to upload a test to my &lt;a href="http://www.myspace.com/sinnoticiasdedios"&gt;myspace&lt;/a&gt;, and my brand new linux distro does not have any mp3 encoder. No problem, in this era of cloud computing there is a service to convert audio files online:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://media.io/"&gt;http://media.io/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Good stuff!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5724022548203362356?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5724022548203362356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5724022548203362356'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/10/online-audio-converter.html' title='Online Audio Converter'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2782263058630040202</id><published>2011-10-02T08:48:00.006Z</published><updated>2011-10-02T08:56:49.015Z</updated><title type='text'>Galway Bay Half Marathon 2011 Video</title><content type='html'>Look carefully, I am in the middle of the image in the &lt;a href="http://www.youtube.com/watch?v=l_aOSl_d74c#t=0m47s"&gt;second 47&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;object width="420" height="315"&gt;&lt;param name="movie" value="http://www.youtube.com/v/l_aOSl_d74c#t=0m47s?version=3&amp;amp;hl=en_US"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/l_aOSl_d74c?version=3&amp;amp;hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2782263058630040202?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2782263058630040202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2782263058630040202'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/10/galway-bay-half-marathon-2011-video_02.html' title='Galway Bay Half Marathon 2011 Video'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7372295482282109896</id><published>2011-10-01T14:57:00.002Z</published><updated>2011-10-01T14:59:41.681Z</updated><title type='text'>Galway Bay Half Marathon 2011 Results</title><content type='html'>Not bad at all, considering that I didn't do any specific preparation:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1:39:11&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is my second best time ever, so I am delighted. I would have been happy with a 1:45:00, so 6 minutes faster means a lot to me :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7372295482282109896?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7372295482282109896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7372295482282109896'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/10/galway-bay-half-marathon-2011-results.html' title='Galway Bay Half Marathon 2011 Results'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7962154263294181610</id><published>2011-09-25T19:03:00.003Z</published><updated>2011-09-25T19:09:12.502Z</updated><title type='text'>Galway Bay Half Marathon, 1st October 2011</title><content type='html'>&lt;a href="http://www.galwaybayhalfmarathon.com/" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 600px; height: 200px;" src="http://www.galwaybayhalfmarathon.com/images/topbar.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This is my next running challenge. In fact it is going to be the third half marathon I run this year, after achieving a new Personal Best in &lt;a href="http://www.genevemarathon.org/en/"&gt;Geneva&lt;/a&gt; (1:37:20). I haven't really trained for it, but have managed to keep my fitness level high enough, to be able to complete a half marathon without much suffering. I'll be happy with a 1:45:00.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7962154263294181610?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7962154263294181610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7962154263294181610'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/09/galway-bay-half-marathon-1st-october.html' title='Galway Bay Half Marathon, 1st October 2011'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6285263372885592933</id><published>2011-09-25T18:53:00.002Z</published><updated>2011-09-25T19:00:08.818Z</updated><title type='text'>Language interpreter that executes on a browser</title><content type='html'>&lt;div style="text-align: justify;"&gt;Thank's to &lt;a href="http://davidhorat.com/"&gt;David Horat&lt;/a&gt;, I have discovered an amazing online application that let's you play (and learn) a number of interpreted languages. The best of it all is that the actual interpreters are executed in the client, since they are written in Javascript. This client execution offers a speed advantage over other &lt;a href="http://tryruby.org/"&gt;similar applications&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://repl.it/"&gt;REPT.IT&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6285263372885592933?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6285263372885592933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6285263372885592933'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/09/language-interpreter-that-executes-on.html' title='Language interpreter that executes on a browser'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1754355764918966315</id><published>2011-09-16T18:55:00.002Z</published><updated>2011-09-16T18:58:02.975Z</updated><title type='text'>The things we do at Duolog</title><content type='html'>Hi,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the information in our website (&lt;a href="www.duolog.ie"&gt;www.duolog.ie&lt;/a&gt;) is not enough give a look at &lt;a href="http://www.facebook.com/pages/Duolog/106049149426662"&gt;Duolog's facebook&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1754355764918966315?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1754355764918966315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1754355764918966315'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/09/things-we-do-at-duolog.html' title='The things we do at Duolog'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-3613557129107391486</id><published>2011-09-09T20:04:00.001Z</published><updated>2011-09-09T20:06:22.404Z</updated><title type='text'>My own Olive Cake</title><content type='html'>&lt;div&gt;Look what a beauty I cooked for dinner today !!!!:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/-S022K-YktK8/TmpxmH5jDVI/AAAAAAAAARw/j276IW2whD8/s1600/101_0220.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://4.bp.blogspot.com/-S022K-YktK8/TmpxmH5jDVI/AAAAAAAAARw/j276IW2whD8/s320/101_0220.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5650453582259096914" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-3613557129107391486?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3613557129107391486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3613557129107391486'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/09/my-own-olive-cake.html' title='My own Olive Cake'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-S022K-YktK8/TmpxmH5jDVI/AAAAAAAAARw/j276IW2whD8/s72-c/101_0220.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-717436396772155315</id><published>2011-09-03T20:03:00.004Z</published><updated>2011-09-03T20:15:25.488Z</updated><title type='text'>Eclipse SWT - JFace resources</title><content type='html'>Recently I have begun to study development using the &lt;a href="http://wiki.eclipse.org/index.php/Rich_Client_Platform"&gt;Eclipse RCP&lt;/a&gt;. If your RCP application has a GUI you are going to have to get familiar with SWT and JFace. In order to help other in their way to achieve this goal, I am providing here a few references that I have found particularly useful.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;General reference links:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;SWT main website (&lt;a href="http://www.eclipse.org/swt/"&gt;http://www.eclipse.org/swt/&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;SWT widgets screenshots (&lt;a href="http://www.eclipse.org/swt/widgets/"&gt;http://www.eclipse.org/swt/widgets/&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;SWT wiki (&lt;a href="http://wiki.eclipse.org/SWT"&gt;http://wiki.eclipse.org/SWT&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Comprehensive SWT widgets list and documentation (&lt;a href="http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/package-summary.html"&gt;http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/package-summary.html&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;JFace wiki (&lt;a href="http://wiki.eclipse.org/index.php/JFace"&gt;http://wiki.eclipse.org/index.php/JFace&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Tutorials&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Very basic example driven tutorial (&lt;a href="http://zetcode.com/tutorials/javaswttutorial/"&gt;http://zetcode.com/tutorials/javaswttutorial/&lt;/a&gt;). Recommended for those with some exposure to Swing&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;That's it for the moment. I will be updating this post as I move along my study path.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-717436396772155315?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/717436396772155315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/717436396772155315'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/09/eclipse-swt-jface-resources.html' title='Eclipse SWT - JFace resources'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-4608616739671994146</id><published>2011-09-01T19:21:00.002Z</published><updated>2011-09-01T19:22:05.460Z</updated><title type='text'>At Duolog we have a new website</title><content type='html'>&lt;a href="http://www.duolog.com"&gt;www.duolog.com&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check it out.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4608616739671994146?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4608616739671994146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4608616739671994146'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/09/at-duolog-we-have-new-website.html' title='At Duolog we have a new website'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7823693216613976</id><published>2011-08-23T19:10:00.003Z</published><updated>2011-08-23T19:14:51.103Z</updated><title type='text'>Heading back to Ireland</title><content type='html'>Yes!!!!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More than two years ago I moved from Ireland (Limerick), to Switzerland (Lausanne, Vevey), and now I repeat the move but this time in the opposite direction. This time I am coming back to Galway. I already lived there in 2008-09, and I have to say it is one of my favourite places to live in the world.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am really excited about this new stage of my life, where I hope I'll be happy personally and professionally. On verra!!!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More to come soon.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7823693216613976?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7823693216613976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7823693216613976'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/08/heading-back-to-ireland.html' title='Heading back to Ireland'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1757998678249939012</id><published>2011-08-12T15:42:00.003Z</published><updated>2011-08-12T15:51:05.172Z</updated><title type='text'>Clojure Fibonacci series</title><content type='html'>&lt;span class="Apple-style-span"&gt;(defn fibo [x] &lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;     (if (&amp;gt; x 1) (+ (fibo (- x 1)) (fibo (- x 2))) x) ) &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;(println (map fibo (range 20)))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;a href="http://clojure.org/"&gt;Clojure &lt;/a&gt;is a functional language that targets, amongst others, the Java Virtual Machine. You can try Clojure with an &lt;a href="http://try-clojure.org/"&gt;online interpreter&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1757998678249939012?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1757998678249939012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1757998678249939012'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/08/clojure-fibonacci-series.html' title='Clojure Fibonacci series'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7682482636052848880</id><published>2011-07-09T17:54:00.005Z</published><updated>2011-08-12T15:48:50.252Z</updated><title type='text'>The most advanced machine ever built launched for the last time</title><content type='html'>&lt;a href="http://www.nasa.gov/images/content/567436main_launch4-m_946-710.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 400px;" src="http://www.nasa.gov/images/content/567436main_launch4-m_946-710.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;a href="http://www.nasa.gov/mission_pages/shuttle/shuttlemissions/sts135/multimedia/gallery/launch4.html" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 0px; height: 0px;" src="http://www.nasa.gov/mission_pages/shuttle/shuttlemissions/sts135/multimedia/gallery/launch4.html" border="0" alt="" /&gt;&lt;/a&gt;It is a bit sad, isn't it? You wouldn't believe the amount of thing part of our day-life that sprang out the the Shuttle program.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Our hopes keep high though.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7682482636052848880?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7682482636052848880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7682482636052848880'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/07/most-advanced-machine-ever-built.html' title='The most advanced machine ever built launched for the last time'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2608463531105816780</id><published>2011-06-26T10:36:00.003Z</published><updated>2011-06-26T11:21:23.800Z</updated><title type='text'>Change Risk Analysis and Predictions, A.K.A. Crap</title><content type='html'>&lt;div&gt;I'm am really impressed by the creativity of the open source community when it comes to choose names for their projects. Today I found this hilarious one:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.crap4j.org/"&gt;Crap4j&lt;/a&gt;: Although the name is "weird" the tool seems to be pretty useful to protect you against crappy code generated by you and by others around you.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Give a look at the logo:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href="http://www.crap4j.org/images/new_banner_tp.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 641px; height: 172px;" src="http://www.crap4j.org/images/new_banner_tp.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2608463531105816780?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2608463531105816780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2608463531105816780'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/06/change-risk-analysis-and-predictions.html' title='Change Risk Analysis and Predictions, A.K.A. Crap'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-568647214590722643</id><published>2011-06-06T20:30:00.004Z</published><updated>2011-06-06T20:39:14.729Z</updated><title type='text'>Geneva Half Marathon Result</title><content type='html'>Yeah,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I beat my personal best, and set it to &lt;b&gt;1:37:25&lt;/b&gt;, about 2'30'' better than my previous one, set back in 2005. So it took me almost 6 years, but it was worth the wait.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://services.datasport.com/2011/lauf/genevema/RANG032.pdf"&gt;Link to the official results&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.marathon-photos.com/scripts/event.py?event=Sports/GKDE/2011/Geneve%20Marathon&amp;amp;match=3656&amp;amp;name=Julio"&gt;Link to my pictures&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For those who want to try to repeat my success, I have followed&lt;a href="http://www.halhigdon.com/halfmarathon/inter.htm"&gt; Hal Higdon training program for intermediate runners.&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-568647214590722643?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/568647214590722643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/568647214590722643'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/06/geneva-half-marathon-result.html' title='Geneva Half Marathon Result'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2856462341591804551</id><published>2011-05-08T11:04:00.004Z</published><updated>2011-05-08T11:15:11.625Z</updated><title type='text'>Geneva Half Marathon</title><content type='html'>OK,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Lausanne 20Km route was quite tough, basically because it was all the time either &lt;a href="http://www.20km.ch/cms/images/pdf/parcours/20km_profile.pdf"&gt;too steep uphill or too steep downhill&lt;/a&gt;. Now, next Sunday 15th of May 2011, there is a FLAT &lt;a href="http://www.genevemarathon.org/"&gt;half marathon in Geneva&lt;/a&gt;, and so I have decided to take part. I know I'm fit at the moment, and that I have good chances to match my PB (1:39:30 in a Half Marathon).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, out of the disappointment comes a new me, ready to embark in this new challenge. I can't deny  competition is in my blood, but what can match the thrill of becoming better and better and better? Sticking to a discipline and experience how it eventually pays off, establishing new  goals and striving to achieve them, that is priceless and somehow gives a meaning to part of my life :)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'll keep you posted.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2856462341591804551?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2856462341591804551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2856462341591804551'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/05/geneva-half-marathon.html' title='Geneva Half Marathon'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-4961708945762891945</id><published>2011-05-08T11:01:00.002Z</published><updated>2011-05-08T11:03:45.836Z</updated><title type='text'>Lausanne 20Km result</title><content type='html'>No really as good as I would have liked, but I sort of new that my limit was around 1:40, and so I did:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1:40:42, which gives an poor average of 5:02 per Km. Far from my past performance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'll do better next time!!!!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4961708945762891945?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4961708945762891945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4961708945762891945'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/05/lausanne-20km-result.html' title='Lausanne 20Km result'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2721176142586545479</id><published>2011-04-30T09:09:00.003Z</published><updated>2011-04-30T09:20:35.366Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='running'/><title type='text'>Lausanne 20K race, TODAY!!</title><content type='html'>After more than 12 weeks following an intense half marathon training program (thanks &lt;a href="http://www.halhigdon.com/halfmarathon/inter.htm"&gt;Hal&lt;/a&gt;), the day has finally arrived.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.20km.ch/cms/index.php?lang=fr"&gt;2oK of Lausanne&lt;/a&gt; it is not exactly a half marathon, as you may suspect from its name. However, is the first big running event of the summer season in the &lt;a href="http://www.swiss-riviera.com/homepage.html"&gt;Swiss Riviera&lt;/a&gt;, and I can't wait!!!!!!!&lt;br /&gt;&lt;br /&gt;After this race I want to try a few mountain ones, starting with one in &lt;a href="http://www.skiclubvallorbe.ch/"&gt;Vallorbe&lt;/a&gt;. If the experience is good, there are plenty of mountains and mountain races in the area :).&lt;br /&gt;&lt;br /&gt;I'll post my time as soon as I know it :)&lt;br /&gt;&lt;br /&gt;Cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2721176142586545479?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2721176142586545479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2721176142586545479'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/04/lausanne-20k-race-today.html' title='Lausanne 20K race, TODAY!!'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8736363623585085773</id><published>2011-04-29T21:27:00.001Z</published><updated>2011-04-29T21:30:25.713Z</updated><title type='text'>My first android post</title><content type='html'>&lt;div&gt;&lt;p&gt;My first post from my new android mobile. Also adding a funny picture&lt;/p&gt;&lt;br/&gt;&lt;img src='http://lh3.ggpht.com/_2CPTItAuDOw/TbstzXzWRsI/AAAAAAAAARU/nyVhxj0w7dU/1304111714568.png' /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8736363623585085773?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8736363623585085773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8736363623585085773'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/04/my-first-android-post.html' title='My first android post'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_2CPTItAuDOw/TbstzXzWRsI/AAAAAAAAARU/nyVhxj0w7dU/s72-c/1304111714568.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8105506716350323312</id><published>2011-04-17T16:16:00.003Z</published><updated>2011-04-17T16:20:58.307Z</updated><title type='text'>Kata: Palindrome generation in Python</title><content type='html'>I took this Kata from &lt;a href="http://apps.topcoder.com/wiki/display/tc/Sample+Problem+Statements"&gt;topcoder.com&lt;/a&gt;. My initial solution:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;def isPalindrome(n):&lt;br /&gt;       return n == reverseNumber(n)&lt;br /&gt;      &lt;br /&gt;def generatePalindrome(n):&lt;br /&gt;       while not isPalindrome(n):&lt;br /&gt;               n = n + reverseNumber(n)&lt;br /&gt;       return n&lt;br /&gt;&lt;br /&gt;def reverseNumber(n):&lt;br /&gt;       res = 0&lt;br /&gt;       while n &amp;gt; 0:&lt;br /&gt;               res =  (res*10) + (n%10)&lt;br /&gt;               n = n/10&lt;br /&gt;       return res&lt;br /&gt;      &lt;br /&gt;n = 265&lt;br /&gt;print reverseNumber(n)&lt;br /&gt;print n&lt;br /&gt;print isPalindrome(24543)&lt;br /&gt;print generatePalindrome(24543)&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8105506716350323312?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8105506716350323312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8105506716350323312'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/04/kata-palindrome-generation-in-python.html' title='Kata: Palindrome generation in Python'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7917684368047605078</id><published>2011-04-16T14:40:00.001Z</published><updated>2011-04-16T14:42:38.956Z</updated><title type='text'>Project Euler N° 2, in Ruby</title><content type='html'>&lt;a href="http://projecteuler.net/index.php?section=problems&amp;amp;id=2"&gt;http://projecteuler.net/index.php?section=problems&amp;amp;id=2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:&lt;/p&gt; &lt;p style="text-align: center;"&gt;1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...&lt;/p&gt; &lt;p&gt;By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def fib(limit)&lt;br /&gt; f_n_1 = 1&lt;br /&gt; f_n_2 = 1&lt;br /&gt; curr = [1,1]&lt;br /&gt; while (f_n_1 + f_n_2) &lt;= limit&lt;br /&gt;  curr.push(f_n_1 + f_n_2)&lt;br /&gt;  f_n_2 = f_n_1&lt;br /&gt;  f_n_1 = curr.last&lt;br /&gt; end&lt;br /&gt; return curr&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Limit = 4000000&lt;br /&gt;allFib = fib(Limit)&lt;br /&gt;iter = allFib.size/3&lt;br /&gt;puts allFib&lt;br /&gt;puts iter&lt;br /&gt;&lt;br /&gt;sum = 0&lt;br /&gt;for i in 0..iter&lt;br /&gt; if i*3 + 2 &gt; allFib.size&lt;br /&gt;  break&lt;br /&gt; end&lt;br /&gt; sum += allFib[i*3 + 2]&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;puts sum&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7917684368047605078?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7917684368047605078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7917684368047605078'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/04/project-euler-n-2-in-ruby.html' title='Project Euler N° 2, in Ruby'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8098308387320467750</id><published>2011-04-15T16:23:00.002Z</published><updated>2011-04-15T16:27:30.051Z</updated><title type='text'>Project Euler problem N° 1 in Ruby</title><content type='html'>&lt;a href="http://projecteuler.net/index.php?section=problems&amp;amp;id=1"&gt;http://projecteuler.net/index.php?section=problems&amp;amp;id=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;def addMultiplesOf(n,range)&lt;br /&gt; nb_of_multiples = 1 + range/n&lt;br /&gt; res = n*((nb_of_multiples/2)*(nb_of_multiples-1))&lt;br /&gt; return res&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;N = 999&lt;br /&gt;&lt;br /&gt;puts addMultiplesOf(3,N) + addMultiplesOf(5,N) - addMultiplesOf(15,N)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://projecteuler.net/"&gt;Project Euler&lt;/a&gt; is avery interesting site proposing dozens of very amusing and challenging mathematical and computational problems. Give it try, it is well worth your time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8098308387320467750?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8098308387320467750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8098308387320467750'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/04/project-euler-problem-n-1-in-ruby.html' title='Project Euler problem N° 1 in Ruby'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1854680912121651704</id><published>2011-04-09T12:46:00.003Z</published><updated>2011-04-09T13:01:23.591Z</updated><title type='text'>Swapping to numbers without an auxiliary variable</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;following with my current geek/nerd stuff writing spree, today I want to introduce a very simple way to swap to numbers, without a third variable&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;a = a + b&lt;br /&gt;b = a - b&lt;br /&gt;a = a - b&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Nice and simple, the explanation is dead simple and obvious, but anyway here it goes:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;a = a + b , nothing to say here&lt;br /&gt;b = a - b = a + b - b = a&lt;br /&gt;a = a - b = a + b - a = b&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There is another nice, yet less intuitive way to do this, by using XOR:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;a = a XOR b&lt;br /&gt;b = a XOR b&lt;br /&gt;a = a XOR b&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Think about it, and enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1854680912121651704?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1854680912121651704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1854680912121651704'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/04/swapping-to-numbers-without-auxiliary.html' title='Swapping to numbers without an auxiliary variable'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6929040039153727581</id><published>2011-04-02T19:34:00.002Z</published><updated>2011-04-02T19:36:46.016Z</updated><title type='text'>Simple Event Manager in Ruby</title><content type='html'>&lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;style type="text/css"&gt;&lt;!--/**  * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann  * (http://qbnz.com/highlighter/ and http://geshi.org/)  */ .ruby  {font-family:monospace;color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0; padding: 3px;} .ruby a:link {color: #000060;} .ruby a:hover {background-color: #f0f000;} .ruby .head {font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;} .ruby .imp {font-weight: bold; color: red;} .ruby .kw1 {color:#9966CC; font-weight:bold;} .ruby .kw2 {color:#0000FF; font-weight:bold;} .ruby .kw3 {color:#CC0066; font-weight:bold;} .ruby .kw4 {color:#CC00FF; font-weight:bold;} .ruby .co1 {color:#008000; font-style:italic;} .ruby .co4 {color: #cc0000; font-style: italic;} .ruby .coMULTI {color:#000080; font-style:italic;} .ruby .es0 {color:#000099;} .ruby .br0 {color:#006600; font-weight:bold;} .ruby .sy0 {color:#006600; font-weight:bold;} .ruby .st0 {color:#996600;} .ruby .nu0 {color:#006666;} .ruby .me1 {color:#9900CC;} .ruby .re0 {color:#ff6633; font-weight:bold;} .ruby .re1 {color:#0066ff; font-weight:bold;} .ruby .re2 {color:#6666ff; font-weight:bold;} .ruby .re3 {color:#ff3333; font-weight:bold;} .ruby span.xtra { display:block; } .ln, .ln{ vertical-align: top; } .coMULTI, .ruby span{ line-height:13px !important;} --&gt;&lt;/style&gt;&lt;table class="ruby"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;24&lt;br /&gt;25&lt;br /&gt;26&lt;br /&gt;27&lt;br /&gt;28&lt;br /&gt;29&lt;br /&gt;30&lt;br /&gt;31&lt;br /&gt;32&lt;br /&gt;33&lt;br /&gt;34&lt;br /&gt;35&lt;br /&gt;36&lt;br /&gt;37&lt;br /&gt;38&lt;br /&gt;39&lt;br /&gt;40&lt;br /&gt;41&lt;br /&gt;42&lt;br /&gt;43&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;pre class="de1"&gt;&lt;span class="kw1"&gt;class&lt;/span&gt; Event&lt;br /&gt; USER_CONNECTED = &lt;span class="nu0"&gt;1&lt;/span&gt;&lt;br /&gt; SERVER_CONNECTED = &lt;span class="nu0"&gt;2&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw1"&gt;class&lt;/span&gt; Listener&lt;br /&gt; &lt;span class="kw1"&gt;def&lt;/span&gt; onEvent&lt;span class="br0"&gt;(&lt;/span&gt;event,params=&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class="kw3"&gt;puts&lt;/span&gt; event&lt;br /&gt; &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw1"&gt;class&lt;/span&gt; EventManager&lt;br /&gt; &lt;span class="kw1"&gt;def&lt;/span&gt; initialize&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class="re1"&gt;@listenersMap&lt;/span&gt; = &lt;span class="kw4"&gt;Hash&lt;/span&gt;.&lt;span class="me1"&gt;new&lt;/span&gt;&lt;br /&gt; &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="kw1"&gt;def&lt;/span&gt; subscribe&lt;span class="br0"&gt;(&lt;/span&gt;event,listener&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;   listeners = &lt;span class="re1"&gt;@listenersMap&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;event&lt;span class="br0"&gt;]&lt;/span&gt;&lt;br /&gt;   &lt;span class="kw1"&gt;if&lt;/span&gt; listeners == &lt;span class="kw2"&gt;nil&lt;/span&gt;&lt;br /&gt;     &lt;span class="re1"&gt;@listenersMap&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;event&lt;span class="br0"&gt;]&lt;/span&gt; = &lt;span class="kw3"&gt;Array&lt;/span&gt;.&lt;span class="me1"&gt;new&lt;/span&gt;&lt;br /&gt;   &lt;span class="kw1"&gt;else&lt;/span&gt;&lt;br /&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="re1"&gt;@listenersMap&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;event&lt;span class="br0"&gt;]&lt;/span&gt;.&lt;span class="kw1"&gt;include&lt;/span&gt;?&lt;span class="br0"&gt;(&lt;/span&gt;listener&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;       &lt;span class="kw2"&gt;return&lt;/span&gt;&lt;br /&gt;     &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;   &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;   &lt;span class="re1"&gt;@listenersMap&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;event&lt;span class="br0"&gt;]&lt;/span&gt;.&lt;span class="me1"&gt;push&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;listener&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="kw1"&gt;def&lt;/span&gt; notify&lt;span class="br0"&gt;(&lt;/span&gt;event&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="re1"&gt;@listenersMap&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;event&lt;span class="br0"&gt;]&lt;/span&gt; != &lt;span class="kw2"&gt;nil&lt;/span&gt;&lt;br /&gt;     &lt;span class="re1"&gt;@listenersMap&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;event&lt;span class="br0"&gt;]&lt;/span&gt;.&lt;span class="me1"&gt;each&lt;/span&gt; &lt;span class="kw1"&gt;do&lt;/span&gt; &lt;span class="sy0"&gt;|&lt;/span&gt;lis&lt;span class="sy0"&gt;|&lt;/span&gt;&lt;br /&gt;       lis.&lt;span class="me1"&gt;onEvent&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;event&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;   &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt; &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw3"&gt;puts&lt;/span&gt; &lt;span class="st0"&gt;"Initializing the event manager"&lt;/span&gt;&lt;br /&gt;lis = Listener.&lt;span class="me1"&gt;new&lt;/span&gt;&lt;br /&gt;manager = EventManager.&lt;span class="me1"&gt;new&lt;/span&gt;&lt;br /&gt;manager.&lt;span class="me1"&gt;subscribe&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="re2"&gt;Event::USER_CONNECTED&lt;/span&gt;,lis&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;manager.&lt;span class="me1"&gt;subscribe&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="re2"&gt;Event::USER_CONNECTED&lt;/span&gt;,lis&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;manager.&lt;span class="me1"&gt;notify&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="re2"&gt;Event::USER_CONNECTED&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6929040039153727581?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6929040039153727581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6929040039153727581'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/04/simple-event-manager-in-ruby.html' title='Simple Event Manager in Ruby'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8779762755731540789</id><published>2011-03-28T00:05:00.005Z</published><updated>2011-03-28T00:12:20.963Z</updated><title type='text'>Kata 2: Sorting a list of integers</title><content type='html'>C (&lt;a href="http://ideone.com/Zf6rB"&gt;http://ideone.com/Zf6rB&lt;/a&gt;)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;style type="text/css"&gt;&lt;!--/**  * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann  * (http://qbnz.com/highlighter/ and http://geshi.org/)  */ .c  {font-family:monospace;color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0; padding: 3px;} .c a:link {color: #000060;} .c a:hover {background-color: #f0f000;} .c .head {font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;} .c .imp {font-weight: bold; color: red;} .c .kw1 {color: #b1b100;} .c .kw2 {color: #000000; font-weight: bold;} .c .kw3 {color: #000066;} .c .kw4 {color: #993333;} .c .co1 {color: #666666; font-style: italic;} .c .co2 {color: #339933;} .c .coMULTI {color: #808080; font-style: italic;} .c .es0 {color: #000099; font-weight: bold;} .c .es1 {color: #000099; font-weight: bold;} .c .es2 {color: #660099; font-weight: bold;} .c .es3 {color: #660099; font-weight: bold;} .c .es4 {color: #660099; font-weight: bold;} .c .es5 {color: #006699; font-weight: bold;} .c .br0 {color: #009900;} .c .sy0 {color: #339933;} .c .st0 {color: #ff0000;} .c .nu0 {color: #0000dd;} .c .nu6 {color: #208080;} .c .nu8 {color: #208080;} .c .nu12 {color: #208080;} .c .nu16 {color:#800080;} .c .nu17 {color:#800080;} .c .nu18 {color:#800080;} .c .nu19 {color:#800080;} .c .me1 {color: #202020;} .c .me2 {color: #202020;} .c span.xtra { display:block; } .ln, .ln{ vertical-align: top; } .coMULTI, .c span{ line-height:13px !important;} --&gt;&lt;/style&gt;&lt;table class="c"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;24&lt;br /&gt;25&lt;br /&gt;26&lt;br /&gt;27&lt;br /&gt;28&lt;br /&gt;29&lt;br /&gt;30&lt;br /&gt;31&lt;br /&gt;32&lt;br /&gt;33&lt;br /&gt;34&lt;br /&gt;35&lt;br /&gt;36&lt;br /&gt;37&lt;br /&gt;38&lt;br /&gt;39&lt;br /&gt;40&lt;br /&gt;41&lt;br /&gt;42&lt;br /&gt;43&lt;br /&gt;44&lt;br /&gt;45&lt;br /&gt;46&lt;br /&gt;47&lt;br /&gt;48&lt;br /&gt;49&lt;br /&gt;50&lt;br /&gt;51&lt;br /&gt;52&lt;br /&gt;53&lt;br /&gt;54&lt;br /&gt;55&lt;br /&gt;56&lt;br /&gt;57&lt;br /&gt;58&lt;br /&gt;59&lt;br /&gt;60&lt;br /&gt;61&lt;br /&gt;62&lt;br /&gt;63&lt;br /&gt;64&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;pre class="de1"&gt;&lt;span class="co2"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="coMULTI"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="coMULTI"&gt;Order an Array of integers, coding kata.&lt;/span&gt;&lt;br /&gt;&lt;span class="coMULTI"&gt;In C we will have to program our own sorting&lt;/span&gt;&lt;br /&gt;&lt;span class="coMULTI"&gt;algorithm. For simplicity our own very inefficient&lt;/span&gt;&lt;br /&gt;&lt;span class="coMULTI"&gt;sorting algorithm is used&lt;/span&gt;&lt;br /&gt;&lt;span class="coMULTI"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw4"&gt;void&lt;/span&gt; printArray&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt;&lt;span class="sy0"&gt;*&lt;/span&gt; list&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="kw4"&gt;int&lt;/span&gt; size&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="kw4"&gt;void&lt;/span&gt; sortAscending&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt;&lt;span class="sy0"&gt;*&lt;/span&gt; list&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="kw4"&gt;int&lt;/span&gt; size&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; main&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw4"&gt;int&lt;/span&gt; size &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;50&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw4"&gt;int&lt;/span&gt; list&lt;span class="br0"&gt;[&lt;/span&gt;size&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="co1"&gt;// Initialize the array in reverse order&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw4"&gt;int&lt;/span&gt; i &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw1"&gt;for&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;i &lt;span class="sy0"&gt;=&lt;/span&gt; size &lt;span class="sy0"&gt;;&lt;/span&gt; i &lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt; &lt;span class="sy0"&gt;;&lt;/span&gt; i&lt;span class="sy0"&gt;--&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                list&lt;span class="br0"&gt;[&lt;/span&gt;size&lt;span class="sy0"&gt;-&lt;/span&gt;i&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; i&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;        printArray&lt;span class="br0"&gt;(&lt;/span&gt;list&lt;span class="sy0"&gt;,&lt;/span&gt;size&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        sortAscending&lt;span class="br0"&gt;(&lt;/span&gt;list&lt;span class="sy0"&gt;,&lt;/span&gt;size&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        printArray&lt;span class="br0"&gt;(&lt;/span&gt;list&lt;span class="sy0"&gt;,&lt;/span&gt;size&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;       &lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw4"&gt;void&lt;/span&gt; printArray&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt;&lt;span class="sy0"&gt;*&lt;/span&gt; list&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="kw4"&gt;int&lt;/span&gt; size&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw4"&gt;int&lt;/span&gt; i &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw1"&gt;for&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;i &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt; &lt;span class="sy0"&gt;;&lt;/span&gt; i &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt; size &lt;span class="sy0"&gt;;&lt;/span&gt; i&lt;span class="sy0"&gt;++&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                &lt;a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span class="kw3"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"list[%d] = %d&lt;span class="es1"&gt;\n&lt;/span&gt;"&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;i&lt;span class="sy0"&gt;,&lt;/span&gt;list&lt;span class="br0"&gt;[&lt;/span&gt;i&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw4"&gt;void&lt;/span&gt; sortAscending&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt;&lt;span class="sy0"&gt;*&lt;/span&gt; list&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="kw4"&gt;int&lt;/span&gt; size&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span class="co1"&gt;// Variable to swap values&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw4"&gt;int&lt;/span&gt; aux&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="co1"&gt;// Variable to knwo when we are done ordering&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw4"&gt;int&lt;/span&gt; comparisonCounter &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw4"&gt;int&lt;/span&gt; index &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kw1"&gt;while&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;index &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt; size &lt;span class="sy0"&gt;-&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;        &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                comparisonCounter&lt;span class="sy0"&gt;++;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kw1"&gt;if&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt; list&lt;span class="br0"&gt;[&lt;/span&gt;index&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;&amp;gt;&lt;/span&gt; list&lt;span class="br0"&gt;[&lt;/span&gt;index&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;                &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                        aux &lt;span class="sy0"&gt;=&lt;/span&gt; list&lt;span class="br0"&gt;[&lt;/span&gt;index&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;                        list&lt;span class="br0"&gt;[&lt;/span&gt;index&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; list&lt;span class="br0"&gt;[&lt;/span&gt;index&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;                        list&lt;span class="br0"&gt;[&lt;/span&gt;index&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="nu0"&gt;1&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; aux&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;                        index &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="sy0"&gt;--&lt;/span&gt;index &lt;span class="sy0"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;?&lt;/span&gt;index&lt;span class="sy0"&gt;:&lt;/span&gt;&lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;                &lt;span class="kw1"&gt;else&lt;/span&gt;&lt;br /&gt;                &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                        index&lt;span class="sy0"&gt;++;&lt;/span&gt;&lt;br /&gt;                &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;        &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;        &lt;a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span class="kw3"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Comparisons done = %d&lt;span class="es1"&gt;\n&lt;/span&gt;"&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;comparisonCounter&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8779762755731540789?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8779762755731540789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8779762755731540789'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/03/kata-2-sorting-list-of-integers.html' title='Kata 2: Sorting a list of integers'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6763665398492294673</id><published>2011-03-27T15:59:00.007Z</published><updated>2011-03-27T23:21:28.561Z</updated><title type='text'>Greater Common Divisor (GCD), the Euclidean way</title><content type='html'>&lt;a href="http://www.cs.scranton.edu/~mccloske/courses/cmps134/euclid_alg.html"&gt;GDC using the Euclidean algorithm&lt;/a&gt; and different programming languages (as a means of a very simple coding kata):&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Python (&lt;a href="http://ideone.com/jqCLR"&gt;http://ideone.com/jqCLR&lt;/a&gt;): &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;style type="text/css"&gt;&lt;!--/**  * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann  * (http://qbnz.com/highlighter/ and http://geshi.org/)  */ .python  {font-family:monospace;color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0; padding: 3px;} .python a:link {color: #000060;} .python a:hover {background-color: #f0f000;} .python .head {font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;} .python .imp {font-weight: bold; color: red;} .python .kw1 {color: #ff7700;font-weight:bold;} .python .kw2 {color: #008000;} .python .kw3 {color: #dc143c;} .python .kw4 {color: #0000cd;} .python .co1 {color: #808080; font-style: italic;} .python .coMULTI {color: #808080; font-style: italic;} .python .es0 {color: #000099; font-weight: bold;} .python .br0 {color: black;} .python .sy0 {color: #66cc66;} .python .st0 {color: #483d8b;} .python .nu0 {color: #ff4500;} .python .me1 {color: black;} .python span.xtra { display:block; } .ln, .ln{ vertical-align: top; } .coMULTI, .python span{ line-height:13px !important;} --&gt;&lt;/style&gt;&lt;table class="python"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;pre class="de1"&gt;&lt;span class="kw1"&gt;def&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;num,den&lt;span class="br0"&gt;)&lt;/span&gt;:&lt;br /&gt;rem = &lt;span class="kw2"&gt;abs&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;num&lt;span class="sy0"&gt;%&lt;/span&gt;den&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;print&lt;/span&gt; &lt;span class="st0"&gt;"num: %d, den: %d, rem: %d"&lt;/span&gt;&lt;span class="sy0"&gt;%&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;num,den,rem&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;rem == &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;:&lt;br /&gt;     &lt;span class="kw1"&gt;return&lt;/span&gt; den&lt;br /&gt;&lt;span class="kw1"&gt;else&lt;/span&gt;:&lt;br /&gt;     &lt;span class="kw1"&gt;return&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;den,rem&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="co1"&gt;# Result should be 11 for all of the following  &lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;print&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;,&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;print&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;-&lt;span class="nu0"&gt;110&lt;/span&gt;,&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;print&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;,-&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;print&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;,&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C&lt;/div&gt;&lt;br /&gt;&lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;style type="text/css"&gt;&lt;!--/**  * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann  * (http://qbnz.com/highlighter/ and http://geshi.org/)  */ .c  {font-family:monospace;color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0; padding: 3px;} .c a:link {color: #000060;} .c a:hover {background-color: #f0f000;} .c .head {font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;} .c .imp {font-weight: bold; color: red;} .c .kw1 {color: #b1b100;} .c .kw2 {color: #000000; font-weight: bold;} .c .kw3 {color: #000066;} .c .kw4 {color: #993333;} .c .co1 {color: #666666; font-style: italic;} .c .co2 {color: #339933;} .c .coMULTI {color: #808080; font-style: italic;} .c .es0 {color: #000099; font-weight: bold;} .c .es1 {color: #000099; font-weight: bold;} .c .es2 {color: #660099; font-weight: bold;} .c .es3 {color: #660099; font-weight: bold;} .c .es4 {color: #660099; font-weight: bold;} .c .es5 {color: #006699; font-weight: bold;} .c .br0 {color: #009900;} .c .sy0 {color: #339933;} .c .st0 {color: #ff0000;} .c .nu0 {color: #0000dd;} .c .nu6 {color: #208080;} .c .nu8 {color: #208080;} .c .nu12 {color: #208080;} .c .nu16 {color:#800080;} .c .nu17 {color:#800080;} .c .nu18 {color:#800080;} .c .nu19 {color:#800080;} .c .me1 {color: #202020;} .c .me2 {color: #202020;} .c span.xtra { display:block; } .ln, .ln{ vertical-align: top; } .coMULTI, .c span{ line-height:13px !important;} --&gt;&lt;/style&gt;&lt;table class="c"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;24&lt;br /&gt;25&lt;br /&gt;26&lt;br /&gt;27&lt;br /&gt;28&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;code class="de1"&gt;&lt;span class="co2"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="co1"&gt;// Function prototype&lt;/span&gt;&lt;br /&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; a&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; main&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span class="kw3"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"GCD(%d,%d) = %d&lt;span class="es1"&gt;\n&lt;/span&gt;"&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span class="kw3"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"GCD(%d,%d) = %d&lt;span class="es1"&gt;\n&lt;/span&gt;"&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="sy0"&gt;,-&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="sy0"&gt;,-&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span class="kw3"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"GCD(%d,%d) = %d&lt;span class="es1"&gt;\n&lt;/span&gt;"&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"&gt;&lt;span class="kw3"&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"GCD(%d,%d) = %d&lt;span class="es1"&gt;\n&lt;/span&gt;"&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="sy0"&gt;,-&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="sy0"&gt;,&lt;/span&gt;gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="sy0"&gt;,-&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;exit&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; a&lt;span class="sy0"&gt;,&lt;/span&gt; &lt;span class="kw4"&gt;int&lt;/span&gt; b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; rem &lt;span class="sy0"&gt;=&lt;/span&gt; abs&lt;span class="br0"&gt;(&lt;/span&gt;a&lt;span class="sy0"&gt;%&lt;/span&gt;b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;if&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;rem &lt;span class="sy0"&gt;==&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;       &lt;span class="kw1"&gt;return&lt;/span&gt; b&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;       &lt;span class="kw1"&gt;return&lt;/span&gt; gcd&lt;span class="br0"&gt;(&lt;/span&gt;b&lt;span class="sy0"&gt;,&lt;/span&gt;rem&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;!-- source code --&gt;&lt;br /&gt; &lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;style type="text/css"&gt;&lt;!--/**  * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann  * (http://qbnz.com/highlighter/ and http://geshi.org/)  */ .cpp  {font-family:monospace;color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0; padding: 3px;} .cpp a:link {color: #000060;} .cpp a:hover {background-color: #f0f000;} .cpp .head {font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;} .cpp .imp {font-weight: bold; color: red;} .cpp .kw1 {color: #0000ff;} .cpp .kw2 {color: #0000ff;} .cpp .kw3 {color: #0000dd;} .cpp .kw4 {color: #0000ff;} .cpp .co1 {color: #666666;} .cpp .co2 {color: #339900;} .cpp .coMULTI {color: #ff0000; font-style: italic;} .cpp .es0 {color: #000099; font-weight: bold;} .cpp .es1 {color: #000099; font-weight: bold;} .cpp .es2 {color: #660099; font-weight: bold;} .cpp .es3 {color: #660099; font-weight: bold;} .cpp .es4 {color: #660099; font-weight: bold;} .cpp .es5 {color: #006699; font-weight: bold;} .cpp .br0 {color: #008000;} .cpp .sy0 {color: #008000;} .cpp .sy1 {color: #000080;} .cpp .sy2 {color: #000040;} .cpp .sy3 {color: #000040;} .cpp .sy4 {color: #008080;} .cpp .st0 {color: #FF0000;} .cpp .nu0 {color: #0000dd;} .cpp .nu6 {color: #208080;} .cpp .nu8 {color: #208080;} .cpp .nu12 {color: #208080;} .cpp .nu16 {color:#800080;} .cpp .nu17 {color:#800080;} .cpp .nu18 {color:#800080;} .cpp .nu19 {color:#800080;} .cpp .me1 {color: #007788;} .cpp .me2 {color: #007788;} .cpp span.xtra { display:block; } .ln, .ln{ vertical-align: top; } .coMULTI, .cpp span{ line-height:13px !important;} --&gt;&lt;/style&gt;&lt;table class="cpp"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;24&lt;br /&gt;25&lt;br /&gt;26&lt;br /&gt;27&lt;br /&gt;28&lt;br /&gt;29&lt;br /&gt;30&lt;br /&gt;31&lt;br /&gt;32&lt;br /&gt;33&lt;br /&gt;34&lt;br /&gt;35&lt;br /&gt;36&lt;br /&gt;37&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;pre class="de1"&gt;&lt;span class="co2"&gt;#include &amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;#include &amp;lt;cstdlib&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kw2"&gt;using&lt;/span&gt; &lt;span class="kw2"&gt;namespace&lt;/span&gt; std&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw2"&gt;class&lt;/span&gt; GDC&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="kw2"&gt;public&lt;/span&gt;&lt;span class="sy4"&gt;:&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw4"&gt;int&lt;/span&gt; calculateGDC&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; a, &lt;span class="kw4"&gt;int&lt;/span&gt; b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; main&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;  GDC &lt;span class="sy2"&gt;*&lt;/span&gt; calculator &lt;span class="sy1"&gt;=&lt;/span&gt; &lt;span class="kw3"&gt;new&lt;/span&gt; GDC&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw4"&gt;int&lt;/span&gt; a &lt;span class="sy1"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw4"&gt;int&lt;/span&gt; b &lt;span class="sy1"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw3"&gt;cout&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;"GDC("&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; a &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;","&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; b &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;") = "&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; calculator&lt;span class="sy2"&gt;-&lt;/span&gt;&lt;span class="sy1"&gt;&amp;gt;&lt;/span&gt;calculateGDC&lt;span class="br0"&gt;(&lt;/span&gt;a,b&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw3"&gt;cout&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;"GDC("&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; a &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;","&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="sy2"&gt;-&lt;/span&gt;b &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;") = "&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; calculator&lt;span class="sy2"&gt;-&lt;/span&gt;&lt;span class="sy1"&gt;&amp;gt;&lt;/span&gt;calculateGDC&lt;span class="br0"&gt;(&lt;/span&gt;a,&lt;span class="sy2"&gt;-&lt;/span&gt;b&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw3"&gt;cout&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;"GDC("&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="sy2"&gt;-&lt;/span&gt;a &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;","&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; b &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;") = "&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; calculator&lt;span class="sy2"&gt;-&lt;/span&gt;&lt;span class="sy1"&gt;&amp;gt;&lt;/span&gt;calculateGDC&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="sy2"&gt;-&lt;/span&gt;a,b&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw3"&gt;cout&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;"GDC("&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="sy2"&gt;-&lt;/span&gt;a &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;","&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; b &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="st0"&gt;") = "&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; calculator&lt;span class="sy2"&gt;-&lt;/span&gt;&lt;span class="sy1"&gt;&amp;gt;&lt;/span&gt;calculateGDC&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="sy2"&gt;-&lt;/span&gt;a,b&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="sy1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw3"&gt;delete&lt;/span&gt; calculator&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw3"&gt;exit&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; GDC&lt;span class="sy4"&gt;::&lt;/span&gt;&lt;span class="me2"&gt;calculateGDC&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; a, &lt;span class="kw4"&gt;int&lt;/span&gt; b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw4"&gt;int&lt;/span&gt; rem &lt;span class="sy1"&gt;=&lt;/span&gt; &lt;span class="kw3"&gt;abs&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;a&lt;span class="sy2"&gt;%&lt;/span&gt;b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;rem &lt;span class="sy1"&gt;==&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;          &lt;span class="kw1"&gt;return&lt;/span&gt; b&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;  &lt;span class="kw1"&gt;else&lt;/span&gt;&lt;br /&gt;  &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;          &lt;span class="kw1"&gt;return&lt;/span&gt; this&lt;span class="sy2"&gt;-&lt;/span&gt;&lt;span class="sy1"&gt;&amp;gt;&lt;/span&gt;calculateGDC&lt;span class="br0"&gt;(&lt;/span&gt;b,rem&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy4"&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Java (&lt;a href="http://ideone.com/nFqLf"&gt;http://ideone.com/nFqLf&lt;/a&gt;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;style type="text/css"&gt;&lt;!--/**  * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann  * (http://qbnz.com/highlighter/ and http://geshi.org/)  */ .java  {font-family:monospace;color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0; padding: 3px;} .java a:link {color: #000060;} .java a:hover {background-color: #f0f000;} .java .head {font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;} .java .imp {font-weight: bold; color: red;} .java .kw1 {color: #000000; font-weight: bold;} .java .kw2 {color: #000066; font-weight: bold;} .java .kw3 {color: #003399;} .java .kw4 {color: #000066; font-weight: bold;} .java .co1 {color: #666666; font-style: italic;} .java .co2 {color: #006699;} .java .co3 {color: #008000; font-style: italic; font-weight: bold;} .java .coMULTI {color: #666666; font-style: italic;} .java .es0 {color: #000099; font-weight: bold;} .java .br0 {color: #009900;} .java .sy0 {color: #339933;} .java .st0 {color: #0000ff;} .java .nu0 {color: #cc66cc;} .java .me1 {color: #006633;} .java .me2 {color: #006633;} .java span.xtra { display:block; } .ln, .ln{ vertical-align: top; } .coMULTI, .java span{ line-height:13px !important;} --&gt;&lt;/style&gt;&lt;table class="java"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;21&lt;br /&gt;22&lt;br /&gt;23&lt;br /&gt;24&lt;br /&gt;25&lt;br /&gt;26&lt;br /&gt;27&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;pre class="de1"&gt;&lt;span class="kw1"&gt;import&lt;/span&gt; &lt;span class="co2"&gt;java.math.*&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;public&lt;/span&gt; &lt;span class="kw1"&gt;class&lt;/span&gt; Main&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class="kw1"&gt;public&lt;/span&gt; &lt;span class="kw1"&gt;static&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; main&lt;span class="br0"&gt;(&lt;/span&gt;&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Astring+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;/a&gt; args&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;            &lt;span class="kw4"&gt;int&lt;/span&gt; a &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kw4"&gt;int&lt;/span&gt; b &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            Main calc &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="kw1"&gt;new&lt;/span&gt; Main&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Asystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"GDC("&lt;/span&gt;&lt;span class="sy0"&gt;+&lt;/span&gt;a&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="st0"&gt;","&lt;/span&gt;&lt;span class="sy0"&gt;+&lt;/span&gt;b&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="st0"&gt;") = "&lt;/span&gt;&lt;span class="sy0"&gt;+&lt;/span&gt; calc.&lt;span class="me1"&gt;calculateGDC&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;a,b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Asystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"GDC("&lt;/span&gt;&lt;span class="sy0"&gt;+&lt;/span&gt;a&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="st0"&gt;","&lt;/span&gt;&lt;span class="sy0"&gt;+-&lt;/span&gt;b&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="st0"&gt;") = "&lt;/span&gt;&lt;span class="sy0"&gt;+&lt;/span&gt; calc.&lt;span class="me1"&gt;calculateGDC&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;a,&lt;span class="sy0"&gt;-&lt;/span&gt;b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Asystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"GDC("&lt;/span&gt;&lt;span class="sy0"&gt;+-&lt;/span&gt;a&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="st0"&gt;","&lt;/span&gt;&lt;span class="sy0"&gt;+&lt;/span&gt;b&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="st0"&gt;") = "&lt;/span&gt;&lt;span class="sy0"&gt;+&lt;/span&gt; calc.&lt;span class="me1"&gt;calculateGDC&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;a,b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Asystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"GDC("&lt;/span&gt;&lt;span class="sy0"&gt;+-&lt;/span&gt;a&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="st0"&gt;","&lt;/span&gt;&lt;span class="sy0"&gt;+-&lt;/span&gt;b&lt;span class="sy0"&gt;+&lt;/span&gt;&lt;span class="st0"&gt;") = "&lt;/span&gt;&lt;span class="sy0"&gt;+&lt;/span&gt; calc.&lt;span class="me1"&gt;calculateGDC&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="sy0"&gt;-&lt;/span&gt;a,&lt;span class="sy0"&gt;-&lt;/span&gt;b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kw4"&gt;int&lt;/span&gt; calculateGDC&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; a, &lt;span class="kw4"&gt;int&lt;/span&gt; b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;            &lt;span class="kw4"&gt;int&lt;/span&gt; rem &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Amath+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;Math&lt;/span&gt;&lt;/a&gt;.&lt;span class="me1"&gt;abs&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;a&lt;span class="sy0"&gt;%&lt;/span&gt;b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;rem &lt;span class="sy0"&gt;==&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;            &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kw1"&gt;return&lt;/span&gt; b&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;            &lt;span class="kw1"&gt;else&lt;/span&gt;&lt;br /&gt;            &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kw1"&gt;return&lt;/span&gt; &lt;span class="kw1"&gt;this&lt;/span&gt;.&lt;span class="me1"&gt;calculateGDC&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;b,rem&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ruby (&lt;a href="http://ideone.com/Q8HPg"&gt;http://ideone.com/Q8HPg&lt;/a&gt;)&lt;/div&gt;&lt;br /&gt;&lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;style type="text/css"&gt;&lt;!--/**  * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann  * (http://qbnz.com/highlighter/ and http://geshi.org/)  */ .ruby  {font-family:monospace;color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0; padding: 3px;} .ruby a:link {color: #000060;} .ruby a:hover {background-color: #f0f000;} .ruby .head {font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;} .ruby .imp {font-weight: bold; color: red;} .ruby .kw1 {color:#9966CC; font-weight:bold;} .ruby .kw2 {color:#0000FF; font-weight:bold;} .ruby .kw3 {color:#CC0066; font-weight:bold;} .ruby .kw4 {color:#CC00FF; font-weight:bold;} .ruby .co1 {color:#008000; font-style:italic;} .ruby .co4 {color: #cc0000; font-style: italic;} .ruby .coMULTI {color:#000080; font-style:italic;} .ruby .es0 {color:#000099;} .ruby .br0 {color:#006600; font-weight:bold;} .ruby .sy0 {color:#006600; font-weight:bold;} .ruby .st0 {color:#996600;} .ruby .nu0 {color:#006666;} .ruby .me1 {color:#9900CC;} .ruby .re0 {color:#ff6633; font-weight:bold;} .ruby .re1 {color:#0066ff; font-weight:bold;} .ruby .re2 {color:#6666ff; font-weight:bold;} .ruby .re3 {color:#ff3333; font-weight:bold;} .ruby span.xtra { display:block; } .ln, .ln{ vertical-align: top; } .coMULTI, .ruby span{ line-height:13px !important;} --&gt;&lt;/style&gt;&lt;table class="ruby"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;pre class="de1"&gt;&lt;span class="kw1"&gt;def&lt;/span&gt; mcd&lt;span class="br0"&gt;(&lt;/span&gt;a,b&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt; rem = &lt;span class="br0"&gt;(&lt;/span&gt;a&lt;span class="sy0"&gt;%&lt;/span&gt;b&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;abs&lt;/span&gt;&lt;br /&gt; &lt;span class="kw1"&gt;if&lt;/span&gt; rem == &lt;span class="nu0"&gt;0&lt;/span&gt; &lt;span class="kw1"&gt;then&lt;/span&gt;&lt;br /&gt;   &lt;span class="kw2"&gt;return&lt;/span&gt; b&lt;br /&gt; &lt;span class="kw1"&gt;else&lt;/span&gt;&lt;br /&gt;   &lt;span class="kw2"&gt;return&lt;/span&gt; mcd&lt;span class="br0"&gt;(&lt;/span&gt;b,rem&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw3"&gt;puts&lt;/span&gt; mcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;,&lt;span class="nu0"&gt;44&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="kw3"&gt;puts&lt;/span&gt; mcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;,&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="kw3"&gt;puts&lt;/span&gt; mcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;,&lt;span class="sy0"&gt;-&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="kw3"&gt;puts&lt;/span&gt; mcd&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;33&lt;/span&gt;,&lt;span class="sy0"&gt;-&lt;/span&gt;&lt;span class="nu0"&gt;110&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6763665398492294673?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6763665398492294673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6763665398492294673'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/03/gdc-using-euclidean-algorithm-and.html' title='Greater Common Divisor (GCD), the Euclidean way'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-4413052179188578671</id><published>2011-03-26T19:23:00.004Z</published><updated>2011-03-26T19:43:15.988Z</updated><title type='text'>Java Regular Expressions</title><content type='html'>&lt;div style="text-align: justify;"&gt;Today I want to provide some useful information about the use of &lt;a href="http://etext.lib.virginia.edu/services/helpsheets/unix/regex.html"&gt;regular expressions&lt;/a&gt; in Java.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Regular expressions handling is part of the Java library, adding to the vast functionality already offered by it. In short, we could say that regular expressions represent string patterns&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;They have may uses. For instance, they can be used to filter the files in a directory whose name follows a particular pattern.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The good news about Java and regular expressions, is that the &lt;a href="http://download.oracle.com/javase/1.4.2/docs/api/java/util/regex/package-summary.html"&gt;API&lt;/a&gt; is pretty simple (something that can not be said about other APIs in the standard library). It is based in the use of two classes, the Pattern and the Matcher. Obviously the Pattern class represents the regular expression pattern, while the Matcher applies the regular expression to a particular String.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are three ways to use a Matcher:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li style="text-align: justify;"&gt;To find substrings matching the pattern&lt;/li&gt;&lt;li style="text-align: justify;"&gt;To check in the whole input string matches the pattern&lt;/li&gt;&lt;li style="text-align: justify;"&gt;To check if a defined region within the inputs string matches the pattern&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;More information can be found in the &lt;a href="http://download.oracle.com/javase/tutorial/essential/regex/"&gt;Java Regular Expressions Trail&lt;/a&gt;.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The following code snippet shows how to use a Pattern and a Matcher to filter Strings in an array. It uses the Matcher to check if the whole input matches the pattern. The source code can be edited and downloaded from &lt;a href="http://ideone.com/fl5pD"&gt;IDEONE.COM&lt;/a&gt;:&lt;/div&gt;&lt;br /&gt;&lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;style type="text/css"&gt;&lt;!--/**  * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann  * (http://qbnz.com/highlighter/ and http://geshi.org/)  */ .java  {font-family:monospace;color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0; padding: 3px;} .java a:link {color: #000060;} .java a:hover {background-color: #f0f000;} .java .head {font-family: Verdana, Arial, sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;} .java .imp {font-weight: bold; color: red;} .java .kw1 {color: #000000; font-weight: bold;} .java .kw2 {color: #000066; font-weight: bold;} .java .kw3 {color: #003399;} .java .kw4 {color: #000066; font-weight: bold;} .java .co1 {color: #666666; font-style: italic;} .java .co2 {color: #006699;} .java .co3 {color: #008000; font-style: italic; font-weight: bold;} .java .coMULTI {color: #666666; font-style: italic;} .java .es0 {color: #000099; font-weight: bold;} .java .br0 {color: #009900;} .java .sy0 {color: #339933;} .java .st0 {color: #0000ff;} .java .nu0 {color: #cc66cc;} .java .me1 {color: #006633;} .java .me2 {color: #006633;} .java span.xtra { display:block; } .ln, .ln{ vertical-align: top; } .coMULTI, .java span{ line-height:13px !important;} --&gt;&lt;/style&gt;&lt;table class="java"&gt;&lt;tbody&gt;&lt;tr class="li1"&gt;&lt;td class="ln"&gt;&lt;pre class="de1"&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;6&lt;br /&gt;7&lt;br /&gt;8&lt;br /&gt;9&lt;br /&gt;10&lt;br /&gt;11&lt;br /&gt;12&lt;br /&gt;13&lt;br /&gt;14&lt;br /&gt;15&lt;br /&gt;16&lt;br /&gt;17&lt;br /&gt;18&lt;br /&gt;19&lt;br /&gt;20&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class="de1"&gt;&lt;pre class="de1"&gt;&lt;span class="kw1"&gt;import&lt;/span&gt; &lt;span class="co2"&gt;java.util.*&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;import&lt;/span&gt; &lt;span class="co2"&gt;java.lang.*&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;import&lt;/span&gt; &lt;span class="co2"&gt;java.util.regex.Pattern&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="kw1"&gt;import&lt;/span&gt; &lt;span class="co2"&gt;java.util.regex.Matcher&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw1"&gt;class&lt;/span&gt; Main&lt;br /&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span class="kw1"&gt;public&lt;/span&gt; &lt;span class="kw1"&gt;static&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; main &lt;span class="br0"&gt;(&lt;/span&gt;&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Astring+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;/a&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; args&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="kw1"&gt;throws&lt;/span&gt; java.&lt;span class="me1"&gt;lang&lt;/span&gt;.&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Aexception+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;Exception&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;     &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;             &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Asystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Initializing"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;             &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Astring+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;/a&gt; input&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;span class="st0"&gt;"pattern0_1"&lt;/span&gt;,&lt;span class="st0"&gt;"pattern1_2"&lt;/span&gt;,&lt;span class="st0"&gt;"pattern_d"&lt;/span&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;             Pattern p &lt;span class="sy0"&gt;=&lt;/span&gt; Pattern.&lt;span class="me1"&gt;compile&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"(pattern)(&lt;span class="es0"&gt;\\&lt;/span&gt;d+)(_)(&lt;span class="es0"&gt;\\&lt;/span&gt;d)+"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;             &lt;span class="kw1"&gt;for&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;int&lt;/span&gt; i &lt;span class="sy0"&gt;=&lt;/span&gt; &lt;span class="nu0"&gt;0&lt;/span&gt; &lt;span class="sy0"&gt;;&lt;/span&gt; i &lt;span class="sy0"&gt;&amp;lt;&lt;/span&gt; input.&lt;span class="me1"&gt;length&lt;/span&gt; &lt;span class="sy0"&gt;;&lt;/span&gt; i&lt;span class="sy0"&gt;++&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                     Matcher m &lt;span class="sy0"&gt;=&lt;/span&gt; p.&lt;span class="me1"&gt;matcher&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;input&lt;span class="br0"&gt;[&lt;/span&gt;i&lt;span class="br0"&gt;]&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;                     &lt;span class="kw1"&gt;if&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;m.&lt;span class="me1"&gt;matches&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;                             &lt;a href="http://www.google.com/search?hl=en&amp;amp;q=allinurl%3Asystem+java.sun.com&amp;amp;btnI=I%27m%20Feeling%20Lucky"&gt;&lt;span class="kw3"&gt;System&lt;/span&gt;&lt;/a&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;m.&lt;span class="me1"&gt;group&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="nu0"&gt;&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;br /&gt;                     &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;             &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;     &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;pre class="source" id="source" style="margin-bottom: 0px"&gt;&lt;br /&gt;&lt;/pre&gt;Enjoy!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4413052179188578671?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4413052179188578671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4413052179188578671'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/03/java-regular-expressions.html' title='Java Regular Expressions'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-3558005425510809866</id><published>2011-02-13T17:32:00.003Z</published><updated>2011-02-13T17:50:32.976Z</updated><title type='text'>GTK+, Hello World</title><content type='html'>It is not really a hello world application, but since it is my first experience with GTK+ I've decided to use that "familiar" expresion in the title of this post. Here you have the code:&lt;br /&gt;&lt;br /&gt;main.c&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color:#000099;"&gt;#include &amp;lt;gtk/gtk.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;/*&lt;br /&gt;* Function launching the View&lt;br /&gt;*/&lt;/span&gt;&lt;/i&gt;&lt;span style="color:#ff6633;"&gt;&lt;br /&gt;void&lt;/span&gt; initUI&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt;int&lt;/span&gt; argc&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt; char&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;**&lt;/span&gt;&lt;/b&gt; argv&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* Close window signal handler&lt;br /&gt;*/&lt;/span&gt;&lt;/i&gt;&lt;span style="color:#ff6633;"&gt;&lt;br /&gt;void&lt;/span&gt; destroy&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; widget&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;gpointer data&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* Login Callback&lt;br /&gt;*/&lt;/span&gt;&lt;/i&gt;&lt;span style="color:#ff6633;"&gt;&lt;br /&gt;void&lt;/span&gt; login&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; widget&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;gpointer data&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* Application's entry point&lt;br /&gt;*/&lt;/span&gt;&lt;/i&gt;&lt;span style="color:#ff6633;"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span style="color:#990000;"&gt; main&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt;int&lt;/span&gt; argc&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt; char&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;**&lt;/span&gt;&lt;/b&gt;argv&lt;b&gt;&lt;span style="color:#663300;"&gt;){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; g_print&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"INIT APPLICATION\n"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; initUI&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;argc&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;argv&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt; return&lt;/span&gt;&lt;span style="color:#999900;"&gt; 0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; initUI&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt;int&lt;/span&gt; argc&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt; char&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;**&lt;/span&gt;&lt;/b&gt; argv&lt;b&gt;&lt;span style="color:#663300;"&gt;){&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Initialize GTK&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  gtk_init&lt;b&gt;&lt;span style="color:#663300;"&gt;(&amp;amp;&lt;/span&gt;&lt;/b&gt;argc&lt;b&gt;&lt;span style="color:#663300;"&gt;,&amp;amp;&lt;/span&gt;&lt;/b&gt;argv&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Create the main window Widget&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; mainWindow&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_window_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW_TOPLEVEL&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Set the window title, default size and position (Centered)&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  gtk_window_set_title&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;mainWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"Login"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_window_set_default_size&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;mainWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;250&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;100&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_window_set_position&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;mainWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;GTK_WIN_POS_CENTER&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; /* When resize is off some of the properties are interpreted in weird ways */&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt; //gtk_window_set_resizable(GTK_WINDOW(mainWindow),FALSE);&lt;br /&gt;&lt;br /&gt; // Set the destroy signal handler, that will be called when the&lt;br /&gt; // window is closed&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  g_signal_connect&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;G_OBJECT&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;mainWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"destroy"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;G_CALLBACK&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;destroy&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;NULL&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Now is time to add some panels to layout the content in the window&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; topVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_vbox_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;10&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; buttonsHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_hbox_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; topHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_hbox_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;20&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; labelsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_vbox_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; textsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_vbox_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Now let's link the panels to each other&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  gtk_box_pack_start&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;topVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;topHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt; FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_start&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;topVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;buttonsHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_start&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;topHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;labelsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_start&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;topHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;textsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Declare and add the buttons&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; loginButton&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_button_new&lt;b&gt;&lt;span style="color:#663300;"&gt;();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; cancelButton&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_button_new&lt;b&gt;&lt;span style="color:#663300;"&gt;();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_button_set_label&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BUTTON&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;loginButton&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"Login"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_button_set_label&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BUTTON&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;cancelButton&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"Cancel"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Link the login button with the login signal handler&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  g_signal_connect&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;G_OBJECT&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;loginButton&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"clicked"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;G_CALLBACK&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;login&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;NULL&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; g_signal_connect&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;G_OBJECT&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;cancelButton&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"clicked"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;G_CALLBACK&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;destroy&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;NULL&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_end&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;buttonsHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;cancelButton&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_end&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;buttonsHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;loginButton&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;FALSE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Declare and add the labels&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; userLabel&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_label_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"User"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; passLabel&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_label_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"Password"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_label_set_width_chars&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_LABEL&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;userLabel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;10&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_label_set_width_chars&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_LABEL&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;passLabel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;10&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_misc_set_alignment&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_MISC&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;userLabel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_misc_set_alignment&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_MISC&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;passLabel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_start&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;labelsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;userLabel&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_start&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;labelsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;passLabel&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; // Declare and add the text boxes&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; userText&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_entry_new&lt;b&gt;&lt;span style="color:#663300;"&gt;();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; passText&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_entry_new&lt;b&gt;&lt;span style="color:#663300;"&gt;();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_start&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;textsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;userText&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_box_pack_start&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_BOX&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;textsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;passText&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;0&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Add the top box to the window&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  gtk_container_add&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_CONTAINER&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;mainWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;topVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;topVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;buttonsHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;topHPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;labelsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;textsVPanel&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;loginButton&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;cancelButton&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;userLabel&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;passLabel&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;userText&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;passText&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;mainWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt; //Init the GTK loop&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  gtk_main&lt;b&gt;&lt;span style="color:#663300;"&gt;();&lt;br /&gt;}&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; destroy&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; widget&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;gpointer data&lt;b&gt;&lt;span style="color:#663300;"&gt;){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_main_quit&lt;b&gt;&lt;span style="color:#663300;"&gt;();&lt;br /&gt;}&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#ff6633;"&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; login&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; widget&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;gpointer data&lt;b&gt;&lt;span style="color:#663300;"&gt;){&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt; // Create the main window Widget&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; messageWindow&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_window_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW_TOPLEVEL&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; GtkWidget&lt;b&gt;&lt;span style="color:#663300;"&gt; *&lt;/span&gt;&lt;/b&gt; label&lt;b&gt;&lt;span style="color:#663300;"&gt; =&lt;/span&gt;&lt;/b&gt; gtk_label_new&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"Trying to log in the system"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; // Set the window title&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  gtk_window_set_title&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;messageWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#009900;"&gt;"MESSAGE"&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_window_set_default_size&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;messageWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;200&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="color:#999900;"&gt;50&lt;/span&gt;&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_window_set_modal&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;messageWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;TRUE&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_window_set_position&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_WINDOW&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;messageWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;GTK_WIN_POS_CENTER&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color:#999999;"&gt;&lt;br /&gt;&lt;br /&gt; //gtk_window_set_resizable(GTK_WINDOW(messageWindow),FALSE);&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;  gtk_container_add&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;GTK_CONTAINER&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;messageWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;),&lt;/span&gt;&lt;/b&gt;label&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;label&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; gtk_widget_show&lt;b&gt;&lt;span style="color:#663300;"&gt;(&lt;/span&gt;&lt;/b&gt;messageWindow&lt;b&gt;&lt;span style="color:#663300;"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;Compile with:&lt;br /&gt;&lt;br /&gt;&gt;&gt;gcc -o a.out main.c `pkg-config --libs --cflags gtk+-2.0`&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-3558005425510809866?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3558005425510809866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3558005425510809866'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/02/gtk-hello-world.html' title='GTK+, Hello World'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6577572707893213352</id><published>2011-02-06T17:56:00.001Z</published><updated>2011-02-06T17:58:35.075Z</updated><title type='text'>Online rock radio (Air Mackay)</title><content type='html'>Hi folks,&lt;br /&gt;&lt;br /&gt;check this out:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.shoutcast.com/Internet-Radio/air%20mackay"&gt;http://www.shoutcast.com/Internet-Radio/air%20mackay&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;fantastic 70's and 80's rock.&lt;br /&gt;&lt;br /&gt;Enjoy!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6577572707893213352?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6577572707893213352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6577572707893213352'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/02/online-rock-radio-air-mackay.html' title='Online rock radio (Air Mackay)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6419993824964729931</id><published>2011-01-05T16:25:00.004Z</published><updated>2011-01-05T19:34:27.664Z</updated><title type='text'>Links to DSL desing/writting in Java:</title><content type='html'>&lt;div&gt;Domain specific languages are powerful, yet to be used-with-care, tools. They can provide new ways of interacting or configuring a system, and greatly increase its productivity and flexibility. New modern (and mostly interpreted) languages like Ruby or Groovy are better suited for DSL implementation than classic languages (Java, C++,...). However Java or C++ can still be used, accepting some verbosity overhead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The following article offers a fantastic introduction to DSLs, their core concepts, desing and implementation, using both modern and more classical languages. Only one piece is missing; nothing is mentioned about the testability of "ultra-expresive" code. Besides, the redundant information that languages like Java forces us to write, and that the author call "ceremony", help other engineers to understand (and thus maintain) our code. We do not just write code to be executed, but also to be maintained (let's not be selfish please).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.javaworld.com/javaworld/jw-06-2008/jw-06-dsls-in-java-1.html"&gt;http://www.javaworld.com/javaworld/jw-06-2008/jw-06-dsls-in-java-1.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.javaworld.com/javaworld/jw-07-2008/jw-07-dsls-in-java-2.html"&gt;http://www.javaworld.com/javaworld/jw-07-2008/jw-07-dsls-in-java-2.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.javaworld.com/javaworld/jw-08-2008/jw-08-dsls-in-java-3.html"&gt;http://www.javaworld.com/javaworld/jw-08-2008/jw-08-dsls-in-java-3.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.javaworld.com/javaworld/jw-09-2008/jw-09-dsls-in-java-4.html"&gt;http://www.javaworld.com/javaworld/jw-09-2008/jw-09-dsls-in-java-4.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As I said these links provide just introductory information. I'll add more links in the following days or weeks as I continue with my own learning adventure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy life to the full!!!!!!!!!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Edit:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have found one of those sentences that Guru wannabes (you know, they will look at you and say "We have designed a DSL to....... you know what a DSL is, don't you?") definitely hate:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Lucida, 'Lucida Grande', Tahoma, sans-serif; font-size: 13px; line-height: 16px; "&gt;"Internal DSL" is more or less a fancy name for an API that has been created thinking in terms of readability and focusing on a particular problem of a specific domain.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Lucida, 'Lucida Grande', Tahoma, sans-serif; font-size: 13px; line-height: 16px; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Lucida, 'Lucida Grande', Tahoma, sans-serif; font-size: 13px; line-height: 16px; "&gt;I have found this in an interesting artical called "&lt;a href="http://www.infoq.com/articles/internal-dsls-java"&gt;An aproach to Internal Domain Specific Languages in Java&lt;/a&gt;"&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6419993824964729931?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6419993824964729931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6419993824964729931'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/01/links-to-dsl-desingwritting-in-java.html' title='Links to DSL desing/writting in Java:'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-682534239434441573</id><published>2011-01-04T22:55:00.002Z</published><updated>2011-01-04T23:02:11.286Z</updated><title type='text'>Online compilers</title><content type='html'>Hi there,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There seems to be a good few online compilers, ready to help us whenever we need to test some code or idea, but no compiler is at hand (and we are just too lazy to get one, or we are using a machine where our privileges do not allow us to install one). I have tested just two of them:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://codepad.org"&gt;http://codepad.org&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://ideone.com"&gt;http://ideone.com&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In fact I have created the customary hello world using ideone. &lt;a href="http://ideone.com/OLPGW"&gt;Check it out&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This kind of very simple online compilers sprung off the &lt;a href="http://en.wikipedia.org/wiki/Pastebin"&gt;pastebin&lt;/a&gt; concetp/idea. The wikipedia provides many links to different pastebin sites.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-682534239434441573?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/682534239434441573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/682534239434441573'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2011/01/online-compilers.html' title='Online compilers'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6603832614246520050</id><published>2010-12-21T17:43:00.004Z</published><updated>2010-12-21T17:50:36.802Z</updated><title type='text'>White Christmas? No thanks</title><content type='html'>Yesterday I left Switzerland with less than 5°C, and an all white landscape. Nice, really Christmaish, but cold, "effing" cold.&lt;br /&gt;&lt;br /&gt;Today I woke up in Las Palmas de Gran Canaria, with 25°C, and an all blue wonderful sky. Nice, not Christmaish at all, but cool, "effing" cool.&lt;br /&gt;&lt;br /&gt;:)&lt;br /&gt;&lt;br /&gt;P.S: Around mid-day the thermomiter raised to 30°C&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6603832614246520050?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6603832614246520050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6603832614246520050'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/12/white-christmas-no-thanks.html' title='White Christmas? No thanks'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7577256991527605517</id><published>2010-12-11T20:20:00.001Z</published><updated>2010-12-11T20:21:58.185Z</updated><title type='text'>Time goes by (once more)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_2CPTItAuDOw/TQPdVQ-rWeI/AAAAAAAAAQY/7TiH2Nn_-1c/s1600/face.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 336px; height: 400px;" src="http://2.bp.blogspot.com/_2CPTItAuDOw/TQPdVQ-rWeI/AAAAAAAAAQY/7TiH2Nn_-1c/s400/face.jpg" alt="" id="BLOGGER_PHOTO_ID_5549522523255429602" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7577256991527605517?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7577256991527605517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7577256991527605517'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/12/time-goes-by.html' title='Time goes by (once more)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_2CPTItAuDOw/TQPdVQ-rWeI/AAAAAAAAAQY/7TiH2Nn_-1c/s72-c/face.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2234977628535330392</id><published>2010-12-04T13:58:00.005Z</published><updated>2010-12-04T16:03:32.691Z</updated><title type='text'>PLC programming, IEC 61131</title><content type='html'>Here you have a few links that may help you getting started with PLCs programming:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Wikipedia, what else? &lt;a href="http://en.wikipedia.org/wiki/IEC_61131-3"&gt;http://en.wikipedia.org/wiki/IEC_61131-3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;www.plcopen.org introduction to the standard. &lt;a href="http://www.blogger.com/www.plcopen.org/pages/pc2_training/downloads/downloads/new_intro_iec.doc"&gt;www.plcopen.org/pages/pc2_training/downloads/downloads/new_intro_iec.doc&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Comparison of the different languages defined by the standard:&lt;a href="http://www.blogger.com/www.automation.com/pdf_articles/IEC_Programming_Thayer_L.pdf"&gt; www.automation.com/pdf_articles/IEC_Programming_Thayer_L.pdf&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Great online book: &lt;a href="http://engineeronadisk.com/V2/book_PLC/engineeronadisk.html"&gt;http://engineeronadisk.com/V2/book_PLC/engineeronadisk.html&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Enjoy!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2234977628535330392?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2234977628535330392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2234977628535330392'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/12/plc-programming-iec-61131.html' title='PLC programming, IEC 61131'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6291323747287618020</id><published>2010-12-03T20:27:00.003Z</published><updated>2010-12-18T21:09:45.412Z</updated><title type='text'>Support WikiLeaks</title><content type='html'>&lt;a href="http://213.251.145.96/"&gt;&lt;img src="http://english.ruvr.ru/data/2010/10/26/1210345812/240px-Wikileaks_logo_svg%20copy.jpg" widht="40px" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6291323747287618020?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6291323747287618020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6291323747287618020'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/12/support-wiki.html' title='Support WikiLeaks'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-573812357749868771</id><published>2010-11-20T10:33:00.002Z</published><updated>2010-11-20T11:24:12.343Z</updated><title type='text'>Python to .exe</title><content type='html'>Have you ever wondered how to distribute your python programs as a self contained .exe, so that your potential user don't even have to install any Python interpreter?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The answer is easy, use &lt;a href="http://www.py2exe.org/"&gt;py2exe&lt;/a&gt;. In this post I'm going to provide a step by step guide on how to use it. Take it as just a quick introductory guide to get you started:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Obviously a working python script is necessary, as well as a python interpreter (preferably &gt;= 2.), since py2exe is just a python module.&lt;/li&gt;&lt;li&gt;I don't mean to be repetitive, but your python script must be a working one. For your first experience with py2exe it is recommended to have a very simple script depending on just the standard library.&lt;/li&gt;&lt;li&gt;Create a setup script, that is another python script with the obvious name of setup.py:&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;pre&gt;&lt;br /&gt;from distutils.core import setup&lt;br /&gt;import py2exe&lt;br /&gt;&lt;br /&gt;setup(console=['yourapp.py'])&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Run the setup script: &lt;pre&gt;python setup.py py2exe&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;Now you should have an exe file ready to be executed. The file is placed under the dist folder, created just under the folder where the setup script was executed&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;I hope it works fine for you, it does the trick for me.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-573812357749868771?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/573812357749868771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/573812357749868771'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/11/python-to-exe.html' title='Python to .exe'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-3831273087063823493</id><published>2010-08-14T16:42:00.000Z</published><updated>2010-08-14T16:43:37.442Z</updated><title type='text'>Python Bresenham's algorithm</title><content type='html'>Do not look any further:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://snipplr.com/view/22482/bresenhams-line-algorithm/"&gt;http://snipplr.com/view/22482/bresenhams-line-algorithm/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-3831273087063823493?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3831273087063823493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3831273087063823493'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/08/python-bresenhams-algorithm.html' title='Python Bresenham&apos;s algorithm'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6531952519886557158</id><published>2010-05-16T16:44:00.003Z</published><updated>2010-05-16T19:43:47.325Z</updated><title type='text'>Java GUI programming</title><content type='html'>Here you have a small compilation of links to different alternatives for Java GUI programming:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;.- &lt;a href="http://java.sun.com/docs/books/tutorial/uiswing/"&gt;The official GUI programming trail&lt;/a&gt;: Of course the classical aproach to GUI programming is using Java's GUI APIs (AWT, SWING, JFC). While being able to put together UIs using Swing is enough for most developers, the real power comes from a deep understanding of its &lt;a href="http://java.sun.com/products/jfc/tsc/articles/architecture/"&gt;achitecture&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;.- &lt;a href="http://www.eclipse.org/swt/"&gt;The Standard Widget Toolkit&lt;/a&gt;: Eclipse's GUI framework, originally developped by IBM.&lt;/div&gt;&lt;div&gt;.- &lt;a href="http://javafx.com/"&gt;JavaFX&lt;/a&gt;: This API is geared toward RIAs (Rich Internet Applications). However it may be worth a try.&lt;/div&gt;&lt;div&gt;.- &lt;a href="http://www.miglayout.com/"&gt;Miglayout&lt;/a&gt;: Layout manager for Swing and SWT. The layout managers included in any JDK are cumbersome and its very difficult to get the GUI you want, and that it adapts properly to different resolutions. Miglayout come to take layout managers a step higher.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Seemingly, there are not many other tools widely adopted.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I may post more information in the following days, following my investigation on aternatives to Swing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6531952519886557158?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6531952519886557158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6531952519886557158'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/05/java-gui-programming.html' title='Java GUI programming'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7024855752925960615</id><published>2010-05-15T18:04:00.003Z</published><updated>2010-05-15T18:18:47.898Z</updated><title type='text'>Pride and prejudice, by Jane Austen</title><content type='html'>In part because I forgot to include this book in my last post, and in part because I honestly believe it deserves its own one, here you have my views and feelings about it:&lt;br /&gt;&lt;br /&gt; At the present time I expect everyone to be aware of the book's plot. Here we have a group of girls on heavy hormone doses, in the Victorian Great Britain. The books is not more that the tale of their flirting adventures, but what a tale!!&lt;br /&gt;&lt;br /&gt; Every character is the book is so wittingly drawn, that after a few chapters we get to understand the way each one plays or accepts the rules of the Victorian world. The story itself is weak, but the way in which the society and its protocols is described is just astonishing.&lt;br /&gt;&lt;br /&gt; On top of that, the book is full of emotions, and the connection between the characters and the reader is total. At some point I was feeling so anxious that my heart began to beat faster, and I had "that" feeling on my stomach.....&lt;br /&gt;&lt;br /&gt; All in all, a very enjoyable book. Not for English beginners though. The language and the grammar used, can discourage many people and make the whole experience a nightmare.&lt;br /&gt;&lt;br /&gt; Regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7024855752925960615?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7024855752925960615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7024855752925960615'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/05/pride-and-prejudice-by-jane-austen.html' title='Pride and prejudice, by Jane Austen'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8126545107520717609</id><published>2010-05-15T09:14:00.004Z</published><updated>2010-05-15T21:32:37.127Z</updated><title type='text'>Mark Twain's biography + full works</title><content type='html'>&lt;div style="text-align: justify;"&gt;Continuing my journey through the land of the &lt;a href="http://www.gutenberg.org/"&gt;classics of the universal literature&lt;/a&gt;, I have left the "old" continent, and set off for the "land of freedom".&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I have already read &lt;a href="http://eoa.auburn.edu/face/Article.jsp?id=h-1506"&gt;Booker T. Washington&lt;/a&gt;'s Up from Slavery, an inspiring autobiography, describing Mr. Washington's way from a slave's hut, to meeting the president in the White House. Mr. Booker praises himself for his humbleness, however it feels like he is too proud (though he has reasons to be so) of his achievements.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I have also read some of &lt;a href="http://people.brandeis.edu/%7Eteuber/poebio.html"&gt;Edgar Poe&lt;/a&gt;'s creations. What I really enjoyed about them was the simplicity of the language. There was no need to be constantly looking for words or idioms in a dictionary. A simple yet charmingly descriptive and effective style. I'm sure I will come back to him, in the following months.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The book that gives name to this post, is the one that occupies me at the moment. I'm still reading &lt;a href="http://shs.umsystem.edu/famousmissourians/writers/clemens/clemens.shtml"&gt;Mark Twain&lt;/a&gt;'s autobiography and, though he was not a slave, his life conditions and level of education do not match at all my expectations when it comes to an author part of the history of literature. Seemingly he used a good deal of his own life into each of his creations (this is by no means a reproach).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I admit that modern literature must be supported and enjoyed, otherwise the classics in the future will be pretty much the same as today :). But, having so much fun reading what we consider classics today, I find it hard to direct my attention to modern creation. Maybe in about &lt;a href="http://en.wikipedia.org/wiki/Wikipedia:Public_domain#When_does_copyright_expire.3F"&gt;70 years, when today's books pass to the public domain...&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Enjoy life!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8126545107520717609?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8126545107520717609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8126545107520717609'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/05/marks-twain-biography-full-works.html' title='Mark Twain&apos;s biography + full works'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6033960986685609463</id><published>2010-04-29T21:40:00.003Z</published><updated>2010-04-29T21:43:12.500Z</updated><title type='text'>The scream</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img100.imageshack.us/img100/8496/thescreen.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 322px; height: 426px;" src="http://img100.imageshack.us/img100/8496/thescreen.png" border="0" alt="" /&gt;&lt;/a&gt;Ja, ja , ja. Isn't it amazing what people come up with off the most unlikely situations?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6033960986685609463?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6033960986685609463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6033960986685609463'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2010/04/scream.html' title='The scream'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-439860565156548923</id><published>2009-10-21T18:24:00.003Z</published><updated>2009-10-21T18:42:18.642Z</updated><title type='text'>Actual does not mean Currently</title><content type='html'>In Java/C++/C terms:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Actual != (currently || at the moment || at the present time)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Is not that difficult, for god's sake!!!!!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;E.g. "Based on actual facts", sentence commonly used in movies, means that the facts are genuine, not that they are current, or recent.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;E.g. "In the current financial situation Banks are reluctant to lend money", so, because of the situation we are going through at the moment, Banks will not give you money for that car you SO want.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please, is not that difficult, why so many non-native English speakers believe that being able to communicate is just enough? no, it is not!!! I understand what they think the meaning of the word "actual" is, because I am Spanish, and the Spanish word "actual" has the same meaning as the English "currently". But that is not the case for a British or an American.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Pleaseeeeeeeee!!!!!!!!!!!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;P.S. What about this grammar jewel: "This is MORE FASTER than ....", hilarious.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-439860565156548923?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/439860565156548923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/439860565156548923'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/10/actual-does-not-mean-currently.html' title='Actual does not mean Currently'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7320314292113070822</id><published>2009-09-26T17:12:00.001Z</published><updated>2009-09-26T17:13:52.452Z</updated><title type='text'>UML Cheat Sheet</title><content type='html'>Always comes in handy:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.holub.com/goodies/uml/"&gt;http://www.holub.com/goodies/uml/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://loufranco.com/blog/assets/cheatsheet.pdf"&gt;http://loufranco.com/blog/assets/cheatsheet.pdf&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7320314292113070822?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7320314292113070822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7320314292113070822'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/09/uml-cheat-sheet.html' title='UML Cheat Sheet'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5407704515541025666</id><published>2009-08-30T11:03:00.004Z</published><updated>2009-09-16T16:04:34.901Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='history'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>The Autobiography of Benjamin Franklin</title><content type='html'>&lt;div style="text-align: justify;"&gt;Today I want to recommend you &lt;a href="http://books.google.ch/books?id=BL1VXdTbDucC&amp;amp;dq=benjamin+franklin+autobiography&amp;amp;printsec=frontcover&amp;amp;source=bl&amp;amp;ots=a2PL4aqRQs&amp;amp;sig=PM87-8PK9WrURWMNVbRFuUpi7ho&amp;amp;hl=en&amp;amp;ei=L1yaSriBIaHbjQeZsNSrBQ&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=3#v=onepage&amp;amp;q=&amp;amp;f=false"&gt;the autobiography of Benjamin Franklin&lt;/a&gt;. This is an amazing piece of history, written  in the most catchy possible way. It grabs you by the neck, and make you not being able to stop reading.&lt;br /&gt;&lt;br /&gt;Whether you are interested in the &lt;a href="http://www.ushistory.org/"&gt;history of the United States&lt;/a&gt;, or just in &lt;a href="http://www.ushistory.org/franklin/info/index.htm"&gt;Benjamin&lt;/a&gt; himself, or want to achieve some degree of personal growth, this book is, doubtless, for you.&lt;br /&gt;&lt;br /&gt;It is a fantastic piece of literature, though it is surprising that men as wise as Benjamin, considered as totally normal to &lt;a href="http://research.history.org/Historical_Research/Research_Themes/ThemeFamily/WomenEducation.cfm"&gt;educate women in a different way&lt;/a&gt;, towards more "domestic" skills. I´m just about to finish the book and haven´t found any references to &lt;a href="http://www.slavenorth.com/pennsylvania.htm"&gt;slavery&lt;/a&gt;, but I´m convinced that even Benjamin, as just and wise as he was, considered this the most natural state of things.&lt;br /&gt;&lt;br /&gt;Enjoy and learn.&lt;br /&gt;&lt;br /&gt;P.S. Benjamin´s autobiography is a book in the public domain, thus you can get an electronic copy for free, though I´m sure you can grab a paper copy at your local library.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gutenberg.org/etext/148"&gt;Project Gutenberg´s links to the book&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://www.onlineuniversities.com/"&gt;onlineuniversities.com&lt;/a&gt; have provided me with an interesting post about &lt;a href="http://www.onlineuniversities.com/blog/2009/09/25-inspiring-biographies-everyone-should-read/"&gt;must read biographies&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5407704515541025666?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5407704515541025666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5407704515541025666'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/08/autobiography-of-benjamin-franklin.html' title='The Autobiography of Benjamin Franklin'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-123145293275376511</id><published>2009-08-16T10:32:00.002Z</published><updated>2009-08-16T10:33:41.329Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Salamanca'/><title type='text'>Time goes by......</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_2CPTItAuDOw/SofgTA2TK9I/AAAAAAAAAO4/BKanNIAOW6s/s1600-h/julio_salamanca.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 214px;" src="http://1.bp.blogspot.com/_2CPTItAuDOw/SofgTA2TK9I/AAAAAAAAAO4/BKanNIAOW6s/s320/julio_salamanca.jpg" alt="" id="BLOGGER_PHOTO_ID_5370507697912490962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Salamanca 1996. I look young, don´t I?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-123145293275376511?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/123145293275376511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/123145293275376511'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/08/time-goes-by.html' title='Time goes by......'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_2CPTItAuDOw/SofgTA2TK9I/AAAAAAAAAO4/BKanNIAOW6s/s72-c/julio_salamanca.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2530348454544167225</id><published>2009-08-10T07:50:00.003Z</published><updated>2009-08-10T08:05:36.013Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Lausanne'/><category scheme='http://www.blogger.com/atom/ns#' term='Switzerland'/><title type='text'>In Lausanne</title><content type='html'>&lt;div style="text-align: justify;"&gt;Yessssssssss,&lt;br /&gt;&lt;br /&gt;Here I am, looking at the lake from a window in the living room. Yesterday I went to &lt;a href="http://www.lutry.ch/"&gt;Lutry &lt;/a&gt;[&lt;a href="http://maps.google.ch/maps?q=Lutry&amp;amp;oe=utf-8&amp;amp;client=firefox-a&amp;amp;ie=UTF8&amp;amp;split=0&amp;amp;gl=ch&amp;amp;ei=LNJ_StCoBsjK_gbip-jnBw&amp;amp;ll=46.503577,6.687284&amp;amp;spn=0.007577,0.01929&amp;amp;t=h&amp;amp;z=16&amp;amp;iwloc=A"&gt;map&lt;/a&gt;], a charming village in the &lt;a href="http://www.lake-geneva-region.ch/"&gt;lake Leman&lt;/a&gt;, with houses that look like taken from a fairy tale, and a kind of beach and a beautiful promenade that runs through the lake's shore.&lt;br /&gt;&lt;br /&gt;Everything is looking good, I feel positive and full of energy, and really looking forward to start discovering every bit that this country has to offer.&lt;br /&gt;&lt;br /&gt;Have a good day.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2530348454544167225?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2530348454544167225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2530348454544167225'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/08/in-lausanne.html' title='In Lausanne'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5292160903530364158</id><published>2009-08-07T14:28:00.004Z</published><updated>2010-04-29T21:45:28.511Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ireland'/><title type='text'>Goodbye Ireland</title><content type='html'>It really feels like it was yesterday, but 4 years have gone by since my first visit to Ireland, and almost 2 years since I moved here. No that I´m leaving this lovely country, it´s time to say goodbye, but most certainly it is time to say thank you, thank you very much:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Valerie&lt;/span&gt;. For you is a double bill, it´s thank you and sorry. Your amazing will power is an inspiration, you really deserve every bit you get. I´m sure we will meet at some crazy race.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Moneena&lt;/span&gt;. The sweetest person I´ve met in Ireland. Being around happy people make us all feel happier, thanks to you I have felt very very happy. Never change please.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Jen&lt;/span&gt;. You are much more than you pretend. I could tell you a thousand things that I like from you, but you already know.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Camila&lt;/b&gt;. My little sweet Camila. I don´t have a clue of your whereabouts now, I hope you are in London studying fashion design, as you wanted.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Fintan&lt;/span&gt;. I can tell this without fear to be mistaken, you are the best person I´ve ever met. Not only talented but also always ready to help, always with a word of encouragement on your mouth. You know I owe you a lot, and for that I will never tell you "thank you" enough.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Donal&lt;/span&gt;. I have learnt and shared a lot with you. I know you have an amazing talent, and I´m sure I´ll see you shining in the near future. I´ll miss our cultural/philosophical chats.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Stephen&lt;/span&gt;. You were the first person that believed in me, in Ireland. All my story in the country began in that small (and sometimes smelly) little office in Galway. Thank you.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Luca&lt;/span&gt;. I hope you are really really happy in Italy, you deserve it. You helped me a lot to get integrated into Galway, and that made my stay there much better.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Paul&lt;/span&gt;. My Limerick running buddy, and a good friend. I wish I could have some of your calm, jeje. I´ll miss our early morning runs, and our laughs in the office.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Sean M&lt;/span&gt;. The most non-boss "boss" that I´ve ever had. Thanks for your understanding, I know it´s not always easy to work with me.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I´m sure there are lots and lots of people that I haven´t mentioned and that deserve to be here, sorry. All in all these two years in Ireland have been amazing. There have been good and bad moments, but the good ones outnumber the bad ones by far. I feel happy and I would recommend anyone this country (avoid Limerick though).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5292160903530364158?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5292160903530364158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5292160903530364158'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/08/goodbye-ireland.html' title='Goodbye Ireland'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6768978645367853115</id><published>2009-07-29T18:10:00.004Z</published><updated>2009-08-07T14:57:57.327Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ireland job'/><title type='text'>Tomorrow will be the day, I can feel it</title><content type='html'>Yes,&lt;br /&gt;&lt;br /&gt;Today I have received the confirmation, but tomorrow will be the day when I will exactly know the conditions (it could be on Friday as well, but I feel it´s going to be tomorrow). I am really delighted. All this comes in the best possible moment. This is going to be a fantastic change, in many aspects.&lt;br /&gt;&lt;br /&gt;P.S.: There is no irreversible decision. There is nothing that can´t be done, it´s just a matter of dreaming, and put your hart in what you do.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;EDITED [30th July 2009]: &lt;/b&gt;Yes my feelings were right, I´ve received the formal offer on Thursday. I have already notified the company, and I don´t have to work any more there, they have been very kind.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6768978645367853115?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6768978645367853115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6768978645367853115'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/07/tomorrow-will-be-day-i-can-feel-it.html' title='Tomorrow will be the day, I can feel it'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-3143458766304045479</id><published>2009-07-26T16:55:00.002Z</published><updated>2009-07-26T17:00:09.263Z</updated><title type='text'>Fire!!!</title><content type='html'>Jesus!!!&lt;br /&gt;&lt;br /&gt;I was watching the ending ceremony of "Le tour &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;de&lt;/span&gt; France" when It started smelling smoke. I guess it´s some kind of ancient instinct that make humans be really scared of fire and smoke. All of &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;sudden&lt;/span&gt; I ran to the window and I found a big smoke column beside some trees that are also beside my house. This made me feel really uneasy.&lt;br /&gt;&lt;br /&gt;I went out, to the next state and there I discovered that a house was on fire. Some people reported that a group of young lads had been sees in the scene a few minutes before the fire became evident. That is something not surprising considering where I live: Limerick (also knows as "stab city").&lt;br /&gt;&lt;br /&gt;I hope the firemen do a good job and the thing is over soon.&lt;br /&gt;&lt;br /&gt;Regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-3143458766304045479?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3143458766304045479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3143458766304045479'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/07/fire.html' title='Fire!!!'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5079334809523060305</id><published>2009-07-23T12:22:00.003Z</published><updated>2009-08-07T15:16:40.213Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Switzerland'/><title type='text'>Paléo Festival</title><content type='html'>Cet soir je va aller au &lt;a href="http://www.2009.paleo.ch/live/paleo/home/index_live.php"&gt;Paléo Festival&lt;/a&gt;, à Nyon.&lt;br /&gt;&lt;br /&gt;Je veux écouter principalement &lt;a href="http://www.moby.com/"&gt;MOBY&lt;/a&gt;, mais &lt;a href="http://www.amymacdonald.co.uk/"&gt;Amy Macdonald&lt;/a&gt; joue aussi. Originalement &lt;a href="http://www.snowpatrol.com/"&gt;Snow Patrol&lt;/a&gt; allaient a jouer, mais finalement ils ne viennent pas, je aimerais les écouter.&lt;br /&gt;&lt;br /&gt;Bonne journé.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5079334809523060305?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5079334809523060305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5079334809523060305'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/07/paleo-festival.html' title='Paléo Festival'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-3315846712059551575</id><published>2009-07-22T10:11:00.004Z</published><updated>2009-07-26T17:01:09.096Z</updated><title type='text'>Sans nouvelles de dieu</title><content type='html'>Voilà, "Sans nouvelles de dieu" c'est le nom de mon blog en Français. C'est la premier fois que je écris en Français dans mon blog.&lt;br /&gt;&lt;br /&gt;Je me rappelle de la premier fois que j'ai écrit en Anglais. Il m'a fallu plus que deux heures pour écrire une petit post.&lt;br /&gt;&lt;br /&gt;J'espère que cette post soit le premier de une longue liste. Il y a trois semaines que j'ai commencé une course de Français à Lausanne, trois heures pour jour. Cette semaine c'est la dernier, mais je vais continuer à étudier le Francais.&lt;br /&gt;&lt;br /&gt;J'ai très bonne nouvelles, mais je ne peux pas vous dire encore. Si tout va bien, la semaine prochaine je vous dirai.&lt;br /&gt;&lt;br /&gt;Bonne journée.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-3315846712059551575?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3315846712059551575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3315846712059551575'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/07/sans-nouvelles-de-dieu.html' title='Sans nouvelles de dieu'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2749910395720811149</id><published>2009-07-13T07:58:00.002Z</published><updated>2009-07-13T07:59:22.542Z</updated><title type='text'>Listen to Silvio</title><content type='html'>&lt;a href="http://www.myspace.com/nonewsfromgod"&gt;&lt;/a&gt;&lt;object width="353" height="132"&gt;&lt;embed src="http://www.goear.com/files/external.swf?file=a5f3466" type="application/x-shockwave-flash" wmode="transparent" quality="high" width="353" height="132"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2749910395720811149?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2749910395720811149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2749910395720811149'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/07/listen-to-silvio.html' title='Listen to Silvio'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8256452822751428191</id><published>2009-06-30T12:31:00.001Z</published><updated>2009-06-30T12:31:08.515Z</updated><title type='text'>2D Convolution example</title><content type='html'>Very clear example of a 2D convolution:&lt;br&gt;&lt;br&gt;&lt;a href="http://www.songho.ca/dsp/convolution/convolution2d_example.html"&gt;http://www.songho.ca/dsp/convolution/convolution2d_example.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;This kind of convolution can be used, for example, to implement and edge detector applying a &lt;a href="http://en.wikipedia.org/wiki/Sobel_operator"&gt;Sobel operator&lt;/a&gt;.&lt;br&gt; &lt;br&gt;Enjoy!!!&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8256452822751428191?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8256452822751428191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8256452822751428191'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/06/2d-convolution-example.html' title='2D Convolution example'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-553289225690765738</id><published>2009-06-06T22:20:00.004Z</published><updated>2009-07-22T10:41:35.448Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='ebook'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Books I´ve read this year so far</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;a href="http://books.google.ie/books?id=gCC0XRKYpd0C&amp;amp;dq=inauthor:Robert+inauthor:Ludlum&amp;amp;ei=C-8qSsPuCoPcygSSsOmQBw&amp;amp;pgis=1"&gt;The Bourne Identity&lt;/a&gt;. Thrilling action pack book, you´ll definitely learn two English words, kerb and quay. 7 out of 10&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://books.google.ie/books?id=WnKLzfW6_cQC"&gt;The constant gardener&lt;/a&gt;. Moving, enigmatic diplomatic atmosphere. I falls a little bit by the middle section, but has an amazing end that leave a great taste. 8 out of 10.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://books.google.ie/books?id=-t3XmioLPk4C&amp;amp;q=the+pillars+of+the+earth&amp;amp;dq=the+pillars+of+the+earth&amp;amp;ei=a-8qSrHMOITyzQTTy_WnBw&amp;amp;pgis=1"&gt;The pillars of the earth&lt;/a&gt;. This is my favorite book ever. I've read it twice in Spanish and twice in English. The last time I read it was between 2008 and 2009. 10 out of 10.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://books.google.ie/books?id=EWnmAAAACAAJ&amp;amp;dq=misery&amp;amp;ei=ou8qSoS2E42yyQSzr4WwBw"&gt;Misery&lt;/a&gt;. This is my second favourite book ever. How many times I have dreaded Ms Wilkes!!!! 9.5 out of 10.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://books.google.ie/books?id=dfIRAAAACAAJ&amp;amp;dq=Hannibal+rising&amp;amp;ei=wu8qStTiBoGczQSEjpSTBw"&gt;Hannibal Rising&lt;/a&gt;. The surprise of the year. The prose is quite unusual and for a non native English speaker (and reader) it causes some confusing at the beginning of the book. Once you get use to it, the is not a single moment dull in this book. I love Hannibal's character. 9 out of 10.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://books.google.ie/books?id=HJ8Wg0u7CUgC"&gt;Alice´s adventures in wonderland&lt;/a&gt;. I began reading this book today. So far I've read 20 of about 280 pages, and I´m absolutely delighted. The English used in the book is very very very easy to read, so I recommend this book for those of you learning English. So far 9 out of 10. [Edit: 21/07/2009] I have finished this book and my overall impression has gone a little bit down, I'm going to give it a 7. The story turns out to be very simplistic, and I can'f find the symbolism and the metaphores anywhere. However it's an excellent book for english students, since the language is very very simple.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://books.google.ie/books?id=A9nWaIpeXhkC&amp;amp;q=a+brief+history+of+time&amp;amp;dq=a+brief+history+of+time&amp;amp;ei=BvAqSq3AAZ-GzQS11OChBw&amp;amp;pgis=1"&gt;A brief history of time&lt;/a&gt;. Just one sentence, do not read it if you don´t have a scientific background. I have a background in both chemical engineering, and computer science, thus my knowledge of maths and physics can be considered more than average, and the book became almost impossible to follow once it "falls" into black holes. However is really enjoyable while can be understood.&lt;/li&gt;&lt;/ul&gt;I addition my parent´s  gave me as a birthday present, a wonderful &lt;a href="http://www.sonystyle.com/webapp/wcs/stores/servlet/ProductDisplay?catalogId=10551&amp;amp;storeId=10151&amp;amp;langId=-1&amp;amp;productId=8198552921665245739"&gt;Sony PRS-505&lt;/a&gt;, this is an ebook reader, so I´m reading more than ever. I transfer to it every interesting article that I find on the net. With a good piece of software called &lt;a href="http://calibre.kovidgoyal.net/"&gt;calibre &lt;/a&gt;I can convert many formats to PRS's native format, and even download online newspapers automatically. Besides you can access more than 500.000 free books through &lt;a href="http://ebookstore.sony.com/google-ebooks/"&gt;google&lt;/a&gt; or &lt;a href="http://www.gutenberg.org/wiki/Main_Page"&gt;Project Gutenberg&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy reading!!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-553289225690765738?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/553289225690765738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/553289225690765738'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/06/books-ive-read-this-year-so-far.html' title='Books I´ve read this year so far'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6079432413321785999</id><published>2009-05-13T19:30:00.003Z</published><updated>2009-05-13T19:39:13.843Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Antonio Vega has passed away</title><content type='html'>Today is a sad day for all of us who love music. During his life, &lt;a href="http://uk.real.com/music/artist/Antonio_Vega/"&gt;Antonio Vega&lt;/a&gt; composed a handful of songs that are part of the memories of a generation. An icon of  "&lt;a href="http://en.wikipedia.org/wiki/La_Movida_Madrile%C3%B1a"&gt;la modiva&lt;/a&gt;" in the 80´s, unfortunately got addicted to drugs, which eventually led to his dead.&lt;br /&gt;&lt;br /&gt;We will never forget you, because your music will always be alive in our harts.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/results?search_type=&amp;amp;search_query=antonio+vega&amp;amp;aq=0&amp;amp;oq=antonio+ve"&gt;Youtube links.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6079432413321785999?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6079432413321785999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6079432413321785999'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/05/antonio-vega-has-passed-away.html' title='Antonio Vega has passed away'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1384145130437658490</id><published>2009-05-04T10:05:00.002Z</published><updated>2009-08-07T15:16:58.337Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Switzerland'/><title type='text'>Gyms in Lausanne (Switzerland)</title><content type='html'>I'm doing a little research about gyms with swimming pool in Laussane (Switzerland). There seems to be quite a lot of gyms there. These are the results&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.holmesplace.ch/e/clubs/highlight.php?clubid=2"&gt;Holmes Place&lt;/a&gt;. This place looks really posh. Design is everywhere, a very clean modern look throughout the place. No swimming pool though.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.fitnessparc.ch/malley/front_content.php?idcat=1011"&gt;Migros fitness park&lt;/a&gt;. There is a swimming pool here, but leisure one, with the temperature set to 32Celisiuss!!!!!!!!! You would like to be there swimming for an hour. Prices are kind of high.&lt;/li&gt;&lt;li&gt;&lt;a href="www.silhouette.ch"&gt;Silhouette&lt;/a&gt;. Flashy, Flashy web page. It's hard to believe that some serious company has a web like that in 2009. There is a swimming pool with the water temperature set at 27 - 28 degrees. Enough not to overheat yourself, but still a little bit to high. No information about its size. The place look clean, moderns, but a little bit clattered. Wooden floors look great.&lt;/li&gt;&lt;li&gt;&lt;a href="http://http://www.letsgo-fit.ch/"&gt;Let's Go&lt;/a&gt;. It doesn't seem to be a swimming on this one. It looks like the poores so far, although the standard seems very high in Switzerland.&lt;/li&gt;&lt;/ul&gt;Indoor swimming pools:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.lausanne.ch/view.asp?docId=30005&amp;amp;domId=64605&amp;amp;language=E"&gt;Bergières&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.lausanne.ch/view.asp?docId=30185&amp;amp;domId=64605&amp;amp;language=E"&gt;Grand-Vennes&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.lausanne.ch/view.asp?docId=30390&amp;amp;domId=64605&amp;amp;language=E"&gt;Mon Repos&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.lausanne.ch/view.asp?docId=30227&amp;amp;domId=64605&amp;amp;language=E"&gt;Vallée de la jeunesse&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Ok, now, this one is kind of funny.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.aquarius-lausanne.ch/Aquarius/Bienvenue.html"&gt;Aquarius gay swimming club&lt;/a&gt;. WTF!!!!! jajajajajaja this is a GAY swimming club, but what in the name of god do sports have to do with sexual orientation. jajajaja, I mean, why would you want to swim with only gay and lesbian people, honestly I don't understand. Will they not admit me in the club becuase I'm not gay?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1384145130437658490?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1384145130437658490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1384145130437658490'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/05/gyms-in-lausanne-switzerland.html' title='Gyms in Lausanne (Switzerland)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8620115200270049426</id><published>2009-04-17T21:53:00.001Z</published><updated>2009-08-07T15:17:12.125Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Enrique Bunbury</title><content type='html'>Everyone who knows me will understand why I´m posting this:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;embed src="http://www.rtve.es/swf/FLVPlayer.swf" flashvars="file=http://rtve.ondemand.flumotion.com/rtve/ondemand2/microsites/muchachadanui/03-01-celebrities-bunbury-02w10ert2.flv&amp;amp;image=http://www.rtve.es/contenidos/muchachadanui/files/images/03-01-celebrities-bunbury-02w10ert2.jpg&amp;amp;&amp;amp;thumbnail=http://www.rtve.es/contenidos/muchachadanui/files/images/p03-01-celebrities-bunbury-02w10ert2.jpg&amp;amp;autostart=false&amp;amp;advertisement=url::http://www.rtve.es/comunes/publicidad/video/video/TE_SMUCHA-video-video.xml,type::antevenio,timeout::10,videoduracion::2700&amp;amp;locale=http://www.rtve.es/swf/locale/es_ES&amp;amp;config=http://www.rtve.es/swf/data/rtve_config_embed.xml&amp;amp;embed=host::http://www.rtve.es,playerHost::http://www.rtve.es/swf,config::http://www.rtve.es/swf/data/rtve_config_embed.xml&amp;amp;controlbar=live::false,volume::1,scrub::true,hideSend::true" allowscriptaccess="always" allowfullscreen="true" wmode="transparent" width="600" height="473" name="FLVPlayer" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8620115200270049426?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8620115200270049426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8620115200270049426'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/04/enrique-bunbury.html' title='Enrique Bunbury'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7783331685668727809</id><published>2009-03-29T19:19:00.003Z</published><updated>2009-04-02T20:49:38.992Z</updated><title type='text'>Back On Track</title><content type='html'>Hi people!!!&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The sports season has begun, and what a beginning! Last week I run the &lt;a href="http://plassey10k.skynet.ie/"&gt;Plassey 10K&lt;/a&gt; race, event organized by the &lt;a href="http://www2.ul.ie/web/WWW/Faculties/Education%20%26%20Health%20Sciences/Departments/Physical%20Education%20and%20Sport%20Sciences/"&gt;University of Limerick physical education&lt;/a&gt; students. Enjoyable, not too bad for the first race in months. I didn't beat my PB (personals best) at all, but I have good sensations. My time was 47:05, not too impressive, I know.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Today I took part in a Duathlon for the first time in my life.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.limericktriathlon.com/drupal/files/duathlon.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 400px;" src="http://www.limericktriathlon.com/drupal/files/duathlon.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The experience was amazing, thrilling, but also absolutely wrecking. The event was organized by the &lt;a href="http://www.limericktriathlon.com/drupal/"&gt;Limerick Triathlon&lt;/a&gt; Club. I work with the &lt;a href="http://sixteenfiftys.blogspot.com/"&gt;swimming coach&lt;/a&gt; of the club, and lately we've been training together (he was faster than me today). I did well on the first running leg, the on the bicycle I almost died. Ireland is famous for its continuous rain and wind, well today was one of those days when the country feels like honoring his fame. My time was 1:10:57 (3.9 run, 16 cycle, 3.9 run), awful, but I consider it a good starting point.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_2CPTItAuDOw/SdUktnfUG5I/AAAAAAAAALw/JFs4qpWk3q4/s1600-h/tribicy.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 213px;" src="http://2.bp.blogspot.com/_2CPTItAuDOw/SdUktnfUG5I/AAAAAAAAALw/JFs4qpWk3q4/s320/tribicy.jpg" alt="" id="BLOGGER_PHOTO_ID_5320198900921146258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Enjoy!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7783331685668727809?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7783331685668727809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7783331685668727809'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/03/back-on-track.html' title='Back On Track'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_2CPTItAuDOw/SdUktnfUG5I/AAAAAAAAALw/JFs4qpWk3q4/s72-c/tribicy.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5100955223761800872</id><published>2009-03-02T22:36:00.002Z</published><updated>2009-03-02T22:38:15.568Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='lego'/><title type='text'>Brilliant!! Famous paintings recreated using Lego</title><content type='html'>&lt;a href="http://www.oddee.com/item_96540.aspx"&gt;http://www.oddee.com/item_96540.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://63.134.213.184/_media/imgs/articles/a313_p1.jpg" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5100955223761800872?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5100955223761800872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5100955223761800872'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/03/brilliant-famous-paintings-recreated.html' title='Brilliant!! Famous paintings recreated using Lego'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-4658628122065011494</id><published>2009-02-28T17:39:00.003Z</published><updated>2009-02-28T17:45:35.149Z</updated><title type='text'>Confessions of an Irish Gamer</title><content type='html'>I just want to recommend to those of you who like videogames, to visit the blog homonym with this entry:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://confessionsofanirishgamer.blogspot.com/"&gt;Confessions of an Irish Gamer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The authors are not really prolific, but the posts are quality ones.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4658628122065011494?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4658628122065011494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4658628122065011494'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/02/confessions-of-irish-gamer.html' title='Confessions of an Irish Gamer'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2828256898740730994</id><published>2009-02-22T12:47:00.003Z</published><updated>2009-02-22T12:59:43.423Z</updated><title type='text'>WIFI WPA Encryption with Ubuntu 6.10</title><content type='html'>&lt;div style="text-align: justify;"&gt;Connecting to a WIFI network that uses WEP encription is a pretty straight forward task using UBUNTU, you only have to use the "Wireless Assistant" tool integrated with the system. However, when you try to connect to a network using WPA encryption things get more complicated. For some reason the "Wireless Assistant" do not let you select a other encryption than WEP.&lt;br /&gt;&lt;br /&gt;After some research, i.e. google search, I found an entry in ubuntuforums.org that explain how to connect to WIFI networks that use WPA encryption. This process involves mainly editing text files, there is no "Windowzed" application to help:&lt;a href="http://ubuntuforums.org/showthread.php?t=202834"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=202834"&gt;http://ubuntuforums.org/showthread.php?t=202834&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;In my case I'm using a network with DHCP activated, and my computer runs a KUBUNTU 6.10. My laptop is an old Toshiba Satellite M70-165 with an integrated WIFI adapter. My /etc/network/interfaces looks like this:&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;br /&gt;auto lo&lt;br /&gt;iface lo inet loopback&lt;br /&gt;&lt;br /&gt;auto eth1&lt;br /&gt;iface eth1 inet dhcp&lt;br /&gt;wpa-driver wext&lt;br /&gt;wpa-ssid &lt;span style="font-style: italic; font-weight: bold;"&gt;$your essid here$&lt;/span&gt;&lt;br /&gt;wpa-ap-scan 1&lt;br /&gt;wpa-proto WPA&lt;br /&gt;wpa-pairwise TKIP&lt;br /&gt;wpa-group TKIP&lt;br /&gt;wpa-key-mgmt WPA-PSK&lt;br /&gt;wpa-psk &lt;span style="font-style: italic; font-weight: bold;"&gt;$your hex key code here$&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Just follow the procedure explain in the forum, it's easy and it worked for me with at the first attempt.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2828256898740730994?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2828256898740730994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2828256898740730994'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/02/wifi-wpa-encryption-with-ubuntu-610.html' title='WIFI WPA Encryption with Ubuntu 6.10'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1975150867604801200</id><published>2009-02-08T18:36:00.003Z</published><updated>2009-02-08T18:49:21.384Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='dom4j'/><category scheme='http://www.blogger.com/atom/ns#' term='xslt'/><title type='text'>XSLT with Java and Dom4j-1.6</title><content type='html'>&lt;div style="text-align: justify;"&gt;Feeling geeky again!!&lt;br /&gt;&lt;br /&gt;Today I´ll show you how to perform an XSLT (XSL transformation) on an XML file using Java and &lt;a href="http://www.dom4j.org/"&gt;Dom4j&lt;/a&gt;. In contrast with the last Java/Dom4j post in this i´ll only show the class that acually performs the transformation. Dom4j is not able to perform the transformation on its own, it needs the help of &lt;a href="https://jaxp-sources.dev.java.net/nonav/docs/api/"&gt;JAXP&lt;/a&gt;:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;a name="line1"&gt; 1&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;package com.julio.xml;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line2"&gt; 2&lt;/a&gt;&lt;br /&gt;&lt;a name="line3"&gt; 3&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import java.io.File;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line4"&gt; 4&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import java.io.FileWriter;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line5"&gt; 5&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import java.io.IOException; // dom4j import&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line6"&gt; 6&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.dom4j.Document;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line7"&gt; 7&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.dom4j.DocumentException;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line8"&gt; 8&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.dom4j.io.SAXReader;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line9"&gt; 9&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.xml.sax.ErrorHandler;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line10"&gt;10&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.xml.sax.SAXException;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line11"&gt;11&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.xml.sax.SAXParseException;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line12"&gt;12&lt;/a&gt;&lt;br /&gt;&lt;a name="line13"&gt;13&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import javax.xml.transform.Transformer;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line14"&gt;14&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import javax.xml.transform.TransformerConfigurationException;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line15"&gt;15&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import javax.xml.transform.TransformerException;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line16"&gt;16&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import javax.xml.transform.TransformerFactory;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line17"&gt;17&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import javax.xml.transform.stream.StreamSource;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line18"&gt;18&lt;/a&gt;&lt;br /&gt;&lt;a name="line19"&gt;19&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.dom4j.io.DocumentResult;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line20"&gt;20&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.dom4j.io.DocumentSource;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line21"&gt;21&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.dom4j.io.DocumentSource;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line22"&gt;22&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.dom4j.io.XMLWriter;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line23"&gt;23&lt;/a&gt; &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;import org.dom4j.io.OutputFormat;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line24"&gt;24&lt;/a&gt;&lt;br /&gt;&lt;a name="line25"&gt;25&lt;/a&gt; &lt;strong&gt;public&lt;/strong&gt; &lt;strong&gt;class&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;XmlTransformer&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line26"&gt;26&lt;/a&gt;  &lt;span style="color:#444444;"&gt;// The input XML file&lt;/span&gt;&lt;br /&gt;&lt;a name="line27"&gt;27&lt;/a&gt;  &lt;strong&gt;private&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;File&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;input&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line28"&gt;28&lt;/a&gt;  &lt;span style="color:#444444;"&gt;// The DOM document for the imput file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line29"&gt;29&lt;/a&gt;  &lt;strong&gt;private&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;Document&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;inputDoc&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line30"&gt;30&lt;/a&gt;  &lt;span style="color:#444444;"&gt;// Guess what!!!!&lt;/span&gt;&lt;br /&gt;&lt;a name="line31"&gt;31&lt;/a&gt;  &lt;strong&gt;private&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;File&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;output&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line32"&gt;32&lt;/a&gt;  &lt;span style="color:#444444;"&gt;// The xslt file&lt;/span&gt;&lt;br /&gt;&lt;a name="line33"&gt;33&lt;/a&gt;  &lt;strong&gt;private&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;File&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;transformation&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line34"&gt;34&lt;/a&gt;&lt;br /&gt;&lt;a name="line35"&gt;35&lt;/a&gt;  &lt;strong&gt;public&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;XmlTransformer&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;File&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;input&lt;/span&gt;, &lt;span style="color:#2040a0;"&gt;File&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;transformation&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line36"&gt;36&lt;/a&gt;   &lt;strong&gt;this&lt;/strong&gt;.&lt;span style="color:#2040a0;"&gt;input&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;input&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line37"&gt;37&lt;/a&gt;   &lt;strong&gt;this&lt;/strong&gt;.&lt;span style="color:#2040a0;"&gt;transformation&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;transformation&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line38"&gt;38&lt;/a&gt;  &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line39"&gt;39&lt;/a&gt;&lt;br /&gt;&lt;a name="line40"&gt;40&lt;/a&gt;  &lt;strong&gt;public&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;File&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;transform&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;strong&gt;throws&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;IOException&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line41"&gt;41&lt;/a&gt;   &lt;span style="color:#444444;"&gt;// Need to create a factory using JAXP&lt;/span&gt;&lt;br /&gt;&lt;a name="line42"&gt;42&lt;/a&gt;   &lt;span style="color:#2040a0;"&gt;TransformerFactory&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;factory&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;TransformerFactory&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;newInstance&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line43"&gt;43&lt;/a&gt;   &lt;strong&gt;try&lt;/strong&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line44"&gt;44&lt;/a&gt;    &lt;span style="color:#444444;"&gt;// Now get a transformer using the facory&lt;/span&gt;&lt;br /&gt;&lt;a name="line45"&gt;45&lt;/a&gt;    &lt;span style="color:#2040a0;"&gt;Transformer&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;transformer&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;factory&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;newTransformer&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;new&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;StreamSource&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line46"&gt;46&lt;/a&gt;      &lt;span style="color:#2040a0;"&gt;transformation&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line47"&gt;47&lt;/a&gt;    &lt;span style="color:#444444;"&gt;// Convert the input file into a DOM document&lt;/span&gt;&lt;br /&gt;&lt;a name="line48"&gt;48&lt;/a&gt;    &lt;strong&gt;this&lt;/strong&gt;.&lt;span style="color:#2040a0;"&gt;createDoc&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line49"&gt;49&lt;/a&gt;    &lt;span style="color:#444444;"&gt;// Dom4j support for trasnformations&lt;/span&gt;&lt;br /&gt;&lt;a name="line50"&gt;50&lt;/a&gt;    &lt;span style="color:#2040a0;"&gt;DocumentSource&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;source&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;DocumentSource&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;this&lt;/strong&gt;.&lt;span style="color:#2040a0;"&gt;inputDoc&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line51"&gt;51&lt;/a&gt;    &lt;span style="color:#2040a0;"&gt;DocumentResult&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;result&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;DocumentResult&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line52"&gt;52&lt;/a&gt;    &lt;strong&gt;try&lt;/strong&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line53"&gt;53&lt;/a&gt;     &lt;span style="color:#444444;"&gt;// OK lets do the actual transformation&lt;/span&gt;&lt;br /&gt;&lt;a name="line54"&gt;54&lt;/a&gt;     &lt;span style="color:#2040a0;"&gt;transformer&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;transform&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;source&lt;/span&gt;, &lt;span style="color:#2040a0;"&gt;result&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line55"&gt;55&lt;/a&gt;     &lt;span style="color:#444444;"&gt;// The rest is boiler plate code!!!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line56"&gt;56&lt;/a&gt;     &lt;span style="color:#2040a0;"&gt;Document&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;outputDoc&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;result&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;getDocument&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line57"&gt;57&lt;/a&gt;     &lt;span style="color:#2040a0;"&gt;OutputFormat&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;format&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;OutputFormat&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;createPrettyPrint&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line58"&gt;58&lt;/a&gt;     &lt;span style="color:#2040a0;"&gt;output&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;File&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#008000;"&gt;"output.xml"&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line59"&gt;59&lt;/a&gt;     &lt;span style="color:#2040a0;"&gt;XMLWriter&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;writer&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;XMLWriter&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;new&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;FileWriter&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;output&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;, &lt;span style="color:#2040a0;"&gt;format&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line60"&gt;60&lt;/a&gt;     &lt;span style="color:#2040a0;"&gt;writer&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;write&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;outputDoc&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line61"&gt;61&lt;/a&gt;     &lt;span style="color:#2040a0;"&gt;writer&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;close&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line62"&gt;62&lt;/a&gt;    &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt; &lt;strong&gt;catch&lt;/strong&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;TransformerException&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;e&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line63"&gt;63&lt;/a&gt;     &lt;span style="color:#444444;"&gt;// TODO Auto-generated catch block&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line64"&gt;64&lt;/a&gt;     &lt;span style="color:#2040a0;"&gt;e&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;printStackTrace&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line65"&gt;65&lt;/a&gt;    &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line66"&gt;66&lt;/a&gt;   &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt; &lt;strong&gt;catch&lt;/strong&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;TransformerConfigurationException&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;e&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line67"&gt;67&lt;/a&gt;    &lt;span style="color:#444444;"&gt;// TODO Auto-generated catch block&lt;/span&gt;&lt;br /&gt;&lt;a name="line68"&gt;68&lt;/a&gt;    &lt;span style="color:#2040a0;"&gt;e&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;printStackTrace&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line69"&gt;69&lt;/a&gt;   &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line70"&gt;70&lt;/a&gt;   &lt;strong&gt;return&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;output&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line71"&gt;71&lt;/a&gt;  &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line72"&gt;72&lt;/a&gt;&lt;br /&gt;&lt;a name="line73"&gt;73&lt;/a&gt;  &lt;strong&gt;private&lt;/strong&gt; &lt;strong&gt;void&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;createDoc&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line74"&gt;74&lt;/a&gt;   &lt;span style="color:#2040a0;"&gt;SAXReader&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;reader&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color:#2040a0;"&gt;SAXReader&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;false&lt;/strong&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line75"&gt;75&lt;/a&gt;   &lt;strong&gt;try&lt;/strong&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line76"&gt;76&lt;/a&gt;    &lt;strong&gt;this&lt;/strong&gt;.&lt;span style="color:#2040a0;"&gt;inputDoc&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;=&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;reader&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;read&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;this&lt;/strong&gt;.&lt;span style="color:#2040a0;"&gt;input&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line77"&gt;77&lt;/a&gt;   &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt; &lt;strong&gt;catch&lt;/strong&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#2040a0;"&gt;DocumentException&lt;/span&gt; &lt;span style="color:#2040a0;"&gt;e&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line78"&gt;78&lt;/a&gt;    &lt;span style="color:#444444;"&gt;// TODO Auto-generated catch block&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line79"&gt;79&lt;/a&gt;    &lt;span style="color:#2040a0;"&gt;e&lt;/span&gt;.&lt;span style="color:#2040a0;"&gt;printStackTrace&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;a name="line80"&gt;80&lt;/a&gt;   &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name="line81"&gt;81&lt;/a&gt;  &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="line82"&gt;82&lt;/a&gt; &lt;span style="color:#4444ff;"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;syntax highlighted by &lt;a href="http://www.palfrader.org/code2html"&gt;Code2HTML&lt;/a&gt;, v. 0.9.1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1975150867604801200?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1975150867604801200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1975150867604801200'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/02/xslt-with-java-and-dom4j-16.html' title='XSLT with Java and Dom4j-1.6'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-3897635346222294500</id><published>2009-02-02T19:32:00.002Z</published><updated>2009-02-02T19:34:21.339Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='music myspace'/><title type='text'>New songs</title><content type='html'>I´ve published a new recording in my Myspace:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.myspace.com/sinnoticiasdedios"&gt;http://www.myspace.com/sinnoticiasdedios&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enjoy!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-3897635346222294500?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3897635346222294500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3897635346222294500'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/02/new-songs.html' title='New songs'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8885061333662819966</id><published>2009-01-26T19:22:00.017Z</published><updated>2009-01-27T20:26:56.158Z</updated><title type='text'>XML schema validation with Dom4j</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi folks, today I´m feeling geeky!!&lt;br /&gt;&lt;br /&gt;First and foremost, if you don´t know what and XML schemas or XML documents are, you´d better listen to my music clicking on the youtube video on your right. For the rest of you, a bit obvious, Dom4j is a Java API, so........&lt;br /&gt;&lt;br /&gt;Ok, let´s get started.&lt;br /&gt;&lt;br /&gt;Dom4j is a Java API that makes XML manipulation sweet, and easier than with pure DOM or SAX. Besides it let you use XPATH to travers XML documents. Dom4j includes its own XML parser, but this in not able to validate document agains schemas. For that purpose we will use Xerces.&lt;br /&gt;&lt;br /&gt;In order to develop our example we will define a very little schema and and two XML documents usign that schema, one will be valid, and the other won´t.&lt;br /&gt;&lt;br /&gt;I´m using Java 5, and ignore if this would work with Java 1.4, let me know if you discover something. I will assume you have downloaded the following APIs:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;Latest dom4j (1.6.1 at the time or writting this).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Latest Xerces (1.4.4 at the time of writting this).&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;I´ll use Eclipse througout the whole example, so let´s kick off:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;Create a Java project. Call it XmlValidation&lt;/li&gt;&lt;li&gt;Add the following libraries to the buid path (Project -&gt; Properties -&gt; Java Build Path -&gt; Libraries -&gt; Add external jars)&lt;ul&gt;&lt;li&gt;dom4j-1.6.1.jar&lt;/li&gt;&lt;li&gt;xerces.jar&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Add an XML schema called SongSchema.xsd:&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;  targetNamespace="SongSchema" xmlns:album="SongSchema"&lt;br /&gt;  elementFormDefault="qualified"&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xsd:element name="album"&amp;gt;&lt;br /&gt;      &amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;          &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;              &amp;lt;xsd:element name="song" type="album:song" /&amp;gt;&lt;br /&gt;              &amp;lt;xsd:element name="comment" type="xsd:string" /&amp;gt;&lt;br /&gt;          &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;      &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;  &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xsd:complexType name="song"&amp;gt;&lt;br /&gt;      &amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;          &amp;lt;xsd:element name="title" type="album:nonemptystring" /&amp;gt;&lt;br /&gt;          &amp;lt;xsd:element name="author" type="album:nonemptystring" /&amp;gt;&lt;br /&gt;          &amp;lt;xsd:element name="minutes" type="album:time" /&amp;gt;&lt;br /&gt;          &amp;lt;xsd:element name="seconds" type="album:time" /&amp;gt;&lt;br /&gt;      &amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;  &amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xsd:simpleType name="time"&amp;gt;&lt;br /&gt;      &amp;lt;xsd:restriction base="xsd:positiveInteger"&amp;gt;&lt;br /&gt;          &amp;lt;xsd:pattern value='[0-6]?[0-9]'/&amp;gt;&lt;br /&gt;      &amp;lt;/xsd:restriction&amp;gt;&lt;br /&gt;  &amp;lt;/xsd:simpleType&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xsd:simpleType name="nonemptystring"&amp;gt;&lt;br /&gt;  &amp;lt;xsd:restriction base="xsd:string"&amp;gt;&lt;br /&gt;      &amp;lt;xsd:pattern value="[\w\W]+"&amp;gt;&amp;lt;/xsd:pattern&amp;gt;&lt;br /&gt;  &amp;lt;/xsd:restriction&amp;gt;&lt;br /&gt;  &amp;lt;/xsd:simpleType&amp;gt;&lt;br /&gt;&amp;lt;/xsd:schema&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Now we create our actual XML file, called MySongs.xml:&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;album xmlns="SongSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;  xsi:schemaLocation="SongSchema SongSchema.xsd"&amp;gt;&lt;br /&gt;  &amp;lt;song&amp;gt;&lt;br /&gt;      &amp;lt;title&amp;gt;Oceano de sal&amp;lt;/title&amp;gt;&lt;br /&gt;      &amp;lt;author&amp;gt;Julio Delgado&amp;lt;/author&amp;gt;&lt;br /&gt;      &amp;lt;minutes&amp;gt;39&amp;lt;/minutes&amp;gt;&lt;br /&gt;      &amp;lt;seconds&amp;gt;7&amp;lt;/seconds&amp;gt;&lt;br /&gt;  &amp;lt;/song&amp;gt;&lt;br /&gt;  &amp;lt;comment&amp;gt;Very Good Song,ideed.&amp;lt;/comment&amp;gt;&lt;br /&gt;&amp;lt;/album&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;We are nearly there!!!&lt;/li&gt;&lt;li&gt;Create the validator class, called Validator, in the Validator.java file:&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&lt;br /&gt;package com.julio.xml;&lt;br /&gt;&lt;br /&gt;import java.io.File;&lt;br /&gt;// dom4j import&lt;br /&gt;import org.dom4j.Document;&lt;br /&gt;import org.dom4j.DocumentException;&lt;br /&gt;import org.dom4j.io.SAXReader;&lt;br /&gt;import org.xml.sax.ErrorHandler;&lt;br /&gt;import org.xml.sax.SAXException;&lt;br /&gt;import org.xml.sax.SAXParseException;&lt;br /&gt;&lt;br /&gt;public class Validator {&lt;br /&gt; private File file;&lt;br /&gt; private Document doc;&lt;br /&gt; private SAXReader reader;&lt;br /&gt; private handler h;&lt;br /&gt; &lt;br /&gt; public Validator(){&lt;br /&gt;  reader = new SAXReader(true);&lt;br /&gt;  h = new handler();&lt;br /&gt;  // Lets configure the reader for full validation&lt;br /&gt;  // set the validation feature to true to report validation errors&lt;br /&gt;  try {&lt;br /&gt;   reader.setFeature("http://xml.org/sax/features/validation", true);&lt;br /&gt;   // set the validation/schema feature to true to report validation errors against a schema&lt;br /&gt;   reader.setFeature("http://apache.org/xml/features/validation/schema", true);&lt;br /&gt;&lt;br /&gt;   // set the validation/schema-full-checking feature to true to enable full schema, grammar-constraint checking&lt;br /&gt;   reader.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);&lt;br /&gt;   reader.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true);&lt;br /&gt;   //reader.setFeature("http://apache.org/xml/features/validation-error-as-fatal", true);&lt;br /&gt;   reader.setErrorHandler(h);&lt;br /&gt;  } catch (SAXException e) {&lt;br /&gt;   // TODO Auto-generated catch block&lt;br /&gt;   e.printStackTrace();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; };&lt;br /&gt; public Validator(String fileName)&lt;br /&gt; {&lt;br /&gt;  this();&lt;br /&gt;  file = new File(fileName);&lt;br /&gt;  try {&lt;br /&gt;   doc = reader.read(file);&lt;br /&gt;  } catch (DocumentException e) {&lt;br /&gt;   // TODO Auto-generated catch block&lt;br /&gt;   e.printStackTrace();&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  // If everything went fine up to this point, now we have&lt;br /&gt;  // an XML document in memory and can try to validate.&lt;br /&gt; }&lt;br /&gt; public void setFile(File file) {&lt;br /&gt;  this.file = file;&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; public boolean validateXml(){&lt;br /&gt;  try {&lt;br /&gt;   h.setHasErrors(false);&lt;br /&gt;   doc = reader.read(file);&lt;br /&gt;  } catch (DocumentException e) {&lt;br /&gt;   // TODO Auto-generated catch block&lt;br /&gt;   System.out.println(e.getMessage());&lt;br /&gt;   //e.printStackTrace();&lt;br /&gt;   return false;&lt;br /&gt;  }&lt;br /&gt;  return !h.getHasErrors();&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; class handler implements ErrorHandler{&lt;br /&gt;&lt;br /&gt;  private boolean hasErrors;&lt;br /&gt;  &lt;br /&gt;  public handler()&lt;br /&gt;  {&lt;br /&gt;   hasErrors = false;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  public boolean getHasErrors()&lt;br /&gt;  {&lt;br /&gt;   return hasErrors;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  public void setHasErrors(boolean b)&lt;br /&gt;  {&lt;br /&gt;   this.hasErrors = b;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  @Override&lt;br /&gt;  public void error(SAXParseException exception) throws SAXException {&lt;br /&gt;   System.out.println("Line: " + exception.getLineNumber() + ") " +&lt;br /&gt;     exception.getMessage());&lt;br /&gt;   hasErrors = true;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public void fatalError(SAXParseException exception) throws SAXException {&lt;br /&gt;   // TODO Auto-generated method stub&lt;br /&gt;   &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public void warning(SAXParseException exception) throws SAXException {&lt;br /&gt;   // TODO Auto-generated method stub&lt;br /&gt;   &lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This code is doing 2 main things:&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;Configure the parser in the Validator constructor. This include it´s behavior and a class to handle errors and warnings during parsing.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Define a class to handle errors. This is needed because otherwise the applicacion would rise and exception with the first error found, and we couldn´t get a list of all the errors present on the Xml file.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;Finally the class that nails everything together, XmlTest, in the file XmlTest.java:&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&lt;br /&gt;package com.julio.test;&lt;br /&gt;&lt;br /&gt;import java.io.File;&lt;br /&gt;&lt;br /&gt;import org.dom4j.Document;&lt;br /&gt;import org.dom4j.DocumentException;&lt;br /&gt;import org.dom4j.io.SAXReader;&lt;br /&gt;&lt;br /&gt;public class XmlTest {&lt;br /&gt;&lt;br /&gt;  // Entry point&lt;br /&gt;  public static void main(String args[])&lt;br /&gt;  {&lt;br /&gt;      System.out.println("XmlTest.main()");&lt;br /&gt;      XmlTest test = new XmlTest();&lt;br /&gt;      test.printWellcomeScreen();&lt;br /&gt;      SAXReader reader = new SAXReader();&lt;br /&gt;      Document doc = null;&lt;br /&gt;      try {&lt;br /&gt;          doc = reader.read(new File("xml/Program.xml"));&lt;br /&gt;      } catch (DocumentException e) {&lt;br /&gt;          // TODO Auto-generated catch block&lt;br /&gt;          e.printStackTrace();&lt;br /&gt;      }&lt;br /&gt;      if(doc != null)&lt;br /&gt;      {&lt;br /&gt;          System.out.println(doc.toString());&lt;br /&gt;          if(doc.getRootElement().getName() == "program")&lt;br /&gt;          {&lt;br /&gt;              System.out.println("program\n");&lt;br /&gt;              System.out.println(doc.getRootElement().attributeValue("buid"));&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  private void printWellcomeScreen()&lt;br /&gt;  {&lt;br /&gt;      System.out.println("WELLCOME!!!\n");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;Now just compile and execute. Try different values in the Xml file, and you´ll see how well the validation works.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Enjoy!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8885061333662819966?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8885061333662819966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8885061333662819966'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/01/xml-schema-validation-with-dom4j.html' title='XML schema validation with Dom4j'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-795657936326371661</id><published>2009-01-17T20:56:00.002Z</published><updated>2009-01-17T20:59:51.137Z</updated><title type='text'>XBOX 360</title><content type='html'>&lt;div style="text-align: justify;"&gt;I've bought myself an XBOX 360 last week. After playing a couple of hours with PGR4 I connected the console to the Internet. The process was amazingly easy, I just plugged one edge the network cable to the console the other to the router, and ........ there we go, my XBOX 360 was happily downloading updates and videos from the Internet.&lt;br /&gt;&lt;br /&gt;So far I've been playing PGR4, Orange Box (A total must have), GTA4, and ........ Kung Fu Panda, I'm sorry but this game is really fun.&lt;br /&gt;&lt;br /&gt;Bye.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-795657936326371661?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/795657936326371661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/795657936326371661'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/01/xbox-360.html' title='XBOX 360'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2897751123683003324</id><published>2009-01-17T20:34:00.003Z</published><updated>2009-01-17T20:55:20.158Z</updated><title type='text'>Limerick information</title><content type='html'>&lt;div style="text-align: justify;"&gt;If you ask an Irish about &lt;a href="http://www.limerickslife.com/"&gt;Limerick&lt;/a&gt;, you'll see that look..., that smile on the face. "You mean &lt;a href="http://www.guardian.co.uk/world/2007/feb/02/ukcrime.prisonsandprobation"&gt;Stab City&lt;/a&gt;?" you'll hear. Limerick is known in Ireland as a city with high crime rates, lots of &lt;a href="http://www.urbandictionary.com/define.php?term=knackers"&gt;knackers&lt;/a&gt;, horses and some gang activities.&lt;br /&gt;&lt;br /&gt;For some historical reasons unknown to me, there are two rival gangs developing all kind of underground activities. This gangs usually kill members of the rival one but, unfortunately, every so often Innocent people get caught in the middle, badly wounded or even killed.&lt;br /&gt;&lt;br /&gt;My impression of the city is different, radically different. Once in the city ,quickly you get the feeling of a middle size one, with some big office buildings, lots of cars, and some big industrial areas. Certainly the city is not as nice as Galway is. But its size is also a good thing since the commercial offer is much bigger.&lt;br /&gt;&lt;br /&gt;Then you discover the vibrant &lt;a href="http://www.ul.ie/"&gt;University of Limerick&lt;/a&gt;, its huge campus with its marvelous sports facilities. The offices of the company I work for are in the middle of the campus, in the &lt;a href="http://www.shannon-dev.ie/RegionalDevelopment/KnowledgeNetwork/NationalTechnologyParkLimerick/"&gt;International Science Center at the National Technology Park&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Also Limerick is a much more international city, somehow people is more open minded, though I'm not saying that people in Galway are not open minded, but here they are more.&lt;br /&gt;&lt;br /&gt;In terms of weather, it seems to be a combination of continental weather, with colder winters and hotter summers than Galway, and a little bit less rainy. This last point is yet to be confirmed.&lt;br /&gt;&lt;br /&gt;So far I'm happy here. There are two things that I really miss, Salthill's promenade, and the ability to go everywhere with my bike.&lt;br /&gt;&lt;br /&gt;Bye.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2897751123683003324?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2897751123683003324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2897751123683003324'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/01/limerick-information.html' title='Limerick information'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8580802257229986335</id><published>2009-01-13T19:41:00.002Z</published><updated>2009-01-13T19:43:37.699Z</updated><title type='text'>Back to life</title><content type='html'>&lt;div style="text-align: justify;"&gt;After a couple of month of craziness and overwhelming stress, I´m back. Today he have had the Internet connexion installed at home, at my new home in Limerick, Ireland. You´ll hear from me soon, promise.&lt;br /&gt;&lt;br /&gt;Byeeeeeeeeeeeee.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8580802257229986335?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8580802257229986335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8580802257229986335'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2009/01/back-to-life.html' title='Back to life'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2253011389401551522</id><published>2008-10-26T01:25:00.002Z</published><updated>2008-10-26T01:33:41.145Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><category scheme='http://www.blogger.com/atom/ns#' term='freedom'/><title type='text'>Don't forget you past</title><content type='html'>&lt;div style="text-align: justify;"&gt;A country that forget it's past is doomed to repeat it. These last days Spain is committed to break apart one of the most remarkable prisons of the dark time, and by dark time I mean Franco's rule: the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Carabanchel&lt;/span&gt; Prison. Hundreds, if not thousands of innocents where kept inside those walls, just for the crime of thinking of a better society.&lt;br /&gt;&lt;br /&gt;No doubt we all evolve, but I can't help looking at how &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;Americans&lt;/span&gt; have San Quintin and other famous prison as &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;reminders&lt;/span&gt; of past mistakes. Spain is tearing apart a symbol of disrespect, of past repression, of denying the right to be an independent thinker. May be this is a sign of what is yet to come........&lt;br /&gt;&lt;br /&gt;Enjoy life, if you can............&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2253011389401551522?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2253011389401551522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2253011389401551522'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/dont-forget-you-past.html' title='Don&apos;t forget you past'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7203089683114571681</id><published>2008-10-25T00:29:00.002Z</published><updated>2008-10-25T00:30:03.782Z</updated><title type='text'>From today on, I'm officially in Panic Mode</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7203089683114571681?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7203089683114571681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7203089683114571681'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/from-today-on-im-officially-in-panic.html' title='From today on, I&apos;m officially in Panic Mode'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8808436426610619026</id><published>2008-10-24T23:33:00.003Z</published><updated>2008-10-24T23:51:13.204Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>No Microsoft, It wasn't you!!!</title><content type='html'>&lt;div style="text-align: justify;"&gt;It wasn't you who discovered the benefits of multi-tire applications, no, it wasn't you who discovered the wonders of using namespaces to logically organize what you call types, and the rest of the world call classes, interfaces, and so on.&lt;br /&gt;&lt;br /&gt;These days of financial crisis I'm reading a book about ASP.NET. The book isn't bad at all, but is somehow Microsoft biased. Written by a bunch of MS MVPs (Most Valuable Professional) is not difficult to understand that the authors must keep the big brother happy. But sometimes is so much, that it feels like a comedy book. I'll give you some examples:&lt;br /&gt;&lt;br /&gt;1.- &lt;span style="font-weight: bold;"&gt;Microsoft forget easily&lt;/span&gt;: This book criticize merciless the classic ASP model. Well, I still remember how they sold us this cutting edge, flawless technology. Not only classic ASP was a total crap, but now M$ have found the way to make our life easier: fully object oriented server side code, and compiled, Ohhhhhh thanks M$, Thanks for delivering what Java gave us almost 8 years ago, thanks anyway for the laugh.&lt;br /&gt;&lt;br /&gt;2.- &lt;span style="font-weight: bold;"&gt;Microsoft have discovered that mixing presentation and logic isn't good&lt;/span&gt;: This is absolutely hilarious. Microsoft have discovered 2 years ago, a principle of Software Engineering that has been with us, software engineers, for almost 10 years now, if not more. It was about time lads!!!.&lt;br /&gt;&lt;br /&gt;3.- &lt;span style="font-weight: bold;"&gt;The most amazing, namespaces&lt;/span&gt;: .Net organizes classes into logical units called namespaces!!!!!!!!!!!! WTF at this point I though maybe I was drinking poisoned water. How is this possible, even the most M$ biased programmers now that namespaces have been around for about 20 years now. Of course the horrible Win32 API don't now much about this, but this is no reason to say that one of the wonders of the .NET framework (which I think is a good thing) are namespaces. I will put this in another way, .NET without namespaces would be absolutely pointless.&lt;br /&gt;&lt;br /&gt;Well, I could continue for hours, but I think it's enough for today. I hope you have laughed reading this as much as I'm  reading that ASP.NET book.&lt;br /&gt;&lt;br /&gt;Maybe I'll give the book's title in a future post.&lt;br /&gt;&lt;br /&gt;Enjoy life lads!!!!&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8808436426610619026?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8808436426610619026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8808436426610619026'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/no-microsoft-it-wasnt-you.html' title='No Microsoft, It wasn&apos;t you!!!'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-4023035190002598542</id><published>2008-10-20T22:22:00.006Z</published><updated>2008-10-20T22:39:19.535Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='movies'/><category scheme='http://www.blogger.com/atom/ns#' term='video games'/><title type='text'>Alone in the crap, sorry, in the dark. The .. movie?</title><content type='html'>&lt;div style="text-align: justify;"&gt;I've just watched Alone in the dark, movie based on the homonym video game. The game was a classic in the era of ancient computers (spectrum and Friends), but the movie has nothing to make it worth the time, thus another 93 minutes of my precious life wasted.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The story is totally meaningless, well, this is shared with the video game. The acting is horrendous, totally dull characters. Christian Slater was good in The name of the rose, but is still using that lost puppy look, for every kind of feeling, which doesn´t work with terror o puzzlement, I´m sure you know what I mean. The music, ohhh the music. Music is meant to emphasize parts of a movie, making it more intense. Well in this movie music comes and goes, distracting and interrupting action, which may not be that bad. It´s used in the wrong place, and the selection doesn´t match the situations at all. Last, but not least, the special effects, well, umm, they really seem to have been created using the same kind of computers that made the videogame famous. If the designer of Alien is making money with the rights, this movie has given him enough for next Christmas presents. I presume they bought ONE kind of Alien monster, and used it once, and again, and again, .......&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I like videogames and I like movies, but the combinations isn´t really working out. Games can be simple, because you are the main character, and that felling compensate the lack of depth or excessive simplicity, but in a movie you are only an spectator, and more have to be given to take you into the movie.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Bye.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4023035190002598542?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4023035190002598542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4023035190002598542'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/alone-in-crap-sorry-in-dark-movie.html' title='Alone in the crap, sorry, in the dark. The .. movie?'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7910372792140196165</id><published>2008-10-18T22:04:00.001Z</published><updated>2008-10-18T22:04:59.272Z</updated><title type='text'>No words, BRILLIANT</title><content type='html'>&lt;a href="http://blog.wfmu.org/freeform/2008/10/photoshop-conte.html"&gt;McCain - Obama&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7910372792140196165?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7910372792140196165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7910372792140196165'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/no-words-brilliant.html' title='No words, BRILLIANT'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-2632707261687692873</id><published>2008-10-16T11:55:00.015Z</published><updated>2008-10-16T20:09:47.232Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='threads'/><category scheme='http://www.blogger.com/atom/ns#' term='POSIX'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Multithread programming</title><content type='html'>&lt;div style="text-align: justify;"&gt;Multi-threaded programs are a must in a world dominated by servers, GUI applications, multiprocessor computers and so on. The standard way of managing threads is by using POSIX threads. I've found and amazingly easy to follow article about POSIX threads. It's only recommendable for those of you who already have knowledge of the basic thread mechanisms and OS design:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://users.actcom.co.il/%7Echoo/lupg/tutorials/multi-thread/multi-thread.html"&gt;&lt;span style="font-size:85%;"&gt;Multi-Threaded Programming With POSIX Threads&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Examples are written in plain old marvelous C, so it might be hard to understand for the Java, and C# crowd, but lads, this is real software!!! :)&lt;br /&gt;&lt;br /&gt;Here you have a little example using threads, it's not rocket science, but makes the job:&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;#include &lt;pthread.h&gt;&lt;br /&gt;#define LIMIT 100&lt;br /&gt;&lt;br /&gt;/* prototype of the function that will be executed by a&lt;br /&gt;thread. It's compulsory to return a void * and to receive&lt;br /&gt;a void * as the only parameter */&lt;br /&gt;void * do_loop(void * arg);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;    /* The thread to be created */&lt;br /&gt;    pthread_t MiThread;&lt;br /&gt;    /* We will use these two as parameters to do_loop */&lt;br /&gt;    int th1 = 1;&lt;br /&gt;    int th2 = 2;&lt;br /&gt;    /* Will get the return value of pthread_create(...) */&lt;br /&gt;    int rc;&lt;br /&gt;    printf("Starting application\n");&lt;br /&gt;    /* Actual thread creation. Parameters:&lt;br /&gt;       1st .- The thread to be initialized&lt;br /&gt;       2nd .- Configuration parameters, NULL to use default&lt;br /&gt;       3rd .- The function to be executed by the thread&lt;br /&gt;       4th .- The parameter to be passed to do_loop&lt;br /&gt;    */&lt;br /&gt;    rc = pthread_create(&amp;MiThread,NULL,do_loop,(void *)&amp;th1);&lt;br /&gt;    /* The main thread also executes the loop, to show us the intermixed&lt;br /&gt;       execution of both threads */&lt;br /&gt;    do_loop((void*)&amp;th2);&lt;br /&gt;    /* Just in case, the main thread waits for the auxiliary thread to&lt;br /&gt;       finish */&lt;br /&gt;    pthread_join(MiThread,NULL);&lt;br /&gt;    system("PAUSE");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void * do_loop(void * arg)&lt;br /&gt;{&lt;br /&gt;     int i = 0;&lt;br /&gt;     for (i = 0 ; i &lt; LIMIT ; i++)&lt;br /&gt;         printf("Hello Thread %d\n",*(int *)arg);&lt;br /&gt;     return NULL;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;By the way, there is a companion article that gives an introduction to parallel programming. Interesting for the newbie.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://users.actcom.co.il/%7Echoo/lupg/tutorials/parallel-programming-theory/parallel-programming-theory.html"&gt;Parallel Programming - Basic Theory For The Unwary&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-2632707261687692873?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2632707261687692873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/2632707261687692873'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/multithread-programming.html' title='Multithread programming'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5313413445109282695</id><published>2008-10-14T21:51:00.004Z</published><updated>2008-10-14T22:15:14.644Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>ASP.Net Datagrid control</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi lads,&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Slowly but steadily I'm discovering the goods and bads of ASP.NET programming. On the one hand it's pretty simple to make a simple but rather functional web application, on the other hand the programming model, if any, it's really simplistic, and this is good, but also bad. On top of that there aren't billions of frameworks to use, in contrast to the Java world, that makes things easier, but also gives you less power. Other factors are the insane dependency on Microsoft, slave forever of IIS, that is definitely not good. Ahh, and don't forget you can program almost everything using very simple HTML and C#, this last one is becoming my favourite language, after god C++, of course.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Well, one very powerful web control provided by ASP.NET is the Datagrid control. It basically allows to show information in a table. This information must come to any source that implements the IEnumerable interface. All the dirty HTML code is automatically generated by ASP.NET, and this, for those of you who fought with the old classic ASP, is a blessing.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I have found a couple of good articles and web sites about the use of this Datagrid web control, I hope they are useful for you.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li style="text-align: justify;"&gt;&lt;a href="http://aspnet.4guysfromrolla.com/articles/040502-1.aspx"&gt;An extensive examination of the Datagrid web control.&lt;/a&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;a href="http://www.datagridgirl.com/"&gt;Datagrid girl&lt;/a&gt;, just don't even ask me.&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;a href="http://articles.techrepublic.com.com/5100-10878_11-5193577.html"&gt;Techrepublic.com on Datagrid.&lt;/a&gt; Actually there are loads of articles in techrepublic.&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Enjoy!!!!!!!&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5313413445109282695?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5313413445109282695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5313413445109282695'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/aspnet-datagrid-control.html' title='ASP.Net Datagrid control'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1383132693534492785</id><published>2008-10-11T20:09:00.003Z</published><updated>2008-10-11T20:12:42.472Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Mono'/><title type='text'>Mono 2.0 Use .NET out of Windows</title><content type='html'>&lt;div style="text-align: justify;"&gt;Since .NET assemblies compile down to CIL bytecode that's executed in a virtual machine under Windows, there's no reason, in principle, that they shouldn't be able to run under any platform. After all, Java's "write once, run anywhere" mantra has the same fundamental architecture: a VM running bytecode that taps into a series of standard APIs and classes.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Visit the &lt;a href="http://www.mono-project.com/news/archive/2008/Oct-06.html"&gt;Mono Project Official Release Notes&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1383132693534492785?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1383132693534492785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1383132693534492785'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/mono-20-use-net-out-of-windows.html' title='Mono 2.0 Use .NET out of Windows'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7010496007247283452</id><published>2008-10-11T20:04:00.002Z</published><updated>2008-10-11T20:06:58.302Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='USA'/><category scheme='http://www.blogger.com/atom/ns#' term='North Korea'/><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><title type='text'>U.S. takes North Korea off terror list</title><content type='html'>&lt;div style="text-align: justify;"&gt;Sounds like a joke. What a wonderful year! First the Olympic games in China, well known for it's respect for human rights, and now North Korea, one of the most open countries in Asia is taken off the terror list.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;But these guys actually believe that we are stupid??? I hope Obama has a little more common sense.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7010496007247283452?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7010496007247283452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7010496007247283452'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/us-takes-north-korea-off-terror-list.html' title='U.S. takes North Korea off terror list'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-9088888754228211304</id><published>2008-10-11T08:38:00.002Z</published><updated>2008-10-11T08:42:40.538Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Austria'/><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><category scheme='http://www.blogger.com/atom/ns#' term='Haider'/><title type='text'>Joerg Haider has been killed in a road accident</title><content type='html'>&lt;div style="text-align: justify;"&gt;I don't consider myself a "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;conspiranoic&lt;/span&gt;" but it's rather suspicious that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Haider&lt;/span&gt; has died just a couple of weeks after getting excellent results in Austria's presidential elections.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Probably we wouldn't have known the results of the far-right parties if &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Haider&lt;/span&gt; hadn't been it's leader. This fact gives him an important and dangerous role, "head" of Austria's most hated out of Austria political movement. Bad for Austria's name, bad for businesses, bad for him.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Rest in peace.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-9088888754228211304?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/9088888754228211304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/9088888754228211304'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/10/joerg-haider-has-been-killed-in-road.html' title='Joerg Haider has been killed in a road accident'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-3434118623137676816</id><published>2008-09-26T15:27:00.003Z</published><updated>2008-09-26T15:35:20.569Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='maths'/><category scheme='http://www.blogger.com/atom/ns#' term='graphics'/><title type='text'>Trigonometric Identities (Razones Trigonométricas)</title><content type='html'>&lt;div style="text-align: justify;"&gt;Basically, if you study computer graphics you need to know some basic trigonometric identities, in order to understand some results, like 2D or 3D rotations. Here I provide a couple of links to lists of trigonometric identities:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.ucm.es/info/Geofis/practicas/trigonometria.htm"&gt;http://www.ucm.es/info/Geofis/practicas/trigonometria.htm&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.sosmath.com/trig/Trig5/trig5/trig5.html"&gt;http://www.sosmath.com/trig/Trig5/trig5/trig5.html&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Trigonometric_identity"&gt;http://en.wikipedia.org/wiki/Trigonometric_identity&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And the most basic application, 2D rotation:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.siggraph.org/education/materials/HyperGraph/modeling/mod_tran/2drota.htm"&gt;Siggraph 2D rotation&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you can read Spanish I´ll recommend you to check this slides from the &lt;a href="http://serdis.dis.ulpgc.es/~ii-fgc/"&gt;"Computer Graphics Fundamentals"&lt;/a&gt; course of the &lt;a href="http://www.ulpgc.es"&gt;University Of Las Palmas de Gran Canaria&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-3434118623137676816?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3434118623137676816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3434118623137676816'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/09/trigonometric-identities-razones.html' title='Trigonometric Identities (Razones Trigonométricas)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-7663178921493157062</id><published>2008-09-25T07:57:00.004Z</published><updated>2008-10-11T20:13:25.525Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Friend Classes (strange justification)</title><content type='html'>&lt;div style="text-align: justify;"&gt;I'm not a friend of the &lt;a href="http://www.cplusplus.com/doc/tutorial/inheritance.html"&gt;C++ friends&lt;/a&gt;, whether they are functions, member functions or classes. However there are some situations when the use of a friend function can be somehow beneficial, like making the &lt;a href="http://www.cplusplus.com/reference/iostream/ostream/operator&amp;lt;&amp;lt;.html"&gt;operator &lt;&lt;&lt;/a&gt; compatible with a particular class (although it's possible to just override or create a kind of toString() method, like in the best Java flavour).&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Lately I've been reading a book on C++ programming. This book is intended to be read by novices, and because of that I think the author should have been more careful when giving advices. This is the way the author justifies friend classes:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;"When might you want to make one class a friend to another? Let’s look at an example. Suppose you must program a simple simulation of a television and a remote control. You decide to define a Tv class representing a television and a Remote class representing a remote control. Clearly, there should be some sort of relationship between these classes, but what kind? A remote control is not a television and vice versa, so the is-a relationship of public inheritance doesn’t apply. Nor is either a component of the other, so the has-a relationship of containment or of private or protected inheritance doesn’t apply. What is true is that a remote control can modify the state of a television, and this suggests making the Remote class a friend to the Tv class."&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This is exactly the example my teachers at university used to teach as an event broadcast pattern like &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.vincehuston.org/dp/observer.html"&gt;Observer&lt;/a&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-style: normal;"&gt;, which is by far a better solution.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Friend classes completely break encapsulation, and couples classes so tight that it will be impossible to use one without the other, therefore preventing code reuse.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The book is called "&lt;a href="http://www.amazon.com/Primer-Plus-5th-Stephen-Prata/dp/0672326973"&gt;C++ Primer Plus, Fifth Edition&lt;/a&gt;".&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-7663178921493157062?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7663178921493157062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/7663178921493157062'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/09/friend-classes-strange-justification.html' title='Friend Classes (strange justification)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-8288031182184659116</id><published>2008-09-10T09:03:00.002Z</published><updated>2008-09-10T09:06:49.144Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sheet'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='cheat'/><title type='text'>Programming cheat sheets</title><content type='html'>&lt;div style="text-align: justify;"&gt;Either if you are a novice or an experience programmer it's always a good idea to have at hand one cheat sheet that helps  you not to make the most usual syntax mistakes. Here you have a compilation of different programing languages' cheat sheets:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.cheat-sheets.org/"&gt;Programming Cheat Sheets (www.cheat-sheets.org)&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-8288031182184659116?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8288031182184659116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/8288031182184659116'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/09/programming-cheat-sheets.html' title='Programming cheat sheets'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-6570761583247866811</id><published>2008-08-31T15:52:00.004Z</published><updated>2008-09-10T09:07:19.611Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='maths'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Perspective projection</title><content type='html'>I've always been interested in Computer Graphics. This area of computer science unites most of the things I´m interested in. From pure maths to algorithm analysis, and software engineering, if you want to be a good graphics programmer, you need to master of this fields of knowledge.&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;The purpose of this post is to provide a set of interesting links about perspective projection. This concept is absolutely essential to understand modern graphics, especially 3D game graphics. Thanks to APIs like OpenGl or DirectX, you don´t have to program your own projection, but you need to understand what is going on under the hood to be able to make the most out of it.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Siggraph &lt;a href="http://www.siggraph.org/education/materials/HyperGraph/viewing/view3d/perspect.htm"&gt;Perspective Viewing Projection&lt;/a&gt;. This is a rather mathematical explanation, but is there any other way.&lt;/li&gt;&lt;li&gt;Client Management Systems, &lt;a href="http://www.cmspro.com/3d_graphics.htm"&gt;computer graphics introduction&lt;/a&gt;. No maths at all, so this is a good starting point.&lt;/li&gt;&lt;/ul&gt;Enjoy!!!&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-6570761583247866811?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6570761583247866811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/6570761583247866811'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/08/perspective-projection.html' title='Perspective projection'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-4962027178686640916</id><published>2008-08-30T18:22:00.006Z</published><updated>2008-08-30T18:39:55.558Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='docks'/><category scheme='http://www.blogger.com/atom/ns#' term='Corrib'/><category scheme='http://www.blogger.com/atom/ns#' term='ireland'/><category scheme='http://www.blogger.com/atom/ns#' term='Gaway'/><title type='text'>The Corrib river, Galway</title><content type='html'>&lt;div style="text-align: justify;"&gt;The &lt;a href="http://en.wikipedia.org/wiki/River_Corrib"&gt;Corrib river&lt;/a&gt; crosses &lt;a href="http://www.galway.net/"&gt;Galway&lt;/a&gt;. Actually Galway is the last place the river passes before reaching the ocean. This afternoon I gave a walk and took some pictures of the river. I hope you enjoy them as much as I enjoyed the walk:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_2CPTItAuDOw/SLmRa8pTArI/AAAAAAAAAIA/0a6dCuVlhOY/s1600-h/DSC_0234.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_2CPTItAuDOw/SLmRa8pTArI/AAAAAAAAAIA/0a6dCuVlhOY/s400/DSC_0234.JPG" alt="" id="BLOGGER_PHOTO_ID_5240379533564248754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_2CPTItAuDOw/SLmRvJnTNsI/AAAAAAAAAII/7ITFUPuVDQM/s1600-h/DSC_0226.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_2CPTItAuDOw/SLmRvJnTNsI/AAAAAAAAAII/7ITFUPuVDQM/s400/DSC_0226.JPG" alt="" id="BLOGGER_PHOTO_ID_5240379880642918082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Then I continued walking and after approximately 30 minutes I arrived to the docks. This area of the city, as it´s name indicates, is where the ships "park". There are lots of warehouses, and industrial stuff scattered across the area. Among all this things I found this structure, that seems to be part of a crane:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_2CPTItAuDOw/SLmS1qRF1FI/AAAAAAAAAIQ/RQwELMt7iRQ/s1600-h/crane.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_2CPTItAuDOw/SLmS1qRF1FI/AAAAAAAAAIQ/RQwELMt7iRQ/s400/crane.jpg" alt="" id="BLOGGER_PHOTO_ID_5240381091998979154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_2CPTItAuDOw/SLmTSZZqWiI/AAAAAAAAAIY/McrHekmT0qc/s1600-h/DSC_0253.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_2CPTItAuDOw/SLmTSZZqWiI/AAAAAAAAAIY/McrHekmT0qc/s400/DSC_0253.JPG" alt="" id="BLOGGER_PHOTO_ID_5240381585687730722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Lovely afternoon indeed.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4962027178686640916?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4962027178686640916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4962027178686640916'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/08/corrib-river-galway.html' title='The Corrib river, Galway'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_2CPTItAuDOw/SLmRa8pTArI/AAAAAAAAAIA/0a6dCuVlhOY/s72-c/DSC_0234.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1392673025658839332</id><published>2008-08-24T15:21:00.004Z</published><updated>2008-09-08T18:26:55.108Z</updated><title type='text'>Streets of Galway 08, Results</title><content type='html'>&lt;div style="text-align: justify;"&gt;Probably this post should be called "Streets of Galway 08, my results", because is only to inform about me, jeje.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;img src="http://4.bp.blogspot.com/_2CPTItAuDOw/SMVuLr4SU1I/AAAAAAAAAJI/L56nShQR_ng/s400/TheFinish08_53.jpg" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" border="0" alt="" id="BLOGGER_PHOTO_ID_5243718488179233618" /&gt;&lt;img src="http://1.bp.blogspot.com/_2CPTItAuDOw/SMVuB8m69GI/AAAAAAAAAJA/Z6Yy3GzAmv8/s400/TheFinish08_52.jpg" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" border="0" alt="" id="BLOGGER_PHOTO_ID_5243718320871109730" /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Well, my most optimistic forecast was to run the 8K in 34 minutes, and honestly this wouldn't have been a bad time, but that Saturday 9th of August I was in a good mood so I decided to push a little bit harder and finally my time was 32 min 50 seconds. My position was 170 out of almost 2000 participants.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The race was wonderful the atmosphere thrilling and on top of that a didn't suffer at all during the race. This tells me, of course, that I could have done a better time. My best Irish race so far, but many more are yet to come.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The official results in the &lt;a href="http://www.galwaycityharriers.com/senior-news/results-2008-streets-galway-road-race"&gt;Galway City Harriers&lt;/a&gt; web page.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1392673025658839332?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1392673025658839332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1392673025658839332'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/08/streets-of-galway-08-results.html' title='Streets of Galway 08, Results'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_2CPTItAuDOw/SMVuLr4SU1I/AAAAAAAAAJI/L56nShQR_ng/s72-c/TheFinish08_53.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-3253495566255316079</id><published>2008-08-22T18:15:00.003Z</published><updated>2008-08-22T18:21:13.267Z</updated><title type='text'>My deepest sympathies to the  affected by Madrid´s  Airport dissaster</title><content type='html'>&lt;div style="text-align: justify;"&gt;I want offer my deepest sympathies to the relatives of the victims of Madrid aircraft accident. The destination of this plane was my home island, Gran &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Canaria&lt;/span&gt;, and this makes me feel specially sad. I know that sooner or later I´ll discover someone that I know that has been affected by this terrible accident.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Rest in peace.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-3253495566255316079?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3253495566255316079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/3253495566255316079'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/08/my-deepest-sympathies-to-affected-by.html' title='My deepest sympathies to the  affected by Madrid´s  Airport dissaster'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5400599475181988698</id><published>2008-08-06T16:32:00.004Z</published><updated>2008-08-06T16:40:15.538Z</updated><title type='text'>Lovely 80's music (El bar de Moe)</title><content type='html'>&lt;div style="text-align: justify;"&gt;Do you consider yourself an 80's music lover. If so you should visit "&lt;a href="http://elrincondelbardemoe.blogspot.com/"&gt;El bar &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;de&lt;/span&gt; Moe&lt;/a&gt;". It is a radio show blog, with lots of information about the golden decade. Besides it is possible to &lt;a href="https://cid-0573d7e66b3659fb.skydrive.live.com/home.aspx"&gt;download all the shows&lt;/a&gt;, which include tons of lovely music. Don't miss this great opportunity.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;This show is hosted in "&lt;a href="http://www.radioestaciononline.com"&gt;Radio Estacion Online&lt;/a&gt;". This webpage is a gateway to lost of retro music.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5400599475181988698?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5400599475181988698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5400599475181988698'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/08/lovely-80s-music-el-bar-de-moe.html' title='Lovely 80&apos;s music (El bar de Moe)'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-4618162308837241517</id><published>2008-08-03T12:17:00.003Z</published><updated>2008-08-03T12:42:18.519Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='training'/><category scheme='http://www.blogger.com/atom/ns#' term='ireland'/><category scheme='http://www.blogger.com/atom/ns#' term='Gaway'/><category scheme='http://www.blogger.com/atom/ns#' term='running'/><title type='text'>Streets of Galway 08</title><content type='html'>&lt;div style="text-align: justify;"&gt;Next Saturday 8&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;th&lt;/span&gt; August take place the major running event in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Galway&lt;/span&gt; city, the &lt;a href="http://www.galwaycityharriers.com/files/gch/Steets_Map.jpg"&gt;Streets of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Galway&lt;/span&gt;&lt;/a&gt;. This race is organized every year by the &lt;a href="http://www.galwaycityharriers.com/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Galway&lt;/span&gt; City Harriers&lt;/a&gt;, and sponsored by &lt;a href="http://www.future.ie/"&gt;Future Financial Services&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It´s is a 8K long race. My last 8K race was in &lt;a href="http://tritanic.blogspot.com/2008/04/maree-8k-my-first-race-in-ireland.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Maree&lt;/span&gt;&lt;/a&gt;, and there I did a 4:20 per K average. Last Monday I did an 8K test at almost race pace, and it took me 34:27, which means that I can improve my result in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Maree&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The anecdote of this race is that I was absolutely convinced that the race would take place the 1st of August. With this in my mind last week I planned a really soft training, and on Friday I called the organization because I &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;hadn&lt;/span&gt;´t received the race pack (chip and t-shirt), only to discover that the race &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;wasn&lt;/span&gt;´t that &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;Saturday&lt;/span&gt;, but saturday week.&lt;br /&gt;&lt;br /&gt;I hope this event doesn´t affect my performance, I´ll inform you soon.&lt;br /&gt;&lt;br /&gt;Bye!!!&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-4618162308837241517?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4618162308837241517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/4618162308837241517'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/08/streets-of-galway-08.html' title='Streets of Galway 08'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-5469986507515263665</id><published>2008-07-18T15:15:00.003Z</published><updated>2008-07-18T15:30:29.109Z</updated><title type='text'>Getting old??</title><content type='html'>Oh my god!!!!&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Right now &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;I'm&lt;/span&gt; listening the song "&lt;a href="http://www.last.fm/music/U96/_/Love+Sees+No+Colour"&gt;love sees no colour&lt;/a&gt;" from &lt;a href="http://www.eurodancehits.com/u96.html"&gt;U96&lt;/a&gt;, an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;absolute&lt;/span&gt; 90's dance hit. Nothing &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;remarkable&lt;/span&gt; about it. The thing is that while listening to this song lots and lots of memories from the early 90's took my mind (and I'd say that my hart too) by assault, and for a moment I though: "Those were good times...".&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ivK8xz0mksg&amp;amp;hl=es&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.youtube.com/v/ivK8xz0mksg&amp;amp;hl=es&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" height="344" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Nwc0shJ2aYc&amp;amp;hl=es&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.youtube.com/v/Nwc0shJ2aYc&amp;amp;hl=es&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" height="344" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Oh my god, I think I'm getting old!!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-5469986507515263665?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5469986507515263665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/5469986507515263665'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/07/getting-old.html' title='Getting old??'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-16077594.post-1750304087248438632</id><published>2008-07-06T11:48:00.004Z</published><updated>2008-07-06T12:30:47.529Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex'/><category scheme='http://www.blogger.com/atom/ns#' term='grammar'/><category scheme='http://www.blogger.com/atom/ns#' term='french'/><title type='text'>Back to LaTeX and French</title><content type='html'>&lt;div style="text-align: justify;"&gt;LaTeX and French, can suggest lots of things .... but in this case I´m going to write only about how to use LaTeX to write some documentation about French grammar. Anyway, do not expect too much about this post, this is only the first in a series dedicated to LaTeX and French grammar, so it will probably be a Little bit naive.&lt;br /&gt;&lt;br /&gt;LaTeX is a documentation generation system. Rather than specifying how things should look, you tell LaTeX what things are (i.e. heading, table, figure, ...), and it decides the best professional look for them. If you are used to Microsoft Word, or OpenOffice it can be hard to begin using LaTeX, but once you´ve started you´ll realise how limited those tools are, and how powerful LaTeX is.&lt;br /&gt;&lt;br /&gt;This is a sample code to generate a very simple document:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;\documentclass[12pt]{article}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\begin{document}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\section{Introduction}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;This is a first attempt to use latex again. I want to use latex to create some documentation about French grammar, therefore the use of tables will be essential. Let´s see how to create a table&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\begin{center}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\begin{tabular}{| c | c |}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\hline&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\textbf{Person} &amp;amp; \textbf{Pronoun} \\&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\hline&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;First &amp;amp; Je\\&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\hline&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Second &amp;amp; Tu/Vous\\&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\hline&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Third &amp;amp; Il/Elle\\&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\hline&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;First Plural &amp;amp; Nous\\&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\hline&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Second Plural &amp;amp; Vous\\&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\hline&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Third Plural &amp;amp; Ils/Elles\\&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\hline&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\end{tabular}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\end{center}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;This is our first table. It doesn´t look too bad, does it?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\end{document}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Compile this code online rather than installing LaTeX on your machine, which is a pretty hard task. Use this &lt;a href="http://dev.baywifi.com/latex/Default.aspx"&gt;online LaTeX compiler&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;That´s all for today!!!!&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16077594-1750304087248438632?l=tritanic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1750304087248438632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16077594/posts/default/1750304087248438632'/><link rel='alternate' type='text/html' href='http://tritanic.blogspot.com/2008/07/back-to-latex-and-french.html' title='Back to LaTeX and French'/><author><name>julito-power</name><uri>http://www.blogger.com/profile/00830938638699612248</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
