All posts tagged with 'Tipps'

Don’t make that sad smilie cry even more

22-Aug-07

Escaping single quotes in ruby is the same mess as in java: puts ":'(".gsub(’\”, ‘\\\\\”)puts ":'(".gsub(‘\”, ‘\\\\\”) I needed this to make the smilies after my comment box (here) clickable. Shortly after that, i found escape_javascript, maybe it still comes in handy.

Read the complete article »

Rails’ respond_to method

06-Aug-07

Ruby On Rails has a neat little feature called “respond_to”: class WeblogController < ActionController::Base def index @posts = Post.find :all respond_to do |format| format.html format.xml { render :xml => @posts.to_xml } format.rss { render :action => "feed.rxml" } end end endclass WeblogController < ActionController::Base def index @posts = Post.find :all respond_to do |format| format.html format.xml […]

Read the complete article »

Simple tokenizing with Oracle PL/SQL

18-Jul-07

I was in need of tokenizing some comma delimited data within an Oracle Database. A pity, there’s no split for a varchar2 like java.lang.String.split. I could have used Java in the database, but that would be lame, too.j I found this little function which uses pipelined results, that is, it returns his results while being […]

Read the complete article »

On Java Threads: A fairytale of a tutorial

12-Jul-07

I always thought that the Java Thread API is something… strange. If you work in a frontend application, things like running long-running tasks in the back without having the GUI ugly frozen and not responding should be somewhat simpler. SwingWorker has been around for quite a time but made it just recently into the core […]

Read the complete article »