What a nice feature:
Just wondered why I got no results after executing a search via Sphinx and Thinking Sphinx. The problem was, that I used a negative value in a filter attribute and that Sphinx only supports unsigned integers:
Attributes are named. Attribute names are case insensitive. Attributes are not full-text indexed; they are stored in the index as is. Currently supported attribute types are:
- unsigned integers (1-bit to 32-bit wide);
- UNIX timestamps;
- floating point values (32-bit, IEEE 754 single precision);
- string ordinals (specially computed integers);
- strings (since 1.10-beta);
MVA, multi-value attributes (variable-length lists of 32-bit unsigned integers).
Here is a small code snippet to check for retarded browsers in Ruby on Rails:
user_agent = request.user_agent
unless user_agent[/msie/i].nil?
session[:browser] = 'retarded'
else
session[:browser] = 'normal'
end
I just had the following problem when trying to start a Ruby on Rails application on a fresh installation of Mac OS X Snow Leopard after I installed the mysql gem via gem install mysql:
uninitialized constant MysqlCompat::MysqlRes
I searched a bit and found a solution here. It was a problem with a buggy version of the Mysql driver. So you need to use a different version when installing the mysql gem. So first uninstall the existing gem via
gem uninstall mysql
and reinstall it via
export ARCHFLAGS="-arch i386 -arch x86_64" ;sudo gem install --no-rdoc --no-ri -v=2.7 mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config

- Image via Wikipedia
The easiest way to install ImageMagick on a Mac system (Snow Leopard) is to download and install MacPorts:
http://www.macports.org/install.php
After installing MacPorts via the package installer just enter
sudo port install ImageMagick
and that’s it.
I just wondered if LinkedIn supports company profile retrieval via their API. Unfortunately they don’t support it yet. :(
We dont have company APIs yet. You can certainly search for people at a specific company using the Search API, but we dont have company APIs that let you get the company profile. Something wed like to do in the future, but we dont have any specific plans yet.
I just had the problem that I added multiple markers to a v3 Google Map and executed fitBounds to see them all at ones. But the zoom level was much to high, when having only one marker. Calling the setZoom() method afterwards didn’t make any difference, so I searched a little bit and found this nice snippet of code:
google.maps.event.addListener(map, 'zoom_changed', function() {
zoomChangeBoundsListener = google.maps.event.addListener(map, 'bounds_changed', function(event) {
if (this.getZoom() > 10) // Change max/min zoom here
this.setZoom(10);
google.maps.event.removeListener(zoomChangeBoundsListener);
});
});
via Boogle’s Blog (Google Groups respectively)
Firefox 4 is coming and you can test it in a first beta version:
Index of /pub/mozilla.org/firefox/nightly/4.0b1-candidates/build1.
Get some more information in this nice slideshow:
Just found this little plugin which is maybe interesting to protect against Cross-site scripting in Ruby on Rails.
xss_terminate is a plugin in that makes stripping and sanitizing HTML stupid-simple. Install and forget. And forget about forgetting to h your output, because you won‘t need to anymore.

- Image via CrunchBase
If you set the NSZombieEnabled environment variable, the Objective C runtime will leave a dummy object behind for every deallocated object. When the zombie object is called, execution stops and you can see the message that was sent to the object and the call stack that tells you where the message came from it doesn’t tell you where you over released the object, but knowing where the object is called from should get you pretty close to the problem.



Recent Comments