Alexander Murmann's blog



Alexander MurmannAlexander Murmann
Standup 11/12/2010
edit Posted by Alexander Murmann on Sunday November 14, 2010 at 07:38PM

Interesting - Local Search API deprecation confusion

Google deprecated their Local Search API and suggest to use the Maps API GoogleBar instead. However, as it turns out, the API GoogleBar is just a wrapper around the Local Search API, that was just deprecated. You could use the Google Places API instead, but that one is currently in developer preview only. What are we supposed to do Google? Googling it did not reveal any fully satisfying answer...

Alexander MurmannAlexander Murmann
Standup 11/11/2010
edit Posted by Alexander Murmann on Thursday November 11, 2010 at 04:20PM

Interesting - Attaching JQuery UI Datepicker

When attaching JQuery UI's datepicker you should not use the class hasDatepicker since JQuery UI uses this class to mark DOM objects that already have a datepicker attached. So it won't attach a datepicker to elements with that class.

Interesting - Solr score sort

It is possible to sort results in Solr using any criteria you want and use the Solr score for a secondary sort. Some people thought that you were only able to use the Solr score as your primary sorting criteria.

Alexander MurmannAlexander Murmann
Standup 11/10/2010
edit Posted by Alexander Murmann on Wednesday November 10, 2010 at 11:49AM

Help - Request for PNG not working in IE7

We request a PNG via IE7 from inside Parallels, but the file doesn't get returned. The Nginx log just shows an empty line for the request. Suggestion: Look also in Nginx's error.log for the failing request. The request might be logged here and help find out what actually went wrong.

Interesting - Google Maps suggest canoeing and jet ski routes if your destination is across the ocean.

Jet ski from Shanghai, China to Kagoshima, Japan

San Francisco to Honolulu via kayak

Alexander MurmannAlexander Murmann
Standup 11/9/2010
edit Posted by Alexander Murmann on Tuesday November 09, 2010 at 01:30PM

Interesting - Making ".*" in regular expressions less greedy

Sometimes .* in regular expressions matches more than we would like it too. Let's say you have a string that includes some numbers you want to extract from a string. Our string might look like this:

some text 123 more text

now we might try to use the following regular expression to get the 123.

.*([\d]+)

However, this will only get us the 3. This happens because .* will match as match as possible. Adding a ? will change this to only match what is needed.

.*?([\d]+)

Now we get the 123 as desired.

A nice toll to experiment with regular expressions is rubular.com. Rubular allows you to see the effects of your regex in combination with an example string instantly.

Alexander MurmannAlexander Murmann
Standup 11/8/2010
edit Posted by Alexander Murmann on Monday November 08, 2010 at 09:32AM

Help - Running my own gem server

Sarah will give a Ruby introduction class for kids at RubyConf. However, there won't be any Internet connection available, but the participants will need to install several gems. A solution to this problem is the gem geminabox which allows you to run a server providing gems. Other users who have geminabox installed then are able to install gems from that server.