What is the currently active workspace in Eclipse?

August 13th, 2010

Imagine you are dealing with multiple workspaces, which for example can be expected if you split up a code base in several Eclipse projects and you are working on several releases at once. Now wouldn’t it be handy if Eclipse would tell you which workspace is active?

There are two ways.

read on

How Ubuntu’s broken bluetooth support came to be

August 8th, 2010

Bluetooth supported? Pairing up your Bluetooth device was relatively well documented, by the community anyway. It was mostly done using the bluez package from bluez.com. Ubuntu town and in fact all of Linux land was generally at peace and the trendy folk at the BlueTooth Bar were being all trendy-like.

Then it happened. Ubuntu went up one release: Jaunty came to be and subsequently Bluetooth support died. Even now the Internet is teeming with Bluetooth bug reports, problems and forums are filled with questions such as ‘my keyboard is not being paired’. In fact, Debian seemed to be hit as well as some other distributions that leveled up.

What had happened?

read on

[solved] Ubuntu’s partman hangs on ‘scanning disks’

August 3rd, 2010

Here’s another gem from the Ubuntu malaise: partitioning a disk hangs when booting from an Ubuntu Live USB stick.

Depending on a couple of factors partman, Ubuntu’s installer partion manager, will hang on ‘scanning disks’, from around 43% to 47%. Following are two possible reasons and solutions.

read on

Fun with Bezier curves and for loops

July 8th, 2010

[REPOST] – this is a repost of an old but still relevant forum post of mine (Fun with Bezier curves), which I’m moving to my blog on my own server.

Bezier curves are cool. They are curves calculated through a formula with control points. These control points are crucial, as these determine how long, big and curved the Bezier curves are. There are optimized formulas for three, four and five control points, but in this post we’ll deal with an arbitrary number of control points and interactively drawing the curves.



(download source)

read on

Papervision3D star (sun) tutorial and source

February 11th, 2010

If you are looking for a cool sun effect (no pun intended) with flaring corona, you’re in the right place. This post isn’t about some practical sun in some shooter though: it would require some tweaking to make it useful in such context, as the animation is rather cpu heavy due to its massive corona noise textures.

No, this post is about combining cool PV3D features in order to achieve a nice looking animated sun. I’ve used the trunk of the papervision code repository, revision 851 (it works up to r910, after that a bug was introduced). Note that I’m no PV3D guru; I’m just sharing what I’ve learned so far.

This movie requires Flash Player 10

(note: this sun uses the skybox from the skybox tutorial)

Closely watch that corona for a while!

read on

Want to play Mass Effect 2, but lost your Mass Effect 1 save games?

January 30th, 2010

Yes, I play video games too. I won’t miss out on Mass Effect, which I think portraits a world almost as intricate as any good sci-fi novel (oh yeah I read those too, you should try A Fire Upon the Deep, by Vernor Vinge).

Since Mass Effect is going to be a trilogy (and more apparently), Bioware included a system that will use old save games as input for continuity in upcoming games, including ME2. Note that you’ll still be able to pick a different face and class.

Get your Mass Effect 1 save games at masseffectsaves.com

I didn’t know there would be an option to use ME1 save games as input until recently and I’ve deleted my save games a long time ago. No undelete program would find them. Annakie recognized this would be a problem and started a small site that offers various save games each with a different set of key choices made over time in ME1.

How awesome is that!

Take your pick as the list is growing fast and the website is becoming a popular hub for Shepards.

trackback

Mass Effect 2

How to connect a bluetooth keyboard in Ubuntu 9.04 Jaunty and 9.10 Karmic (workaround)

January 28th, 2010

Here’s a quick workaround for connecting and reconnecting a bluetooth keyboard (or any bluetooth device for that matter) in Ubuntu Jaunty and Karmic, even after rebooting. In short it’s a shell script that keeps connecting to your device in the background on a regular interval. Dirty? Absolutely. Does it work? Absolutely, no bluetooth configuration required at all.

read on

Excluding resources and test classes from war/ear in Eclipse

August 24th, 2009

Today I was trying to figure out how to exclude certain resources/classes from the war that was being deployed to my embedded server in Eclipse. I couldn’t find out how to do this in the Eclipse settings file.

Apparently, it has nothing to do with the source folder you see in the Project Explorer view, or the export settings in the Buildpath dialogs: instead you need to edit the Eclipse settings file “project-war\.settings\org.eclipse.wst.common.component” (viewable in the Navigator view) and modify the deployed source folders in there. Changes there do *not* reflect in the Project explorer (at least not with my version of Eclipse, Galileo). I’ve removed the test sourcefolder from there and everything was honky dory.

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
  <wb-module deploy-name="foo-war">
    <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
    <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
    <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
    <property name="context-root" value="foo"/>
    <property name="java-output-path"/>
  </wb-module>
</project-modules>

trackback

Repost: Make Eclipse ignore .svn directories

August 11th, 2009

Eclipse has the annoying little problem where Eclipse will copy .svn folders to the target/classes output folder and then complain about duplicate resources. After wading through some vague solutions, here’s a clear and simple post I found to solve this annoyance.

Make Eclipse ignore .svn directories

Window -> Preferences…, Java -> Compiler -> Building. Under “Output folder” add “, .svn/” to “Filtered Resources” (so that you get “*.launch, .svn/”).

It still works like a charm. Thanks Brian.

trackback

Java generic paged lazy List with JSF/JPA example implementation

July 22nd, 2009

Here’s a list implementation I came up with to enable true paged data fetching completely transparent to any user. It works independent of persistence layers, such as JPA implementations etc.

read on