Archive for September, 2008
September 23, 2008
Vin nemții
De ceva timp mi se tot parea ceva ciudat la Prima TV sau mai degraba cunoscut. Acel slogan “We love” suna apropiat de “We love to entertain you”, slogan pe care îl folosește Pro7, iar melodia de promo suna ca si melodia de la Pro7.
Primul meu gând, Prima TV apartine de Pro7. Și cum nu aveam ce face bag pe google “prima tv pro7″ și ce găsesc? Confirmarea! Prima TV aparține de ProSiebenSat.1 Media AG, ca și Kiss TV.
De fapt nu ii cine știe ce descoperire să merite un post în blog, dar moare blogul de foame și am zis să îi dau ceva de rumegat.
Detalii: http://www.prosiebensat1.com/aktivitaeten/segmente/free_tv/channels/romania/prisma_tv/
Ei da, chestia din link “PriSma TV” nu este greșeală făcută de mine! Chiar așa apare pe site-ul de la ProSiebenSat.1 Media AG
September 15, 2008
Creating a Ruby on Rails Search with Squirrel
I was trying to create a search form with all kind of search fields but almost no text fields so Ferret is nothing that would help me since I need no full text search.
I found several hints but none was really what I was looking for until I came across something on scribd (http://www.scribd.com/doc/3188387/Advanced-Searching-in-Rails) which didn’t help me either but it gave me the link to Squirrel which seemed to be exactly what I needed.
But as usual there is something that doesn’t quite work as expected, in my case the first problem was with checkboxes. What I tried to accomplish is that it should return all records that have true in the field if the checkbox is checked and ALL records (also the ones with false) if the checkbox is not checked.
My problem was that I was trying all kind of comparisons with ==true or ==1 which all failed. The correct way to do it is ==”1″ for true or ==”0″ for false. Here an example:
@course= Course.find(:all) do
kinderbetreuung==true unless params[:course_search][:kinderbetreuung]==”0″
end
The next problem I had is that I have for each day separate times for the course, yeah I know this is a bit to much work but I really had no better Idea how to solve it. Anyway, my problem was that a course could be on just one day of the week or 3 times a week. This makes the search a bit more complicated.
Let’s say you are searching all courses that start after 09:00. The correct way to do it is like this:
any do
kurszeit_mo_von >= zeit_von.to_s
kurszeit_mo_von==nil
end
This will return either if the coursetime for monday matches OR if the coursetime is null. Hope I could save someone a lot of time with this.
September 11, 2008
Shit does happen …
For a second I was not careful and I hit a BMW on the freeway, well things could be worse










