<?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-1967442237480846918</id><updated>2012-01-31T08:01:44.820+02:00</updated><category term='dom'/><category term='javascript'/><category term='stopwords'/><category term='html5'/><category term='file hosting'/><category term='firebug'/><category term='benchmark'/><category term='rhythmbox'/><category term='syntax'/><category term='http'/><category term='assembly'/><category term='brainfuck'/><category term='porn'/><category term='css'/><category term='python'/><category term='spam'/><category term='e-mail'/><category term='rss'/><category term='windows'/><category term='eclipse'/><category term='rant'/><category term='bittorrent'/><category term='apache'/><category term='linux'/><category term='facebook'/><category term='snippets'/><category term='geoip'/><category term='ubuntu one'/><category term='java'/><category term='mysql'/><category term='php'/><category term='internet explorer'/><category term='ajax'/><category term='highlight'/><category term='rhythmtoweb'/><category term='school'/><category term='oracle'/><category term='c'/><category term='android'/><category term='captcha'/><category term='pygments'/><category term='blogger'/><category term='bandwidth'/><category term='smarty'/><category term='admob'/><category term='notepad++'/><category term='optimization'/><category term='server'/><category term='design'/><category term='framework'/><category term='ubuntu'/><category term='proguard'/><category term='python java'/><category term='reader'/><category term='svn'/><category term='google'/><title type='text'>A Programmer's Ride</title><subtitle type='html'>...the thrilling ride of sitting on a chair and coding...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5474048826656924821</id><published>2011-07-19T11:46:00.004+03:00</published><updated>2011-07-19T11:53:33.024+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='proguard'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='admob'/><title type='text'>Android AdMob &amp; ProGuard</title><summary type='text'>On most devices, using AdMob in an obfuscated application (using ProGuard) works perfectly fine. However, on a few devices (I don't know which ones), you'll get a java.lang.NoSuchMethodError and your users will be angry. Here's the full stack trace:

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:200)
at </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5474048826656924821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2011/07/android-admob-proguard.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5474048826656924821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5474048826656924821'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2011/07/android-admob-proguard.html' title='Android AdMob &amp; ProGuard'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-1974585432305006544</id><published>2010-10-29T18:46:00.009+03:00</published><updated>2010-10-29T21:25:35.989+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android: implementing a notification service the right way</title><summary type='text'>
One of the key features of Android is the ability for apps to provide notifications that pop up in the status bar. I'll try to explain in this post how you should implement a Service component that polls a web service regularly to check for updates.


The first thing you need is a preferences activity, where the user can set what notifications they want and how often they want your app to check </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/1974585432305006544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/10/android-implementing-notification.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/1974585432305006544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/1974585432305006544'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/10/android-implementing-notification.html' title='Android: implementing a notification service the right way'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-1400502783952145536</id><published>2010-08-13T20:57:00.002+03:00</published><updated>2010-08-13T21:10:57.993+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Save image in instance state (Android)</title><summary type='text'>
While working on an app, I had an activity that downloaded an image from the Internet and displayed it to the user (amongst other things). Because all of the data presented to the user is downloaded from the Internet, it's mandatory for me to save this data in onSaveInstanceState() and restore it in onCreate().


At first, I had a problem. I was downloading the image to a Drawable, using </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/1400502783952145536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/08/save-image-in-instance-state-android.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/1400502783952145536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/1400502783952145536'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/08/save-image-in-instance-state-android.html' title='Save image in instance state (Android)'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-6213106262945435028</id><published>2010-07-30T21:21:00.004+03:00</published><updated>2010-07-30T21:28:38.771+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android Title Marquee</title><summary type='text'>
I recently wanted the title of my activity to scroll like a marquee whenever it was too long to fit in its space (because it is fetched from the net and can be pretty much anything). I didn't want to use a custom multi-line title view because that would waste screen space and because I want to preserve the native look and feel. The solution I've found is rather hackish, but it works. Here goes </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/6213106262945435028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/07/android-title-marquee.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6213106262945435028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6213106262945435028'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/07/android-title-marquee.html' title='Android Title Marquee'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-9115573684227755536</id><published>2010-06-05T15:05:00.002+03:00</published><updated>2010-06-05T15:16:50.668+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python java'/><title type='text'>Java vs. Python: fetching URLs</title><summary type='text'>
Here we go, another Java vs. Python comparison (I just can't help myself). This time it's about standard library usefulness in doing certain tasks. Fetching the contents of a URL should be a trivial one, but in Java, it's not. Especially if the contents of that URL are gzipped and use a nice charset such as UTF-8.


Java:

URL url = new URL("http://www.example.com/");
URLConnection conn = </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/9115573684227755536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/06/java-vs-python-fetching-urls.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/9115573684227755536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/9115573684227755536'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/06/java-vs-python-fetching-urls.html' title='Java vs. Python: fetching URLs'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-89120108684812713</id><published>2010-06-01T21:46:00.003+03:00</published><updated>2010-06-01T22:09:53.744+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark'/><title type='text'>Java "Hello, World!" 6x slower than Python</title><summary type='text'>
Yup. I know, micro-benchmarks, but I find this one quite interesting. Take two small programs, one Java, one Python:

package com.test;

public class TestJava {
 
 public static void main(String[] args) throws Exception {
  System.out.println("Hello, World!");
 }

}
print "Hello, World!"

Running these two through time clearly shows that Java is 6 (six) times slower:

[felix@the-machine bin]$ </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/89120108684812713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/06/java-hello-world-6x-slower-than-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/89120108684812713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/89120108684812713'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/06/java-hello-world-6x-slower-than-python.html' title='Java &quot;Hello, World!&quot; 6x slower than Python'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-3000699917810382266</id><published>2010-05-24T14:57:00.002+03:00</published><updated>2010-05-24T15:01:45.119+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><title type='text'>Server 'kitty' shut down</title><summary type='text'>
I used to have a home server which I playfully named kitty, mainly because it was not very powerful, yet it was very fun to play with. Today, I shut it down to replace it with a newer machine. These were its last words:


Broadcast message from felix@kitty
 (/dev/pts/0) at 12:00 ...

The system is going down for power off NOW!
Meow? :(
felix@kitty:~$
Connection to kitty closed by remote host.


</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/3000699917810382266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/05/server-kitty-shut-down.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3000699917810382266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3000699917810382266'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/05/server-kitty-shut-down.html' title='Server &apos;kitty&apos; shut down'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-1859880634120825995</id><published>2010-04-22T16:06:00.003+03:00</published><updated>2010-04-22T16:27:46.169+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android YouTube Intent</title><summary type='text'>
For a long time I've wondered how to show a YouTube video to the user in an Android application. There's this awesome post published by KeyesLabs on how to create your own Activity that plays YouTube videos. It's great, and you should definitely use it. But I think you can improve on that. It would be very useful for the user to view that video in the default YouTube player installed on the </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/1859880634120825995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/04/android-youtube-intent.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/1859880634120825995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/1859880634120825995'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/04/android-youtube-intent.html' title='Android YouTube Intent'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-8683308263798003411</id><published>2010-04-14T17:18:00.002+03:00</published><updated>2010-04-14T17:25:44.155+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>How-to: Android Favorite Button (the right way, this time)</title><summary type='text'>
My last blog post is about how to make a favorite button in an Android application. It is wrong, those drawables should not be used independently. Instead, the @android:drawable/btn_star resource should be used, as it is a state-drawable and contains all the possible states (checked, unchecked, checked and focused, checked and clicked, ...). The proper way to use this is:

&lt;CheckBox
 android:</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/8683308263798003411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/04/how-to-android-favorite-button-right.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8683308263798003411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8683308263798003411'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/04/how-to-android-favorite-button-right.html' title='How-to: Android Favorite Button (the right way, this time)'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-4888593420103155995</id><published>2010-04-12T18:30:00.002+03:00</published><updated>2010-04-12T18:37:27.765+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android Favorite Button</title><summary type='text'>I love Android. What I hate about it, though, is that they don't tell you how to make standard-looking UIs. For example, I had to dig through source codes to find the @android:style/ButtonBar style that you can use as the style on pretty much any layout (RelativeLayout, LinearLayout, etc.) which provides a nice background graphic for your button bars. Anyway, today I discovered another such </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/4888593420103155995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/04/android-favorite-button.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4888593420103155995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4888593420103155995'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/04/android-favorite-button.html' title='Android Favorite Button'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5829629383553303340</id><published>2010-04-02T22:50:00.003+03:00</published><updated>2010-04-02T23:52:13.476+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>How to properly write JavaScript libraries</title><summary type='text'>
I've seen JavaScript code written in all the possible ways. The reason there are so many ways to do it is because JavaScript is incredibly flexible. But that flexibility makes people write really ugly code. Examples of ugly, unreadable, error-prone code:

(function(window, undefined) {
    var myLibrary = (function () {

      var someProp = "...";

      function someFunc() {
        ...
var </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5829629383553303340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/04/how-to-properly-write-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5829629383553303340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5829629383553303340'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/04/how-to-properly-write-javascript.html' title='How to properly write JavaScript libraries'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-7058687937295357018</id><published>2010-03-16T11:57:00.002+02:00</published><updated>2010-03-16T12:07:57.001+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rhythmbox'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Rhythmbox "Rock" EQ Preset</title><summary type='text'>I recently helped a friend beta test a Winamp plugin, so I had to spend time in Windows. While listening to my music in Winamp, I chose the Rock preset in the equalizer. And my, I felt enlightened. The sound was at least ten times better than the flat sound Rhythmbox produces on my usual Ubuntu system. My music had been revived. When I went back to Ubuntu, I hated the sound. So I spent some time </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/7058687937295357018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/03/rhythmbox-rock-eq-preset.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7058687937295357018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7058687937295357018'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/03/rhythmbox-rock-eq-preset.html' title='Rhythmbox &quot;Rock&quot; EQ Preset'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_9E027M4ymec/S59YUmasuRI/AAAAAAAAAEk/tXp-s0FLpDA/s72-c/Screenshot-Rhythmbox.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-3416422107673112836</id><published>2010-03-15T23:51:00.002+02:00</published><updated>2010-03-16T00:04:06.276+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>How to properly use @font-face</title><summary type='text'>I've spent some time playing around with some of the new features in CSS3. Thankfully, these are pretty well implemented in modern browsers (read: not in IE). One feature that I really like is the @font-face rule. Finally, no more cross-platform rendering problems, with buttons that appear wider / narrower than they should and so on. However, I couldn't find anywhere how to specify different </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/3416422107673112836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/03/how-to-properly-use-font-face.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3416422107673112836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3416422107673112836'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/03/how-to-properly-use-font-face.html' title='How to properly use @font-face'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5477999761134610652</id><published>2010-02-20T14:00:00.003+02:00</published><updated>2010-02-20T14:07:16.249+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='internet explorer'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Another Internet Explorer annoyance that you might not be aware of</title><summary type='text'>Recently, I've been using display: inline-block in CSS a lot. It's a very useful feature -- it allows you to have a fix-sized (e.g. 100x20px, or just fixed width / height) element that is inline, incredibly useful when doing precision design work. However! Internet Explorer 7 cannot handle display: inline-block on an element that is natively a block element. So, for instance, if you try to use </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5477999761134610652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/02/another-internet-explorer-annoyance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5477999761134610652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5477999761134610652'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/02/another-internet-explorer-annoyance.html' title='Another Internet Explorer annoyance that you might not be aware of'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-725870482011050225</id><published>2010-02-18T14:36:00.004+02:00</published><updated>2010-02-18T14:42:02.214+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Sleeping with Linux is dangerous</title><summary type='text'>Seriously, using the sleep function with Linux is dangerous. I just put my laptop on sleep for a while, woke it up and apparently everything was fine. But only apparently, because the system fan (you know, the one that keeps your laptop from melting) lost its "medium" speed. That means that it wouldn't run unless it had to go on max. So, after half an hour of peace and quiet, the fan started </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/725870482011050225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2010/02/sleeping-with-linux-is-dangerous.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/725870482011050225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/725870482011050225'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2010/02/sleeping-with-linux-is-dangerous.html' title='Sleeping with Linux is dangerous'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5298335537834712207</id><published>2009-12-15T22:30:00.001+02:00</published><updated>2009-12-15T22:32:18.471+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Windows 7 Permissions</title><summary type='text'>I find the way that this dialog is worded very, very funny:
</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5298335537834712207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/12/windows-7-permissions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5298335537834712207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5298335537834712207'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/12/windows-7-permissions.html' title='Windows 7 Permissions'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i498.photobucket.com/albums/rr348/Znupi2/blog/th_permission.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5083105652226751918</id><published>2009-11-23T22:06:00.002+02:00</published><updated>2009-11-23T22:08:28.155+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='google'/><title type='text'>Google funnies</title><summary type='text'>I really think these kinds of things are injected by Google as easter eggs:
</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5083105652226751918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/11/google-funnies.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5083105652226751918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5083105652226751918'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/11/google-funnies.html' title='Google funnies'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i498.photobucket.com/albums/rr348/Znupi2/blog/th_Google.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-8946147203397931594</id><published>2009-11-22T17:56:00.003+02:00</published><updated>2009-11-22T18:11:10.105+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>DOMElement innerHMTL</title><summary type='text'>Currently, there's no built-in method in the DOMElement that gets the inner/outerHTML of the element. There are a few solutions in the comments and on other blogs, but they loop through all the childNodes in order to get the innerHMTL. Getting the outerHTML is much easier (no looping) and just as useful:
function outerHTML($e) {
    $doc = new DOMDocument();
    $doc-&gt;appendChild($doc-&gt;importNode</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/8946147203397931594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/11/domelement-innerhmtl.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8946147203397931594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8946147203397931594'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/11/domelement-innerhmtl.html' title='DOMElement innerHMTL'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-8498435208578805394</id><published>2009-11-18T18:15:00.003+02:00</published><updated>2009-11-18T19:54:24.039+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Use ssh-copy-id on a different port</title><summary type='text'>ssh-copy-id has known problems with handling non-standard ports (e.g. connecting to a different port than 22). To overcome this issue, use a command like:
$ ssh-copy-id "user@host -p 6842"</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/8498435208578805394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/11/use-ssh-copy-id-on-different-port.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8498435208578805394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8498435208578805394'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/11/use-ssh-copy-id-on-different-port.html' title='Use ssh-copy-id on a different port'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-4326291620417905401</id><published>2009-11-11T22:54:00.004+02:00</published><updated>2009-11-11T23:13:17.576+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>a + b in MIPS assembly</title><summary type='text'>We're just starting to learn assembly at college, so here's my first program. It reads to numbers, sums them up and displays the result. Not really rocket science, but good for a first program without any previous practice:
.data
prompt1: .asciiz "a: "
prompt2: .asciiz "b: "
newline: .asciiz "\n"

.text

main:
    # print prompt 1
    li $v0, 4
    la $a0, prompt1
    syscall
    
    # read in $</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/4326291620417905401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/11/b-in-mips-assembly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4326291620417905401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4326291620417905401'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/11/b-in-mips-assembly.html' title='a + b in MIPS assembly'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-7288824591520992545</id><published>2009-11-04T21:30:00.002+02:00</published><updated>2009-11-04T21:53:58.900+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><category scheme='http://www.blogger.com/atom/ns#' term='brainfuck'/><title type='text'>A brainfuck interpreter</title><summary type='text'>In case you didn't know, there's an esoteric programming language named brainfuck. It is quite simple and I thought I should make an interpreter for it, in C. It is nowhere near the sub-200 bytes compilers others have made, but it's a good exercise. Well, here's my solution:
/*

    A brainfuck intepreter written in C, complete with error checking so you
    don't hurt yourself while, uh, </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/7288824591520992545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/11/brainfuck-interpreter.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7288824591520992545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7288824591520992545'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/11/brainfuck-interpreter.html' title='A brainfuck interpreter'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-3592118641675867800</id><published>2009-10-23T00:02:00.001+03:00</published><updated>2009-10-23T00:03:56.139+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Windows 7 editions</title><summary type='text'>Did you know there's an entire article on Wikipedia about the various Windows 7 editions? Talk about confusing.</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/3592118641675867800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/10/windows-7-editions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3592118641675867800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3592118641675867800'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/10/windows-7-editions.html' title='Windows 7 editions'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-736138760869286983</id><published>2009-10-11T00:16:00.002+03:00</published><updated>2009-10-11T00:20:28.139+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rhythmtoweb'/><title type='text'>RhythmToWeb moved to Google Code</title><summary type='text'>I have moved the RhythmToWeb project to Google code. Apart from a small bugfix (it used to send empty requests every x seconds when Rhythmbox was first started), I have also added a couple of server-side examples.</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/736138760869286983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/10/rhythmtoweb-moved-to-google-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/736138760869286983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/736138760869286983'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/10/rhythmtoweb-moved-to-google-code.html' title='RhythmToWeb moved to Google Code'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-7826059594655771569</id><published>2009-10-10T11:58:00.004+03:00</published><updated>2009-10-10T12:17:19.954+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Apache nice URLs without mod_rewrite</title><summary type='text'>I recently noticed a peculiar behavior in Apache. It seems that if I have, for example, a file /var/www/hello.php, the following URLs will load the same file:

http://localhost/hello.php
http://localhost/hello
http://localhost/hello/goodbye/

After a bit of researching, I found that this behavior is dictated by MultiViews, so if you have that option turned on on your server you can practically </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/7826059594655771569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/10/apache-nice-urls-without-modrewrite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7826059594655771569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7826059594655771569'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/10/apache-nice-urls-without-modrewrite.html' title='Apache nice URLs without mod_rewrite'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-8635285264617852550</id><published>2009-10-05T19:33:00.005+03:00</published><updated>2009-10-06T00:43:20.276+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='rhythmtoweb'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>RhythmToWeb Updated</title><summary type='text'>I've recently received an e-mail from Aaron Hill, about some modifications he's done to RhythmToWeb. I took his idea of storing information about more than one song, and adapted it in my own way. You can now use the buttons under the song information on the right to browse the last 5 songs I've played. It will also automatically refresh, so if you wait around long enough you'll see it switch to a</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/8635285264617852550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/10/rhythmtoweb-updated.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8635285264617852550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8635285264617852550'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/10/rhythmtoweb-updated.html' title='RhythmToWeb Updated'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-4033405024232717725</id><published>2009-09-24T00:10:00.003+03:00</published><updated>2009-09-24T00:23:24.211+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Android Market Share</title><summary type='text'>@wbm Agreed that android needs more market share before you should care.Do you think that's true? I beg to differ. Getting your foot in early can earn you recognition on a new platform pretty easily. Let me explain: if you were to develop some awesome app for the iPhone right now, you would find it at the bottom of an over saturated App Store, amongst mostly mediocre products which no one bothers</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/4033405024232717725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/android-market-share.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4033405024232717725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4033405024232717725'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/android-market-share.html' title='Android Market Share'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-6968765379937219070</id><published>2009-09-22T22:21:00.005+03:00</published><updated>2009-09-22T22:37:27.568+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Java: parse XML from the web smartly</title><summary type='text'>Up until recently, I used to fetch the entire XML document before parsing it. I've found that that can be extremely unhealthy for your application, especially if you're developing on Android, where resources are scarce and the GC is very unforgiving. The optimal way to parse XML is to parse it while it's loading, so that resources are freed much more efficient. Here's a snippet of code that </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/6968765379937219070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/java-parse-xml-from-web-smartly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6968765379937219070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6968765379937219070'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/java-parse-xml-from-web-smartly.html' title='Java: parse XML from the web smartly'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-8687868760569807922</id><published>2009-09-20T01:40:00.002+03:00</published><updated>2009-09-20T01:43:03.121+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Java Package Mayhem</title><summary type='text'>Here's how a 350-some line Android Activity looks like, in terms of imports:
import java.io.StringReader;
import java.net.URLEncoder;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;

import android.app.Activity;
import </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/8687868760569807922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/java-package-mayhem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8687868760569807922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8687868760569807922'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/java-package-mayhem.html' title='Java Package Mayhem'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-3175002922918348715</id><published>2009-09-20T01:32:00.003+03:00</published><updated>2009-09-20T01:39:13.046+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Fetch HTTP content in Java</title><summary type='text'>Since programming for Android, I hit my head against every possible snag in the Java programming language. For example, I have to fetch the content of a URL. In PHP, I'd simply do:
$data = file_get_contents($url);
But no, in Java, no such easiness for you! I had to write my own helper function:
public static String getUrlContent(String sUrl) throws Exception {
    URL url = new URL(sUrl);
    </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/3175002922918348715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/fetch-http-content-in-java.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3175002922918348715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3175002922918348715'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/fetch-http-content-in-java.html' title='Fetch HTTP content in Java'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5942777828786981709</id><published>2009-09-14T16:49:00.002+03:00</published><updated>2009-09-14T17:04:23.185+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>SVN for an Android project</title><summary type='text'>I've started working on the Android project, and I'm using SVN as my version control system (I'm the only one working on it, so I'm actually using it more as a backup and for keeping track of things). A small tip when doing this is to not simply add everything in your project directory to the repository. In one word, don't run:
$ svn add *
I did so, and three revisions later I was unable to </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5942777828786981709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/svn-for-android-project.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5942777828786981709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5942777828786981709'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/svn-for-android-project.html' title='SVN for an Android project'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-9031118407156737343</id><published>2009-09-10T10:58:00.002+03:00</published><updated>2009-09-10T10:59:13.765+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spam'/><category scheme='http://www.blogger.com/atom/ns#' term='e-mail'/><title type='text'>Spam</title><summary type='text'>Funniest spam I ever got:
Hello My Dear
How are you? i hope all is well with you, i hope you may not
know me, and i don\'t know who you  are, My Name is Miss morin khalifa
i am just broswing now i just saw your email
it seams like some thing touches me all over my body, i started having
some feelings in me which i have never experience in me before, so i
became interested in you, l will also like</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/9031118407156737343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/spam.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/9031118407156737343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/9031118407156737343'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/spam.html' title='Spam'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-3226346061170835991</id><published>2009-09-08T00:08:00.002+03:00</published><updated>2009-09-08T00:16:06.308+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='html5'/><title type='text'>Playing with HMTL5 Drag &amp; Drop</title><summary type='text'>I'm just toying around with HTML5-related things, to prepare myself so I don't get smacked in the head when it starts rolling out. The most interesting feature, in my opinion, is support for Drag &amp; Drop. What I find most interesting about this feature is being able to drag &amp; drop files from your desktop / file browser into a webpage. Unfortunately, we are unable to upload files this way just yet </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/3226346061170835991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/playing-with-hmtl5-drag-drop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3226346061170835991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3226346061170835991'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/playing-with-hmtl5-drag-drop.html' title='Playing with HMTL5 Drag &amp; Drop'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-6869732468706319497</id><published>2009-09-03T01:21:00.004+03:00</published><updated>2009-09-03T01:47:05.522+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Folding@Home on Ubuntu Server</title><summary type='text'>I recently started folding @ home on my Jaunty-based server (which runs 24/7 with not so much activity). What I have noticed is that they do not provide a proper init.d script for it. This is the default one they tell you to use:
# chkconfig: 345 93 14
# description: will start FAH client as a service
cd /path/to/folding
./fah6 -verbosity 9 &lt; /dev/null &gt; /dev/null 2&gt;&amp;1 &amp;
This doesn't seem to work</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/6869732468706319497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/foldinghome-on-ubuntu-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6869732468706319497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6869732468706319497'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/foldinghome-on-ubuntu-server.html' title='Folding@Home on Ubuntu Server'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-6469180577247170091</id><published>2009-09-01T23:15:00.002+03:00</published><updated>2009-09-01T23:20:05.201+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Verifying a hostname / IP address with PHP</title><summary type='text'>If you ever need to verify a hostname or an IP address in PHP, here's how:
// try to determine the IP address of the hostname
// if the hostname is actually an IP, gethostbyname() will return it unchanged
// if the hostname cannot be resolved, it will have the same behavior
$ip = gethostbyname($address);
// check if the resulting IP is valid
if ($ip !== long2ip(ip2long($ip))) {
    echo "Invalid </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/6469180577247170091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/09/verifying-hostname-ip-address-with-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6469180577247170091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6469180577247170091'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/09/verifying-hostname-ip-address-with-php.html' title='Verifying a hostname / IP address with PHP'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5958771960012805484</id><published>2009-08-17T14:57:00.004+03:00</published><updated>2009-09-01T23:20:24.097+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='captcha'/><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Captcha</title><summary type='text'>Here's a custom image captcha I just made. What's cool about it is that it's transparent (PNG), so it 'blends' into the background. To suit different backgrounds, it has two settings - dark and light - which you set according to the background color of the page you want to put it on. Here's a picture that demonstrates this; you can see that the captcha is completely unreadable when put on the </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5958771960012805484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/captcha.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5958771960012805484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5958771960012805484'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/captcha.html' title='Captcha'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i498.photobucket.com/albums/rr348/Znupi2/blog/th_captcha-demo.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5076343556085861560</id><published>2009-08-15T21:10:00.006+03:00</published><updated>2009-08-15T21:41:26.545+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='file hosting'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu one'/><title type='text'>Ubuntu One</title><summary type='text'>Ubuntu One is a file hosting service provided by Canonical (the company that develops Ubuntu). You are given 2GB for free and 10GB for $10/month. The way it works is that you create an account, install a client and associate it with your account. After that, the client will monitor your $HOME/Ubuntu One folder and synchronize its contents with the Ubuntu One servers. The main idea of it is that </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5076343556085861560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/ubuntu-one.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5076343556085861560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5076343556085861560'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/ubuntu-one.html' title='Ubuntu One'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-3562046021363608792</id><published>2009-08-15T02:13:00.004+03:00</published><updated>2009-09-01T23:20:41.151+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='smarty'/><title type='text'>Pagination with Smarty</title><summary type='text'>I've spent the last hour or two on this. It's a Smarty template that takes an associative array with these keys:
curPage: The number of the current pageurl: The url to which it will make the links. It replaces "%x" with the page number in the URL, so this can be something like /news/page-%x/ or /news.php?page=%xtotalPages: The number of total pages.
It also has a few variables that tweak its </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/3562046021363608792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/pagination-with-smarty.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3562046021363608792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3562046021363608792'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/pagination-with-smarty.html' title='Pagination with Smarty'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-7075508029845506615</id><published>2009-08-14T19:25:00.005+03:00</published><updated>2009-09-01T23:21:13.011+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PHP Server Uptime</title><summary type='text'>This is a pretty simple way of getting the server uptime using PHP. Note that this only works on Linux (and probably other Unix-like OSes that store the machine uptime in /proc/uptime). Straight to the code:
function get_uptime() {
    $file = @fopen('/proc/uptime', 'r');
    if (!$file) return 'Opening of /proc/uptime failed!';
    $data = @fread($file, 128);
    if ($data === false) return '</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/7075508029845506615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/php-server-uptime.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7075508029845506615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7075508029845506615'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/php-server-uptime.html' title='PHP Server Uptime'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-2671663355532317394</id><published>2009-08-13T03:55:00.003+03:00</published><updated>2009-09-01T23:21:31.109+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geoip'/><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>GeoIP MySQL</title><summary type='text'>A while ago I found this great article on how to import the free GeoIP database into MySQL. It provides a really simple way to look up IPs and see what country they are from using a MySQL database. It is also fairly optimized for size (the GeoIP .csv is 7.9MB and the MySQL tables are 1.9MB). Vincent (the author of the article) also provides some PHP snippets that look up IPs, just to get the feel</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/2671663355532317394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/geoip-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/2671663355532317394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/2671663355532317394'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/geoip-mysql.html' title='GeoIP MySQL'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5344080417707382551</id><published>2009-08-12T00:43:00.004+03:00</published><updated>2009-08-12T02:05:15.296+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: Home Sweet Home</title><summary type='text'>Back to Ubuntu from my temporary Windows usage. Man, it's good to be back. Have to go restore all my backups now, buh bye.</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5344080417707382551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/ubuntu-home-sweet-home.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5344080417707382551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5344080417707382551'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/ubuntu-home-sweet-home.html' title='Ubuntu: Home Sweet Home'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-2215984541351759749</id><published>2009-08-06T01:51:00.002+03:00</published><updated>2009-08-06T02:03:02.798+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='notepad++'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Notepad++ and Python</title><summary type='text'>I know, I know, I'm using Windows. But it's just temporary, I just felt like playing some video games. Anyway, Notepad++ is awesome, I must say. And I wanted to use it for Python developing (I hate that IDLE Python comes with). To set up Notepad++ for Python developing I had to:
Create a batch script that would run a python script and then wait for a key (so that the terminal (or, command line) </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/2215984541351759749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/notepad-and-python.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/2215984541351759749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/2215984541351759749'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/notepad-and-python.html' title='Notepad++ and Python'/><author><name>Felix</name><uri>http://www.blogger.com/profile/09877005898455077649</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/-1EkKneXHbFU/Tn3swoP9zLI/AAAAAAAAAMQ/b8ljDrZ6GIY/s1600/2863e506256679592c6d824b2a1b69a5%253Fs%253D240'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-2166523585663584013</id><published>2009-08-06T00:25:00.004+03:00</published><updated>2009-08-06T00:41:10.672+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Rant on Eclipse</title><summary type='text'>If you at least once thought about programming in Java, you must have heard about Eclipse. Well, I'm playing around with the Android SDK, learning Java at the same time. While using Eclipse to code for Android is very easy and straightforward, Eclipse itself is a monstrous bloat of an application. I barely have one project and five files open and Eclipse is using up 400MB of memory. Don't believe</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/2166523585663584013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/rant-on-eclipse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/2166523585663584013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/2166523585663584013'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/rant-on-eclipse.html' title='Rant on Eclipse'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i498.photobucket.com/albums/rr348/Znupi2/blog/th_eclipse_memory.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-6104707523014792039</id><published>2009-08-05T00:34:00.004+03:00</published><updated>2009-09-01T23:22:16.493+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='optimization'/><category scheme='http://www.blogger.com/atom/ns#' term='bandwidth'/><title type='text'>Small bandwidth optimization trick</title><summary type='text'>I've been helping my brother out with his project (http://tastekid.com) and learning some new tricks in the meantime. One thing that bugged me is that we have a lot of JavaScript files, because we like to keep things separated (one file for the tooltip, one for the autocomplete feature etc.). While this makes developing easier, it's pretty bad for production because it drastically increases the </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/6104707523014792039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/08/small-bandwidth-optimization-trick.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6104707523014792039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6104707523014792039'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/08/small-bandwidth-optimization-trick.html' title='Small bandwidth optimization trick'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-4757989597202331393</id><published>2009-05-14T22:23:00.003+03:00</published><updated>2009-05-14T22:26:20.156+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reader'/><category scheme='http://www.blogger.com/atom/ns#' term='porn'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='rss'/><title type='text'>Google is really open minded</title><summary type='text'>I use Google Reader to read a few feeds. And it has this nifty little box called Recommended for you. Usually, that box is full of Python, PHP, Linux-related feeds. But today, something new: a website called rule #34 - If it exists there IS porn of it. Wow. I swear I don't have any kinky feeds in my reader :-\.</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/4757989597202331393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/05/google-is-really-open-minded.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4757989597202331393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4757989597202331393'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/05/google-is-really-open-minded.html' title='Google is really open minded'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-6574973774401289707</id><published>2009-05-14T15:30:00.004+03:00</published><updated>2009-05-14T16:29:09.668+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Upgrading to Ubuntu 9.04</title><summary type='text'>1) The Desktop
As always, I did a full reinstall on the desktop. I don't like having old packages and configuration files in my system, so I always to a fresh install no matter what. However, I have a /home partition, so all my settings, e-mails, documents, work is saved (I still do backups, just in case). Installing was a breeze (as always with Ubuntu), so here are my impressions (it's already </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/6574973774401289707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/05/upgrading-to-ubuntu-904.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6574973774401289707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6574973774401289707'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/05/upgrading-to-ubuntu-904.html' title='Upgrading to Ubuntu 9.04'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_W4OEwvrbSQA/SgwaPmDrCZI/AAAAAAAAABw/VGsoiNoaNTQ/s72-c/Screenshot-Transmission.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-3920068199494573494</id><published>2009-05-02T17:59:00.008+03:00</published><updated>2009-10-11T00:24:14.252+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='rhythmtoweb'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>RhythmToWeb</title><summary type='text'>Attention: RhythmToWeb has moved to Google Code

RhythmToWeb is a plugin for Rhythmbox (a music player for the GNOME desktop). It sends information about the currently playing song over the web. The information is sent as a series of GET variables: artist, title, album, genre, year, duration (seconds).
The configuration dialog:URL: This is the URL that is going to be called.Interval: This is NOT </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/3920068199494573494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/05/rhythmtoweb.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3920068199494573494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/3920068199494573494'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/05/rhythmtoweb.html' title='RhythmToWeb'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-6473374540074151295</id><published>2009-05-02T14:10:00.004+03:00</published><updated>2009-09-01T23:22:44.949+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python: alternative class initializers</title><summary type='text'>You may notice that some Python modules have classes that define more than one initializer. Why you may want this is if you have more than one input method of initializing it. For example, you can have an RPC class (just an example) which can take both XML and JSON arguments when initializing. There are more than one way of doing this, but having a couple of initializers is the most beautiful way</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/6473374540074151295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/05/python-alternative-class-initializers.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6473374540074151295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6473374540074151295'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/05/python-alternative-class-initializers.html' title='Python: alternative class initializers'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5489946546575526296</id><published>2009-04-24T23:30:00.002+03:00</published><updated>2009-04-25T00:05:26.257+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bittorrent'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Transmission BitTorrent on a headless server</title><summary type='text'>I never would have thought installing a WebUI-based torrent client could be so easy. I have a 24/7 running server, on Ubuntu 8.10 Server Edition, so I thought I should try to install a BitTorrent client so I can download torrents even when my PC is turned off, so I can add torrents while away etc. The client of choice was Transmission. I use this on the desktop, too, and the only down side I can </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5489946546575526296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/transmission-bittorrent-on-headless.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5489946546575526296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5489946546575526296'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/transmission-bittorrent-on-headless.html' title='Transmission BitTorrent on a headless server'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-6995404560375214533</id><published>2009-04-16T22:48:00.002+03:00</published><updated>2009-04-16T22:50:49.701+03:00</updated><title type='text'>Pygmentool</title><summary type='text'>I have written my first Python web application, yay! The purpose of the application is to help people post highlighted code on their blogs using Pygments. I have written an article on this before, but it implied using Pygments from the command line, which is unpleasant for most people. Also, not all people have Python available (like, say, Windows users?) and don't feel like installing it just </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/6995404560375214533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/pygmentool.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6995404560375214533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/6995404560375214533'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/pygmentool.html' title='Pygmentool'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-966005421681790200</id><published>2009-04-12T22:06:00.007+03:00</published><updated>2009-04-12T22:52:23.780+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><title type='text'>The nature of the HTTP protocol</title><summary type='text'>When first learning web programming and web design, a very basic thing it is good to understand from the very beginning is the nature of the HTTP protocol. That's because everything you are going to do will be based on this protocol. HTTP is a "connect-and-disconnect" type of protocol. Here's a hopeful diagram (which I will explain shortly):
I will try my best to explain this simple yet very </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/966005421681790200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/nature-of-http-protocol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/966005421681790200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/966005421681790200'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/nature-of-http-protocol.html' title='The nature of the HTTP protocol'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_W4OEwvrbSQA/SeI8tRHPJlI/AAAAAAAAABI/luryoMtn3s4/s72-c/the-nature-of-http.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-4754385505712601736</id><published>2009-04-10T13:28:00.003+03:00</published><updated>2009-08-05T02:10:55.575+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>A possible new look</title><summary type='text'>I made a Blogger theme concept. I'm not sure it can actually be implemented in Blogger, but I'll try (I have to read the documentation on Blogger templates). So far I have just an image:

Here's the Inkscape SVG concept. Hope I'll get the time to look into Blogger template docs and make this happen in the near future.</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/4754385505712601736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/possible-new-look.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4754385505712601736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/4754385505712601736'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/possible-new-look.html' title='A possible new look'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i498.photobucket.com/albums/rr348/Znupi2/blog/th_blog.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-8348712694313444217</id><published>2009-04-05T13:42:00.005+03:00</published><updated>2009-09-01T23:23:42.919+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><title type='text'>Smart Ajax / Javascript Paths</title><summary type='text'>I always wondered how heavy Ajax applications (like Facebook) make use of those smart paths. When I browse on Facebook, I can see that the actual URL is always the same, usually http://facebook.com/home.php, but after that comes a "#" and then a path, for example http://facebook.com/home.php#/profile.php etc. I had a look with Firebug and found that there are no magic Javascript events going on </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/8348712694313444217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/smart-ajax-javascript-paths.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8348712694313444217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8348712694313444217'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/smart-ajax-javascript-paths.html' title='Smart Ajax / Javascript Paths'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5988650317730119481</id><published>2009-04-05T12:33:00.005+03:00</published><updated>2009-04-05T13:25:19.215+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook'/><category scheme='http://www.blogger.com/atom/ns#' term='firebug'/><title type='text'>Facebook funnies</title><summary type='text'>An excerpt from a Facebook Javascript file:
function URI(uri) {
    if (uri===window) {
        Util.error('what the hell are you doing');
        return;
    }
    // ...
Hah! I found this while trying to figure out how they do the smart Ajax urls (like http://example.com/page.html#/smart/path) and it seems they just check from time to time (about five times a second) if the document location </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5988650317730119481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/facebook-funnies.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5988650317730119481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5988650317730119481'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/facebook-funnies.html' title='Facebook funnies'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5559010079320207402</id><published>2009-04-04T18:11:00.005+03:00</published><updated>2009-09-01T23:29:12.462+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='stopwords'/><title type='text'>Keywords from a string</title><summary type='text'>For a project of mine, I had to get the most used X words from a string (mainly an HTML document), in Python. I took some inspiration from this post, but added quite a few things to it (besides translating it to Python, duh). Here are a few optimizations I made:

Parse only the content between &lt;body&gt; and &lt;/body&gt;;
Remove any scripts or stylesheets as they will contain words that repeat a lot of </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5559010079320207402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/keywords-from-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5559010079320207402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5559010079320207402'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/keywords-from-string.html' title='Keywords from a string'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5852142378804273038</id><published>2009-04-02T22:04:00.006+03:00</published><updated>2009-09-01T23:29:28.663+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='framework'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Your own PHP framework</title><summary type='text'>This article is based on the previous "Perfect PHP Setup" one. I will explain everything here again, so you don't have to read it.
This tutorial will show you how you can build your own PHP framework from scratch. You might ask yourself, why do that when there are so many third party frameworks out there? Well, here are a few reasons I can think of off the top of my head:

You understand how </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5852142378804273038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/your-own-php-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5852142378804273038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5852142378804273038'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/your-own-php-framework.html' title='Your own PHP framework'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-7634746108981985474</id><published>2009-04-01T21:53:00.007+03:00</published><updated>2009-09-01T23:29:52.214+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='snippets'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Perfect PHP Setup</title><summary type='text'>PHP is the first 'serious' language I've learned. I fiddled around with it quite a lot, and came up with this 'perfect' setup. What I mean by this is that this will give you full flexibility, easy adding of modules and native "nice URLs".
First of all, I'm using Apache as my webserver. If you're using something else, the .htaccess part might not work for you. Now, this RewriteRule is gold:
</summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/7634746108981985474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/04/perfect-php-setup.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7634746108981985474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/7634746108981985474'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/04/perfect-php-setup.html' title='Perfect PHP Setup'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-5080025686814325300</id><published>2009-03-31T21:36:00.008+03:00</published><updated>2009-03-31T23:17:38.514+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='highlight'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='pygments'/><category scheme='http://www.blogger.com/atom/ns#' term='syntax'/><title type='text'>Syntax Highlighting on Blogger with Pygments</title><summary type='text'>It seems that Blogger is not a "by coders for coders" type of service. Not at all, actually. Currently, there's no easy way to post syntax highlighted code on your blog. Although, this blog is pretty new, I have a hunch I'll be posting bits of code quite often, so I thought I should find a way to do it, and do it right.
Most of the solutions on the web today imply the use of complicated </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/5080025686814325300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/03/syntax-highlighting-on-blogger-with.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5080025686814325300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/5080025686814325300'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/03/syntax-highlighting-on-blogger-with.html' title='Syntax Highlighting on Blogger with Pygments'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-8449256267618184445</id><published>2009-03-31T11:52:00.004+03:00</published><updated>2009-04-01T19:15:27.867+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>The "Now Playing"  Feature</title><summary type='text'>Notice the "Now Playing" widget in the right sidebar? Just goes to show the awesome things you can do in Python in one evening. It's basically a Rhythmbox plugin that sends information about the currently playing song over HTTP. A small PHP script takes that and writes a simple Javascript file that just does a document.write() which is then included in the sidebar. Awesome! :-)

I still have a </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/8449256267618184445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/03/now-playing-feature.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8449256267618184445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/8449256267618184445'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/03/now-playing-feature.html' title='The &quot;Now Playing&quot;  Feature'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_W4OEwvrbSQA/SdOS__HeArI/AAAAAAAAABA/cOK9jAh6YIs/s72-c/nowplaying.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1967442237480846918.post-2503123475583745216</id><published>2009-03-29T22:38:00.003+03:00</published><updated>2009-03-29T22:55:56.401+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='school'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Why Oracle is stupid</title><summary type='text'>We're learning Oracle SQL in school. Now, this may seem a good thing, but it is not, unfortuantely. For one, the Oracle "enhanced" SQL blows. It is completely un-standard and to quote an experienced programmer: "If you want to learn assbackward SQL, learn Oracle". To quote another experienced programmer, "It's a great hole in the ground into which money can be poured". The only good thing about </summary><link rel='replies' type='application/atom+xml' href='http://it-ride.blogspot.com/feeds/2503123475583745216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://it-ride.blogspot.com/2009/03/why-oracle-is-stupid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/2503123475583745216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1967442237480846918/posts/default/2503123475583745216'/><link rel='alternate' type='text/html' href='http://it-ride.blogspot.com/2009/03/why-oracle-is-stupid.html' title='Why Oracle is stupid'/><author><name>Znupi</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_W4OEwvrbSQA/Sc_at2vJ5aI/AAAAAAAAAAM/-wEy4rtRV6A/S220/profile.jpg'/></author><thr:total>0</thr:total></entry></feed>
