<?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-19110059</id><updated>2012-02-17T01:13:40.331-02:00</updated><category term='C#'/><category term='Python'/><category term='Howto'/><category term='PHP'/><category term='Essays'/><category term='Javascript PHP'/><category term='Programming Lessons'/><category term='Windows Vista'/><category term='Javascript'/><category term='software'/><category term='Linux'/><category term='programming'/><category term='OOP'/><category term='Tools'/><category term='rants'/><category term='Ubuntu'/><category term='Firebird'/><category term='Tips'/><category term='Fun'/><category term='.NET'/><category term='delphi'/><title type='text'>Yet Another Coding Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>85</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-19110059.post-4705295421977208719</id><published>2008-10-21T12:07:00.001-02:00</published><updated>2008-10-21T12:07:28.366-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Shrink your Firefox context menus with ffchrome</title><content type='html'>&lt;p&gt;If you, like me, don’t like reading all the forty seven options of the firefox context menu just to find the “Save link As..” or “Save Image As…” options, here is the solution: &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/9023" target="_blank"&gt;ffchrome Firefox extension&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This extension allows you to customize the Context Menu elements, keeping the menu very tiny and clean.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-4705295421977208719?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/4705295421977208719/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=4705295421977208719' title='5 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4705295421977208719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4705295421977208719'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/10/shrink-your-firefox-context-menus-with.html' title='Shrink your Firefox context menus with ffchrome'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-4134213066825412614</id><published>2008-10-20T20:51:00.001-02:00</published><updated>2008-10-20T20:51:32.426-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>xKill - My favorite Linux application of all times, now on Windows</title><content type='html'>&lt;p&gt;Now I can, once more, use one of the most useful tools ever invented: &lt;a href="http://en.wikipedia.org/wiki/Xkill" target="_blank"&gt;xKill&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you don’t know what it does, its purpose is very straightforward: It kills any application with just one mouse click.&lt;/p&gt;  &lt;p&gt;You know when that buggy application which has a giant memory leak crashes, start eating up all you memory and by the time you try to open the task manager you computer is already dead? Well, this is over now.&lt;/p&gt;  &lt;p&gt;With xKill you need just to hit Ctrl + Alt + Backspace and click on the bad application, it will die instantly.&lt;/p&gt;  &lt;p&gt;You can download the windows version of xKill &lt;a href="http://solo-dev.deviantart.com/art/Windows-xKill-100737525" target="_blank"&gt;here&lt;/a&gt;. Have a nice hunting!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-4134213066825412614?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/4134213066825412614/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=4134213066825412614' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4134213066825412614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4134213066825412614'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/10/xkill-my-favorite-linux-application-of.html' title='xKill - My favorite Linux application of all times, now on Windows'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-2679311809987451019</id><published>2008-10-20T13:41:00.001-02:00</published><updated>2008-10-20T13:41:15.451-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Merging partitions on Windows Vista</title><content type='html'>&lt;p&gt;Recently I began to run out of space on my Windows partition, mostly because when I installed Vista I thought that 30GB for the primary partition would be enough.&lt;/p&gt;  &lt;p&gt;That proved to be a miscalculation, even disabling everything I could, like &lt;a href="http://vistahelp.blogspot.com/2007/01/disable-hibernation-and-free-up-space.html" target="_blank"&gt;Hibernation&lt;/a&gt; and &lt;a href="http://techie-buzz.com/tips-and-tricks/free-disk-space-by-making-windows-vista-service-pack-1-permanent.html" target="_blank"&gt;making Service Pack 1 permanent&lt;/a&gt;, I was still running out of space.&lt;/p&gt;  &lt;p&gt;Luckily I found out that you can &lt;a href="http://www.lytebyte.com/2007/02/19/how-to-partition-in-windows-vista-extend-and-shrink/" target="_blank"&gt;Merge partitions on Windows Vista&lt;/a&gt;, with no effort at all!&lt;/p&gt;  &lt;p&gt;I had an old partition which I mostly used to test Linux distros, so I deleted that partition and merged up the free space with the primary partition, the problem was solved with a few clicks!&lt;/p&gt;  &lt;p&gt;If you are running out of space, instead of reinstalling everything from scratch, you can backup a secondary partition, delete it, merge the free space with the Windows partition and live happily ever after.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-2679311809987451019?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/2679311809987451019/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=2679311809987451019' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2679311809987451019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2679311809987451019'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/10/merging-partitions-on-windows-vista.html' title='Merging partitions on Windows Vista'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-5307478459620305397</id><published>2008-07-18T23:36:00.001-03:00</published><updated>2008-07-18T23:37:27.381-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>localhost redirecting to www.localhost.com</title><content type='html'>&lt;p&gt;For some time now, each time I typed localhost on Firefox it tried to open &lt;a href="http://www.localhost.com"&gt;www.localhost.com&lt;/a&gt;, but accessing 127.0.0.1 worked just fine.&lt;/p&gt;  &lt;p&gt;I was lazy about fixing it, but today I got pissed off and decided to find out what the hell was happening.&lt;/p&gt;  &lt;p&gt;After googling a little bit I found this forum post: &lt;a title="http://www.wilderssecurity.com/archive/index.php/t-198020.html" href="http://www.wilderssecurity.com/archive/index.php/t-198020.html"&gt;http://www.wilderssecurity.com/archive/index.php/t-198020.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It happens because of Firefox and Vista's IPv6 support. I'm not sure why it happens, but there are 3 easy solutions:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Remove the IPv6 entry for localhost in the windows hosts file (explained bellow).&lt;/li&gt;    &lt;li&gt;&lt;a href="http://support.mozilla.com/pt-BR/kb/Firefox+cannot+load+web+sites+but+other+programs+can#IPv6" target="_blank"&gt;Disable Firefox's IPv6 support&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.mydigitallife.info/2007/09/09/disable-and-turn-off-ipv6-support-in-vista/" target="_blank"&gt;Disable Vista's IPv6 support.&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;As I don't use IPv6 at all, my choice, is the quickest and dirtiest one: remove the entry from the hosts file.&lt;/p&gt;  &lt;p&gt;To do it, just do the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open notepad as Administrator and edit the file: C:\Windows\System32\drivers\etc\hosts&lt;/li&gt;    &lt;li&gt;Remove the line: ::1 localhost&lt;/li&gt;    &lt;li&gt;Save the file.&lt;/li&gt;    &lt;li&gt;Open up the command prompt as Administrator (hit the windows key, type cmd and then hit Ctrl + Shift + Enter)&lt;/li&gt;    &lt;li&gt;Execute the command: ipconfig /flushdns&lt;/li&gt;    &lt;li&gt;That's all folks :)&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I don't know why Firefox tries to open &lt;a href="http://www.localhost.com"&gt;www.localhost.com&lt;/a&gt;, but if you are asking yourself what is &amp;quot;::1 localhost&amp;quot;, it is the IPv6 equivalent of 127.0.0.1, you can read more about it at the &lt;a href="http://en.wikipedia.org/wiki/Localhost" target="_blank"&gt;Localhost's entry at wikipedia&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-5307478459620305397?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/5307478459620305397/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=5307478459620305397' title='14 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/5307478459620305397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/5307478459620305397'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/07/localhost-redirecting-to.html' title='localhost redirecting to www.localhost.com'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-974598259210080158</id><published>2008-06-10T18:27:00.001-03:00</published><updated>2008-06-10T18:27:43.061-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>define: programming</title><content type='html'>&lt;blockquote&gt;   &lt;p&gt;Programming is all about knowing when to boil the orange sponge donkey across the phillipines with an orangutang gorilla crossed with a ham sandwich to the fourth power of twelve across the nile with an awful headache from the previous night when all of alfred's naughty jalapeno peppers frog-marched the nordic elves across the loom-lined geronimo induced swamp donkey over and above the fortran fortified kilomanjaro fence past the meticulously crafted anti disgusting sponge cake scenario where all the hats doth quoteth the milk which is not unlike the super werewolf from the infinite realm of ninja-step. it's hard to define, really.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;By some extremely creative (and high) anonymous guy who commented on &lt;a href="http://www.codinghorror.com/blog/archives/001130.html" target="_blank"&gt;Coding Horror&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-974598259210080158?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/974598259210080158/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=974598259210080158' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/974598259210080158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/974598259210080158'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/06/define-programming.html' title='define: programming'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-1228336401397963204</id><published>2008-06-09T23:09:00.001-03:00</published><updated>2008-06-09T23:09:53.331-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Essays'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>RTFM</title><content type='html'>&lt;p&gt;I learned (the hard way), that is always better to read the documentation, help files, readme.txt or install.txt files before trying to do something using trial and error.&lt;/p&gt;  &lt;p&gt;It is &lt;strong&gt;always&lt;/strong&gt; quicker and more productive to take your time, read about what you want to, and then do it knowing exactly how.&lt;/p&gt;  &lt;p&gt;You think that an easy task can be done without getting help from boring manuals, going straight to the point is so much funnier isn't it?&lt;/p&gt;  &lt;p&gt;Believe me, you are losing so much good information doing it like this, and a lot of time too. When you make something work, how can you be sure that you did it using the right method? Isn't there an easier, faster and safer way?&lt;/p&gt;  &lt;p&gt;Sadly most people are afraid of manuals and spend precious time using trial and error, without any clues about what they are doing. When programing this is called &lt;a href="http://pragprog.com/the-pragmatic-programmer/extracts/coincidence" target="_blank"&gt;programming by coincidence&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I also used to program a lot by coincidence, who didn't? But after passing some hard times you realize that reading the documentation is always faster than trial and error.&lt;/p&gt;  &lt;p&gt;So you become to add more value to products which has a good and complete documentation, it's very sad when you find some definitions like this in the documentation:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;This is Ranged, a member of class TClientDataSet.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;When you are working on a project, or in my case developing something which will be used for several projects, it is very important to document things, it will save you and your co-workers a lot of time in the future, I usually forget things which I did myself, how can will I remember about something someone else did if nobody documented it? Well, guess the only option is to program by coincidence.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-1228336401397963204?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/1228336401397963204/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=1228336401397963204' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/1228336401397963204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/1228336401397963204'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/06/rtfm.html' title='RTFM'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-8081598564277535366</id><published>2008-05-26T12:32:00.001-03:00</published><updated>2008-05-26T12:32:17.559-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='delphi'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>Recursive component's enumerator in Delphi</title><content type='html'>&lt;p&gt;I needed to loop through all the components in some forms, and when you have a frame inside a form, the default TComponent's enumerator doesn't return the components which are inside the frame.&lt;/p&gt;  &lt;p&gt;After goggling a little bit I found this nice reference: &lt;a href="http://17slon.com/blogs/gabr/2007/03/fun-with-enumerators.html" target="_blank"&gt;Fun with enumerators&lt;/a&gt;, which helped me understand how Delphi enumerator's work (and how complicated they are), so I managed to write a class helper to loop recursively through components.&lt;/p&gt;  &lt;p&gt;Below is the unit full source code:&lt;/p&gt;  &lt;pre class="Delphi" name="code"&gt;unit RecursiveEnumerator;&lt;br /&gt;&lt;br /&gt;interface&lt;br /&gt;&lt;br /&gt;uses Classes,&lt;br /&gt;  Contnrs;&lt;br /&gt;&lt;br /&gt;type&lt;br /&gt;  TRecursiveComponentsEnum = class&lt;br /&gt;  private&lt;br /&gt;    FComponents: TComponentList;&lt;br /&gt;    FIndex: Integer;&lt;br /&gt;    function GetCurrent: TComponent;&lt;br /&gt;  public&lt;br /&gt;    constructor Create(AContainer: TComponent);&lt;br /&gt;    destructor Destroy; override;&lt;br /&gt;    function MoveNext: Boolean;&lt;br /&gt;    property Current: TComponent read GetCurrent;&lt;br /&gt;  end;&lt;br /&gt;&lt;br /&gt;  IRecursiveEnumeratorFactory = interface&lt;br /&gt;    function GetEnumerator: TRecursiveComponentsEnum;&lt;br /&gt;  end;&lt;br /&gt;&lt;br /&gt;  TRecursiveEnumeratorFactory = class(TInterfacedObject, IRecursiveEnumeratorFactory)&lt;br /&gt;  private&lt;br /&gt;    FContainer: TComponent;&lt;br /&gt;  public&lt;br /&gt;    function GetEnumerator: TRecursiveComponentsEnum;&lt;br /&gt;    constructor Create(AContainer: TComponent);&lt;br /&gt;  end;&lt;br /&gt;&lt;br /&gt;  TRecursiveEnumeratorComponentHelper = class helper for TComponent&lt;br /&gt;  public&lt;br /&gt;    function GetRecursiveEnumerator: IRecursiveEnumeratorFactory;&lt;br /&gt;  end;&lt;br /&gt;&lt;br /&gt;implementation&lt;br /&gt;&lt;br /&gt;uses&lt;br /&gt;  SysUtils;&lt;br /&gt;&lt;br /&gt;constructor TRecursiveComponentsEnum.Create(AContainer: TComponent);&lt;br /&gt;  procedure AddToList(AComponent: TComponent);&lt;br /&gt;  var&lt;br /&gt;    lComponent: TComponent;&lt;br /&gt;  begin&lt;br /&gt;    for lComponent in AComponent do&lt;br /&gt;    begin&lt;br /&gt;      if lComponent.ComponentCount &amp;gt; 0 then&lt;br /&gt;        AddToList(lComponent);&lt;br /&gt;      FComponents.Add(lComponent);&lt;br /&gt;    end;&lt;br /&gt;  end;&lt;br /&gt;begin&lt;br /&gt;  FComponents := TComponentList.Create(False);&lt;br /&gt;  AddToList(AContainer);&lt;br /&gt;  FIndex := -1;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;destructor TRecursiveComponentsEnum.Destroy;&lt;br /&gt;begin&lt;br /&gt;  FComponents.Free;&lt;br /&gt;  inherited;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function TRecursiveComponentsEnum.GetCurrent: TComponent;&lt;br /&gt;begin&lt;br /&gt;  Result := FComponents.Items[FIndex];&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function TRecursiveComponentsEnum.MoveNext: Boolean;&lt;br /&gt;begin&lt;br /&gt;  Result := FIndex &amp;lt; FComponents.Count - 1;&lt;br /&gt;  if Result then&lt;br /&gt;    Inc(FIndex);&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function TRecursiveEnumeratorComponentHelper.GetRecursiveEnumerator: IRecursiveEnumeratorFactory;&lt;br /&gt;begin&lt;br /&gt;  Result := TRecursiveEnumeratorFactory.Create(Self);&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;constructor TRecursiveEnumeratorFactory.Create(AContainer: TComponent);&lt;br /&gt;begin&lt;br /&gt;  FContainer := AContainer;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;function TRecursiveEnumeratorFactory.GetEnumerator: TRecursiveComponentsEnum;&lt;br /&gt;begin&lt;br /&gt;  Result := TRecursiveComponentsEnum.Create(FContainer);&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;end.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It is a class helper, to use it, just add the unit to the uses list and use it like this: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="Delphi" name="code"&gt;var&lt;br /&gt;  Component: TComponent;&lt;br /&gt;begin&lt;br /&gt;  for Component in GetRecursiveEnumerator do&lt;br /&gt;    // do something with the component&lt;br /&gt;end;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The magic here is that it doesn't loop trough the components &amp;quot;on the fly&amp;quot;. When you call the GetRecursiveEnumerator a TRecursiveComponentsEnum instance is created, at this time, it loops recursively trough all the component's underlying components and fill a TComponentList (FComponents), then the GetCurrent method return's the components from this list, and it just works.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="Delphi" name="code"&gt;constructor TRecursiveComponentsEnum.Create(AContainer: TComponent);&lt;br /&gt;  procedure AddToList(AComponent: TComponent);&lt;br /&gt;  var&lt;br /&gt;    lComponent: TComponent;&lt;br /&gt;  begin&lt;br /&gt;    for lComponent in AComponent do&lt;br /&gt;    begin&lt;br /&gt;      if lComponent.ComponentCount &amp;gt; 0 then&lt;br /&gt;        AddToList(lComponent);&lt;br /&gt;      FComponents.Add(lComponent);&lt;br /&gt;    end;&lt;br /&gt;  end;&lt;br /&gt;begin&lt;br /&gt;  FComponents := TComponentList.Create(False);&lt;br /&gt;  AddToList(AContainer);&lt;br /&gt;  FIndex := -1;&lt;br /&gt;end;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Hope I'm not reinventing the wheel. If you know a better solution, please let me know.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-8081598564277535366?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/8081598564277535366/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=8081598564277535366' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/8081598564277535366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/8081598564277535366'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/05/recursive-component-enumerator-in.html' title='Recursive component&amp;#39;s enumerator in Delphi'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-6380493191270065711</id><published>2008-05-09T23:02:00.002-03:00</published><updated>2008-05-09T23:05:29.605-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Essays'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Code is your least problem</title><content type='html'>&lt;p&gt;Most developers think that in order to be a good developer, they need to know 10 different programming languages. I wish real life was that simple. &lt;/p&gt;  &lt;p&gt;When you start working in real life software, problems in the source code are the easiest to solve, the real problems start to hunt you when you need to think about design, or in most cases, when you don't design in the first place. &lt;/p&gt;  &lt;p&gt;Keeping it short, you can't please both Greeks and Trojans. If you try to do that, you can doom your project for that neat little feature you added just because someone asked and you found it cool.&lt;/p&gt;  &lt;p&gt;I just finished reading The Mythical Man Month, it was written in the sixties, back then they didn't have these wonderful ultra high level languages as we do today, but still problems in the design phase were worst than coding problems, can you imagine what is worst than reading memory dumps produced by assembly code?&lt;/p&gt;  &lt;p&gt;I confess that when I started programming, I wanted to write code, and still want, but I realized that rushing straight to the code writing will give you more headaches and make you lose a lot more time than if you take your time and carefully think about what problem you are trying to solve, but still I always rush into it.&lt;/p&gt;  &lt;p&gt;Have you ever get in a discussion that lasted hours and hours and suddenly someone asks &amp;quot;what problem are we trying to solve again?&amp;quot;, usually nobody can answer it.&lt;/p&gt;  &lt;p&gt;Asking yourself what problems you are trying to solve is indeed one of the best ways to be sure that what you are trying to do is worth it, you need to solve problems, not write code, indeed for a developer it is very difficult to solve a problem without writing code, but that would be heaven, personally I find it more enjoyable to delete code, not write it.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;If we wish to count lines of code, we should not regard them as &lt;i&gt;lines produced&lt;/i&gt; but as &lt;i&gt;lines spent&lt;/i&gt;. (Edsger Dijkstra)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Remember, your purpose is to solve people's problem, not write code, if you keep that in mind, you can produce real software which people would really use in real life, which would solve real problems.&lt;/p&gt;  &lt;p&gt;Easier said than done, isn't it?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-6380493191270065711?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/6380493191270065711/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=6380493191270065711' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/6380493191270065711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/6380493191270065711'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/05/code-is-your-least-problem.html' title='Code is your least problem'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-8970809870555073205</id><published>2008-05-04T11:42:00.005-03:00</published><updated>2008-05-04T12:18:34.872-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>How to add syntax highlight to Blogger</title><content type='html'>Adding syntax highlight to blogger is very simple, first of all you need to download &lt;a href="http://code.google.com/p/syntaxhighlighter/downloads/list"&gt;SyntaxHighlighter&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now extract the contents of the package and upload the Scripts and Styles folder to any host or website which can be linked from your blog.&lt;br /&gt;&lt;br /&gt;To make it work, you will need to edit your blog's template and add the following code after the &lt;b&gt;&amp;lt;!-- end outer-wrapper --&amp;gt;&lt;/b&gt; tag:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="javascript"&gt;&lt;br /&gt;&amp;lt;link href='http://[YOUR HOST URL]/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/&amp;gt;&lt;br /&gt;&amp;lt;script language='javascript' src='http://[YOUR HOST URL]/shCore.js'/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script language='javascript'&amp;gt;&lt;br /&gt;dp.SyntaxHighlighter.BloggerMode();&lt;br /&gt;dp.SyntaxHighlighter.HighlightAll('code');&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now you just need to add support for the languages you want, I could just say, just put this bunch of code on your blog's template and it will work, but most people don't post code in several languages, also it's very important to understand what the hell you are doing.&lt;br /&gt;&lt;br /&gt;To add syntax highlight support for python, after the shCore.js line you added before, add this line:&lt;br /&gt;&lt;pre name="code" class="javascript"&gt;&lt;br /&gt;&amp;lt;script language='javascript' src='http://[YOUR HOST URL]/shBrushPython.js'/&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you browse the Scripts folder of the syntaxhighlighter package, you will notice several shBrush*.js files, like shBrushPhp.js, these files are the highlight rules for especific languages, to support other languages, just change the shBrushPython in the above code to your language's specific file and add it to your template.&lt;br /&gt;&lt;br /&gt;Syntaxhighlighter supports pre and textarea tags, but it will &lt;b&gt;not&lt;/b&gt; work automagically, you need to specify that a pre or textarea tag is code and which language the code is.&lt;br /&gt;&lt;br /&gt;To add some python code to your blog use:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;lt;pre name="code" class="python"&amp;gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The list of supported languages and their aliases can be found at the &lt;a href="http://code.google.com/p/syntaxhighlighter/w/list"&gt;syntaxhighlighter wiki&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-8970809870555073205?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/8970809870555073205/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=8970809870555073205' title='35 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/8970809870555073205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/8970809870555073205'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/05/how-to-add-syntax-highlight-to-blogger.html' title='How to add syntax highlight to Blogger'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>35</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-5814782470366202683</id><published>2008-04-23T22:19:00.003-03:00</published><updated>2008-04-23T23:08:20.461-03:00</updated><title type='text'>UsWare, the better way to make software. Better.</title><content type='html'>This week I decided to use the software I'm currently helping develop at my job to control my personal finances.&lt;br /&gt;&lt;br /&gt;I used to control my finances on a spreadsheet and it was a real pain, I've never had a real estimate of anything, I just got very wrong assumptions.&lt;br /&gt;&lt;br /&gt;This experience of using our own software was very constructive, in the first 5 minutes I thought: "how the hell can people use this?", But after a while I noticed that the software is very consistent and it does very well what it is supposed to do.&lt;br /&gt;&lt;br /&gt;In 15 minutes I had about 15 ideas of improvements, some I tried to code right away, others, after some thinking proved not to be worth doing, and others gave ideas for future improvements.&lt;br /&gt;&lt;br /&gt;Being a user of your own software just brings you benefits, you will know it better than anyone else and be user and developer at same time.&lt;br /&gt;&lt;br /&gt;This quote fits perfectly for those developers that treats users as enemies:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;"Know thy self, know thy enemy. A thousand battles, a thousand victories.” Sun Tzu&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;If you write software but don't use it, shame on you!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This post was inspired by: &lt;a href="http://www.codinghorror.com/blog/archives/001066.html"&gt;UsWare vs. ThemWare&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-5814782470366202683?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/5814782470366202683/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=5814782470366202683' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/5814782470366202683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/5814782470366202683'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/04/usware-better-way-to-make-software.html' title='UsWare, the better way to make software. Better.'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-3102475628922511955</id><published>2008-03-27T19:38:00.001-03:00</published><updated>2008-03-27T19:39:16.366-03:00</updated><title type='text'>Delphi 2007 Cheat Sheet</title><content type='html'>This week I started reading the Marco Cantú's Delphi 2007 Handbook, and it inspired me to make this cheat sheet.&lt;br id="sxan"&gt;&lt;br id="qp:0"&gt;I learned several new Delphi 2007 shortcuts that helps a lot to improve productivity.&lt;br id="v8:0"&gt;&lt;br id="oupt"&gt;I made a compilation of the shortcuts which I think are essentials to every Delphi developer.&lt;br id="ugix"&gt;&lt;br id="hybc"&gt;Download: &lt;a title="Delphi 2007 Cheat Sheet.pdf" href="http://www.flash-host.com.br/blog/Delphi2007CheatSheet.pdf" id="et93"&gt;Delphi 2007 Cheat Sheet.pdf&lt;/a&gt; &lt;br id="i46c"&gt;&lt;br id="gucx"&gt;Just a few comments about some of the shortcuts:&lt;br id="e9:0"&gt;&lt;br id="fvt_"&gt;&lt;span id="qz8n"&gt;&lt;b&gt;Ctrl + /&lt;/b&gt;&lt;/span&gt;: This slash is the phisical slash key, it is located on the left side of the right shift key.&lt;br id="pbcz"&gt;&lt;span id="ffux"&gt;&lt;b&gt;Ctrl + O, U: &lt;/b&gt;&lt;/span&gt;&lt;span id="ffux"&gt;This shotcut inverts the case so CaSe becomes cAsE, you have to select the text, press Ctrl + O, release the Ctrl key and then press U&lt;br id="ucf5"&gt;&lt;/span&gt;&lt;br id="i65v"&gt;      &lt;br id="ulzj"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-3102475628922511955?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/3102475628922511955/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=3102475628922511955' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/3102475628922511955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/3102475628922511955'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/03/delphi-2007-cheat-sheet.html' title='Delphi 2007 Cheat Sheet'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-9006775723314264501</id><published>2008-03-11T22:08:00.011-03:00</published><updated>2008-03-20T15:00:30.096-03:00</updated><title type='text'>How to use TortoiseSVN to create a local Subversion repository</title><content type='html'>In my &lt;a href="http://yacoding.blogspot.com/2007/11/how-version-control-works.html"&gt;last post&lt;/a&gt; I explained how version control works, today I'll explain how to create your first local subversion repository using the tortoiseSVN subversion client.&lt;br /&gt;&lt;br /&gt;There are several ways to have a Subversion repository, you can create an open source application and host in &lt;a href="http://code.google.com/hosting/"&gt;Google Project Hosting&lt;/a&gt;, you can sign up for a professional subversion hosting like &lt;a href="http://wush.net/subversion.php"&gt;wush.net&lt;/a&gt;, and you can keep it simple (stupid), and create your own local subversion repository.&lt;br /&gt;&lt;br /&gt;A repository is basically the main subversion database where subversion tracks all modifications you do to any files added to it. So in order to use subversion you need a repositoy.&lt;br /&gt;&lt;br /&gt;First of all you will need the &lt;a href="http://tortoisesvn.net/downloads"&gt;TortoiseSVN client&lt;/a&gt;, just grab it and install.&lt;br /&gt;&lt;br /&gt;After installing it, it will add some new options to you Windows Explorer context menu, so right click in any folder and you will see 2 options, SVN Checkout and a TortoiseSVN sub menu.&lt;br /&gt;&lt;br /&gt;First of all, you will need to create a folder to be your repository, this folder will store a copy of your projects stored in the subversion repository and keep track of their modifications, so create a folder called &lt;span style="font-weight: bold;"&gt;MyRepository&lt;/span&gt; in any place you like.&lt;br /&gt;&lt;br /&gt;After creating the folder, right click on it, go to the TortoiseSVN menu and click on Create Repository Here.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__RT6qeLyUVA/R9czHpf7SlI/AAAAAAAAAYQ/FUP_a6NuXbo/s1600-h/CreateRepository.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/__RT6qeLyUVA/R9czHpf7SlI/AAAAAAAAAYQ/FUP_a6NuXbo/s400/CreateRepository.png" alt="" id="BLOGGER_PHOTO_ID_5176662503177538130" border="0"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's all you need to create a local repository.&lt;br /&gt;&lt;br /&gt;No you will need some code to add to it, so create a folder or just create a folder called temp and a HelloWorld.txt, open the HelloWorld.txt file and type something on it.&lt;br /&gt;Now, right click on the temp folder and on the TortoiseSVN menu, select import.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/__RT6qeLyUVA/R9czy5f7SmI/AAAAAAAAAYY/bhYqMO6iGeM/s1600-h/Import.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/__RT6qeLyUVA/R9czy5f7SmI/AAAAAAAAAYY/bhYqMO6iGeM/s400/Import.png" alt="" id="BLOGGER_PHOTO_ID_5176663246206880354" border="0"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You will need to select where you repository is, to do so, click on the "..." button on the top right corner, and select the &lt;span style="font-weight: bold;"&gt;MyRepository&lt;/span&gt; folder.&lt;br /&gt;&lt;br /&gt;Type Initial Import on the Import Message and click OK.&lt;br /&gt;&lt;br /&gt;I'll explain what you just did, because it can be tricky to understand.&lt;br /&gt;&lt;br /&gt;When you created your Repository, you just created an empty database, and the import you just did, added your project to that database, so now you can access your project using the database and send your changes to the database.&lt;br /&gt;&lt;br /&gt;Create a new folder anywhere and call it &lt;span style="font-weight: bold;"&gt;MyWorkingCode&lt;/span&gt;, now, right click on this folder and select SVN Checkout, this window should pop up:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__RT6qeLyUVA/R9c1Mpf7SnI/AAAAAAAAAYg/35W6Nl0H1ro/s1600-h/Checkout.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/__RT6qeLyUVA/R9c1Mpf7SnI/AAAAAAAAAYg/35W6Nl0H1ro/s400/Checkout.png" alt="" id="BLOGGER_PHOTO_ID_5176664788100139634" border="0"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you did in the import process, click on the top right button and select the &lt;span style="font-weight: bold;"&gt;MyRepository &lt;/span&gt;folder, don't change the checkout directory, now just click the OK  and you will notice that Subversion starts adding your files to your MyWorkingCode folder.&lt;br /&gt;&lt;br /&gt;Notice that now your MyWorkingCode folder has a green icon on it, it means that the source code in that folder wasn't modified and it is exactly how it was on the subversion repository &lt;font style="font-weight: bold;"&gt;when&lt;/font&gt; you checked it out.&lt;br /&gt;&lt;br /&gt;Inside this folder you should find your HelloWorld.txt, change something in this file and save it, after saving you will notice that both the file and the folder containing it will have a red icon on them, that means that they were modified.&lt;br /&gt;&lt;br /&gt;Now you have two options, send those modifications to the database, or revert the stated of the file back to the state it was when you checked it out, it is a very powerfull thing, because now you can just mess everything up and with just a click you have everything back to normal in seconds!&lt;br /&gt;&lt;br /&gt;Try it out, delete the HelloWorld.txt file and after that right click on your MyWorkingCode folder and select Revert on the TortoiseSVN sub menu, click OK on the window that will pop up and feel the power, your file that was deleted was restored!&lt;br /&gt;&lt;br /&gt;Now, Edit your HelloWorld.txt again and save it. After that, right click on you MyWorkingCode folder and select SVN Commit, you will notice that a Window will pop up and in the bottom panel, you will see your modified File, double click on it, you should see this window:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/__RT6qeLyUVA/R9c4mJf7SoI/AAAAAAAAAYo/Aug7XfaYQ00/s1600-h/Merge.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/__RT6qeLyUVA/R9c4mJf7SoI/AAAAAAAAAYo/Aug7XfaYQ00/s400/Merge.png" alt="" id="BLOGGER_PHOTO_ID_5176668524721687170" border="0"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It shows the differences between your working file and the state the file was when you checked it out, just close this window and click on the OK button in the Commit window, it will send your modifications to the database and show the new revision number, this means that now you have 2 versions of this file on the repository, and you can get them at any time, just checking out the specific revision, and also you can revert the file to any past revision you like.&lt;br /&gt;&lt;br /&gt;For now it's just it, I don't want to scare you as I was scared by the SVN Book, so I'll try to post a better explanation of commit and other subversion features in a near future, stay tunned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-9006775723314264501?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/9006775723314264501/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=9006775723314264501' title='23 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/9006775723314264501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/9006775723314264501'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/03/how-to-use-tortoisesvn-to-create-local.html' title='How to use TortoiseSVN to create a local Subversion repository'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__RT6qeLyUVA/R9czHpf7SlI/AAAAAAAAAYQ/FUP_a6NuXbo/s72-c/CreateRepository.png' height='72' width='72'/><thr:total>23</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-658469880984422553</id><published>2008-03-10T18:56:00.001-03:00</published><updated>2008-10-16T11:24:33.017-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Essays'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>How version control works</title><content type='html'>I can't believe how stupid I was for not using a version control software since I started programming, I was always lazy about reading about it, also the &lt;a href="http://svnbook.red-bean.com/" target="_blank"&gt;SVN Book&lt;/a&gt; scared me do death.&lt;br /&gt;&lt;br /&gt;First of all you will need to understand what version control really means.&lt;br /&gt;&lt;br /&gt;You can find a lot of information about version control, but sometimes they are too extensive or maybe too complicated for beginners, I don't know if when people write about it they want to scare the begginners so they can learn the hard way as I did, but anyway I'll try explain with my own words, how version control works.&lt;br /&gt;&lt;br /&gt;Every developer who has written more than "hello world" applications have faced this kind of situation:&lt;br /&gt;&lt;br /&gt;You have a software that says that 1 plus 1 is 2, and then you change some stuff and it start saying that 1 plus 1 is -1, well, you changed a lot of stuff and it was working yesterday, but today you can make it work anymore, and also you changed so many things that it is almost impossible to figure out what caused the problem, it would be nice to have something to say what was changed since yesterday so you can quickly get a clue about what went wrong and what modification added the bug.&lt;br /&gt;&lt;br /&gt;Well, version control could do that for you...&lt;br /&gt;&lt;br /&gt;Now another situation, what if you accidentally deleted a file by mistake? What are you going to do? Search for backups? What if your backup is one week old and you changed a lot of stuff since then, well I guess you will have to do everything again, good luck.&lt;br /&gt;&lt;br /&gt;Even people who already use version control sometimes don't know about everything it can do and how it really works.&lt;br /&gt;&lt;br /&gt;First of all you need to understand that version control just stores the differences of your files, it creates a database and after you add a file for the first time, from that point on, every time you modify it, it will store only the difference of the current file to the previous state, so you can get the original file any time you want, and also based on this, you can always keep track of every modification and restore a file to any state it once was.&lt;br /&gt;&lt;br /&gt;Also, version control never removes anything, so even if you delete a file, you can always restore it from a previous point where it still existed.&lt;br /&gt;&lt;br /&gt;Imagine a timeline, with version control you can just go back to a point in time when that file still existed and restore it, nice isn't it?&lt;br /&gt;&lt;br /&gt;Most people start using version control after the first time they need to work with someone else in the same source code, because it's practically impossible to work in a team, modifying the same source code without version control.&lt;br /&gt;&lt;br /&gt;Did you notice that I didn't talk about any advantages version control has when working in teams, well, Its because that is not the idea behind this post.&lt;br /&gt;&lt;br /&gt;For some time now, I've been keeping a local &lt;a href="http://subversion.tigris.org/" target="_blank"&gt;subversion&lt;/a&gt; repository for all my personal application, even the useless ones, because every once in a while you need to do something in real life that you already did in some useless test application that you garbaged, if you have that piece of code in subversion, it's just a matter of minutes do find it, instead of losing some hours doing it again.&lt;br /&gt;&lt;br /&gt;To learn how to create your own subversion repository, please read: &lt;a href="http://yacoding.blogspot.com/2008/03/how-to-use-tortoisesvn-to-create-local.html"&gt;How to use TortoiseSVN to create a local Subversion repository&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-658469880984422553?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/658469880984422553/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=658469880984422553' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/658469880984422553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/658469880984422553'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/11/how-version-control-works.html' title='How version control works'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-5725297766697477567</id><published>2008-03-10T18:44:00.001-03:00</published><updated>2008-03-10T18:46:34.664-03:00</updated><title type='text'>Blogs and chitchat</title><content type='html'>This week I unsubscribed from several blogs I used to read because of the excessive chitchat.&lt;br /&gt;&lt;br /&gt;I noticed that after becoming famous, a lot of blogs started posting useless and repetitive stuff just to keep the blog updated, and that resulted in poor content which doesn't add anything to my life, so I just kicked their asses and unsubscribed from the rss.&lt;br /&gt;&lt;br /&gt;One of the reasons this blog kinda died, is because after deciding to just post here about something that can add something to the reader's life (which is not the case with this post), I just got out of ideas.&lt;br /&gt;&lt;br /&gt;When I ask myself "will this add something to people's life?" the answer is no and as I'm too lazy to just post it anyway, I just forget about it.&lt;br /&gt;&lt;br /&gt;But maybe, just maybe, I'm thinking the wrong way, maybe my ideas just don't add something to MY life, but it could be helpful to someone out there, and as now I just have a few things to read in my rss read, I think I can use some spare time to post some chitchat here too, who knows?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-5725297766697477567?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/5725297766697477567/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=5725297766697477567' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/5725297766697477567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/5725297766697477567'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2008/03/blogs-and-chitchat.html' title='Blogs and chitchat'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-962594116049746368</id><published>2007-11-01T00:05:00.000-02:00</published><updated>2007-11-01T00:29:43.313-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>How not to write code: The evils of duplication</title><content type='html'>I had to do some maintenance on some old php code and saw the following code:&lt;br /&gt;&lt;br /&gt;&lt;img style="text-align: center;" src="http://flash-host.com.br/blog/sql_before.jpg" alt="before" /&gt;&lt;br /&gt;&lt;br /&gt;Just by looking at it you can see 3 things:&lt;br /&gt;&lt;br /&gt;1 - Everything is duplicated&lt;br /&gt;2 - It was copied and pasted.&lt;br /&gt;3 - The field names sux.&lt;br /&gt;&lt;br /&gt;Well, guess what, I wrote that code. period.&lt;br /&gt;&lt;br /&gt;But now when I look at it, it is disgusting. I'm violating the &lt;a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself" target="blank"&gt;DRY&lt;/a&gt; (Don't repeat yourself) principle and also suffering from the &lt;a href="http://www.pragprog.com/the-pragmatic-programmer/extracts/toc" target="_blank"&gt;evils of duplication&lt;/a&gt;, because I needed to add one field in that select, and if I didn't refactor I would have to add the field 3 times!&lt;br /&gt;&lt;br /&gt;But as I'm &lt;a href="http://www.codinghorror.com/blog/archives/000530.html" target="_blank"&gt;sucking less&lt;/a&gt; now I took some minutes and refactored the code, here is what the code looks like after a quick and little refactoring:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://flash-host.com.br/blog/sql_after.jpg" alt="before" /&gt;&lt;br /&gt;&lt;br /&gt;Still not perfect, but way better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-962594116049746368?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/962594116049746368/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=962594116049746368' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/962594116049746368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/962594116049746368'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/11/how-not-to-write-code-evils-of.html' title='How not to write code: The evils of duplication'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-3201399992619681301</id><published>2007-10-30T20:42:00.000-02:00</published><updated>2007-11-06T01:38:01.501-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Why do we need www?</title><content type='html'>&lt;span style="font-weight:bold;"&gt;/RANT ON&lt;/span&gt;&lt;br /&gt;I'm not talking about the world wild west, I'm talking about why the hell do we need to type www to enter a website?&lt;br /&gt;&lt;br /&gt;Try acessing: &lt;a href="http://acer.com" target="_blank"&gt;acer.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It didn't work did it?&lt;br /&gt;&lt;br /&gt;Now try &lt;a href="http://www.acer/com" target="_blank"&gt;www.acer.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So you ask yourself what's so complicated about it?&lt;br /&gt;&lt;br /&gt;Well, I dare to say &lt;span style="font-weight:bold;"&gt;lazyness&lt;/span&gt;, yes when you try acessing something without www and it doesn't work, you can call the webmaster a stupid lazy bastard, because that's what he is.&lt;br /&gt;&lt;br /&gt;So if you are a webmaster, I'll teach you how to solve it, just change your Virtual Host * section on apache.conf or httpd.conf from this:&lt;br /&gt;&lt;pre&gt;  DocumentRoot /home/www/web&lt;br /&gt;  ServerName www.example.com&lt;/pre&gt;&lt;br /&gt;to this:&lt;br /&gt;&lt;pre&gt;  DocumentRoot /home/www/web&lt;br /&gt;  ServerName www.example.com&lt;br /&gt;  ServerAlias example.com&lt;/pre&gt;&lt;br /&gt;Did you notice that I just added this line: &lt;span style="font-weight:bold;"&gt;ServerAlias example.com&lt;/span&gt; that's everything you need to solve this stupid problem and spare your users of typing 3 useless letters to access your website.&lt;br /&gt;&lt;br /&gt;I still don't understand why there are some many sites out there that aren't accessible without www, it's so stupid.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;/RANT OFF&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-3201399992619681301?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/3201399992619681301/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=3201399992619681301' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/3201399992619681301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/3201399992619681301'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/10/why-do-we-need-www.html' title='Why do we need www?'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-2881620220561978846</id><published>2007-10-30T13:44:00.000-02:00</published><updated>2007-10-30T13:10:17.271-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Tool: Delete Files Older than X days in Windows</title><content type='html'>Here is a little tool I wrote to delete files older than X days in windows, in linux we have several ways for doing that but I couldn't find any easy solutions on windows, so I opened up my Visual Studio and it took me about 5 minutes to write it.&lt;br /&gt;&lt;br /&gt;As I think this tool can be useful, I'm sharing it, use it at your own risk.&lt;br /&gt;&lt;br /&gt;I'm also sharing the source code, it is stupid but feel free to improve it, just remember to send me a copy of the improved version.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://flash-host.com.br/blog/DelOldFiles.exe"&gt;DelOldFiles.exe&lt;/a&gt; (requires .NET 2.0)&lt;br /&gt;&lt;a href="http://flash-host.com.br/blog/DelOldFiles_src.rar"&gt;Source Code&lt;/a&gt; (Visual Studio 2008 project)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-2881620220561978846?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/2881620220561978846/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=2881620220561978846' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2881620220561978846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2881620220561978846'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/10/tool-delete-files-older-than-x-days-in.html' title='Tool: Delete Files Older than X days in Windows'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-1265941022572554660</id><published>2007-10-22T11:46:00.000-02:00</published><updated>2007-10-30T13:11:20.887-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>Howto: Schedule SQlServer Express backup</title><content type='html'>I was assigned with the task of maintaining a VPS server that hosts our bugtracking system and internal management software.&lt;br /&gt;&lt;br /&gt;As there was a new version of our bugtracking system (&lt;a href="http://www.fogcreek.com" target="_blank"&gt;fogbugz&lt;/a&gt;) available I was asked to update it.&lt;br /&gt;&lt;br /&gt;The update process is very simple, it has an installer and you just have to click, next, next and finish, but as I don't like doing anything without backing up first, and as our SQLServer doesn't have a daily backup set up (aside from the full system backup, which I particularly don't trust), so I decided to set up a daily backup.&lt;br /&gt;&lt;br /&gt;The first problem was figure out how sqlserver backup works, I found this nice article: &lt;a href="http://www.sqldbatips.com/showarticle.asp?ID=29" target="_blank"&gt;Automating Database maintenance in SQL 2005 Express Edition Part II&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It worked flawlessly, but there was a problem, each backup took more than 1.5GB, we don't have much disk space and in my opinion keeping just one daily backup is as useless as no backup at all. I had to get my hands dirty and write a batch script to compact the backup and delete the backup files older than 7 days.&lt;br /&gt;&lt;br /&gt;Compacting the files wasn't a problem, as winrar comes with a command line utility (rar.exe) it was easy to set up a command line to compact the backup files, just using rar.exe /? is enough to find out how to compact a set of files in command line, which was basically:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;rar.exe a file.rar c:\FilesToAdd\*.* -r&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But the real problem was how to delete the backups older than 7 days, I found several solutions in google, but none worked as I expected, some used vbscripts, other used batch scripts (which proved to be very dangerous), but none solved my problem, so I decided to write my own application to delete files older than 7 days, and in less than 10 minutes my problem was solved.&lt;br /&gt;&lt;br /&gt;The application to download files older than X days can be found &lt;a href="http://yacoding.blogspot.com/2007/10/tool-delete-files-older-than-x-days-in.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-1265941022572554660?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/1265941022572554660/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=1265941022572554660' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/1265941022572554660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/1265941022572554660'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/10/howto-schedule-sqlserver-express-backup.html' title='Howto: Schedule SQlServer Express backup'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-1584563571935404316</id><published>2007-10-17T06:28:00.000-02:00</published><updated>2007-11-06T01:34:55.602-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>Howto: Write unmaintainable code</title><content type='html'>This post is inspired by &lt;a href="http://freeworld.thc.org/root/phun/unmaintain.html" target="_blank"&gt;How To Write Unmaintainable Code&lt;/a&gt; Ensure a job for life ;-) by Roedy Green.&lt;br /&gt;&lt;br /&gt;But rater I'd call it: &lt;span style="font-weight:bold;"&gt;How To Write Unmaintainable Code ensure headaches for life&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Well, I started programming when I was 15 years old, and since then I've learned a lot,  and almost all I learned since then (except the very basics, which I learned at school) I learned by myself, I read a lot and I really enjoy programming, which helps, because as I code for fun I learn and have fun at same time.&lt;br /&gt;&lt;br /&gt;And I lost almost all of my oldest codes. I wrote I game like space invaders using clipper once, and for what I can remember it's the code I regret most to have lost.&lt;br /&gt;&lt;br /&gt;But these kind of code you write for fun, you don't have to maintain, even if it is a piece of shit, who cares? it's just dead code.&lt;br /&gt;&lt;br /&gt;But the real problem starts when other people starting using your code, because you can't just trash it, and that's a big problem.&lt;br /&gt;&lt;br /&gt;And 4 or 5 years ago, I dropped clipper and start with php, even php being a modern language it still have many problems, and one of these problems is that it is easy too learn, and it attracts a lot of newbies, like me, who you should have guessed got attracted by it's simplicity (please forgive me for using this word to describe php) and easy learning.&lt;br /&gt;&lt;br /&gt;And what happens when a newbie join forces with other newbies to learn a language? Nothing good, I'm sure.&lt;br /&gt;&lt;br /&gt;As clipper was a procedural language and I didn't have a clue what OOP was at that time, I started writing spaghetti code at speed of light, and that was not a good idea.&lt;br /&gt;&lt;br /&gt;1 or 2 years after that I found myself a full time job as a php developer, or maybe you should call it, php code typer.&lt;br /&gt;&lt;br /&gt;And man, I'm fucking proud of it, because even with spaghetti code I was able to write a web based software by myself which works flawlesslly and also was a passport to my new job.&lt;br /&gt;&lt;br /&gt;But when you write unmaintainable code, you can be sure that it will be back to hunt you, and it started hunting me as soon as I quit that job, and till now (8 months later) I am the only one maintaining it, not that it is impossible to maintain, but it is so freaking complex, that every new php programmer (aka newbie) that looks at it says, holy shit!&lt;br /&gt;&lt;br /&gt;Why do I think this code is unmaintainable? Well, I spent more that one hour reading my own code trying to understand what that fuck some piece of code did, and after understanding it I asked myself, why the fuck I wrote that?&lt;br /&gt;&lt;br /&gt;And as the spaghetti code quantity grows, it becomes I snow ball, if you try to refactor it, you will spend a lot of time with the risk of breaking what is working, if you just keeps writing code crazily you will end up in a dead end some day, and if you try to write the new code in a better way, well it will help a little, but your software will be like when you make a collage with letters cut off from a newspaper, b-e-a-u-t-i-f-u-l.&lt;br /&gt;&lt;br /&gt;Anyway, don't blame for skipping the topic, this is a blog damnit! So I got carried away. Sorry :)&lt;br /&gt;&lt;br /&gt;The purpose of this post was to give a simple advice, before writing code, please take your time, hold your breath, and read something about coding quality, design patterns, or general programming books, and be sure to at least read the &lt;a href="http://www.pragprog.com/the-pragmatic-programmer" target="_blank"&gt;Pragmatic Programmer&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm sure it will open your eyes and make you write better code, because I knew (and Know) a lot of potencial programmers that get stuck in a company which doesn't care about code quality, and thinks that code quantity is equals code quality, and it's a shame that these companies sometimes make these good programmers rot into oblivion.&lt;br /&gt;&lt;br /&gt;I left my last company and moved to another one, starting with a lower salary, the new company is in another city so I had to move and I spend money with rent and households stuff, but man, it was the best thing I did. I've learned a lot in this past 8 months, I can use my full potential here to learn new stuff and write better software, I don't have to be stuck 8 hours a day writing spaghetti code, because I can spend half hour researching and write a 10 line code in some minutes that will do the same work, and better.&lt;br /&gt;&lt;br /&gt;If advice was good, we would sell it, not give, but here is a little piece of advice.&lt;br /&gt;&lt;br /&gt;If you spend more than some minutes to understand some code (specially if it's your code), it's got to have something wrong, so think carefully about it, can it be better? Will you understand it if you read it again after 2 months? Can you really copy and paste code without any punishment? Will you be able to reuse the code?&lt;br /&gt;&lt;br /&gt;Well, if you ask this kind of questions to yourself, I can asure you that you will not regret it in the future, I wonder what my code would be like if I had asked these questions to my self in the first place... I'm sure that I wouldn't spend 1 hour to understand it and also I wouldn't be here writing this stupid post.&lt;br /&gt;&lt;br /&gt;Anyway, if you read everything till here, thank you, but if you just read this last line, go to hell, because this is the first sin of "spaghetti code writers", they don't like reading.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-1584563571935404316?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/1584563571935404316/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=1584563571935404316' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/1584563571935404316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/1584563571935404316'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/10/howto-write-unmaintainable-code.html' title='Howto: Write unmaintainable code'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-9207712353570981165</id><published>2007-10-17T04:41:00.000-02:00</published><updated>2007-10-17T04:51:55.989-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Conditional Formatting on Google Docs, farewell excel.</title><content type='html'>At last conditional formatting was added to Google Docs, if you don't know what I'm talking about, conditional formatting is used to change the formatting of a certain cell based on some user defined conditions, for example, you can make a cell's text automatically become red when the number in another cell is negative.&lt;br /&gt;&lt;br /&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;" src="http://1.bp.blogspot.com/__RT6qeLyUVA/RxWvdxk6g1I/AAAAAAAAAWE/kRqOv9cqNtI/s400/conditional_formatting.jpg" border="0" alt="ScreenShot" id="BLOGGER_PHOTO_ID_5122193077263041362" /&gt;&lt;br /&gt;&lt;br /&gt;This is one of excel's features I missed most in Google Docs, but now I think it's time to say farewell to excel, for good.&lt;br /&gt;&lt;br /&gt;You can read more about this &lt;a href="http://documents.google.com/support/spreadsheets/bin/answer.py?answer=78413&amp;hl=en" target="_blank"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-9207712353570981165?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/9207712353570981165/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=9207712353570981165' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/9207712353570981165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/9207712353570981165'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/10/conditional-formatting-on-google-docs.html' title='Conditional Formatting on Google Docs, farewell excel.'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__RT6qeLyUVA/RxWvdxk6g1I/AAAAAAAAAWE/kRqOv9cqNtI/s72-c/conditional_formatting.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-4081571819643854273</id><published>2007-10-12T18:23:00.000-03:00</published><updated>2007-10-12T18:31:54.637-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Writing a Text Files Line Counter in C#</title><content type='html'>A friend asked me today if I knew an application that could count all the lines in all .php files in a directory, and my answer was no, but I can make one in five minutes, and thats all it took.&lt;br /&gt;&lt;br /&gt;Bellow is the code, it's so simple that I'm lazy to explain, enjoy:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;DirectoryInfo dInfo = new DirectoryInfo(args[0]);&lt;br /&gt;FileInfo[] Files = dInfo.GetFiles("*.php");&lt;br /&gt;int i = 0;&lt;br /&gt;foreach (FileInfo fInfo in Files)&lt;br /&gt;{&lt;br /&gt;  string[] temp = File.ReadAllLines(fInfo.FullName);&lt;br /&gt;  i += temp.Length;&lt;br /&gt;}&lt;br /&gt;Console.WriteLine("Total Lines: " + i);&lt;br /&gt;Console.ReadLine();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It's dirty but it works, if you have a better solution, please comment, I'll be pleased to learn a better way to do this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-4081571819643854273?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/4081571819643854273/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=4081571819643854273' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4081571819643854273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4081571819643854273'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/10/writing-text-files-line-counter-in-c.html' title='Writing a Text Files Line Counter in C#'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-2965497196183757751</id><published>2007-09-18T18:15:00.000-03:00</published><updated>2007-09-18T18:24:58.642-03:00</updated><title type='text'>How Google Docs works in real life</title><content type='html'>Today along with the announcement of the brand new &lt;a href="http://googleblog.blogspot.com/2007/09/our-feature-presentation.html" target="_blank"&gt;presentation support&lt;/a&gt; in &lt;a href="http://docs.google.com" target="_blank"&gt;Google Docs&lt;/a&gt;, which you should already know about by now, the &lt;a href="http://googleblog.blogspot.com/" target="_blank"&gt;Official Google Blog&lt;/a&gt; posted a nice video explaining the idea behind Google Docs, and how it works in real life.&lt;br /&gt;&lt;br /&gt;This video is very simple, but is very interesting, enjoy:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;object width="425" height="366"&gt;&lt;param name="movie" value="http://www.youtube.com/v/eRqUE6IHTEA&amp;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/eRqUE6IHTEA&amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="366"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-2965497196183757751?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/2965497196183757751/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=2965497196183757751' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2965497196183757751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2965497196183757751'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/how-google-docs-works-in-real-life.html' title='How Google Docs works in real life'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-2321800714202537841</id><published>2007-09-17T18:30:00.000-03:00</published><updated>2007-09-17T19:12:47.845-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Working inside a Virtual Machine</title><content type='html'>I've been thinking about this for a while now, and last friday I decided to make a development environment inside a Virtual Machine, in my point of view it has more advanges than disadvantages.&lt;br /&gt;&lt;br /&gt;Actually I'm working most with Delphi 2006, and if you already used it, you may know that this thing is a memory eater like nothing else, and also it sucks out a lot of cpu power (maybe it has a &lt;a href="http://folding.stanford.edu/" target="_blank"&gt;folding@home&lt;/a&gt; client running inside it, because I've always wondered why it needs so much cpu power to make autocomplete works, but anyway...).&lt;br /&gt;&lt;br /&gt;So the main concern of most people is the application performance when running inside the Virtual Machine, I'm not going to lie, it isn't 100% the speed of a native operating system running on real hardware, but it is, believe me, a lot faster than you may think.&lt;br /&gt;&lt;br /&gt;But I'll leave the speed for a later post because I didn't have enough time to work on it to see how it really performs on a real coding routine, but for now I'll leave the first impressions and the pros and cons (in my opinion) about having a development environment inside a Virtual Machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Pros:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1 - Very easier to backup up a full working environment, so if you screw up, or have some hardware failures, you can go back to work in no time.&lt;br /&gt;&lt;br /&gt;2 - Transportable, you can always carry your Virtual Machine inside a portable Hard Drive and work from any computer.&lt;br /&gt;&lt;br /&gt;3 - You can share it with your co-workers, if someone needs to work on your project, but doesn't have the tools, components or whatever it needs to compile installed, you can just hand him a copy of your VM and he will be able to begin working instantaneously.&lt;br /&gt;&lt;br /&gt;4 - Safer, if use your VM just to work with the tools you need, and don't install any  crap you find on the internet on it, it will be harder to screw it up, because most people are always installing a lot of crap they find on the internet on their pcs, and it can fuck up everything.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Cons:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1 - You will need a fast pc, with at least 2GB of ram, and the VM will most likely eat half of it.&lt;br /&gt;&lt;br /&gt;2 - It is a bit slower than native OS on real hardware.&lt;br /&gt;&lt;br /&gt;3 - It uses a lot more disk space, because you will have to install windows or whichever OS you use in the Virtual Machine, and it uses a lot of space.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, if you have a similar experience, or think I'm just talking bullshit, post a comment, so I can learn more about it and be sure I'm doing the right thing, because what I want with this is to have a safer work environment which I can be sure that will always be available, and will save me of the headache that is installing everything from scratch over and over again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-2321800714202537841?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/2321800714202537841/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=2321800714202537841' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2321800714202537841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2321800714202537841'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/working-inside-virtual-machine.html' title='Working inside a Virtual Machine'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-4551999959885754761</id><published>2007-09-14T21:29:00.001-03:00</published><updated>2008-10-25T04:29:30.766-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>Javascript: Send Tab key on Enter.</title><content type='html'>I just finished doing some dirty work in javascript, and it's some interesting stuff.&lt;br /&gt;&lt;br /&gt;The problem was with a software I wrote in PHP for the previous company I used to work,  a user bought a bar code reader and wanted to use it with the software, but the stupid bar code reader sends an "Enter" key after it reads the bar code, so the software submited the form and the user got really pissed.&lt;br /&gt;&lt;br /&gt;Anyway, the solution was this piece of code:&lt;br /&gt;&lt;pre class="javascript" name="code"&gt;function getIndex(input)&lt;br /&gt;  {&lt;br /&gt;    var index = -1, i = 0, found = false;&lt;br /&gt;    while (i &lt; input.form.length &amp;&amp; index == -1)&lt;br /&gt;      if (input.form[i] == input)index = i;&lt;br /&gt;      else i++;&lt;br /&gt;    return index;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;function SendTab(objForm, , strField, evtKeyPress)&lt;br /&gt;{&lt;br /&gt;  var aKey = evtKeyPress.keyCode ?&lt;br /&gt;    evtKeyPress.keyCode :evtKeyPress.which ?&lt;br /&gt;      evtKeyPress.which : evtKeyPress.charCode;&lt;br /&gt;&lt;br /&gt;  if (aKey == 13)&lt;br /&gt;  {&lt;br /&gt;    objForm[(getIndex(objForm[strField])+1) % objForm.length].focus();&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;I found most part of this solution on google and just adapted it to my needs, sorry about not giving the credits to the author, but I got pieces of code from a lot of places and can't find them again, if you are the author of some of this code, please let me know.&lt;br /&gt;&lt;br /&gt;To use it, just put this on your input code:&lt;br /&gt;&lt;pre class="javascript" name="code"&gt;&lt;br /&gt;onkeypress="return SendTab(document.forms['f'], 'yourfieldname', event);"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It will process the "Enter" key as a Tab and go to the next input.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-4551999959885754761?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/4551999959885754761/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=4551999959885754761' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4551999959885754761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4551999959885754761'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/javascript-send-tab-key-on-enter.html' title='Javascript: Send Tab key on Enter.'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-4402907406235269259</id><published>2007-09-12T09:53:00.000-03:00</published><updated>2007-09-12T13:09:21.283-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Tip: Debug using watches</title><content type='html'>if you are developer or just a coder wannabe like me, you may know that usually it takes more time to debug and correct errors then to write the code itself.&lt;br /&gt;&lt;br /&gt;So it is essential to always try a better and more improved way of debugging, and always know what your development tool or ide can offer you.&lt;br /&gt;&lt;br /&gt;When I worked with php, debugging was a serious problem, because I didn't use any ide or debugger, just a raw text editor, sometimes I had to do some ninja stuff to find bugs, like adding a var_dump everywhere to find out where the bug was, good old times...&lt;br /&gt;&lt;br /&gt;But now as I'm working with Delphi and Visual Studio I have better tools, but is having a plane worth something if you can't fly it? Hell no!&lt;br /&gt;&lt;br /&gt;So, I'll give a tip to beginners who still don't use watches, because they help a lot.&lt;br /&gt;&lt;br /&gt;If you are not a beginner, but don't use watches, shame on you!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Watches:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;I don't know exactly how to define it but it is a debugger feature that keep watching your variable and object values (ok, that is obvious but at least I tried).&lt;br /&gt;&lt;br /&gt;An example is easier to understand:&lt;br /&gt;&lt;br /&gt;Imagine that you have a loop that in each iteration increments the variable I with some value. You can just add a breakpoint after the increment and pass the mouse over it can't you? But it is a pain isn't it? what if your loop takes 100 iterations and you have 2 variables? You are gonna make a hole in you desk from moving you mouse back and forth to see the value of each variable.&lt;br /&gt;&lt;br /&gt;Watches make this task much simpler, almost all modern IDEs have Watches, to add a watch often you need to right click the variable or object and select Add Watch, or in the debug window  you click in Add Watch or New Watch and type the variable name... but how doest it work?&lt;br /&gt;&lt;br /&gt;Lets imagine that you have the variables I and K in a loop, if you add a watch to each one, and add a breakpoint inside the loop, when the debuger stops on the breakpoint, the values of K and I will show up in the watches window, so you can see and navigate through the values (if it is an object) without using the mouse or dumping de variable on the a terminal.&lt;br /&gt;&lt;br /&gt;Here an example of a watch window in Visual Studio, isn't it easier to see the values?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__RT6qeLyUVA/Ruf3_FuEEUI/AAAAAAAAAV8/CLw9oCCPvb8/s1600-h/watch1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/__RT6qeLyUVA/Ruf3_FuEEUI/AAAAAAAAAV8/CLw9oCCPvb8/s400/watch1.png" alt="" id="BLOGGER_PHOTO_ID_5109324965514318146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Off course this is a very very stupid example, watches become more and more powerfull as the code complexity grows.&lt;br /&gt;&lt;br /&gt;Keeping it short, If you don't use it, you should try it out right now, because it can save a hell lot of time when debugging!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-4402907406235269259?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/4402907406235269259/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=4402907406235269259' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4402907406235269259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4402907406235269259'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/tip-debug-using-watches.html' title='Tip: Debug using watches'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__RT6qeLyUVA/Ruf3_FuEEUI/AAAAAAAAAV8/CLw9oCCPvb8/s72-c/watch1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-2326611099382386032</id><published>2007-09-06T10:57:00.000-03:00</published><updated>2007-09-06T11:27:22.763-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='delphi'/><title type='text'>Delphi UI design, a nightmare for any coder</title><content type='html'>Just a quick post to yell about how boring it is to design User Interfaces, I had to do something simple, add a tab inside a window then add a Toolbar and a grid inside it...&lt;br /&gt;&lt;br /&gt;First I spent a lot of time trying to figure out how to make the stupid toolbar dock inside the tab, but I did it, but as I always do, I forgot to add everything inside a GroupBox! Crap!&lt;br /&gt;&lt;br /&gt;At this time I was already really really pissed of, then I tried to add the GroupBox but anything wanted to go inside the GroupBox, Cutting and Pasting didn't work, I was becoming more and more pissed off...&lt;br /&gt;&lt;br /&gt;And when I get pissed I try to stay calm and think "isn't there a better way to do this?" then I get those Aha! moments, so I tought, if Delphi isn't helping me, let's do it in a more fun way, then  I just opened the dfm code, that luckly is a very simple hierarchy, and everything was in place in less than 30 seconds.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So the tip is, sometimes the UI designer just keeps getting in you way and its better to just open up some code editor and do it by hand (so much funnier), but you need to KNOW what are you doing, otherwise you will just fuck everything up!&lt;br /&gt;&lt;br /&gt;Delphi's dfm file are organized in a very very simple hierachy, it is something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;object Frame1: TFrame&lt;br /&gt; object Panel1: TPanel&lt;br /&gt;   object EditInicio: TcxDateEdit&lt;br /&gt;     Left = 67&lt;br /&gt;     Top = 5&lt;br /&gt;     TabOrder = 0&lt;br /&gt;     Width = 100&lt;br /&gt;   end&lt;br /&gt; end&lt;br /&gt;end&lt;/pre&gt;&lt;br /&gt;So in this case, there is a TFrame and inside it a Panel and inside the Panel a cxDateEdit, it you want to move the DateEdit inside the Frame1, you just need to do this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;object Frame1: TFrame&lt;br /&gt; object EditInicio: TcxDateEdit&lt;br /&gt;   Left = 67&lt;br /&gt;   Top = 5&lt;br /&gt;   TabOrder = 0&lt;br /&gt;   Width = 100&lt;br /&gt; end&lt;br /&gt; object Panel1: TPanel&lt;br /&gt; end&lt;br /&gt;end&lt;/pre&gt;&lt;br /&gt;Simple isn't it? The problem is to know when to stop trying to make something quicker using a UI designer that actually slows you down, and when to just open up the source code and just hack!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-2326611099382386032?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/2326611099382386032/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=2326611099382386032' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2326611099382386032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/2326611099382386032'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/delphi-ui-design-nightmare-for-any.html' title='Delphi UI design, a nightmare for any coder'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-1970425517109858772</id><published>2007-09-04T16:19:00.003-03:00</published><updated>2007-09-04T16:19:53.015-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Lesson 8: Conditionals</title><content type='html'>Today we are gonna learn one of the most important and most used things in computer programming, conditionals.&lt;br /&gt;&lt;br /&gt;Conditionals are used to make your program follow a certain path if some of the conditions are match, I'll give an example based on our daily life, imagine the necessary actions for you to brush your teeth, take the toothbrush, take the toothpaste, put a little bit of toothpaste on the toothbrush.&lt;br /&gt;&lt;br /&gt;Now imagine that we want to make a robot to automatize these actions, how do we program your robot, something like this:&lt;br /&gt;&lt;pre&gt;Take the toothbrush&lt;br /&gt;Take the toothpaste tube&lt;br /&gt;Open the toothpaste tube&lt;br /&gt;Put some toothpaste on the toothbrush&lt;br /&gt;Close the toothpaste tube&lt;/pre&gt;&lt;br /&gt;Everything seems simple, but I'm gonna make it more complicated, what would this robot do if the tooth paste is already open? Will it pick up the tube and try to open it, or will it try opening the tube that is already open, or maybe it will crash.&lt;br /&gt;&lt;br /&gt;This can look obvious for us, but in case the tube is already open we know that we don't need to open it, but the robot doesn't think like us.&lt;br /&gt;&lt;br /&gt;It's in cases like this that we need the conditionals, to write a better robot program we need to use conditionals so it can executed the proper action based on some environment conditions, let's rewrite our robot actions, but now adding conditionals.&lt;br /&gt;&lt;pre&gt;Take the toothpaste tube&lt;br /&gt;&lt;br /&gt;If the toothpaste tube end is closed&lt;br /&gt;   Open the end&lt;br /&gt;   Hold the end&lt;br /&gt;&lt;br /&gt;Put some toothpaste on the toothbrush&lt;br /&gt;&lt;br /&gt;If holding the end&lt;br /&gt;   Close the end&lt;/pre&gt;&lt;br /&gt;Notice that the action "open the end" is some spaces to the right, I used those spaces to illustrate that this action will be executed just if the line before is is match, in programming these spaces are called indentation, and as we will see on the next lesson, they are very important in Python!&lt;br /&gt;&lt;br /&gt;Now let's try making our program better, let's presume you want your robot to beep and stop when you are out of toothpaste, who would we do that?&lt;br /&gt;&lt;br /&gt;Again, being out of toothpaste is a condition, let's see how the program would look like:&lt;br /&gt;&lt;pre&gt;Take the toothpaste tube&lt;br /&gt;&lt;br /&gt;If the toothpaste tube is empty&lt;br /&gt;   Beep&lt;br /&gt;Else&lt;br /&gt;   If the toothpaste tube end is closed&lt;br /&gt;       Open the end&lt;br /&gt;       Hold the end&lt;br /&gt;&lt;br /&gt;   Take the toothbrush&lt;br /&gt;   Put some toothpaste on the toothbrush&lt;br /&gt;&lt;br /&gt;   If holding the end&lt;br /&gt;       close the end&lt;/pre&gt;&lt;br /&gt;Notice that our robot will only work if the toothpaste tube isn't empty, it will test if the toothpaste tube is empty, it if is, it will just stop, if it's not it will execute what is inside the "Else", and if the end is open it will just put some toothpaste on the toothbrush and will not open the end, and if it's not holding the end it will not close the end.&lt;br /&gt;&lt;br /&gt;This lesson was just theory, but this theory is very important, so in case you have any doubts, comment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-1970425517109858772?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/1970425517109858772/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=1970425517109858772' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/1970425517109858772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/1970425517109858772'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/lesson-8-conditionals.html' title='Lesson 8: Conditionals'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-733600452726064892</id><published>2007-09-04T16:19:00.001-03:00</published><updated>2007-09-04T16:19:19.732-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Lesson 7: Working with strings and numerical types</title><content type='html'>Today we are gonna learn how to make the infamous application that calculates the average number of two numbers&lt;br /&gt;&lt;br /&gt;Take it easy, you should be think "here comes another useless lesson", but before jumping to conclusions, read this lesson, I can assure that you will learn some new and useful things with this little application.&lt;br /&gt;&lt;br /&gt;As our lesson today is a bit practical, let's get direct to the point, open up IDLE in edit mode and type the following code:&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;# -*- coding: utf-8 -*-&lt;br /&gt;a = raw_input("Type a number: ")&lt;br /&gt;b = raw_input("Type another number: ")&lt;br /&gt;print "The average of these number is:"&lt;br /&gt;print (a + b) / 2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Notice that we already have some new stuff, the second line tells which encoding is used in our text, it isn't mandatory, but IDLE will ask for a encoding if you use some non-ascii chars and don't put this line.&lt;br /&gt;&lt;br /&gt;Another new thing is this line:&lt;br /&gt;&lt;pre&gt;a = raw_input("Type a number: ")&lt;/pre&gt;&lt;br /&gt;This line shows the message "Type a number: " on the screen and puts the cursor after the phrase so the user can type some text, and when the user hits Enter this text is stored on the variable "a", notice the variable and the equals signal before the word raw_input.&lt;br /&gt;&lt;br /&gt;You should have noticed that it displays "Type a number", but is possible to type any text and that you cause an error, so run you program and type just 2 integer numbers, like: 10 and 15.&lt;br /&gt;&lt;br /&gt;If you did everything right, you should get the following error:&lt;br /&gt;&lt;pre&gt;TypeError: unsupported operand type(s) for /: 'str' and 'int'&lt;/pre&gt;&lt;br /&gt;Take it easy, the error was intentional.&lt;br /&gt;&lt;br /&gt;Even when you type just numbers on the terminal, the function raw_input will always set the variable as string, so even if you type 10, 10 in this case won't be and integer, but a string with the text 10, that's why you got that error, because we tried to sum 2 strings and then divide it by and integer.&lt;br /&gt;&lt;br /&gt;Erase the last line of you program and add the following:&lt;br /&gt;&lt;pre&gt;print a + b&lt;/pre&gt;&lt;br /&gt;Run you program and type: 10 and 15 (or another number) and take a look at the results:&lt;br /&gt;&lt;pre&gt;1015&lt;/pre&gt;&lt;br /&gt;Did you understand? If you use the plus (+) signal to sum 2 strings you are joining them together.&lt;br /&gt;&lt;br /&gt;Now that you should have understood why did we get that error, I'll explain how to fix it.&lt;br /&gt;&lt;br /&gt;I think you already have done some operations with things that have different measure units, like sum 300 minutes with 2 hours and get the results in hours, and you know that to do this kind of operation both values need to be in the same measure unit, like minutes or hours, the same happens in programming.&lt;br /&gt;&lt;br /&gt;To work with numbers, you first need to convert the values to the same (or equivalent) numerical type, because its impossible to sum the string "1" with the number 1, so before doing any operation we need to convert the typed numbers to integer, so let's see how do we fix our program:&lt;br /&gt;&lt;br /&gt;Erase again the last line of you code and type the following on its place:&lt;br /&gt;&lt;pre&gt;print ((int(a) + int(b)) /2)&lt;/pre&gt;&lt;br /&gt;You code should look like this:&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;# -*- coding: utf-8 -*-&lt;br /&gt;a = raw_input("Type a number: ")&lt;br /&gt;b = raw_input("Type another number: ")&lt;br /&gt;print "The average is:"&lt;br /&gt;print ((int(a) + int(b)) /2)&lt;/pre&gt;&lt;br /&gt;Run this program and type the numbers 10 and 15 to see what happens.&lt;br /&gt;&lt;br /&gt;If everything is right, you should obtain the result 12 (try with other numbers, just run the program again), but there is something wrong isn't there?&lt;br /&gt;&lt;br /&gt;The average between 10 and 15 is 12.5 and not just 12, but why did we get 12?&lt;br /&gt;&lt;br /&gt;Its simple, when we use int(a) and int(b) we are converting the value of the variables to integer, when we sum 2 integer we get another integer and when we divide by and integer (2) Python returns an integer, because in python a division between 2 integer will always return an integer, so let's change our code again.&lt;br /&gt;&lt;br /&gt;We have several ways to fix this problem, add the following lines to the end of you code and test it typing the numbers 10 and 15:&lt;br /&gt;&lt;pre&gt;print ((int(a) + int(b)) /2.0)&lt;/pre&gt;&lt;br /&gt;It will print 12.5 because when we changed 2 to 2.0 we are dividing by a float, so Python returns a float.&lt;br /&gt;&lt;pre&gt;print float((int(a) + int(b))) /2&lt;/pre&gt;&lt;br /&gt;This one will return 12.5 too, because we sum the numbers and integers but convert the result to float and then divide by 2, Python returns a float when we divide a float by an integer.&lt;br /&gt;&lt;pre&gt;print (float(a) + float(b)) /2&lt;/pre&gt;&lt;br /&gt;This on works too, because the sum of 2 floats returns a float and dividing a float by a integer a float is returned.&lt;br /&gt;&lt;br /&gt;Now you can confess, you never imagined that a simple program like this could be so complicated and have so many concepts!&lt;br /&gt;&lt;br /&gt;If you have any questions, suggestions or corrections, please comment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-733600452726064892?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/733600452726064892/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=733600452726064892' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/733600452726064892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/733600452726064892'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/lesson-7-working-with-strings-and.html' title='Lesson 7: Working with strings and numerical types'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-195365630059508009</id><published>2007-09-04T16:18:00.001-03:00</published><updated>2007-09-08T01:39:25.558-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Lesson 6: Logical and arithmetical operators</title><content type='html'>We all know how to solve the expression 1 + 1 don't we? E also we know that the result is 3 (just kidding), but still some people doesn't that the numbers in this expression are called operands and the plus (+) signal is called operator, so by know you should have another operators in mind, operators like plus (+) and minus (-) are called arithmetical operators, because they are used to solve arithmetical expressions.&lt;br /&gt;&lt;br /&gt;In computer's programming we also have another kind of operators, called logical operators, they are used in logical expressions and just return true or false, take a look at the following tables with the most used arithmetical and logical operators in computer programming.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Arithmetical:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;**      Exponentiation&lt;br /&gt;+x, -x  Positive, Negative&lt;br /&gt;*, /, % Multiplication, Division, Remainder&lt;br /&gt;+, -    Addition, Subtraction&lt;/pre&gt;&lt;br /&gt;You should at least know the majority of the operators above, the only one that a few people may know is the Remainder (%), it returns the remainder of a division, for example: 3 % 2 would return 1 because 3 divided by 1 is 1 and 1 remains, the operator % returns the reminder of a division.&lt;br /&gt;&lt;br /&gt;The operators above are processed from top to bottom (using the above table order), so the expression:&lt;br /&gt;&lt;pre&gt;1 + 3 * 2&lt;/pre&gt;&lt;br /&gt;Is processed in the following order: first 3 * 2 that will result in 6, then 6 + 1 that will result in 7, test it, open up a Python shell and type? 1 + 3 * 2.&lt;br /&gt;&lt;br /&gt;And as I'm a nice guy, I'll not make you remember the order of the operators (like some teachers that never did real code in their life do), there is a way for you to organize the expression so it executes in the order that you want, using parenthesis, like in mathematics, the most internal parenthesis are processed first, so if we want the sum to be processed before the multiplication we need to write our expression like this:&lt;br /&gt;&lt;pre&gt;(1 + 3) * 2&lt;/pre&gt;&lt;br /&gt;Type the above code in Python and see what happens&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Logical:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;or                   Boolean operator OR&lt;br /&gt;and                  Boolean Operator AND&lt;br /&gt;not                  Boolean Operator NOT&lt;br /&gt;&lt;, &lt;=, &gt;, &gt;=, !=, == Comparisons&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Like we have learned in our  &lt;a href="http://codinglessons.blogspot.com/2007/01/lesson-5-what-are-and-how-to-use.html"&gt;previous lesson&lt;/a&gt; a Boolean variable have just 2 possible values (true or false), logical operators are used in logical expressions and they always return true or false, take a look at the expression:&lt;br /&gt;&lt;pre&gt;5 &gt; 3&lt;/pre&gt;&lt;br /&gt;The above expression is a logical expression and returns true, because its true that 5 is bigger than 3, now a little more complex expression:&lt;br /&gt;&lt;pre&gt;5 &gt; 3 ou 3 &gt; 4&lt;/pre&gt;&lt;br /&gt;The expression above would return false too, because the operator OR returns true if one of the two expressions is true.&lt;br /&gt;The following expressions return false:&lt;br /&gt;&lt;pre&gt;10 != 10 -&gt; is 10 different from 10? false!&lt;br /&gt;10 &gt; 10 -&gt; is 10 bigger 10? false!&lt;br /&gt;10 == 11 -&gt; is 10 equals 11? false!&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Like we have learned before, true or false to the computer means 1 (true) or 0 (false), on and off, so to process this expressions, the computer multiplies or sum, depending on the operator, it looks complicated at first sight but to help you understand I made some tables, take a look:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Operator AND&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;1 0 | 1 * 0 = 0 -&gt; false&lt;br /&gt;0 * 1 = 0 -&gt; false&lt;br /&gt;1 * 1 = 1 -&gt; true&lt;br /&gt;0 * 0 = 0 -&gt; false&lt;/pre&gt;&lt;br /&gt;So for the operator AND return true, both variables need to be true.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Operator OR&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;1 + 0 = 1 -&gt; true&lt;br /&gt;0 + 1 = 1 -&gt; true&lt;br /&gt;1 + 1 = 1 -&gt; true&lt;br /&gt;0 + 0 = 0 -&gt; false&lt;/pre&gt;&lt;br /&gt;It the OR operator's case, its necessary just one of the variables to be true, the expression will be false just when both variables are false, what is exactly the contrary of the AND operator.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Operator NOT &lt;/span&gt;&lt;br /&gt;The operator not just returns the inverse value of the Boolean variable, so not true is false, and not false is true, as we see bellow:&lt;br /&gt;&lt;pre&gt;not 1 -&gt; 0&lt;br /&gt;not 0 -&gt; 1&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;There are more logical and arithmetical operators, but we are not studying them right now, this lesson is just a introduction about the most used operators, if you want to read more about it, take a look &lt;a href="http://www.swaroopch.info/text/Byte_of_Python:Operators_and_Expressions"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And as always, if you have any questions, suggestions or corrections, please comment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-195365630059508009?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/195365630059508009/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=195365630059508009' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/195365630059508009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/195365630059508009'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/lesson-6-logical-and-arithmetical.html' title='Lesson 6: Logical and arithmetical operators'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-6225506967814890185</id><published>2007-09-04T16:17:00.001-03:00</published><updated>2007-09-04T16:17:47.283-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Lesson 5: What are and how to use variables</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Variable"&gt;Variables&lt;/a&gt; are one of the most used things in computer programming, basically a variable stores a value in the computer's memory and can be modified at any time, in computer programming there are several &lt;a href="http://en.wikipedia.org/wiki/Type_system"&gt;variable types&lt;/a&gt; and today we are gonna learn what are and how to use the most important variable types in C# and Python.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Basic variable types:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are several variable types, below there is an explanation of the most used variable types (language independent):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Boolean:&lt;/span&gt; can be either true or false. Ex: true, True, false, 0,1.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Char:&lt;/span&gt; can have just one character. Ex. 'A', 'c', '1';&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;String:&lt;/span&gt; stores several characters. Ex: "This is a string";&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Integer:&lt;/span&gt; stores just integer numbers. Ex: -10, 10, 5000, -30000, etc.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Decimal (decimal, float, double, etc):&lt;/span&gt; stores numbers with one or more decimal digits. Ex: 0,01 - 10,0001.&lt;br /&gt;&lt;br /&gt;Each programming language threats these types differently, in some like languages like C# you need to declare the variable with it's type before using it, others like Python the variable declaration occurs automatically when you store it's first value, others like PHP doesn't have a defined type for the variable, the interpreter controls everything based on the variable value.&lt;br /&gt;&lt;br /&gt;There are advantages and disadvantages in what we call strong and weak typed languages, strong typed is when the compiler or interpreter makes mandatory to declare the variables with it's types defined, weak typed is when the compiler controls the variables types based on their values, for beginners the idea of not having to declare and convert variable types are tempting, but the truth is that it just creates a bad habit and make you write insecure code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Variable names:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Both Languages that we are studying here have basically the same naming rules, every variable should start with a letter or underscore and can have just letters and numbers, also avoid using non-&lt;a href="http://en.wikipedia.org/wiki/Ascii"&gt;ascii&lt;/a&gt; characters, the following variable names are valid:&lt;br /&gt;&lt;br /&gt;_name, name1, name, NAME, n4m3, etc.&lt;br /&gt;&lt;br /&gt;The following are invalid:&lt;br /&gt;1name, $name, %name, name$, etc.&lt;br /&gt;&lt;br /&gt;You should also notice that both C# and Python are case sensitive, so the variable "Name" is different from "name".&lt;br /&gt;&lt;br /&gt;Now we are gonna see how to declare variables in Python and C#.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Python Variables:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To understand it better we will first see how to declare and use a variable in python, for this task we are gonna use one of Python's best features, the interactive shell!&lt;br /&gt;&lt;br /&gt;Open IDLE, and in case you IDLE is configured to open in edit mode, just click on Run -&gt; Shell.&lt;br /&gt;&lt;br /&gt;First we will see how a Boolean variable in Python works, type on the shell and press Enter (for each command you type on the shell you need to press enter, so I'll not say this again):&lt;br /&gt;&lt;pre&gt;a = True&lt;/pre&gt;&lt;br /&gt;In case you type "true" instead of "True", you will get an error, because Python is case sensitive.&lt;br /&gt;&lt;br /&gt;With that code we just declared the variable "a" with a Boolean type, also we set its value as True, to be sure that this variable is a Boolean, type:&lt;br /&gt;&lt;pre&gt;type(a)&lt;/pre&gt;&lt;br /&gt;You shell should look like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; a = True&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; type(a)&lt;br /&gt;&amp;lt;type 'bool'&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now type the following lines:&lt;br /&gt;&lt;pre&gt;b = 'string'&lt;br /&gt;c = 1&lt;br /&gt;d = 1.0&lt;/pre&gt;&lt;br /&gt;And see each variable type typing:&lt;br /&gt;&lt;pre&gt;type(b)&lt;br /&gt;type(c)&lt;br /&gt;type(d)&lt;/pre&gt;&lt;br /&gt;You terminal should look like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; b = 'string'&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; c = 1&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; d = 1.0&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; type(b)&lt;br /&gt;&amp;lt;type 'str'&amp;gt;&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; type(c)&lt;br /&gt;&amp;lt;type 'int'&amp;gt;&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt; type(d)&lt;br /&gt;&amp;lt;type 'float'&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now type:&lt;br /&gt;&lt;pre&gt;b + c&lt;/pre&gt;&lt;br /&gt;You should get the following error:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt; File "&amp;lt;pyshell#9&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;br /&gt;   b + c&lt;br /&gt;TypeError: cannot concatenate 'str' and 'int' objects&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You got this error because it's not possible to sum a integer type variable with a string type variable, some languages allow this kind of operation (run away from them), but normally you will need to convert both variables to the same type.&lt;br /&gt;&lt;br /&gt;Now type:&lt;br /&gt;&lt;pre&gt;print b&lt;/pre&gt;&lt;br /&gt;It should output the text "string" in your terminal, because when you use: "print b" you are saying to the compiler: "Print the &lt;span style="font-weight: bold;"&gt;value&lt;/span&gt; of the variable b on the screen", and in this case the value of the variable b is the text "string", now do another test, type:&lt;br /&gt;&lt;pre&gt;b = 'new b value'&lt;br /&gt;print b&lt;/pre&gt;&lt;br /&gt;Now we changed the value of b and printed the new value on the screen.&lt;br /&gt;&lt;br /&gt;If you want to learn more about Python Variables and Types take a look in &lt;a href="http://www.developer.com/article.php/626321"&gt;this article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In the next lesson we are gonna learn what are and how to use arithmetic operators and logical operators and also how to use this variables in mathematical expressions among other things!&lt;br /&gt;&lt;br /&gt;As always, if you have any questions, suggestions or corrections, please comment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-6225506967814890185?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/6225506967814890185/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=6225506967814890185' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/6225506967814890185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/6225506967814890185'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/lesson-5-what-are-and-how-to-use.html' title='Lesson 5: What are and how to use variables'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-6507083074633933134</id><published>2007-09-04T16:16:00.001-03:00</published><updated>2007-09-04T16:17:09.235-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Lesson 4: Your first program in Python</title><content type='html'>In our &lt;a href="http://codinglessons.blogspot.com/2007/01/lesson-3-setting-up-our-development.html"&gt;previous lesson&lt;/a&gt; we learned how to set up Python in our box.&lt;br /&gt;&lt;br /&gt;In this lesson we are gonna learn how to make our first program, the infamous Hello World, there is a legend that tells that once you can run the Hello World program in a language, you can do anything with that language, think you can do it?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;First Python program: Hello World&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First we need to change some configs in IDLE, so open IDLE clicking on Start -&gt; Programs -&gt; Python 2.5 -&gt; IDLE.&lt;br /&gt;&lt;br /&gt;The first time you open IDLE, it opens a shell, soon we are gonna play a little with the shell but for now let's change the IDLE's config so it opens an editor window when you start it.&lt;br /&gt;&lt;br /&gt;So click on Options -&gt; COnfigure Idle -&gt; General and check the options: Open in Edit Window and No Prompt, after that just click OK, close IDLE and open it again.&lt;br /&gt;&lt;br /&gt;Now each time we open IDLE it will start with a blank text file&lt;br /&gt;&lt;br /&gt;Now type the following code in IDLE:&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;print "Hello World"&lt;/pre&gt;&lt;br /&gt;After typing it press F5 a message will pop up saying that you need to save your file, just click OK and save the file, after saving it IDLE will open a shell window and the result of code will show up, your screen should look like this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://xgn.com.br/blog/hello_py.png" target="_blank"&gt;&lt;img src="http://xgn.com.br/blog/tb_hello_py.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Running Python from a terminal:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is another way to run python code, using a terminal. If you are using windows do the following:&lt;br /&gt;&lt;br /&gt;Click on Start -&gt; Execute, type cmd and hit Enter, a terminal will show up, type the following on it:&lt;br /&gt;&lt;pre&gt;path=%path%;c:\python25&lt;/pre&gt;&lt;br /&gt;c:\python25 should be changed to whichever folder you installed python on.&lt;br /&gt;&lt;br /&gt;After that cd to the folder where you salved the file hello.py (use cd c:\path\to\your\folder), remember that this hello.py could be written on notepad or any other text editor, now type:&lt;br /&gt;&lt;pre&gt;python hello.py&lt;/pre&gt;&lt;br /&gt;The phrase "Hello World" should show up, keeping it short:&lt;br /&gt;&lt;pre&gt;path=%path%;c:\python25&lt;br /&gt;cd c:\path&lt;br /&gt;python hello.py&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Linux Users&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you are using linux and doesn't have IDLE, create a new text file in your favorite text editor with the contents described above and save it as hello.py.&lt;br /&gt;&lt;br /&gt;On linux you have 2 options to run python programs, in a terminal, change to the folder where you saved the file (cd \home\user\yourfolder\) and typing this:&lt;br /&gt;&lt;pre&gt;python hello.py&lt;/pre&gt;&lt;br /&gt;Or you can give it execute permission on the file and run it, like this:&lt;br /&gt;&lt;pre&gt;chmod +x hello.py&lt;br /&gt;./hello.py&lt;/pre&gt;&lt;br /&gt;If you were able to make this program run, congratulations you have a bright future as a programmer, if you were not able to do it, maybe you should try working with something else.&lt;br /&gt;&lt;br /&gt;As this is our first program, I'll explain how the lessons from now on will work, as you already know how to create and run a file using IDLE, I'll not repeat these steps on the next lessons.&lt;br /&gt;&lt;br /&gt;And all the code we write here will be explained line by line, and that's what I'm going to do now with our hello world program.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Program Explanation:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first line: #!/usr/bin/env will always be the first line in every python program, this code tells that the file is a python script, and also tells where the python interpreter is, so always put this line in the beginning of all python scripts and for better compatibility always use: /usr/bin/env python.&lt;br /&gt;&lt;br /&gt;print "Hello World": this line tells python "Show the text Hello World on the screen".&lt;br /&gt;&lt;br /&gt;This program is so simple that any explanation about it is just a waste of mine and your time, so I'll stop here, the purpose of this lesson was to teach you how to run a program and see the results, in the next lesson we are gonna learn a little more about Python's syntax and what are variables.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you have any questions, suggestions or want to correct some mistake, please comment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-6507083074633933134?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/6507083074633933134/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=6507083074633933134' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/6507083074633933134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/6507083074633933134'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/lesson-4-your-first-program-in-python.html' title='Lesson 4: Your first program in Python'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-8259513067605711967</id><published>2007-09-04T16:14:00.003-03:00</published><updated>2007-09-04T16:15:43.210-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Lesson 3: Setting up our development environment</title><content type='html'>In this lesson we are gonna learn what is necessary to install and configure so we can code in Python&lt;br /&gt;&lt;br /&gt;First we have to download some tools, and off course all these tools are free to use.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Windows XP users:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the following:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.python.org/ftp/python/2.5/python-2.5.msi"&gt;Python 2.5&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The package comes with the Python 2.5 interpreter and a text editor and shell, IDLE.&lt;br /&gt;&lt;br /&gt;You just have to execute the installer as usuall and click next..next..next.. finish :)&lt;br /&gt;&lt;br /&gt;In case you want to take a look in IDLE, it is in Start -&gt; Programs -&gt; Python25 -&gt; IDLE&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Linux Users:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you use linux, you should already have python installed, so it will be necessary just install the IDLE IDE, if you use Ubuntu or Debian, just open up a terminal and type the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo apt-get install idle&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you are using other distro, you can download Idle &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=9579"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Obs. The Idle installation is optional, you can use any linux text editor you like, such as gedit, vim ,emacs, kate, etc.&lt;br /&gt;&lt;br /&gt;In the next lesson we are gonna learn how to write our first application Python!&lt;br /&gt;&lt;br /&gt;If you use any other linux distro and this lesson doesn't work for you, please comment if you have problems or want to add something, and as always, suggestions and corrections are welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-8259513067605711967?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/8259513067605711967/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=8259513067605711967' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/8259513067605711967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/8259513067605711967'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/lesson-3-setting-up-our-development.html' title='Lesson 3: Setting up our development environment'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-4891499791171131898</id><published>2007-09-04T16:14:00.001-03:00</published><updated>2007-09-04T16:15:18.425-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Lesson 2: What do i need to start programming?</title><content type='html'>Now that you know the basics about what is computer programming we should start something more interesting, i m gonna explain the basics about the Python Language.&lt;br /&gt;But before that we need to understand what is a compiler and an interpreter.&lt;br /&gt;&lt;br /&gt;As i said in the last lesson, computers just understand binary, so if you want it to understand your code you should talk to it in Binary, but as you have noticed is kinda hard to understand binary, so you need something to translate the code you write to binary, and that is called a compiler, or interpreter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What is the difference between a compiler and an interpreter?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The main difference about a compiter and an interpreter is simple, imagine a book writen in english, you want this book to be available in japanese, if we compile this book, we are gonna print another book writen in japanese, like another copy, but if you know english and japanese, you can read the book in english and understand it in japanese, because you are interpreting it as you read.&lt;br /&gt;&lt;br /&gt;So, the compiler creates a binary object that can be read by the computer and the interpreter translates on the fly and sends it in binary so the computer understands it, in both cases we get the same result.&lt;br /&gt;&lt;br /&gt;Some examples of compiled languages are:&lt;br /&gt;C, C++, C#, Pascal, Clipper, Java, etc.&lt;br /&gt;&lt;br /&gt;And some examples of interpreted languages:&lt;br /&gt;Python, PHP, Ruby, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;But, what do i really need to start programming?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The answer is simple, you just need a  compiler or interpreter and a text editor.&lt;br /&gt;&lt;br /&gt;Ok, i understand why i need the compiler or interpreter, but why a text editor? Don't i need an application like, Delphi, Visual Studio, etc?&lt;br /&gt;&lt;br /&gt;No, you don't really need an ide (integrated development environment), Delphi and Visual Studio are just tools that helps you in the coding process, but they aren't really necessary.&lt;br /&gt;&lt;br /&gt;So, can i code in notepad?&lt;br /&gt;&lt;br /&gt;The answer is  yes,  but just if you like to suffer :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What are we going to use in our coding?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We are going to use the following application in our lessons:&lt;br /&gt;&lt;a href="http://www.python.org/idle/"&gt;IDLE&lt;/a&gt; for Python&lt;br /&gt;&lt;br /&gt;In the next lesson we are gonna set up our development environment, if you have any questions or want to add or correct something, please comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-4891499791171131898?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/4891499791171131898/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=4891499791171131898' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4891499791171131898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/4891499791171131898'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/lesson-2-what-do-i-need-to-start.html' title='Lesson 2: What do i need to start programming?'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-367923520345265997</id><published>2007-09-04T16:12:00.000-03:00</published><updated>2007-09-04T16:15:31.259-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Lesson 1: What is computer programming?</title><content type='html'>Basically &lt;a href="http://en.wikipedia.org/wiki/Computer_programming"&gt;computer programming&lt;/a&gt; is the process of writing &lt;a href="http://en.wikipedia.org/wiki/Code_%28computer_programming%29"&gt;source code&lt;/a&gt; in a &lt;a href="http://en.wikipedia.org/wiki/Programming_language"&gt;programming language&lt;/a&gt; to make a computer do some task, a simple example would be a calculator.&lt;br /&gt;&lt;br /&gt;Everyone knows how a calculator works, but if you think about it, it is just doing some predefined task, you know that 1 + 1 is 2 but for each arithmetical calculation there is a rule, and a calculator is simply following this rules.&lt;br /&gt;&lt;br /&gt;It is a predefined task, computers can´t think, so everything it does is follow the steps the programmer told him to, but how do you teach a computer to sum numbers?&lt;br /&gt;&lt;br /&gt;As you may know, the "native" computer language is binary, so if you want to talk to the computer without a programming language you will need to talk to him in binary, and that's is kind hard isn't it?&lt;br /&gt;&lt;br /&gt;Just for example, can you translate this?&lt;br /&gt;&lt;br /&gt;01000011 01101111 01101110 01100111 01110010 01100001 01110100 01110101 01101100 01100001 01110100 01101001 01101111 01101110 01110011 00101100 00100000 01111001 01101111 01110101 00100000 01101011 01101110 01101111 01110111 00100000 01101000 01101111 01110111 00100000 01110100 01101111 00100000 01110101 01110011 01100101 00100000 01100001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01110100 01110010 01100001 01101110 01110011 01101100 01100001 01110100 01101111 01110010 00100000 00111010 00101001&lt;br /&gt;&lt;br /&gt;No? But that's how computers understand everything.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So what is a programming language?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If we didn't have any programming language we would have to talk to the computer in &lt;a href="http://en.wikipedia.org/wiki/Binary_code"&gt;Binary Code&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Basically a programming language is a way to programmers talk to computers with an easier language instead of binary, and without making everything from scratch, the main difference between all programming languages are the syntax, off course each programming language is best for this or that task, each has its own set of libraries and functions, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Programming isn't about programming languages!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;People think that programming is about programming languages, but it IS NOT!&lt;br /&gt;&lt;br /&gt;Programming is about logic and algorithms.&lt;br /&gt;&lt;br /&gt;Imagine if you want to talk to a Japanese guy, but you don't know even a word in Japanese, so you think "i can't talk to him because i don't know Japanese", but that is wrong, you CAN talk to him, not talk using a spoken language but you can make him understand what you want by drawing, making gestures, etc but first you need to know how to think in a way of making him understand you.&lt;br /&gt;&lt;br /&gt;Talking to computers is the same thing, if you are bad in logic you will never be able to talk to a computer even if you know the syntax of all the programming languages in the world.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What programming language should i start or use?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I can't answer that for you, each person like this or that language, but the truth is that you can't live only with one language, each language is more suited for a task, you can try doing everything in just one language but just if you want to suffer, because for certain tasks, is faster for you to learn a new language than try making it in your current language.&lt;br /&gt;&lt;br /&gt;You can start with any language, some says that this or that language is best, at university you will most likely learn pascal or C.&lt;br /&gt;&lt;br /&gt;But in my own honest opinion, i think that for starters its better to start with a modern language like python or C#, because these languages already have a support for a lot of modern things that languages like pascal doesn't have, like object oriented programming, exception handling, etc.&lt;br /&gt;&lt;br /&gt;I think its difficult to learn Object Oriented Programming once you are too used to Structural programming, so i recommend using a modern language, but that's just my opinion.&lt;br /&gt;&lt;br /&gt;And please, if i said something stupid or you have something to add, please comment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-367923520345265997?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/367923520345265997/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=367923520345265997' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/367923520345265997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/367923520345265997'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/lesson-1-what-is-computer-programming.html' title='Lesson 1: What is computer programming?'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-3695594350280342207</id><published>2007-09-04T13:54:00.000-03:00</published><updated>2007-09-14T13:48:54.398-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming Lessons'/><title type='text'>Coding Lessons</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Sorry about abandoning this blog, but the bad news is...&lt;br /&gt;&lt;br /&gt;I'm stiiiiiiiiiiiiiiiiil aliiiiiiiiiiiiiiiiiiive (and coding)!&lt;br /&gt;&lt;br /&gt;So starting today, I'll try to take at least half hour a day to write something stupid here, but first of all I need to get everything in place.&lt;br /&gt;&lt;br /&gt;The first thing I did was to convert this blog to the new blogger layout (its way better and has tags, hurray!).&lt;br /&gt;&lt;br /&gt;The second thing was to delete a lot of post (yes you should thank me for that because it was a dark time of my life, when I lost all my senses and started posting digg histories here.. argh!).&lt;br /&gt;&lt;br /&gt;The third was to delete a new blog I started some days ago, and just try to keep everything on this one.&lt;br /&gt;&lt;br /&gt;And the forth thing, is what I'm gonna do right now, wich is move all the posts of another blog I started (coding lessons) to this one. Sadly the blog is discontinued, but just as a memento I will copy all the lessons to this blog, so all the hours I spent working on that blog doesn't become stardust.&lt;br /&gt;&lt;br /&gt;And thats it, I'll not promise to write here everyday because if I do it, it will start to be an obligation and then I'll get depressive about having to do it and will just stop.&lt;br /&gt;&lt;br /&gt;So, perhaps you will see some good posts soon, perhaps not, who knows, just add me to your rss reader and pray :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-3695594350280342207?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/3695594350280342207/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=3695594350280342207' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/3695594350280342207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/3695594350280342207'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2007/09/coding-lessons.html' title='Coding Lessons'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-116341538625720460</id><published>2006-11-13T08:50:00.000-02:00</published><updated>2007-09-04T16:27:37.664-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Vista'/><title type='text'>The Vista Myth</title><content type='html'>If you are worried about having to upgrade your computer to run vista, take it easy, it isn´t a monster that eats children like people are saying out there.&lt;br /&gt;&lt;br /&gt;i´ll talk about my first impressions about vista, i ve been using it for 2 days now, and i didn´t use any betas, so i think i can have a different point of view compared to people that were using it since the first beta versions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1 - Hardware:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Athlon 64 2800+ s754&lt;br /&gt;512MB ram @ 200mhz&lt;br /&gt;Epox 8KDA3+ (Nforce3 250GB chipset)&lt;br /&gt;Geforce 4 Ti 4200 128MB&lt;/pre&gt;&lt;br /&gt;As you can see, its not an expensive nor high end system and my VGA is directx 7.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2 - The install process.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The install process was surprisingly easy and fast, no more 2 hours waiting for the stupid drums to detect your hardware, no more questions after you type the serial, but with some scary things, like a button "Install Now" which when i clicked i say "oh god, here comes microsoft erasing my whole harddrive", but there was (a very easy indeed) partitioning option, that worked flawless and allowed me to install Vista on a 10GB partiton without erasing my other partitions.&lt;br /&gt;&lt;br /&gt;The whole install process (and all countless reboots, but at least without stupid questions) took less than half hour, and after that i was already on the vista startup screen to set a user and password.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3 - Desktop First impressions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I didnt like much what i saw but, the interface is clean and being a windows user since 3.1, (no i´m not that old) the first thing i did was change the start menu to the classic one and complain about how ugly (and big) the icons are, but you get used to it.&lt;br /&gt;&lt;br /&gt;After that i opened up IE7, i´ll not talk about it because i just saw one website using it: www.mozilla.com and downloaded firefox, after that IE is just another brick on the wall.&lt;br /&gt;&lt;br /&gt;I didn´t like one thing, the files and folders navigation are a lot worst than the previous windows versions, i never liked the gnome way to open folders with that "view all folders" button, but guess what, microsoft copied that stupid navigation system, and its very very annoying, hope i get used to it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4 - Protect you from yourself.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Another annoying thing is that you have to confirm almost everything, even to open vista´s own configurations apps you have to confirm, almost everything you try to run or install, a message like "Are you really sure you want to do this?" pops up and you have to click on allow each time, its very annoying, hope i find out soon how to disable it, cause i don´t need to be protected from myself.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5 - Performance.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It was a suprise, but i didn´t think it would run so smooth on my pc, off course it isn´t as fast as my Tiny XP (Tiny xp just flies), but it was ok, i didn´t notice any slowdowns, off course i wasn´t using aero (my vga can´t run it) and set up the visual style for performance, just left the font anti-aliasing (finally windows have it) and the vista-ish theme on, but disabled all the shadows, fades, effects, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6 - Installing Essetial Software.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First thing i tried to install was the &lt;a href="http://www.cccp-project.net/" target="_blank"&gt;Comunity Combined Codec Pack (CCCP)&lt;/a&gt;, it didn´t run saying that it required windows xp, so i set the compatibility mode to windows XP and it installed, mplayer classic works just fine, and all the codecs works too. Azureus worked fine after installing the JVM.&lt;br /&gt;&lt;br /&gt;Nero din´t run, sadly we will have to wait for a vista version, i heard that nero 7 lite runs on vista, but their website keept sending me corrupted files so i gave up, then i found &lt;a href="http://www.swiftdisc.com/" target="_blank"&gt;swiftdisc&lt;/a&gt; that fits my needs perfectly.&lt;br /&gt;&lt;br /&gt;Apache, Mysql and php didn´t run either, but i just tested to see if it would work, who uses this on windows anyway?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Keeping it short:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My first impressions of vista couldn´t be better, after all that talk about having to upgrade all the hardware to run it, it appears that was just rummors.&lt;br /&gt;&lt;br /&gt;The only setbacks are the "protect you from yourself" philosophy and the files and folders navigation that i didn´t like.&lt;br /&gt;&lt;br /&gt;I didn´t try all that media center crap and never will, and the movie maker and dvd maker refused to run on my VGA saying it was too damn old.&lt;br /&gt;&lt;br /&gt;But Vista is a fine OS and i was surprisingly pleased with it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Anyone who is using it have the same opinion? Did i miss something?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-116341538625720460?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/116341538625720460/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=116341538625720460' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/116341538625720460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/116341538625720460'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/11/vista-myth.html' title='The Vista Myth'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-115492230441119187</id><published>2006-08-07T00:43:00.000-03:00</published><updated>2007-09-04T16:28:00.348-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>HOWTO: Cleaning up all those unnecessary junk files...</title><content type='html'>Today i found a nice howto on the Ubuntu forums, teaching how to clean up your Ubuntu box, very usefull!&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=140920" target="_blank"&gt;&lt;br /&gt;http://ubuntuforums.org/showthread.php?t=140920&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-115492230441119187?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/115492230441119187/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=115492230441119187' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115492230441119187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115492230441119187'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/08/howto-cleaning-up-all-those.html' title='HOWTO: Cleaning up all those unnecessary junk files...'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-115339522097671220</id><published>2006-07-20T08:30:00.000-03:00</published><updated>2006-07-20T08:33:40.993-03:00</updated><title type='text'>I wonder why designers cant just folow this...</title><content type='html'>"A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away." ? Antoine de Saint-Exupéry&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-115339522097671220?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/115339522097671220/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=115339522097671220' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115339522097671220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115339522097671220'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/07/i-wonder-why-designers-cant-just-folow.html' title='I wonder why designers cant just folow this...'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-115244641409613789</id><published>2006-07-09T08:59:00.000-03:00</published><updated>2007-09-04T16:28:27.253-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Can PHP Render 3d?</title><content type='html'>The answer to that question is here: &lt;a href="http://forums.bit-tech.net/showthread.php?t=116224" taget="_blank"&gt;http://forums.bit-tech.net/showthread.php?t=116224&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-115244641409613789?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/115244641409613789/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=115244641409613789' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115244641409613789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115244641409613789'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/07/can-php-render-3d.html' title='Can PHP Render 3d?'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-115244591870561333</id><published>2006-07-09T08:49:00.000-03:00</published><updated>2007-09-04T16:28:39.387-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Ubuntu Dapper Commercial Repository</title><content type='html'>It is not the death of freedom in Ubuntu land, but it certainly is the birth of one kind of freedom - &lt;b&gt;freedom of choice.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Canonical, Ubuntu?s parent company has announced the dapper-commercial repository, where one will hopefully find packages released by commercial companies (read non-open-source) for use by Ubuntu users. Right now, all the repository has is Opera 9, and RealPlayer 10. Hopefully as time progresses, we will see more software, like, say, Skype, that are useful to users presently, though they are not open source, in this repository.&lt;br /&gt;&lt;br /&gt;To read more and learn how to add the repository on your Ubuntu Dapper, click &lt;a href="http://ubuntu.wordpress.com/2006/07/08/introducing-the-dapper-commercial-repository/" target="_blank"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Source: &lt;a href="http://ubuntu.wordpress.com/" target="_blank"&gt;http://ubuntu.wordpress.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-115244591870561333?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/115244591870561333/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=115244591870561333' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115244591870561333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115244591870561333'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/07/ubuntu-dapper-commercial-repository.html' title='Ubuntu Dapper Commercial Repository'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-115244558945555005</id><published>2006-07-09T08:44:00.000-03:00</published><updated>2007-09-04T16:28:52.706-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Why Programming is like sex</title><content type='html'>* One mistake and you have to support it for the rest of your life. (Michael Sinz)&lt;br /&gt;   * Once you get started, you?ll only stop because you?re exhausted.&lt;br /&gt;   * It takes another experienced person to really appreciate what you?re doing.&lt;br /&gt;   * Conversely, there?s some odd people who pride themselves on their lack of experience.&lt;br /&gt;   * You can do it for money or for fun.&lt;br /&gt;   * If you spend more time doing it than watching TV, people think you?re some kind of freak.&lt;br /&gt;   * It?s not really an appropriate topic for dinner conversation.&lt;br /&gt;   * There?s not enough taught about it in public school.&lt;br /&gt;   * It doesn?t make any sense at all if you try to explain it in strictly clinical terms.&lt;br /&gt;   * Some people are just naturally good.&lt;br /&gt;   * But some people will never realize how bad they are, and you?re wasting your time trying to tell them.&lt;br /&gt;   * There are a few weirdos with bizarre practices nobody really is comfortable with.&lt;br /&gt;   * One little thing going wrong can ruin everything.&lt;br /&gt;   * It?s a great way to spend a lunch break.&lt;br /&gt;   * Everyone acts like they?re the first person to come up with a new technique.&lt;br /&gt;   * Everyone who?s done it pokes fun at those who haven?t.&lt;br /&gt;   * Beginners do a lot of clumsy fumbling about.&lt;br /&gt;   * You?ll miss it if it?s been a while.&lt;br /&gt;   * There?s always someone willing to write about the only right way to do things.&lt;br /&gt;   * It doesn?t go so well when you?re drunk, but you?re more likely to do it.&lt;br /&gt;   * Sometimes it?s fun to use expensive toys.&lt;br /&gt;   * Other people just get in the way.&lt;br /&gt;&lt;br /&gt;Source: &lt;a href="http://push.cx/2006/programming-is-like-sex" target="_blank"&gt;http://push.cx/2006/programming-is-like-sex&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-115244558945555005?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/115244558945555005/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=115244558945555005' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115244558945555005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115244558945555005'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/07/why-programming-is-like-sex.html' title='Why Programming is like sex'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-115190293901206678</id><published>2006-07-03T01:58:00.000-03:00</published><updated>2007-09-04T16:29:06.571-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>HOWTO: Install DBDesigner 4 on Ubuntu Linux</title><content type='html'>&lt;p&gt;Its very simple to install this great application on Ubuntu, i m using the 6.06 Dapper Drake version of Ubuntu, but it should work on any other version, so lets see how to install it:&lt;br /&gt;&lt;br /&gt;First of all you need to download the DBDesigner package, you can get it from here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fabforce.net/downloads.php" target="_blank"&gt;http://fabforce.net/downloads.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Grab the rpm version.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After downloading this file you will need alien to convert it to .deb, if you don't have it installed, just type this on a terminal:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;sudo apt-get install alien&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now, go to where you downloaded the rpm package and install it using:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo alien -i   DBDesigner4-0.5.4-0.i586.rpm&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And now the trick to get it working, if you try to open the DBDesigner it will give you an error saying that it cant open the shared library libborqt-6.9-qt2.3.so, to fix it do the following:&lt;br /&gt;&lt;br /&gt;First &lt;a href="http://prdownloads.sourceforge.net/kylixlibs/kylixlibs3-borqt-3.0-2.tar.gz?download" target="_blank"&gt;Download&lt;/a&gt; the library package and extract it using:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;tar xzvf kylixlibs3-borqt-3.0-2.tar.gz&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After extracting it do the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo cp kylixlibs3-borqt/libborqt-6.9.0-qt2.3.so /lib/libborqt-6.9-qt2.3.so&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now your DBDesigner should be working, the executable file DBDesigner4 can be found at /opt/DBDesigner&lt;br /&gt;&lt;br /&gt;Hope it helps!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-115190293901206678?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/115190293901206678/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=115190293901206678' title='28 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115190293901206678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115190293901206678'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/07/howto-install-dbdesigner-4-on-ubuntu.html' title='HOWTO: Install DBDesigner 4 on Ubuntu Linux'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-115063355376408411</id><published>2006-06-18T09:24:00.000-03:00</published><updated>2007-09-04T16:29:21.642-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Howto: Compile Mplayer on a Fresh Ubuntu Dapper Install</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;I wrote a howto in the ubuntu forums, to help people compile MPlayer from SVN with wmv, mp4 and x264 support, the howto is here:&lt;/p&gt;  &lt;p&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=187709"&gt;http://ubuntuforums.org/showthread.php?t=187709&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Hope it is usefull!&lt;br /&gt;&lt;/p&gt; &lt;br /&gt;&lt;p style="text-align: right; font-size: 8px;"&gt;Blogged with &lt;a href="http://www.flock.com/" target="_new" title="Flock"&gt;Flock&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-115063355376408411?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/115063355376408411/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=115063355376408411' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115063355376408411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/115063355376408411'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/06/howto-compile-mplayer-on-fresh-ubuntu.html' title='Howto: Compile Mplayer on a Fresh Ubuntu Dapper Install'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-114789238690152406</id><published>2006-05-17T15:47:00.000-03:00</published><updated>2007-09-04T16:29:37.661-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Creating key combination shortcuts on C#</title><content type='html'>Hi guys, i have bad news, i m still alive, i know that its been more than a month without any posts, but, i m back!&lt;br /&gt;&lt;br /&gt;I m not posting here often cause i m too busy learning C#, and i m still doing some usefull (or maybe useless) stuff using it, and today i had a little problem that took me a while to find out a solution, but thanx to Arild on the ##chsarp channel on irc.freenode.org i solved it!&lt;br /&gt;&lt;br /&gt;I wanted to bind some custom shortcuts to some button actions, for example, if you press Ctrl + S on the form, it will execute the Save button action, i took a long time to solve the puzzle, but its rater easy to do, here we go:&lt;br /&gt;&lt;br /&gt;First of all you need to set the KeyPreview Property on your form to true, this property makes the form get the key events before the controls, so you can set the KeyPress event on the form, to do it is easy:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;frmBase.KeyPreview = true;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After doing this, you just have to set the form event for the keypress, like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;this.KeyDown += new KeyEventHandler(this.frmBase_KeyDown);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And to make the shortcuts work, just use this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;private void frmBase_KeyDown(object sender, KeyEventArgs e) {&lt;br /&gt; if (e.Control &amp;&amp;amp; e.KeyCode == Keys.S) {&lt;br /&gt;   btnGravar_Click(null, null);&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The code above executes the btnGravar_Click() when you Press Ctrl (e.Control) and "S" (e.KeyCode == Key.S).&lt;br /&gt;&lt;br /&gt;As you can see, its very simple to do, but it took me a long time to figure this out, hope it helps.&lt;br /&gt;&lt;br /&gt;-Fábio&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-114789238690152406?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/114789238690152406/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=114789238690152406' title='15 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114789238690152406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114789238690152406'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/05/creating-key-combination-shortcuts-on.html' title='Creating key combination shortcuts on C#'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-114467661082756131</id><published>2006-04-10T10:36:00.000-03:00</published><updated>2007-09-04T16:29:49.322-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Firebird'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Connecting to Firebird in C#</title><content type='html'>As i promissed i ll start posting some basic C# using firebird, first of all lets see how to open a simple connection using the firebird driver and C#.&lt;br /&gt;&lt;br /&gt;First you need to add a reference to FirebirdSql.Data.Firebird in your project, and add: using FirebirdSql.Data.Firebird to your code.&lt;br /&gt;&lt;br /&gt;Now, to open a connection, just do it:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;private FbConnection con = new FbConnection("User=SYSDBA;" +&lt;br /&gt;   "Password=masterkey;" +&lt;br /&gt;   "Database=/path/to/your/database.gdb;" +&lt;br /&gt;   "DataSource=192.168.0.1;" +&lt;br /&gt;   "Port=3050;" +&lt;br /&gt;   "Dialect=3;" +&lt;br /&gt;   "Charset=ISO8859_1;");&lt;br /&gt;try {&lt;br /&gt;   con.Open();&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;   MessageBox.Show(ex.ToString());&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Difficult isnt it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-114467661082756131?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/114467661082756131/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=114467661082756131' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114467661082756131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114467661082756131'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/04/connecting-to-firebird-in-c.html' title='Connecting to Firebird in C#'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-114432428149379246</id><published>2006-04-06T08:27:00.001-03:00</published><updated>2008-10-25T04:44:02.834-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Firebird'/><title type='text'>Howto: Mono, SharpDevelop and Firebird on Windows</title><content type='html'>I took some time to make these 3 wonderfull things work together, but as I'm  a nice guy, I'll save you the trouble and teach step by step how to make them work together.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mono:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We can start installing mono, this is very easy, just download the installer from &lt;a href="http://www.mono-project.com/Main_Page" target="_blank"&gt;Here&lt;/a&gt; and install it.&lt;br /&gt;&lt;br /&gt;After that you need to add the the mono install on the Windows Path.&lt;br /&gt;&lt;br /&gt;To do that, right click on My Computer -&gt; Properties -&gt; Advanced -&gt; Environment Vars, chose PATH on the list on the bottom and click on Edit.&lt;br /&gt;&lt;br /&gt;You need to add mono´s bin folder, for example if you installed mono on: C:\Program Files\Mono, the path Would be: C:\Program Files\Mono\bin.&lt;br /&gt;&lt;br /&gt;After doing this we need to set up another environment var, Click in New and Add this var:&lt;br /&gt;&lt;br /&gt;MONO_EXTERNAL_ENCODINGS&lt;br /&gt;&lt;br /&gt;Set it to this value:&lt;br /&gt;&lt;br /&gt;default_locale&lt;br /&gt;&lt;br /&gt;Now your mono is alive and kicking (At least it should be), now we are going to install the Firebird ADO.NET provider.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Firebird ADO.NET Provider:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Download &lt;a href="http://nant.sourceforge.net/" taget="_blank"&gt;Nant&lt;/a&gt; extract it to wherever you want and add the bin folder to the windows path, the same way you added the firebird bin folder.&lt;br /&gt;&lt;br /&gt;Download and install &lt;a href="http://nunit.sourceforge.net/" target="_blank"&gt;Nunit &lt;/a&gt;2.2&lt;br /&gt;&lt;br /&gt;Download the &lt;a href="http://www.firebirdsql.org/index.php?op=files&amp;amp;id=netprovider" target="_blank"&gt;Firebird 1.7 ADO.NET Provider Souce code&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Extract the source code and execute the build.bat file that is located on the build/win32/ado.net folder of the source code you just extracted.&lt;br /&gt;&lt;br /&gt;If everything is fine you should now have a FirebirdSql.Data.Firebird.dll, place this file wherever you want, you will need to use it on SharpDevelop.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SharpDevelop&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To install SharpDevelop, just download the install from &lt;a href="http://sharpdevelop.net/OpenSource/SD/Download/" target="_blank"&gt;Here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;After installing it, to compile things on mono you need just to set the compiler, to do it, open up a new project, then click on the menu: Project -&gt; Project Options -&gt; Compiling, on then target Framework chose Mono 2.0.&lt;br /&gt;&lt;br /&gt;To use firebird in your project, you need to add a reference to it, to do so, right click on References -&gt; Add Mono Reference -&gt; .NET Assembly Navigator -&gt; Browse, and select your FirebirdSQl.Data.Firebird.dll.&lt;br /&gt;&lt;br /&gt;Thats all you need to start making .NET Applications with Mono and Firebird using SharpDevelop.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-114432428149379246?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/114432428149379246/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=114432428149379246' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114432428149379246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114432428149379246'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/04/howto-mono-sharpdevelop-and-firebird.html' title='Howto: Mono, SharpDevelop and Firebird on Windows'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-114432242706023267</id><published>2006-04-06T08:04:00.000-03:00</published><updated>2007-09-04T16:30:34.379-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Firebird'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C#, .NET and Firebird</title><content type='html'>Hi fellows, its been a long time since my last post, but thats because i m too busy to post here, and i didnt have anything usefull either, but now things are changed.&lt;br /&gt;&lt;br /&gt;Its been around 6 months since i started working on my currenty company, and since the first day i started here i hear my boss saying that we are starting a new ERP system, but my co-workers always said that he said that for his whole life but never started.&lt;br /&gt;&lt;br /&gt;So.. guess what.. i m starting it.&lt;br /&gt;&lt;br /&gt;After talking a lot with him, i m making the project, database and documentation, for now we are still just in paper, but some things are already defined, and one of these things is the language and database that we are going to work with.&lt;br /&gt;&lt;br /&gt;And that would be C# and Firebird.&lt;br /&gt;&lt;br /&gt;But it isnt going just to stop there, as you may already know i love linux and i just use linux at home, even if most of our customers just run windows, we are making this thing run on linux and windows.. how?&lt;br /&gt;&lt;br /&gt;The answer for that question is simple:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mono-project.com/Main_Page" target="_blank"&gt;MONO&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So i ve been very very busy learning C#, ADO.NET and trying to make everything work on mono.&lt;br /&gt;&lt;br /&gt;But for now i m just saying this, soon i ll start posting some code snippets as usual, but the thing is:&lt;br /&gt;&lt;br /&gt;Mono r0x!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-114432242706023267?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/114432242706023267/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=114432242706023267' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114432242706023267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114432242706023267'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/04/c-net-and-firebird.html' title='C#, .NET and Firebird'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-114224789999752233</id><published>2006-03-13T08:01:00.000-03:00</published><updated>2007-09-04T16:30:49.854-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Converting Audio files with Sound Converter</title><content type='html'>Some time ago i started writing my first linux app, and it was a simple app to convert some audio files, like mpc, flac, wav, ogg, into mp3, but i found out that it was already being made, so i stopped.&lt;br /&gt;&lt;br /&gt;At that time sound converter didnt work properly, it was in a very early development stage, but now its working fine! I tested it out with some mpc files i had to convert and it works perfectly.&lt;br /&gt;&lt;br /&gt;So if you need to convert any audio file, Sound Converter is worth a try!&lt;br /&gt;&lt;br /&gt;You can download it at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://soundconverter.berlios.de/" target="_blank"&gt;Sound Converter&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here a screenshot:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://soundconverter.berlios.de/Screenshot-SoundConverter.png" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-114224789999752233?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/114224789999752233/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=114224789999752233' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114224789999752233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114224789999752233'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/03/converting-audio-files-with-sound.html' title='Converting Audio files with Sound Converter'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-114224764422851771</id><published>2006-03-13T07:57:00.000-03:00</published><updated>2007-09-04T16:31:04.279-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Vim Cheat Sheet</title><content type='html'>I found a nice vim cheat sheet at the ubuntu forums, and i m sharing it with the few souls that lose their time reading this useless blog.. here you go:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tjl2.com/sysadmin/vim-cheat-sheet.html" target="_blank"&gt;&lt;img src="http://www.tjl2.com/img/vimcheatsheet-1.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Cheat Sheet is in PDF format. I ve already printed mine, what are you waiting for?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-114224764422851771?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/114224764422851771/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=114224764422851771' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114224764422851771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114224764422851771'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/03/vim-cheat-sheet.html' title='Vim Cheat Sheet'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-114190234169079084</id><published>2006-03-09T08:00:00.000-03:00</published><updated>2007-09-04T16:31:14.817-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>In love with python</title><content type='html'>Hi fellows, its been a looooooooong time since i posted my last useless post on this blog, and do you know why?&lt;br /&gt;&lt;br /&gt;Its all Python's fault! You should blame python for this! why?&lt;br /&gt;&lt;br /&gt;Cause python is so freaking easy to code, that i dont have anything usefull to post here, maybe i can write a pygtk + glade begginers tutorial soon, but for now, i ll just post the Zen of python:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;The Zen of Python, by Tim Peters&lt;br /&gt;&lt;br /&gt;Beautiful is better than ugly.&lt;br /&gt;Explicit is better than implicit.&lt;br /&gt;Simple is better than complex.&lt;br /&gt;Complex is better than complicated.&lt;br /&gt;Flat is better than nested.&lt;br /&gt;Sparse is better than dense.&lt;br /&gt;Readability counts.&lt;br /&gt;Special cases aren't special enough to break the rules.&lt;br /&gt;Although practicality beats purity.&lt;br /&gt;Errors should never pass silently.&lt;br /&gt;Unless explicitly silenced.&lt;br /&gt;In the face of ambiguity, refuse the temptation to guess.&lt;br /&gt;There should be one-- and preferably only one --obvious way to do it.&lt;br /&gt;Although that way may not be obvious at first unless you're Dutch.&lt;br /&gt;Now is better than never.&lt;br /&gt;Although never is often better than *right* now.&lt;br /&gt;If the implementation is hard to explain, it's a bad idea.&lt;br /&gt;If the implementation is easy to explain, it may be a good idea.&lt;br /&gt;Namespaces are one honking great idea -- let's do more of those!&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Anyway, i started coding python at work now, i ve finished my php jobs (almost to tell the truth), and i m coding some new projects using python, and have so much fun with it!&lt;br /&gt;&lt;br /&gt;And thats it, i ll start learning django so i can code my web based stuff on python too, and then i ll be a one language man: python, ops, thats not true, i think that isnt going to be easy to leave php behind, and besides i started in computer science at a cheap (and stupid) university, and i m learning some C code, so its impossible to stick with python 100% of the time, but i ll try my best :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-114190234169079084?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/114190234169079084/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=114190234169079084' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114190234169079084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/114190234169079084'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/03/in-love-with-python.html' title='In love with python'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113879015979363266</id><published>2006-02-01T08:14:00.000-02:00</published><updated>2006-02-01T08:37:53.050-02:00</updated><title type='text'>Getting started with ajax</title><content type='html'>For some time now i ve been reading a lot about &lt;a href="http://en.wikipedia.org/wiki/AJAX" target="_blank"&gt;ajax&lt;/a&gt;.  and all its concepts and use, and as i am very bored at work, i decided to do some ajax stuff with my own hands (even this meaning ctrl + c, ctrl + v).&lt;br /&gt;&lt;br /&gt;So i decided to start with a simple thing.. i have some stuff i made that when you change a select box it refreshes the page and load a list of clients based on what you choose no the first checkbox.. so why not avoid this stupid refresh and just use ajax to load the new checkbox? So here we go.&lt;br /&gt;&lt;br /&gt;The first thing to do is start the XMLHttpRequest, i dont understand much of this myself, but it just works, here we go:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function getHTTPObject() {&lt;br /&gt; var xmlhttp;&lt;br /&gt; /*@cc_on&lt;br /&gt; @if (@_jscript_version &amp;gt;= 5)&lt;br /&gt;  try {&lt;br /&gt;   xmlhttp = new ActiveXObject(&amp;quot;Msxml2.XMLHTTP&amp;quot;);&lt;br /&gt;  }&lt;br /&gt; catch (e) {&lt;br /&gt;  try {&lt;br /&gt;   xmlhttp = new ActiveXObject(&amp;quot;Microsoft.XMLHTTP&amp;quot;);&lt;br /&gt;  } catch (E) {&lt;br /&gt;   xmlhttp = false;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; @else&lt;br /&gt;  xmlhttp = false;&lt;br /&gt; @end @*/&lt;br /&gt; if (!xmlhttp &amp;amp;&amp;amp; typeof XMLHttpRequest != 'undefined') {&lt;br /&gt;  try {&lt;br /&gt;   xmlhttp = new XMLHttpRequest();&lt;br /&gt;  }&lt;br /&gt;  catch (e) {&lt;br /&gt;   xmlhttp = false;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; return xmlhttp;&lt;br /&gt;}&lt;br /&gt;var http = getHTTPObject(); // We create the HTTP Object&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we have our HTTP Object on the http var, time to make some functions to make the dirty work.&lt;br /&gt;&lt;br /&gt;First we need a function to read the ajax responses for the events we are gonna send to it:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function handleHttpResponse() {&lt;br /&gt; if (http.readyState == 4) {  document.getElementById(&amp;quot;hiddenDIV&amp;quot;).style.visibility=&amp;quot;visible&amp;quot;;&lt;br /&gt;  document.getElementById(&amp;quot;hiddenDIV&amp;quot;).innerHTML=http.responseText;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This function reads the XMLHttpRequest State, 4 means loaded, that means that our request was fine and what we asked for it to do is done, so we can show it up on our page, notice that what the function above do is just show a div that was hidden, but our code goes beyond this.&lt;br /&gt;&lt;br /&gt;So we have the function to show up our stuff.. now we need the stuff do show dont we? &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var url = &amp;quot;select_cli.php?ved_cod=&amp;quot;;&lt;br /&gt;function getagents(ved_cod) {&lt;br /&gt; var myRandom=parseInt(Math.random()*99999999);&lt;br /&gt; // cache buster&lt;br /&gt; http.open(&amp;quot;GET&amp;quot;, url + escape(ved_cod), true);&lt;br /&gt; http.onreadystatechange = handleHttpResponse; http.send(null);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This function will open the select_cli.php file, and send our data using GET, our data in this case is a vendor id, so it is the same to open the select_cli.php like this: select_cli.php?ved_cod=1.&lt;br /&gt;After opening the file and sending the GET request, it tests the state of the file and send it to our previous function handleHttpResponse.&lt;br /&gt;&lt;br /&gt;Now lets look at our selec_cli.php file.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?&lt;br /&gt;$conexao_id = conectar_firebird();&lt;br /&gt;if(is_numeric($_GET['ved_cod'])) {&lt;br /&gt; echo $ved_cod;&lt;br /&gt; $ved_cod = addslashes($_GET['ved_cod']);&lt;br /&gt; $sql_cli = &amp;quot;SELECT cli_nome, cli_cod FROM clientes WHERE ved_cod='$ved_cod'&lt;br /&gt;             ORDER BY cli_nome ASC&amp;quot;;&lt;br /&gt; $clientes = consulta($conexao_id, $sql_cli);&lt;br /&gt;  if($clientes) {&lt;br /&gt;   echo '&amp;lt;select name=&amp;quot;cli_cod&amp;quot;&amp;gt;&lt;br /&gt;     &amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;Selecione um Cliente&amp;lt;/option&amp;gt;';&lt;br /&gt;   foreach($clientes as $dados_cli) {&lt;br /&gt;      echo '&lt;br /&gt;        &amp;lt;option value=&amp;quot;' . $dados_cli['CLI_COD'] . '&amp;quot;&amp;gt;' . $dados_cli['CLI_NOME'] . '&amp;lt;/option&amp;gt;';&lt;br /&gt;    }&lt;br /&gt;   echo '&amp;lt;/select&amp;gt;';&lt;br /&gt;  }&lt;br /&gt;}else {&lt;br /&gt; echo '&amp;lt;select name=&amp;quot;temp&amp;quot;&amp;gt;&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;Selecione um vendedor!&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;';&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see the only thing this stuff do is show a select box, and the final step is to set the action that is gonna call all this stuff.. like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;select name=&amp;quot;ved_cod&amp;quot; onchange=&amp;quot;getagents(this.value);&amp;quot;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And off course, we need our hidden div(or span like i used here):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;span id=&amp;quot;hiddenDIV&amp;quot; style=&amp;quot;visibility:hidden;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After this we can just enjoy our clients select box appearing when we select a vendor.. nice isnt it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113879015979363266?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113879015979363266/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113879015979363266' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113879015979363266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113879015979363266'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/02/getting-started-with-ajax.html' title='Getting started with ajax'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113797580025268053</id><published>2006-01-22T22:19:00.000-02:00</published><updated>2007-09-04T16:31:51.187-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Some fun with javascript, Shake it baby!</title><content type='html'>Just open a firefox or internet explorer window, rezise it and make it small, something smaller than 1/4 of your screen, then type one of this codes on the adress bar:&lt;br /&gt;&lt;br /&gt;&lt;input name="1" size="80" value="javascript:a=0;x=0;y=0;setInterval(&amp;quot;a+=.01;x=Math.cos(a*3)*10;y=Math.sin(a*2)*10;moveBy(x,y)&amp;quot;,10);void(O)" type="text"&gt;&lt;br /&gt;&lt;br /&gt;Shake it baby!&lt;br /&gt;&lt;input name="1" size="80" value="javascript:a=0;x=0;y=0;setInterval(&amp;quot;a+=.1;x=Math.cos(a*3)*10;y=Math.sin(a*2)*10;moveBy(x,y)&amp;quot;,10);void(O)" type="text"&gt;&lt;br /&gt;&lt;br /&gt;Dance dance!&lt;br /&gt;&lt;input name="1" size="80" value="javascript:a=0;x=0;y=0;setInterval(&amp;quot;a+=0.1;x=8*Math.tan(3*a)*Math.sin(a);y=8*Math.sin(3*a);moveBy(x,y)&amp;quot;,8);void(0)" type="text"&gt;&lt;br /&gt;&lt;br /&gt;Source: &lt;a href="http://200.221.3.178/showthread.php?s=&amp;threadid=398966&amp;amp;perpage=30&amp;amp;pagenumber=1" target="_blank"&gt;Forum Hardmob&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113797580025268053?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113797580025268053/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113797580025268053' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113797580025268053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113797580025268053'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/01/some-fun-with-javascript-shake-it-baby.html' title='Some fun with javascript, Shake it baby!'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113775376923163946</id><published>2006-01-20T08:37:00.000-02:00</published><updated>2007-09-04T16:32:18.441-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Living and learning...</title><content type='html'>I think you all remember this post:&lt;a href="http://yacoding.blogspot.com/2005/12/php-2006-calendar-12-lines-of-dirty.html"&gt;php 2006 calendar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;if you look at the comments, Zed said...&lt;br /&gt;&lt;br /&gt;   'cal 2006' has almost the exact same output and just needs to be wrapped in a pre-tag.&lt;br /&gt;&lt;br /&gt;so.. all that stupid code i wrote can be changed to this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$year = 2006;&lt;br /&gt;exec("cal $year", $result);&lt;br /&gt;echo "&amp;lt;pre&amp;gt;";&lt;br /&gt;foreach ($result as $r) { print "$r&amp;lt;br /&amp;gt;"; }&lt;br /&gt;echo "&amp;lt;/pre&amp;gt;";&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;i feel ashamed of my newbieness, but at same time, glad i shared this code and learned from my mistake :)&lt;br /&gt;&lt;br /&gt;And i m sure you all remember this post as well:&lt;br /&gt;&lt;a href="http://yacoding.blogspot.com/2005/12/working-with-dates-in-php.html"&gt;Working with dates in php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, i make all that crap to compare 2 dates, but this strtotime() do the trick very easily, like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;if(strtotime($date1) &gt; strtotime($date2)) do_something();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;How dumb can i be?&lt;br /&gt;&lt;br /&gt;After all this, now i know that i can be pretty dumb :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113775376923163946?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113775376923163946/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113775376923163946' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113775376923163946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113775376923163946'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/01/living-and-learning.html' title='Living and learning...'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113775330196177064</id><published>2006-01-20T08:24:00.000-02:00</published><updated>2007-09-04T16:33:28.929-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Form submission confirmation</title><content type='html'>Have you ever need to ask a user if he *really* wants to submit i form?&lt;br /&gt;If you never had to do it, someday you will, so i ll share you some little code :)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function confirmSubmit(){&lt;br /&gt;var agree=confirm("Are you sure you want to submit this?");&lt;br /&gt;if (agree)&lt;br /&gt;  Submit();&lt;br /&gt;else&lt;br /&gt;  return false ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function Submit(){&lt;br /&gt;document.forms['form_id'].method="post";&lt;br /&gt;document.forms['form_id'].submit();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Use it like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;input type="submit" name="sub" value="Whatever" onclick="return confirmSubmit()" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Do i need to explain?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113775330196177064?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113775330196177064/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113775330196177064' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113775330196177064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113775330196177064'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/01/form-submission-confirmation.html' title='Form submission confirmation'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113775236730598494</id><published>2006-01-20T08:03:00.001-02:00</published><updated>2008-10-25T04:51:21.811-02:00</updated><title type='text'>Playing with javascript and checkboxes</title><content type='html'>As you may know already, when I want to do something, I try, try, till either one of these things happens: I make it work, or I die. I m still alive, so that means I won another one :)&lt;br /&gt;&lt;br /&gt;The problem:&lt;br /&gt;I was coding some user rights in a php system, it had some categories, and each category had a lot of stuff in it, and in almost all the cases the administrator want to set the rights by category and not one by one (imagine yourself clicking on 100+ checkboxes to configure the user rights), so i needed something that when you click on the category, it automatically checks all the sub-checkboxes in that category, that sounds easy, and it *was* until microsoft invented a virus called Internet Explorer.&lt;br /&gt;&lt;br /&gt;The first version I made was easy and worked in the first try, but when I tried that on the stupid Internet Explorer, it didn't work, I tried changing a lot of things but it still didn't want to work, so I rewrote everything from scratch.&lt;br /&gt;&lt;br /&gt;&lt;pre class="javascript" name="code"&gt;&lt;br /&gt;function checkUncheckAll(z,id) {&lt;br /&gt;  if(z == 100 || z == 200 || z == 300 || z == 400) {&lt;br /&gt;    var y = z+100, x = 0, x1 = 0, check = 0;&lt;br /&gt;    var inputs = document.getElementsByTagName(&amp;quot;input&amp;quot;);&lt;br /&gt;    x1 = 'ck_' + z + '_' + id;&lt;br /&gt;    x = 'ck_' + z + '_' + id;&lt;br /&gt;    for (var i=0; i&amp;lt;inputs.length; i++) {&lt;br /&gt;      if (inputs[i].name == x1) {&lt;br /&gt;        check = inputs[i].checked;&lt;br /&gt;      }&lt;br /&gt;      x = 'ck_' + z + '_' + id;&lt;br /&gt;      if(inputs[i].name == x) {&lt;br /&gt;        inputs[i].checked = check;&lt;br /&gt;        z++;&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  } else {&lt;br /&gt;    return false;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Use it like this:&lt;br /&gt;&lt;pre class="javascript" name="code"&gt;&lt;br /&gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ck_400_1&amp;quot; onclick=&amp;quot;checkUncheckAll(400, 1);&amp;quot; /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Let me explain, it is *very* important to name your checkbox like this: ck_400_1, ck_402_1, so when i click on the ck_400_1, it will sum 1 to 400 and loop till it checks all the checkboxes till 499, easy isn't it?&lt;br /&gt;&lt;br /&gt;The secret to make it work on that virus called IE was this:     var inputs = document.getElementsByTagName("input");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113775236730598494?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113775236730598494/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113775236730598494' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113775236730598494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113775236730598494'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/01/playing-with-javascript-and-checkboxes.html' title='Playing with javascript and checkboxes'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113615299992914728</id><published>2006-01-01T20:02:00.000-02:00</published><updated>2007-09-04T16:33:44.871-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Nice try</title><content type='html'>&lt;img src="http://img495.imageshack.us/img495/9215/nicetry26zp3ix.jpg" alt="Nice Try" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113615299992914728?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113615299992914728/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113615299992914728' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113615299992914728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113615299992914728'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2006/01/nice-try.html' title='Nice try'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113545835081477398</id><published>2005-12-24T19:03:00.000-02:00</published><updated>2007-09-04T16:33:59.446-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>BUG #1 in Ubuntu</title><content type='html'>&lt;b&gt;Bug #1 in Ubuntu: "Microsoft has a majority market share"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Microsoft has a majority market share in the new desktop PC marketplace. This is a bug, which Ubuntu is designed to fix.&lt;br /&gt;&lt;br /&gt;Here is the link:&lt;br /&gt;&lt;a href="https://launchpad.net/distros/ubuntu/+bug/1" target="_blank"&gt;https://launchpad.net/distros/ubuntu/+bug/1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It can take a long time, but i m sure that they are gonna fix it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113545835081477398?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113545835081477398/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113545835081477398' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113545835081477398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113545835081477398'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/bug-1-in-ubuntu.html' title='BUG #1 in Ubuntu'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113545810092240325</id><published>2005-12-24T18:35:00.000-02:00</published><updated>2007-09-04T16:34:11.431-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Gonna buy a new pc?</title><content type='html'>Most people complains about incompatibility when they try installing linux, the most common is:&lt;br /&gt;&lt;br /&gt;"I couldnt make X card to work under linux, so i uninstalled it"&lt;br /&gt;&lt;br /&gt;"I can get my 56k modem (winmodem) to work under linux, so i gave up"&lt;br /&gt;&lt;br /&gt;"My 3d card isnt working and i dont understand what should i do"&lt;br /&gt;&lt;br /&gt;"My sound card didnt work out of the box, and i dont know how to make it work"&lt;br /&gt;&lt;br /&gt;Everything in my ubuntu install worked out of the box, so, why did mine worked and yours didnt?&lt;br /&gt;&lt;br /&gt;Cause you suck :)&lt;br /&gt;&lt;br /&gt;Just kidding, cause before buying my pc, i checked if every single piece of hardware would work under linux (Ubuntu), so i installed ubuntu here after buying it, and didnt have to configure even a single card, of course my 3d aceleration didnt work out of the box, but that was easily fixed installing the NVidia linux driver from their website.&lt;br /&gt;&lt;br /&gt;So if i would give you some tips, it would be the following:&lt;br /&gt;&lt;br /&gt;1 - Dont freaking buy ANY ATI cards, they 3d driver sucks, and sucks hard, i have a Geforce Ti4200, but i had an ATI Radeon 9800pro 128MB, believe me, the TI4200 beats the radeon in any game under linux.&lt;br /&gt;&lt;br /&gt;2 - If you have, or are gonna buy a winmodem, stay away from linux, it can work, but isnt worth the headache that you are gonna have, you have 3 choices: buy a descent modem (kinda difficult to find), sign some broadband conection, or stay with windows.&lt;br /&gt;&lt;br /&gt;3 - You all know that most people these days buy those "onboard" motherboards, that have everything (sometimes even the cpu) onboard.&lt;br /&gt;STAY AWAY FROM THIS SHIT! If you are gonna buy an "all" onboard motherboard remember what i m saying here. YOU ARE GONNA REGRET IT.&lt;br /&gt;Onboard motherboards are the worst thing that people ever invented, of couse i m not talking about sound and lan onboard, that is ok, my mobo have a sound/lan onboard, but dont freaking buy an "all-onboard" motherboard, its performance just SUCK, and you are gonna have a lot of headaches just to save a few bucks.&lt;br /&gt;&lt;br /&gt;4 - Chosing a good mobo with a good chipset is the key for a good pc and good performance, i m stuck with the NVidia NForce chipset since NForce2, i had some via chipsets but they arent good as the NForce ones, and the better part, all NForce chipsets should work out of the box in most linux distros, cause nvidia have drivers for it.&lt;br /&gt;&lt;br /&gt;5 - Cpu, i m an AMD lover, so i m suspicious, but the tip is: A slow cpu with a good mobo, is better than the fastest cpu on earth with a pcchips all onboard mobo, save money here, but dont think about saving money when buying your mobo, the cpu is the heart, but without a good body (mobo), it will just beat, but will never walk. :)&lt;br /&gt;If you dont have much money right now, buy a good mobo, and buy the cheapest cpu you find, but think about upgrading it in the future, so if you mobo supports an Athlon 64, buy any cheap semprom you find, and when you have money for an upgrade, buy an Athlon 64.&lt;br /&gt;&lt;br /&gt;6 - Always think about the future when buying a new pc, "Can i upgrade it in the future?" if the answer is NO, try finding something else to buy, if you are short of money, buy the cheapest 3d card you find, the cheapest cpu and an awesome mobo, and when you get some money, buy a new vga card, and after it a new cpu, or more ram.&lt;br /&gt;&lt;br /&gt;7 - This is a parody ok? But search for this simbol before buying:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;img src="http://img169.imageshack.us/img169/14/designedforubuntu5qu.jpg" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113545810092240325?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113545810092240325/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113545810092240325' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113545810092240325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113545810092240325'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/gonna-buy-new-pc.html' title='Gonna buy a new pc?'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113545601194141695</id><published>2005-12-24T18:25:00.000-02:00</published><updated>2005-12-24T18:26:51.940-02:00</updated><title type='text'>My christmas gift just arrived today</title><content type='html'>Do i need to explain?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://img368.imageshack.us/my.php?image=ubuntu18ee.jpg" target="_blank"&gt;&lt;img src="http://img368.imageshack.us/img368/9018/ubuntu18ee.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113545601194141695?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113545601194141695/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113545601194141695' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113545601194141695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113545601194141695'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/my-christmas-gift-just-arrived-today.html' title='My christmas gift just arrived today'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113545545359690587</id><published>2005-12-24T18:13:00.000-02:00</published><updated>2007-09-04T16:34:35.965-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Ubuntu 5.10 Breezy Badger stable?</title><content type='html'>&lt;a href="http://img362.imageshack.us/my.php?image=uptime3cq.jpg" target="_blank"&gt;&lt;img src="http://img362.imageshack.us/img362/5774/uptime3cq.th.jpg" alt="Free Image Hosting at www.ImageShack.us" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Oh wait, you are gonna say "My server have a 3 years uptime".&lt;br /&gt;&lt;br /&gt;But this is a DESKTOP pc, MY pc, and i play games, compile stuff, install a lot of things, and i dont have ANY nobreaks or stuff, i got lucky cause we didnt have any power failure this month so this is my uptime.&lt;br /&gt;&lt;br /&gt;And wait, i just took this screenshot cause its rainning today, my ubuntu box is still up and kicking, and it will just go down, when some hardware blow up or we have a power failure.&lt;br /&gt;&lt;br /&gt;Is it stable enough? ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113545545359690587?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113545545359690587/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113545545359690587' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113545545359690587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113545545359690587'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/ubuntu-510-breezy-badger-stable.html' title='Ubuntu 5.10 Breezy Badger stable?'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113522367999356898</id><published>2005-12-22T01:53:00.000-02:00</published><updated>2007-09-04T16:34:52.602-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Found an usefull tool to post html code in a blog</title><content type='html'>This tool saved me from headeaches, cause posting php code when it have html code inside is a pain, this saved me:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.uccs.edu/%7Ecbrewer/tools/translate_entities.html" target="_blank"&gt;http://www.uccs.edu/~cbrewer/tools/translate_entities.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113522367999356898?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113522367999356898/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113522367999356898' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113522367999356898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113522367999356898'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/found-usefull-tool-to-post-html-code.html' title='Found an usefull tool to post html code in a blog'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113522282308317117</id><published>2005-12-22T01:35:00.000-02:00</published><updated>2007-09-04T16:35:06.224-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>php 2006 calendar, 12 lines of dirty code :)</title><content type='html'>&lt;pre&gt;&lt;b&gt;&lt;br /&gt;for($i = 1; $i &amp;lt;= 12; $i++) {&lt;br /&gt;echo '&amp;lt;td style="padding: 10px;"&amp;gt;';&lt;br /&gt;$month = $i;&lt;br /&gt;$year = 2006;&lt;br /&gt;exec("cal $month $year", $result);&lt;br /&gt;echo "&amp;lt;pre&amp;gt;";&lt;br /&gt;foreach ($result as $r) { print "$r&amp;lt;br /&amp;gt;"; }&lt;br /&gt;echo "&amp;lt;/pre&amp;gt;";&lt;br /&gt;echo '&amp;lt;/td&amp;gt;';&lt;br /&gt;if($i == 3 or $i == 6 or $i == 9) echo '&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;';&lt;br /&gt;unset($result);&lt;br /&gt;}&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And here is the result:&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;    January 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;1  2  3  4  5  6  7&lt;br /&gt;8  9 10 11 12 13 14&lt;br /&gt;15 16 17 18 19 20 21&lt;br /&gt;22 23 24 25 26 27 28&lt;br /&gt;29 30 31&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;   February 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;        1  2  3  4&lt;br /&gt;5  6  7  8  9 10 11&lt;br /&gt;12 13 14 15 16 17 18&lt;br /&gt;19 20 21 22 23 24 25&lt;br /&gt;26 27 28&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;     March 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;        1  2  3  4&lt;br /&gt;5  6  7  8  9 10 11&lt;br /&gt;12 13 14 15 16 17 18&lt;br /&gt;19 20 21 22 23 24 25&lt;br /&gt;26 27 28 29 30 31&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;     April 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;                 1&lt;br /&gt;2  3  4  5  6  7  8&lt;br /&gt;9 10 11 12 13 14 15&lt;br /&gt;16 17 18 19 20 21 22&lt;br /&gt;23 24 25 26 27 28 29&lt;br /&gt;30&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;      May 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;  1  2  3  4  5  6&lt;br /&gt;7  8  9 10 11 12 13&lt;br /&gt;14 15 16 17 18 19 20&lt;br /&gt;21 22 23 24 25 26 27&lt;br /&gt;28 29 30 31&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;     June 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;           1  2  3&lt;br /&gt;4  5  6  7  8  9 10&lt;br /&gt;11 12 13 14 15 16 17&lt;br /&gt;18 19 20 21 22 23 24&lt;br /&gt;25 26 27 28 29 30&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;     July 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;                 1&lt;br /&gt;2  3  4  5  6  7  8&lt;br /&gt;9 10 11 12 13 14 15&lt;br /&gt;16 17 18 19 20 21 22&lt;br /&gt;23 24 25 26 27 28 29&lt;br /&gt;30 31&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;    August 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;     1  2  3  4  5&lt;br /&gt;6  7  8  9 10 11 12&lt;br /&gt;13 14 15 16 17 18 19&lt;br /&gt;20 21 22 23 24 25 26&lt;br /&gt;27 28 29 30 31&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;   September 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;              1  2&lt;br /&gt;3  4  5  6  7  8  9&lt;br /&gt;10 11 12 13 14 15 16&lt;br /&gt;17 18 19 20 21 22 23&lt;br /&gt;24 25 26 27 28 29 30&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;    October 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;1  2  3  4  5  6  7&lt;br /&gt;8  9 10 11 12 13 14&lt;br /&gt;15 16 17 18 19 20 21&lt;br /&gt;22 23 24 25 26 27 28&lt;br /&gt;29 30 31&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;   November 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;        1  2  3  4&lt;br /&gt;5  6  7  8  9 10 11&lt;br /&gt;12 13 14 15 16 17 18&lt;br /&gt;19 20 21 22 23 24 25&lt;br /&gt;26 27 28 29 30&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td style="padding: 10px;"&gt;&lt;pre&gt;   December 2006&lt;br /&gt;Su Mo Tu We Th Fr Sa&lt;br /&gt;              1  2&lt;br /&gt;3  4  5  6  7  8  9&lt;br /&gt;10 11 12 13 14 15 16&lt;br /&gt;17 18 19 20 21 22 23&lt;br /&gt;24 25 26 27 28 29 30&lt;br /&gt;31&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113522282308317117?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113522282308317117/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113522282308317117' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113522282308317117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113522282308317117'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/php-2006-calendar-12-lines-of-dirty.html' title='php 2006 calendar, 12 lines of dirty code :)'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113496877218599083</id><published>2005-12-19T02:57:00.001-02:00</published><updated>2008-10-25T04:53:50.901-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><title type='text'>Writing some classes in php</title><content type='html'>Last friday I was kinda bored at work so I decided to renew my functions and write some classes, I started with the ones that I use most, and just wrote a class to conect, execute a sql query and return an array with the data using a firebird database, nothing really usefull, but makes my life easier.&lt;br /&gt;&lt;pre class="php" name="code"&gt;&lt;br /&gt;class firebird{&lt;br /&gt; var $conexao_id;&lt;br /&gt; function firebird() {&lt;br /&gt;   $bd = "localhost:/path/to/database.gdb";&lt;br /&gt;   $usr = "SYSDBA";&lt;br /&gt;   $snh = "masterkey";&lt;br /&gt;   $charset ="ISO8859_1";&lt;br /&gt;   # Conecta ao banco de dados&lt;br /&gt;   $this-&gt;conexao_id = ibase_connect($bd, $usr, $snh, $charset) or die("Erro na conexão: ".ibase_errmsg());&lt;br /&gt;   return $this-&gt;conexao_id;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function consulta($sql){&lt;br /&gt;   if($sql != '') {&lt;br /&gt;     $resultado = ibase_query($this-&gt;conexao_id, sprintf($sql)) or die(ibase_errmsg());&lt;br /&gt;     while($item = ibase_fetch_assoc($resultado)){&lt;br /&gt;       $items[] = $item;&lt;br /&gt;     }&lt;br /&gt;     $rows = count($items);&lt;br /&gt;     if($rows &gt; 0) {&lt;br /&gt;       ibase_free_result($resultado);&lt;br /&gt;       return $items;&lt;br /&gt;     } else {&lt;br /&gt;       return false;&lt;br /&gt;     }&lt;br /&gt;   } else {&lt;br /&gt;     return false;&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt; function fechar() {&lt;br /&gt;   ibase_close($this-&gt;$conexao_id);&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;This is just the begging, I'm planning to convert all my functions to OOP and try to make them as much reusable as possible :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113496877218599083?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113496877218599083/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113496877218599083' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113496877218599083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113496877218599083'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/writing-some-classes-in-php.html' title='Writing some classes in php'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113496648902510153</id><published>2005-12-19T02:13:00.000-02:00</published><updated>2007-09-04T16:41:48.846-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Essays'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Readings for open minded people :)</title><content type='html'>Today after browsing thousands and thousands of random pages to get rid of my usual sunday boredom, i found 3 interesting pages, they are 3 texts meant for open minded people, if you people think that you crazy, or you are always agaisnt everything, or sometimes you just feel out of place, i think that these 3 texts are for you, everybody thinks that i m crazy, i m always the only one that goes against the mass, and i m always feeling out of place so i read them all :).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.geocities.com/mdetting/unmaintainable.html" target="_blank"&gt;How To Write Unmaintainable Code, Ensure a job for life ;-)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This one is talking in a very ironic way, but everything that is said there is true, i garantee it, i sometimes find some of these codes, and sometimes i write some myself, i need a job too you know..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cantrip.org/gatto.html" target="_blank"&gt;The Six-Lesson Schoolteacher&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This one is very interesting, thats that way i think about school, and i was aways a bad kid, i never did what the teacher said, and i was the first one to rant about doing something that i didnt want to do, and as you may know i didnt start my university, and maybe i never will, i will join a university when i find something that i really want to learn, i dont wanna learn a piece of everything and never be good at anything.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.godlessgeeks.com/WhyAtheism.htm" target="_blank"&gt;Why Atheism? by Mark Thomas&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This one is like i think about religion too, i say always that these things about the past of the church and religion, but people refuses to believe, hope they go to heaven, cause i ll not.&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/19110059-113496648902510153?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113496648902510153/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113496648902510153' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113496648902510153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113496648902510153'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/readings-for-open-minded-people.html' title='Readings for open minded people :)'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113466595029794955</id><published>2005-12-15T14:50:00.000-02:00</published><updated>2007-09-04T16:36:07.967-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Working with dates in php</title><content type='html'>Today i had to make some boring coding again, and i had to sum some dates and some stuff like it, and as i m kinda lazy today, i m not gonna descripe anything.. just cut and paste the code :P&lt;br /&gt;&lt;br /&gt;find the difference between 2 dates:&lt;br /&gt;&lt;pre&gt;&lt;b&gt;function data_dif($endDate, $beginDate) {&lt;br /&gt;$date_parts1 = explode("/", $beginDate);&lt;br /&gt;$date_parts2 = explode("/", $endDate);&lt;br /&gt;$start_date = gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]);&lt;br /&gt;$end_date = gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]);&lt;br /&gt;return $end_date - $start_date;&lt;br /&gt;}&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;Sum $n days to the current date:&lt;br /&gt;&lt;pre&gt;&lt;b&gt;$new_date = date('d/m/Y', time() + ($n * (86400)));&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;And on of my crazy logics, i had a period, like 30 days, and the first date isnt today, but a user given date, so.. how the hell am i supposed to sum the user given date with 30 days? so i wrote this:&lt;br /&gt;&lt;pre&gt;&lt;b&gt;$diff = data_dif($user_date, date('m/d/Y'));&lt;br /&gt;$first_date = date('m/d/Y', time() + (($diff + $n) * (86400)));&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;Thats it :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113466595029794955?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113466595029794955/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113466595029794955' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113466595029794955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113466595029794955'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/working-with-dates-in-php.html' title='Working with dates in php'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113464246433653077</id><published>2005-12-15T08:10:00.000-02:00</published><updated>2007-09-04T16:36:34.720-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Firebird'/><title type='text'>War against php 5 and firebird.</title><content type='html'>Oh yeah, this useless blog was without any posts for a couple of days because i was stuck in a war between this two things..&lt;br /&gt;&lt;br /&gt;What i needed was simple, i needed to export some database tables into plain text files, this is a new bleding edge technology that the company wich i work is working with, xml is a thing of the past, the new technology is called plain text files.&lt;br /&gt;&lt;br /&gt;So it was easy to export my firebird database into plain text, but firebird and php 5 were in a kinda of a bad mood and decided not to talk, when i exported the data, firebird sent the data to php, but when i sent it to the text file, the data keept freaking repeating, and it repeated the data in a alternate way, i took even a screenshot of how it was:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://img231.imageshack.us/img231/4240/fb6dr.jpg" target="_blank"&gt;&lt;img src="http://img231.imageshack.us/img231/4240/fb6dr.th.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Dont mind the notepad, as you know i work in a big company with bleading edge technology.&lt;br /&gt;&lt;br /&gt;I asked for help in the firebird suppor group (firebird-support@yahoogroups.com), the thread has grown to 30 posts, but still i couldnt find a solution.&lt;br /&gt;&lt;br /&gt;So i dont remember where this idea came from, but i noticed that all the fields that were giving me problems, had something in common, they were all BLANK, so i dont know too how this came to my mind.. i wrote this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;UPDATE CLIENTES SET CLI_BAIRRO = NULL WHERE CLI_BAIRRO = '';&lt;br /&gt;UPDATE CLIENTES SET CLI_ENDERECO = NULL WHERE CLI_ENDERECO = '';&lt;br /&gt;UPDATE CLIENTES SET CLI_LIM_CREDITO = NULL WHERE CLI_LIM_CREDITO ='';&lt;br /&gt;UPDATE CLIENTES SET CLI_OBS = NULL WHERE CLI_OBS ='';&lt;br /&gt;UPDATE CLIENTES SET CLI_CEP = NULL WHERE CLI_CEP ='';&lt;br /&gt;UPDATE CLIENTES SET CLI_CNPJ_CPF = NULL WHERE CLI_CNPJ_CPF ='';&lt;br /&gt;UPDATE CLIENTES SET CLI_IE_RG = NULL WHERE CLI_IE_RG ='';&lt;br /&gt;UPDATE CLIENTES SET CLI_DDD = NULL WHERE CLI_DDD ='';&lt;br /&gt;UPDATE CLIENTES SET CLI_TELEFONE = NULL WHERE CLI_TELEFONE ='';&lt;br /&gt;UPDATE CLIENTES SET CLI_CELULAR = NULL WHERE CLI_CELULAR ='';&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So after setting all the blank fields to NULL, the stupid thing worked...&lt;br /&gt;&lt;br /&gt;But now i had another problem, i tried and tried to make php write NULL in the field but it didnt, if i set:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;b&gt;$var = NULL;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;it would write blank again, so i created a new database with all the fields with NULL default value, but it just recorded NULL when i sent nothing to the query, so i couldnt send an empty var.. so.. what to do?&lt;br /&gt;&lt;br /&gt;Again, the bleding edge technology that i work with would take place, so i made a gambiarra, to write NULL in this stupid think, and this solved my problem:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;b&gt;$sql_clientes = str_replace("''", 'NULL', $sql_clientes);&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So this was the end of my war, now everything is fine and i can work again :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113464246433653077?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113464246433653077/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113464246433653077' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113464246433653077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113464246433653077'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/war-against-php-5-and-firebird.html' title='War against php 5 and firebird.'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113434484561422192</id><published>2005-12-11T21:45:00.000-02:00</published><updated>2007-09-04T16:36:55.750-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>HOWTO: make qt apps look more gnome'ish</title><content type='html'>I ve installed Skype here today and it was UGLY, so i found this howto, and now it is a little less ugly, but kde apps are ugly by nature (sorry kde users), but it got a little better, heres the link for the howto by FLeiXiuS:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=56630" target="_blank"&gt;HOWTO: make qt apps look more gnome'ish&lt;/a&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/19110059-113434484561422192?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113434484561422192/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113434484561422192' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113434484561422192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113434484561422192'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/howto-make-qt-apps-look-more-gnomeish.html' title='HOWTO: make qt apps look more gnome&apos;ish'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113433920650238527</id><published>2005-12-11T20:06:00.000-02:00</published><updated>2007-09-04T16:43:53.317-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>Howto: Install Gaim 2.0 From CVS</title><content type='html'>I ve posted another howto on the ubuntuforums, this howto is meant to help people who dont know how to use cvs, i ve posted a debian package in the how to too, enjoy:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=100899" taget="_blank"&gt;HOWTO: Gaim 2.0 CVS - .deb inside!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now &lt;a href="http://gaim.sf.net/" target="_blank"&gt;Gaim&lt;/a&gt; supports custom emoticons in msn, now my friends are gonna stop complaining that i dont receive their "cute" emoticons .&lt;br /&gt;&lt;br /&gt;Another great improvement was the removal of that stupid away window, that thing was annoying.&lt;br /&gt;&lt;br /&gt;Here the screenshot:&lt;br /&gt;&lt;a href="http://img213.imageshack.us/my.php?image=gaim204fq.jpg" target="_blank"&gt;&lt;img src="http://img213.imageshack.us/img213/4939/gaim204fq.th.jpg" alt="Free Image Hosting at www.ImageShack.us" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And here the debian package for the lazy ones:&lt;br /&gt;&lt;a href="http://xgn.com.br/fabio/gaim_2.0.0cvs2-1_i386.deb" target="_blank"&gt;gaim_2.0.0cvs2-1_i386.deb&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113433920650238527?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113433920650238527/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113433920650238527' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113433920650238527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113433920650238527'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/howto-install-gaim-20-from-cvs.html' title='Howto: Install Gaim 2.0 From CVS'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113433877649780160</id><published>2005-12-11T20:00:00.000-02:00</published><updated>2007-09-04T16:44:07.533-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Enlightened XFCE, now its perfect :)</title><content type='html'>As you can see in the last posts on this blog, i was using xfce as my primary desktop, and had elightenment installed, but didnt use it cause its usability is still very poor, but today in the ubuntu forums, i found the solution for my problems:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=101066" taget="_blank"&gt;Enlightened XFCE&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now i can run my beloved xfce, with the beauty and speed of the enlightenment window manager, i m amazed with my new desktop :)&lt;br /&gt;&lt;br /&gt;take a look at how pretty it became:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://img118.imageshack.us/my.php?image=enlightenedxfce8lm.jpg" target="_blank"&gt;&lt;img src="http://img118.imageshack.us/img118/5245/enlightenedxfce8lm.th.jpg" alt="Free Image Hosting at www.ImageShack.us" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The only problem is that i cant get the e17 window manager to work with the xfcetaskbar, but its just a small detail.&lt;br /&gt;&lt;br /&gt;Now my desktop is Running, XFCE with Enlightenment as a window manager and Thunar as a File Manager, couldnt find a better combination of pretty and lightweight apps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113433877649780160?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113433877649780160/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113433877649780160' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113433877649780160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113433877649780160'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/enlightened-xfce-now-its-perfect.html' title='Enlightened XFCE, now its perfect :)'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113395686504013654</id><published>2005-12-07T07:52:00.000-02:00</published><updated>2005-12-07T10:08:40.343-02:00</updated><title type='text'>Starting to learn C++</title><content type='html'>It can sound crazy, but i decided to learn something new.. so i m going with C++, i just started yesterday with this &lt;a href="http://www.cplusplus.com/doc/tutorial/" target="_blank"&gt;tutorial&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Before starting it, i aways tought that c and c++ were something very difficult, but after starting reading about it, it looks very simple for me now.&lt;br /&gt;&lt;br /&gt;And i m trying to learn vi as well, everyone that uses vi to code says that it is the best thing in the world, i still dont know how to use it, i m gonna learn so i can see myself if its really the best editor as they say, or if they are just crazy.&lt;br /&gt;&lt;br /&gt;And i found this interesting "Cheat Sheet" so i m using it to memorize the vi keys, this is very usefull.&lt;br /&gt;&lt;a href="http://img216.imageshack.us/my.php?image=vicheatfinal1oc.png" target="_blank"&gt;&lt;img src="http://img216.imageshack.us/img216/1678/vicheatfinal1oc.th.png" border="0" alt="Free Image Hosting at www.ImageShack.us" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here my first codes using vim, at least i m already writing something more than a Hello World code.&lt;br /&gt;&lt;a href="http://img225.imageshack.us/my.php?image=cplusplus8bd.jpg" target="_blank"&gt;&lt;img src="http://img225.imageshack.us/img225/6122/cplusplus8bd.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113395686504013654?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113395686504013654/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113395686504013654' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113395686504013654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113395686504013654'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/starting-to-learn-c.html' title='Starting to learn C++'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113388564777470812</id><published>2005-12-06T13:35:00.000-02:00</published><updated>2007-09-04T16:44:54.158-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>Installing e17 from CVS.</title><content type='html'>Yesterday i was kinda boring and decided to try something new, i ve installed e17 some time ago, but it still had very few features (even being just a few they are all cool features).&lt;br /&gt;&lt;br /&gt;I noticed that the same problems that i found when i installed it for the first time are still there.. so here is what i think about it&lt;br /&gt;&lt;br /&gt;1 - When you look at it, you think that with all that eyecandy, it should be slow, but i m sure that everybody get impressed with how fast e17 is, when you open a window or something it just blinks on your screen, if you move things around, maximize, minimize windows you never see a single slowdown, and the better part, it doesnt use much ram, i would say that it uses less ram than XFCE does.&lt;br /&gt;&lt;br /&gt;2 - After using it for a while, the first thing that you miss is a systray, and it was almost solved with &lt;a href="http://ubuntuforums.org/showthread.php?t=61488&amp;highlight=gtk+themes+e17" target="_blank"&gt;Engage&lt;/a&gt;, but in the end i didnt like it too much.&lt;br /&gt;&lt;br /&gt;3 - The next thing that you miss is a file manager.. i needed to use the terminal to open files.. and its too complicated to make simple things, like add a icon or a shortcut in some place.. so i began think about going back to xfce at this time.&lt;br /&gt;&lt;br /&gt;4 - I installed some themes there.. they were all pretty and easy to install.&lt;br /&gt;&lt;br /&gt;5 - but after using it for something like 4 hours straight.. i began to stress out with that thing.. the usability still lacks a lot of things, and e17 just made things that were simple in another desktop too complicated to do there.. so i logged out of it, and came back to my XFCE.&lt;br /&gt;&lt;br /&gt;But even with all this little problems, i loved the way e17 handle the desktop, its a very very promissing "desktop shell", its worth a try, i didnt uninstalled it from my ubuntu box, i ll leave it there just waiting for updates, and maybe someday it will become my default desktop.&lt;br /&gt;&lt;br /&gt;But for now, here are some links and a screenshot of my desktop running e17:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=97199" target="_blank"&gt;Howto: Install e17 from CVS, the easy way&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=54476&amp;amp;highlight=enlightened+gnome" target="_blank"&gt;Howto: Enlightened Gnome&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Screenshot:&lt;br /&gt;&lt;a href="http://img236.imageshack.us/my.php?image=e174fl.jpg" target="_blank"&gt;&lt;img src="http://img236.imageshack.us/img236/6190/e174fl.th.jpg" alt="Free Image Hosting at www.ImageShack.us" 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/19110059-113388564777470812?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113388564777470812/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113388564777470812' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113388564777470812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113388564777470812'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/installing-e17-from-cvs.html' title='Installing e17 from CVS.'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113388324602031964</id><published>2005-12-06T13:25:00.000-02:00</published><updated>2007-09-04T16:46:07.501-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>A64 Power Saving Features</title><content type='html'>Yesterday after i installed e17 on my Ubuntu box, i noticed that e17 had a little app that could make my cpu run @ 800mhz when idle, and when i opened a video or something that required more processing, it automatically set up the speed back to the original 1.8ghz.&lt;br /&gt;&lt;br /&gt;So today i decided to figure out how the hell did that app do it, so i asked in the #ubuntu @ irc.freenode.org and czr told me that it was called "governors" and it was a kernel feature.&lt;br /&gt;&lt;br /&gt;And again my best friend &lt;a href="http://google.com/" target="_blank"&gt;Google&lt;/a&gt; sent me to this howto at &lt;a href="http://www.thinkwiki.org/wiki/How_to_make_use_of_Dynamic_Frequency_Scaling#Using_Frequency_Scaling_Governors" target="_blank"&gt;ThinkWiki.org&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now my pc is downloading my torrents at home as it aways does, running @ 800mhz, saving power, and maybe extending its lifespan.&lt;br /&gt;&lt;br /&gt;Now i love my A64 even more :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113388324602031964?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113388324602031964/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113388324602031964' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113388324602031964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113388324602031964'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/a64-power-saving-features.html' title='A64 Power Saving Features'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113363813051635950</id><published>2005-12-03T17:13:00.000-02:00</published><updated>2007-09-04T16:46:23.634-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>Installing php4 + mysql + apache + phpmyadmin never was so easy.</title><content type='html'>After buying a new sata 120GB samsung hardrive i decided to make a clean install of my &lt;a href="http://www.ubuntulinux.org/" target="_blank"&gt;Ubuntu 5.10, Breezy Badger&lt;/a&gt; and today i decided to reinstall my working stuff cause i still have to make some freelance code.&lt;br /&gt;&lt;br /&gt;What i use to work is kinda simple: PHP4, Mysql, Apache, phpmyadmin and gedit, yes i code php using gedit, any problems with it?&lt;br /&gt;&lt;br /&gt;Btw i just followed this how-to at the Ubuntu wiki: &lt;a href="https://wiki.ubuntu.com/ApacheMySQLPHP" target="_blank"&gt;ApacheMysqlPHP&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;but just for keeping it short, all i did to install it all was type the following on the terminal:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo apt-get install apache2 php4 mysql-server php4-mysql phpmyadmin&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After this i just changed the mysql password, changed the ports.conf to fill my needs (my damn adsl provider blocks my port 80).&lt;br /&gt;&lt;br /&gt;One thing that isnt written in the Wiki, is that, as you may now.. i m brazillian, and here we use the ISO8859-1 charset, so when i opened my websites, some caracters were all messed up, it was solved editing the &lt;b&gt;/etc/php4/apache2/php.ini&lt;/b&gt; and uncommenting the line:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;default_charset = "iso-8859-1"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now my personal webserver is alive and kicking, i ll post later how to install the no-ip app and setup a domain with a dinamic ip, but that will have to wait, i m kinda lazy right now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113363813051635950?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113363813051635950/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113363813051635950' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113363813051635950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113363813051635950'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/12/installing-php4-mysql-apache.html' title='Installing php4 + mysql + apache + phpmyadmin never was so easy.'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113337697152675569</id><published>2005-11-30T16:48:00.001-02:00</published><updated>2008-10-25T04:39:15.796-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Howto'/><title type='text'>Using Javascript OnChange() with php.</title><content type='html'>I'm sure that all php developers who writes more than "Hello World" code, have found themselves needing to feed a combo box when the user select something in another combo box. Like when you select your state, the page fill the cities combo box with all the cities from that state.&lt;br /&gt;&lt;br /&gt;Again, my best friend &lt;a href="http://google.com/" target="_blank"&gt;Google&lt;/a&gt; helped me and I found an easy solution.&lt;br /&gt;&lt;br /&gt;The solution was found in the &lt;a href="http://zazzybob.com/" target="_blank"&gt;Zazzybob.com&lt;/a&gt; website, and here's the &lt;a href="http://zazzybob.com/articles/php/Using_onChange_with_PHP.pdf" target="_blank"&gt;PDF&lt;/a&gt; and the &lt;a href="http://zazzybob.com/onchange.html" target="_blank"&gt;HTML&lt;/a&gt; with the solution for this problem.&lt;br /&gt;&lt;br /&gt;As I'm bored, I'll give you a preview of the code that is in the pdf, see below:&lt;br /&gt;&lt;br /&gt;Here is the javascript code, as you can see, you can post the form to one page with the onchange() and can post the page to another page when you click in the submit button, so here we go:&lt;br /&gt;&lt;br /&gt;Javascript functions:&lt;br /&gt;&lt;pre class="javascript" name="code"&gt;&lt;br /&gt;function resubmit() {&lt;br /&gt; document.form_name.action="some_page.php";&lt;br /&gt; document.form_name.submit();&lt;br /&gt;}&lt;br /&gt;function process() {&lt;br /&gt; document.form_name.action="another_page.php";&lt;br /&gt; document.form_name.submit();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Remember that you have to change the form_name to whatever you name your form.&lt;br /&gt;&lt;br /&gt;And now the html stuff:&lt;br /&gt;&lt;pre class="html" name="code"&gt;&amp;lt;select name="state" onchange="resubmit();"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type="submit" name="sub_form" value="Submit!" onclick="process();"&amp;gt;&lt;/pre&gt;&lt;br /&gt;Now you are asking, where the hell is the php on it?&lt;br /&gt;&lt;br /&gt;In this example, you just need to query your database or use any other method to populate the cities combo box, something like this:&lt;br /&gt;&lt;pre class="php" name="code"&gt;&lt;br /&gt;&amp;lt;?&lt;br /&gt;if($_POST['state']) {&lt;br /&gt; $id = $_POST['state'];&lt;br /&gt; $sql = "SELECT city_id, city_name FROM cities WHERE state='$id'";&lt;br /&gt; ...&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Remember that this is just an example, don't try using this code, you will regret it :)&lt;br /&gt;&lt;br /&gt;For a more detailed explanation, please read the &lt;a href="http://zazzybob.com/articles/php/Using_onChange_with_PHP.pdf" target="_blank"&gt;PDF&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113337697152675569?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113337697152675569/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113337697152675569' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113337697152675569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113337697152675569'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/using-javascript-onchange-with-php.html' title='Using Javascript OnChange() with php.'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113321269621682951</id><published>2005-11-28T19:15:00.000-02:00</published><updated>2007-09-04T16:46:48.304-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Install Thunar file manager on Xubuntu</title><content type='html'>I tried Xubuntu here and it was love at first sight, but the only thing that i disliked about it was the rox-filer, not that its not good, its very fast, but for some reasons i think its too complicated, and i missed some nautilus features.&lt;br /&gt;&lt;br /&gt;The purpose of this thread is to help you install Thunar from svn, its far easier than rox and looks like nautilus, so you will be at home.&lt;br /&gt;&lt;br /&gt;Thunar is still in early development stage, so dont expect too much from it, but it can do the basic stuff, open, copy, move, delete files, etc.&lt;br /&gt;&lt;br /&gt;For more info and screenshots, &lt;a href="http://thunar.xfce.org/index.xhtml" target="_blank"&gt;click here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Here a screenshot:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://img399.imageshack.us/my.php?image=filewindow17ny.png" target="_blank"&gt;&lt;img src="http://img399.imageshack.us/img399/3117/filewindow17ny.th.png" alt="Free Image Hosting at www.ImageShack.us" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Btw.. lets start.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To install xfce (Xubuntu) in breezy is simple:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo apt-get install xubuntu-desktop&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To enter xfce just logoff from your Gnome or KDE Session, click on the session button and choose XFCE.&lt;br /&gt;&lt;br /&gt;Now to install Thunar, open up a terminal and cut and paste, or type the following commands:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo apt-get install gtk-doc-tools libxml-parser-perl automake1.8 libxfce4util-dev&lt;br /&gt;&lt;br /&gt;svn co http://svn.xfce.org/svn/xfce/libexo/trunk xfce4-svn-source/libexo&lt;br /&gt;svn co http://svn.xfce.org/svn/xfce/thunar/trunk xfce4-svn-source/thunar&lt;br /&gt;svn co http://svn.xfce.org/svn/xfce/xfce4-dev-tools/trunk xfce4-svn-source/xfce4-dev-tools&lt;br /&gt;&lt;br /&gt;cd xfce4-svn-source/xfce4-dev-tools&lt;br /&gt;sh autogen.sh&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;&lt;br /&gt;cd ../libexo/&lt;br /&gt;sh autogen.sh&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;&lt;br /&gt;cd ../thunar/&lt;br /&gt;sh autogen.sh&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now to open up tunar, just create a shortcut to it, right click on the xfce panel, add new item, then select laucher, select an icon, and in the command fill with thunar.&lt;br /&gt;&lt;br /&gt;If you have some more tips about it, or any doubs please ask, so i can update the howto and make it better.&lt;br /&gt;&lt;br /&gt;For now is just it, i just wanted to share it with all the ubuntu users, if you have a slow pc or if you would like to make you fast pc fly, give Xubuntu a try.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113321269621682951?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113321269621682951/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113321269621682951' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113321269621682951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113321269621682951'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/install-thunar-file-manager-on-xubuntu.html' title='Install Thunar file manager on Xubuntu'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113309504170511889</id><published>2005-11-27T10:29:00.000-02:00</published><updated>2005-11-27T10:37:21.716-02:00</updated><title type='text'>In love With Xubuntu</title><content type='html'>I m going to  install Ubuntu in a 400mhz pc this monday, finally convinced my boss that i would work better if i was in linux.&lt;br /&gt;&lt;br /&gt;So i read about Xubuntu and decided to try it out at my home pc (A64 2800+, 512MB RAM).&lt;br /&gt;&lt;br /&gt;And now i m in love with it, good bye Ubuntu (Gnome), welcome Xubuntu (xfce).&lt;br /&gt;&lt;br /&gt;My first impressions couldnt be better.&lt;br /&gt;&lt;br /&gt;1 - I really loved the blue boot up screen.&lt;br /&gt;2 - It flies man, i cant believe how fast my computer is running&lt;br /&gt;3 - I thought it was kinda of a "ripped" desktop without anything, but i was wrong, it has almost everything i had in gnome.&lt;br /&gt;4 - I love being able to drag my windows to another desktop and go to another desktop draging the mouse to the edge of the screen.&lt;br /&gt;5 - The control panel rules, its perfect, in the screenshot below you can see it, it changed my resolution without restarting X, and its very easy and intuitive to use.&lt;br /&gt;&lt;br /&gt;But i disliked some stuffs, nothing serius...&lt;br /&gt;&lt;br /&gt;1 - I couldnt make the main panel fill the screen width&lt;br /&gt;2 - RoX-filer is too simple, its as fast as the speed of light, but it doesnt have tree view, doesnt have video thumbnails, and i cant move files with ctrl + X, ctrl + X is used to delete a file.&lt;br /&gt;3 - It doesnt have icons, nor any options on the desktop, like right clicking in the wallpaper.&lt;br /&gt;&lt;br /&gt;I just cant wait to see the Xubuntu cd that are coming with the Dapper Drake release.&lt;br /&gt;&lt;br /&gt;More info about Xubuntu can be found &lt;a href="https://wiki.ubuntu.com/Xubuntu" target="_blank"&gt;HERE&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here a screenshot of how my desktop looks like now:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://img358.imageshack.us/my.php?image=xubuntu18ys.jpg" target="_blank"&gt;&lt;img src="http://img358.imageshack.us/img358/5476/xubuntu18ys.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;More info about XFCE can be found &lt;a href="http://www.xfce.org/index.php" target="_blank"&gt;HERE&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113309504170511889?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113309504170511889/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113309504170511889' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113309504170511889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113309504170511889'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/in-love-with-xubuntu.html' title='In love With Xubuntu'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113287269807470484</id><published>2005-11-24T20:49:00.000-02:00</published><updated>2005-11-24T20:51:38.076-02:00</updated><title type='text'>Ubuntu 5.10 Breezy Badger, Best Desktop for Small Business</title><content type='html'>No, this conclusion is not mine, my conclusion would be something like, "Ubuntu, best linux eva!".&lt;br /&gt;&lt;br /&gt;Read The full History &lt;a href="http://linux.slashdot.org/article.pl?sid=05/11/24/1826220&amp;from=rss" target="_blank"&gt;HERE&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113287269807470484?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113287269807470484/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113287269807470484' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113287269807470484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113287269807470484'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/ubuntu-510-breezy-badger-best-desktop.html' title='Ubuntu 5.10 Breezy Badger, Best Desktop for Small Business'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113287161097758706</id><published>2005-11-24T20:26:00.000-02:00</published><updated>2005-11-30T16:47:19.153-02:00</updated><title type='text'>How to make BloGTK 1.0 work with Blogger</title><content type='html'>I decided to try BloGTK to make it easier to add posts in this blog, and for my surprise it didnt work, but it was because i didnt know what to fill up in the account config, but the app itself didnt have any hints or help, it didnt even have a link to a website so i could to read the documentation, so i had to ask my friend &lt;a href="http://google.com" target="_blank"&gt;Google&lt;/a&gt; for help.&lt;br /&gt;&lt;br /&gt;And i found the &lt;a href="http://blogtk.sourceforge.net/" target="_blank"&gt;Official BloGTK Website&lt;/a&gt;, and reading the &lt;a href="http://blogtk.sourceforge.net/faq.php" target="_blank"&gt;FAQ&lt;/a&gt;, i found out &lt;a href="http://blogtk.sourceforge.net/faq.php#6" target="_blank"&gt;How to make it work with Blogger&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Besides this little problem, BloGTK works as its supposed to, have spell check, preview and some usefull features.&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/19110059-113287161097758706?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113287161097758706/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113287161097758706' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113287161097758706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113287161097758706'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/how-to-make-blogtk-10-work-with.html' title='How to make BloGTK 1.0 work with Blogger'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113287079770479167</id><published>2005-11-24T20:15:00.000-02:00</published><updated>2005-11-24T20:19:57.713-02:00</updated><title type='text'>Logitech MX310 with 800dpi in Ubuntu Breezy</title><content type='html'>I was postponing this, but i m kinda bored today, so i decided to make some tweaks in my ubuntu box, and i decided to start with my MX310, it was working with 400dpi, but now its working with 800dpi thanx to this &lt;a href="http://ubuntuforums.org/showthread.php?t=4357&amp;highlight=mx310+install" target="_blank"&gt;HOWTO&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please read it carefully, i m lazy so i didnt read it at first and it didnt work, if you have a MX310 or MX510 mouse, you should download the .gz file attached in the end of the thread.&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/19110059-113287079770479167?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113287079770479167/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113287079770479167' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113287079770479167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113287079770479167'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/logitech-mx310-with-800dpi-in-ubuntu.html' title='Logitech MX310 with 800dpi in Ubuntu Breezy'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113285593906466814</id><published>2005-11-24T16:07:00.000-02:00</published><updated>2005-11-25T23:37:19.893-02:00</updated><title type='text'>Find out how many days are in month</title><content type='html'>It took me a while to find out how to do it using php, but thanx to my beloved friend &lt;a href="http://google.com" targe="_blank"&gt;Google&lt;/a&gt; and this &lt;a href="http://www.zend.com/tips/tips.php?id=40&amp;single=1" targe="_blank"&gt;tip&lt;/a&gt; on the zend.com website, i figured out how to do it, here we go:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;b&gt;$lastday = 29;&lt;br /&gt;  while (checkdate($month, $lastday, $year)) {&lt;br /&gt;    $lastday++;&lt;br /&gt;  }&lt;br /&gt;$lastday -= 1;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Simple isnt it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113285593906466814?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113285593906466814/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113285593906466814' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113285593906466814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113285593906466814'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/find-out-how-many-days-are-in-month.html' title='Find out how many days are in month'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113284646790403522</id><published>2005-11-24T13:12:00.000-02:00</published><updated>2005-11-24T16:44:06.446-02:00</updated><title type='text'>Firebird GROUP BY syntax</title><content type='html'>Yesterday i was proud of myself, and was planning to ask for a job at microsoft, i never had made a code so dirty in my life (not that my codes are clean, but that one was to fucking dirty), i m sure that if i ve sent my code to microsoft they would hire me right away.&lt;br /&gt;&lt;br /&gt;I needed a report that could count how many of each product were sold for each day of the month, i tried a lot of stuff but none work.&lt;br /&gt;&lt;br /&gt;So i used one select for each day and each product, so a report with 4 products took 120 selects, i m sure microsoft would be proud of me.&lt;br /&gt;&lt;br /&gt;But the last thing that i want in my useless life is to work at microsoft or under any microsoft code philosofy, so here is my new query and new code, a lot cleaner and a lot faster, but still noob :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SELECT SUM(I.item_qtde), N.vnd_data, SUM(N.vnd_total) AS total&lt;br /&gt;                     FROM vendas N, items_venda I&lt;br /&gt;                     WHERE N.ved_cod='$ved_cod' AND I.pro_cod='$pro_cod' AND N.vnd_cod=I.vnd_cod&lt;br /&gt;                     GROUP BY N.vnd_data&lt;br /&gt;                     ORDER BY N.vnd_data ASC&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This GROUP BY stuff was kinda a pain, cause there are some rules to make it work, and i m kinda lazy about reading the fucking manuals, so i tried till it worked.&lt;br /&gt;&lt;br /&gt;But now i know that you have to have a  SUM or a COUNT in the selected fields, and a field wich the data are gonna be grouped, now it is working perfectly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113284646790403522?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113284646790403522/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113284646790403522' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113284646790403522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113284646790403522'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/firebird-group-by-syntax.html' title='Firebird GROUP BY syntax'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113260437727207483</id><published>2005-11-21T18:13:00.000-02:00</published><updated>2005-11-21T18:27:12.170-02:00</updated><title type='text'>Some triggers using Firebird 1.5</title><content type='html'>Man, this Firebird stuff gave me a lot of headaches today, but i m brazilian and never give up :) so in the end i won against it, and learned how to make some triggers, i ll explain what it does.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BEGIN&lt;br /&gt;UPDATE PRODUTOS&lt;br /&gt;SET PRO_EST_ATUAL = (PRO_EST_ATUAL + NEW.EST_QTDE)&lt;br /&gt;WHERE (PRO_COD = NEW.PRO_COD);&lt;br /&gt;END&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This was the first one, it is activated after a insert in the estoque (stock) table, and it automatically updates the field pro_est_atual (actual stock) in the produtos (products) table, so each time I insert a new row it automatilly sum the value with the current stock, and add the result to the actual stock field.&lt;br /&gt;&lt;br /&gt;The second one was kinda hard work, but it worked as i wanted, here it goes:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;BEGIN&lt;br /&gt;UPDATE PRODUTOS SET PRO_EST_ATUAL =&lt;br /&gt;COALESCE((&lt;br /&gt;SELECT SUM(EST_QTDE) FROM ESTOQUE&lt;br /&gt;WHERE PRO_COD = OLD.PRO_COD&lt;br /&gt;),0)&lt;br /&gt;WHERE&lt;br /&gt;PRO_COD = OLD.PRO_COD;&lt;br /&gt;END&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This one seens more complicated, but its simple.&lt;br /&gt;&lt;br /&gt;It is activated after a delete, and it gets the product code that was deleted (OLD.PRO_COD) and sum all the stock entries for the product again, and after this it writes the new stock value in the produtos (products) table.&lt;br /&gt;&lt;br /&gt;Dont ask me about this coalesce stuff, i dont quite understand it.. maybe in a near future i can understand what exactly it does, for now i ll just stfu so i dont say anything wrong :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113260437727207483?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113260437727207483/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113260437727207483' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113260437727207483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113260437727207483'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/some-triggers-using-firebird-15.html' title='Some triggers using Firebird 1.5'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113245412117452570</id><published>2005-11-20T00:35:00.000-02:00</published><updated>2005-11-20T11:15:21.146-02:00</updated><title type='text'>Problem with stock control with sql and firebird...</title><content type='html'>Now i m sure, i have to study more about Databases, sql and normalization...&lt;br /&gt;&lt;br /&gt;i was with the following problem with a firebird database and a stock control table:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;i have to sometimes remove a row, and i have to&lt;br /&gt;rewrite all the actual_stock of the product.. like, if i remove the&lt;br /&gt;second entry.. i have to do it:&lt;br /&gt;&lt;br /&gt;id, pro_id, action, quantity, actual_stock&lt;br /&gt;1, 01, A, 10, 0&lt;br /&gt;2, 01, R, 1, 9&lt;-Remove&lt;br /&gt;3, 01, R, 1, 9&lt;-Update&lt;br /&gt;4, 01, R, 1, 8&lt;-Update&lt;br /&gt;5, 01, R, 2, 6&lt;-Update&lt;br /&gt;6, 01, A, 5, 11&lt;-Update&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;So the solutions posted on the firebird support mail list was the following:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Bill Meaney&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You definitely do NOT want to do what you are trying to do in this manner.&lt;br /&gt;&lt;br /&gt;If you want the actual_stock so that you can know what you have on hand at&lt;br /&gt;any time you could do this in several different ways.&lt;br /&gt;&lt;br /&gt;Drop the actual_stock column from this table.  As you have found out this&lt;br /&gt;will cause you headaches.  You could use Quantity as a signed value such&lt;br /&gt;that a removed value of 2 was -2.  You could then 'A'dd and 'R'emove rows&lt;br /&gt;without any updating.  In fact you don't even need the Action column as this&lt;br /&gt;information is known by the sign.  You get the stock on hand with the&lt;br /&gt;following query.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SELECT Pro_Id, sum(Quantity) On_Hand&lt;br /&gt;FROM StockControl&lt;br /&gt;WHERE Pro_Id = :Pro_Id&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you need a multiple row set with a running total of On_Hand then you&lt;br /&gt;could write a stored procedure.  There is an example in Helen's book.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Adam&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This design needs to be normalized, or you will get real problems with&lt;br /&gt;performance&lt;br /&gt;&lt;br /&gt;Something like this:&lt;br /&gt;&lt;br /&gt;StockControl&lt;br /&gt;(id, pro_id, stock_added)&lt;br /&gt;&lt;br /&gt;Stock&lt;br /&gt;(pro_id, actual_stock);&lt;br /&gt;&lt;br /&gt;*** Stock_added is negative when you remove and positive otherwise&lt;br /&gt;&lt;br /&gt;Now create some triggers on StockControl to manage stock&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CREATE TRIGGER SCI ACTIVE AFTER INSERT AS&lt;br /&gt;BEGIN&lt;br /&gt;UPDATE STOCK&lt;br /&gt;SET ACTUAL_STOCK = ACTUAL_STOCK + NEW.STOCK_ADDED&lt;br /&gt;WHERE PRO_ID = NEW.PRO_ID;&lt;br /&gt;END&lt;br /&gt;^&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Ok, now every time you add something to stock control, the stock count&lt;br /&gt;is updated in the stock table.&lt;br /&gt;&lt;br /&gt;If you want that information, a simple join will do it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SELECT SC.id, SC.pro_id, SC.stock_added, S.ACTUALSTOCK&lt;br /&gt;FROM STOCKCOUNT SC&lt;br /&gt;JOIN STOCK S ON (SC.PRO_ID = S.PRO_ID)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Judging by the design, you would do well to spend a few hours reading&lt;br /&gt;about normalization.&lt;br /&gt;&lt;br /&gt;Hope that helps.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Yes, it helps a lot, and now i m gonna study more about normalization, thanks guys.&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113245412117452570?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113245412117452570/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113245412117452570' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113245412117452570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113245412117452570'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/problem-with-stock-control-with-sql.html' title='Problem with stock control with sql and firebird...'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113245202063661006</id><published>2005-11-20T00:00:00.000-02:00</published><updated>2006-12-24T12:55:02.269-02:00</updated><title type='text'>select * IS EVIL!</title><content type='html'>select * IS EVIL!&lt;br /&gt;&lt;br /&gt;While taking a quick look at the ##php channel on irc.freenode.org, i got this link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.parseerror.com/sql/select*isevil.html" target="_blank"&gt;select * is evil&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It explain why you should not use select * in sql queries.&lt;br /&gt;But the better thing in this page is the footer about the author's life, enjoy.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;pizza_milkshake is a dedicated computer nerd, fuzzy mathematician and freelance pornstar who's main mission in life is to make as many mistakes as possible and then write about them in the vain hope of doing some good&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113245202063661006?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113245202063661006/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113245202063661006' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113245202063661006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113245202063661006'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/select-is-evil.html' title='select * IS EVIL!'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19110059.post-113236279389993370</id><published>2005-11-18T23:11:00.000-02:00</published><updated>2005-11-18T23:13:13.900-02:00</updated><title type='text'>&lt;? echo "Goodbye World"; ?&gt;</title><content type='html'>o/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19110059-113236279389993370?l=yacoding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yacoding.blogspot.com/feeds/113236279389993370/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19110059&amp;postID=113236279389993370' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113236279389993370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19110059/posts/default/113236279389993370'/><link rel='alternate' type='text/html' href='http://yacoding.blogspot.com/2005/11/o.html' title='&lt;? echo &quot;Goodbye World&quot;; ?&gt;'/><author><name>Fábio Gomes</name><uri>http://www.blogger.com/profile/14809553216948800841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/__RT6qeLyUVA/SayTARs89EI/AAAAAAAAAqA/L9Z-7yT8rjg/S220/Sem+t%C3%ADtulo.png'/></author><thr:total>1</thr:total></entry></feed>
