Showing posts from May, 2009

Eclipse 3.4 - Templates and Save Actions

My save action configuration in EclipseSave actions are actions which are performed when a file is saved, duh?. The configuration can be found by pressing ctrl+3 and typing 'save actions' (Java > Editor > Save Actions). The very first time I used Emacs I remember thinking, why would anyone use this? But the more I learned about how to configure Emacs the more i liked it. Nowadays it's on my top 10 list of things i would bring to a deserted island. The point is, the less time you spend struggling with the editor the more time you can spend on developing. Having a properly configured IDE will speed up your development significantly. I'm not going to list a bunch of hotkeys in this post. Instead I'm going to show the settings for 'code templates' and 'save actions' that I use. Code templates Both code templates and regular templates can be exported after they have been configured, which makes them easy to apply to new workspaces. The code temp


Today i ran into this warning when testing IE7 compatibility for a web project: Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917) The problem is that the site has some JavaScript code that tries to modify the parent of a DOM-node from the a child node before the child is finished loading. Here's a short example of a how to get the error: <br /> <div id="parent"><div id="child">Same ol' child<br /> <script> document.getElementById('parent').innerHTML = 'New child'; </script><br /> </div></div> The content will still be replaced but with a warning in the console. To get rid of the warning just move the script out to the parent container, ie. <br /> <div id="parent"><div id="child">Same ol' child<br /> </div><script> document.getElementById('par

jsTagCloud - JS canvas 3D tag cloud

jsTagCloud is a tag cloud plugin for jQuery. It uses the canvas element to render a 3d cloud that can be rotated with the mouse. It's made as a proof of concept, but it would be great if this someday evolved into a Wordpress plugin. So far i've only been able to test it in these browsers: Firefox/3.0.10 - Ubuntu 9.04 x64 yes, only one The tags in the demo is from this page and they should be clickable as well. The configuration of the plugin should be pretty obvious if you take a look at the source of demo.html . Features It's made as a jQuery plugin. Navigate the 3d cloud with the mouse pointer Clickable links I just wanted more than 3 items on my feature list :) Download and demo The source can be found at: And a demo can be found at: FAQ q: Why is the text size jumping? a: Because i couldn't find any way to scale strings between integer

Simple 3d engine with JavaScript canvas

This weekend I was testing the canvas element in JavaScript. It was pretty easy so I decided to make a very simple 3d engine. The engine only consists of a simple scene graph where the camera is fixed at origo and pointing along the Z-axis. The "pipeline" consists of two steps, transformation and rendering. All transformations are represented by 4x4 matrices which are pushed to a matrix-stack as the code traverses the scene graph. After the transformations are done the scene is rendered. The renderer only supports solid faces and edges. Since the objects aren't sorted before they are drawn all faces and lines are transparent. I never got the inheritance to work properly in JavaScript so there is no base class for objects just one implementation of a cube-class. A demo of the engine can be found at: The latest source is available in the project repository at:

Install a git server on ubuntu

Finally I took the time to install a git repository with gitosis on my server. If you read the instructions carefully from the start, the install will go pretty smooth. These are the guides i used: