Author Archives: crydust

How to encode accents in an ascii sql file

Sometimes when you want to send a sql file to someone and it contains accents things go … bad. To circumvent this in oracle sql files you can escape these with compose(unistr(‘CHARACTER + ACCENT’)). This way your sql file remains … Continue reading

Posted in sql, Uncategorized | Comments Off on How to encode accents in an ascii sql file

How to combine multiple videos

Vlc has a command line interface that enables all sorts of video editing actions. One of those is to stitch together multiple videos. This is how it works on a mac: /Applications/VLC.app/Contents/MacOS/VLC -I ncurses 1.ts 2.ts 3.ts –sout “#gather:std{access=file,dst=full.mp4}” –sout-keep

Posted in Mac | Comments Off on How to combine multiple videos

Switching to Mac

I’ve recently switched from windows and linux to mac. Pretty much everything is different. Here are the shortcuts I can’t live without: On Windows, I used to… On my Mac… Home Cmd+Left End Cmd+Right Delete fn+Backspace Ctrl+Left Alt+Left Ctrl+Right Alt+Right … Continue reading

Posted in Mac | Comments Off on Switching to Mac

Optimizing JavaScript is harder than ever

We’ve all got our favorite browser. And while developing for the web we test in that one browser first. Optimizing JavaScript for one browser only is a tempting idea. I mean … how much difference could there be between browser … Continue reading

Posted in JavaScript | Comments Off on Optimizing JavaScript is harder than ever

Internet Explorer Platform Preview randomness is biased

After installing Internet Explorer Platform Preview 1.9.7745.6019 the first thing I did was check out its javascript performance on my own scripts. It turns out to have a very wierd output for Math.random. Test your browsers Math.random() function and see … Continue reading

Posted in Uncategorized | Comments Off on Internet Explorer Platform Preview randomness is biased

Custom model binder to avoid decimal separator problems

I bumped into an issue while trying to get the open source ASP.NET MVC project NerdDinner running on my laptop. The Create action in the DinnersController just wouldn’t work. This was due to Latitude and Longitude values being set with … Continue reading

Posted in ASP.NET MVC | Comments Off on Custom model binder to avoid decimal separator problems

IE8 aggressive caching fix

Apparently Internet Explorer 8 has a more aggressive caching mechanism than any other browser I’ve ever met. To fix it I’ve added the following to almost every dynamic page on my server. <% // prevent caching (asp classic jscript) Response.CacheControl … Continue reading

Posted in asp | Comments Off on IE8 aggressive caching fix

Silverlight vs Flash Chess

After seeing the Silverlight Chess sample I immediately started work on a flash version. It needs a lot of optimizing, not a single variable type was set, so it’s not a very fair fight. Anyway … flash is about 10x faster than the ie7 js engine on my machine. But still a lot slower than silverlight.

Continue reading

Posted in Flash, Silverlight | 4 Comments

Generate Excel files in ASP Classic

Generating Excel files in ASP Classic is not as easy as I thought. I hope someone finds use in this little piece of code that shows a way to export data to csv and to xls.

Continue reading

Posted in asp | 2 Comments

Selecting a random employee with adjacency tables

In my previous blogpost I mentioned a way to retrieve the entire tree from a hierarchy stored with adjacency tables. Now I’ve got a way to retrieve a random employee in an organisation. I use ORDER BY NEWID() to randomize … Continue reading

Posted in sql | 1 Comment