When searching for text snippets in sql databases you might want to rank the results according to “how good did it match”. And: the ranking shouldn’t make the query slower.
Let’s take a simple example using the LIKE operator. (I know, FTS does a better job, but let’s stick to like for now).
Assume the search …
by far not as powerful as the Fastest Fourier Transform in the West but maybe sometimes useful for a quick data analysis or de-noising. Reads stdin and writes to stdout.
Algorithm taken from Meyberg, Vachenauer: Höhere Mathematik II and ported to plain ruby myself.
< ![CDATA[
#!/usr/bin/env ruby
require ‘complex’
class Array
# DFT and inverse.
#
# Algorithm from
# …
Neulich war ich auf der Burg zu Burghausen1 und entdeckte auf einem der ältesten Bilder (eine Schutzmantelmadonna) im Palas eine merkwürdige Aufschrift:
Das Bild kam unter einem Stifterbild der Hedwigskapelle1 zum Vorschein und ist eine Rekonstruktion. Offiziell datiert ist das Bild auf
1507
Mir fiel jedoch die verblüffende Ähnlichkeit mit der Zahl 1258 in arabischer Schreibweise2
١٢٥٨
auf, was mir und meiner kunstgeschichtlichen …
¶
Posted 22 März 2011
§
Artikel auf deutsch § offtopic
‡
°
Tagged: Bayern, Bayernkurier, Burghausen, CSU, Elisabethkapelle, Frühgotik, Geschichte, Heinrich XIII, Islam, Kunstgeschichte, Laptop, Lederhose, Rant
Gestern gab’s einen Mini-Vortrag von mir bei den CocoaHeads München:
CoreData (iOS) ist nur mit Tricks dazu zu bringen den Index bei Textsuche zu benutzen,
SQLite Full Text Search (FTS) ist der Hammer.
Die Folien dazu.
Hurra! Vor einigen Tagen ist die erste Version des Promillerechners im erschienen. Die App merkt sich was Du wann getrunken hast und schätzt nach der Widmark Formel grob den aktuellen und fallenden Promillewert ab:
.
Loading UIImages automatically in high-resolution works fine for locally stored images – but if you want to fetch them via remote URL you have to code yourself.
A simple, blocking but backward compatible (iOS >= 3.0, maybe even 2.0 but untested) implementation could look like this:
@implementation UIImage (MRORemote)
// add the @2x filename suffix
+(NSURL *)url2x:(NSURL …
The iPhone4 comes with a super high-res display and to leverage that encourages App Developers to provide all artwork twofold – once “normal” and once in double resolution named equally with a “@2x” suffix.
To ease my designers’ life and avoid confusion (and designers are easily confused I found) I ask them to provide the …
again, for my custom install location I need to prepare:
cleanly uninstall and remove cruft:
$ dir=/Users/Developer.SnowLeopard
$ sudo sh $dir/Library/uninstall-devtools
$ sudo rm -r $dir/*
$ sudo mv /Developer /Developer.deleteme
then do the custom-location install and
finally restore some hotfix softlinks:
$ dir=/Users/Developer.SnowLeopard
$ sudo ln -s $dir/Platforms /Developer/Platforms
$ sudo ln -s $dir/SDKs /Developer/SDKs
$ sudo ln -s $dir/Applications/Xcode.app /Developer/Applications/Xcode.app
Not removing the cruft …
Parser mit Ragel – komplizierte Grammatiken und rattenschnelles XML.
Warum Parser bauen?
Was spricht gegen Ad-Hoc Parsing (a.k.a. Gefrickel)?
Quelltext Impression
Wie komme ich drauf?
Anschnallen: Die Bausteine
Beispiel: SVG Path Parser
Beispiel: XML Parser
Ausblick: Zustandsautomaten
Vielen Dank
Die Folien vom Vortrag am 22. September bei den CocoaHeads München.
UILabel’s font property accepts UIFonts – but strange enough there’s no way to get a custom loaded CGFont (from a ttf or otf file) converted into such an UIFont. You’re stuck with the iPhone’s pre-installed fonts – at least when you have to support iOS 3.0 devices.
After googling a bit and searching Stackoverflow I found …