Top Commentators

OnTheRoad

  • Two guys and a Beer - Episode 85
  • Jam Session 2
  • Two guys and a Beer - Episode 84
April 21, 2010

Irony of searches and one iPad visit to my blog

Just a couple of pictures this time.

The first one is about something i noticed i was doing, while searching for a code fragment. One could call it ironic, trying to find “find” :)

[continue reading]

December 18, 2009

Websockets tutorial/example with pywebsocket

As everyone already knows, Google Chrome now supports websockets. In essence, this allows you to keep a connection open with a webserver indefinitely (analogous to typical sockets) and send data bi-directionally. Unfortunately Chrome is the only browser currently supporting this, but I’m pretty sure this will change.

So I (…)
[continue reading]

November 12, 2009

Android location provider mock

So, yeah, I resumed playing around with android, this time version 2.0.

I’m really tempted to buy the new Motorola Milestone that should come out in Europe sometime between… now… and early next year, so I wanna be ready to create all the crazy stuff I have in mind (…)
[continue reading]

October 21, 2009

Grabbing title tag from web page

At least a couple of options, the first using BeautifulSoup:

import urllib import BeautifulSoup soup = BeautifulSoup.BeautifulSoup(urllib.urlopen("https://www.google.com")) print soup.title.string

And the second one using lxml:

import lxml.html t = lxml.html.parse(url) print t.find(".//title").text
September 30, 2009

Django template filter: Show list of objects as table with fixed number of columns

I recently ran into the following problem: I needed to be able to display a list of users in a table that had a maximum of X columns. Since I could not find the solution on the Internet I decided to give it a try and here is my (…)
[continue reading]