Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 472

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 487

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 494

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-settings.php on line 530

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/cache.php on line 103

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/therning/public_html/niklas/wp-includes/theme.php on line 623
Niklas blog

Niklas blog

Just another WordPress weblog

Rotating video clips shot in "portrait" mode (revisited)

December 31st, 2007 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Some time ago I write about how to use mencoder to rotate videos. After playing around with mencoder some more today I found a better way of doing it, all in one go. Read the rest of this entry »

Preprocessing JSP files to automatically escape EL expressions

September 20th, 2007 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

In his post, Proposed Tomcat Enhancement: Add flag to escape JSP’s EL by default, Matt Raible suggests that Tomcat should add an option to escape the output of EL expressions by default. At Trillian we’ve also run into the problem he’s describing since we needed the output of our JSPs to be valid XML at all times. Read the rest of this entry »

Xbox Media Center Linux port in the works

July 2nd, 2007 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Seems like the Xbox Media Center team are working on a Linux port! Apparently they have only been working on it for a couple of months now but it’s already beyond just being a tool for skinners and plugin developers. Remote control support using LIRC is in there and it already plays most audio and video files. Even DVD ISO’s over Samba! Read the rest of this entry »

Useful link: SEO checklist for Drupal websites

April 23rd, 2007 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

tela has posted a SEO checklist for Drupal websites. If I've managed to configure drupal correctly this post should get a nice URL alias automatically from the title. I'm using drupal's pathauto module.

Ant + Log4j

March 15th, 2007 in Uncategorized

Hibernate’s SchemaExportTask ant task always gives very informative error messages (not! Smiling). Here’s an example:

BUILD FAILED
build.xml:267: Schema text failed: Could not parse mapping document from file SomeClass.hbm.xml

To get some useful info on what went wrong we need to specify a log4j configuration file:

niklas@niklas:~$ ANT_OPTS=-Dlog4j.configuration=file:///path/to/log4j.properties ant some-task

Don’t forget file://!

Here’s a simple log4j.properties file you could use:

log4j.rootLogger=DEBUG, consoleAppender
log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.consoleAppender.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

Spring and named constructor arguments (cont.)

September 5th, 2006 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

I’ve just uploaded the patch I was talking about in my previous post to Spring’s issue tracker. I just hope they won’t be too hard on me. Smiling

The page is right here: http://opensource.atlassian.com/projects/spring/browse/SPR-2539.

It’s going to be very interesting to hear what they think about it.

Spring and named constructor arguments

September 4th, 2006 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

I’m a big fan of Spring and I’ve been using various parts of it now for the last two and a half years. Using the Spring dependency injection container has indeed made my life (as a programmer, of course Eye-wink) a lot easier. In this post I will demonstrate a technique which could be incorporated into Spring to add support for constructor injection using named parameters. The same technique could also be useful for scripting languages like Jython and Groovy to add support for calling Java methods using named parameters. Read the rest of this entry »

Downloading YouTube movie clips to your local hard drive

August 10th, 2006 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

I tried to watch this YouTube clip the other day but found that my flash player had a hard time synching the audio and video. Very annoying! And as far as I can see YouTube doesn’t provide a download link to let me download the movie and play it directly from my hard drive. I really wanted to see this clip but couldn’t stand the audio lagging behind. I figured there must be a way to hack that flash thing they are using to play the movie. It turned out to be quite easy! Read the rest of this entry »

Rotating video clips shot in "portrait" mode

July 28th, 2006 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

When using my Canon IXUS 40 digital camera to record short videos I sometimes accidently rotate the camera 90 degrees. Of course this isn’t a problem when taking photos since it’s very simple to rotate an image using Photoshop, GIMP, ImageMagick, etc.

The solution might seem less obvious when dealing with video files. Fortunately, there’s this great tool called mencoder (which is part of MPlayer) which let’s us fix things like this: Read the rest of this entry »

Slutet gott…

July 27th, 2006 in Uncategorized

Deprecated: Function split() is deprecated in /home/therning/public_html/niklas/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 466

Vi närmar oss slutet på vår USA-resa när vi nu sitter på flygplatsen i New York. Sammanfattningsvis har det varit mycket lyckat. Trots missen med biljetterna mellan LA och NY kom vi med den sedan innan planerade flighten. I NY har vi hälsat på frihetsgudinnan (hon verkade lite stel, men så kan det ju vara när man får främmat). Se vidare bifogad bild. Tyvärr missade vi vad som skulle kunna ha varit en helt fantastisk konsert med Antony and the Johnsons. Biljetterna var helt slutsålda. Att vara ute i god tid är nog ett bra tips i NY. För övrigt har det varit jävligt varmt och jävligt mycket folk och jävligt många tutande bilar och… någon som tror att vi tycker det är skönt att komma hem till gamla Svedala?