Jul 26 2008

Minimize any application to the system tray in Ubuntu

Today I was googling to figure out how I could minimize any application to the Ubuntu system tray.

I am very used to Outlook and I have recently migrated to Thunderbird, so I was looking for a method to minimize Thunderbird to the system tray.

I found two solutions.

The first one was New Mail Icon, which is an extension for Thunderbird. It works like a charm, putting the Thunderbird icon in the system tray. This icon changes when a new mail is received.

I also found the AllTray application. With this software you can minimaze any application you want to the Ubuntu system tray. Pretty cute!

To install it, open a terminal and type:

sudo apt-get install alltray



Jul 23 2008

Creating an XNA project for both Windows and XBOX platforms

This week I’ve started a new XNA project and I had some troubles trying to configure the solution with Visual Studio, until I figured out how easy it was.

The point was creating a single solution with both Windows and XBOX projects on it. I also want a single shared folder for the sources.

I started creating a blank solution.




Then I added both XBOX and Windows projects to the solution.




To create a shared folder for sources I had to create a folder in the solution.

Then I added the sources contained in that solution folder in both projects as a link.




If you need to add additional files to the sources folder you must add them in the solution folder, and then add them to both projects always as a link.




And that’s all. :mrgreen:


Jul 18 2008

Building an arcade cabinet from scratch

One of my current projects consists in building and old arcade cabinet entirely from scratch.

This would be a long process. I am planning to buy wood panels and cut them off to form the cabinet based on the blueprints I am finishing off.

I have the controls already ordered at Ultimarc, and I am currently preparing the computer I’m going to bundle inside the cabinet.

I have also a 21” CRT TV happily waiting to be dismantled and connected to the cabinet :-)

For running roms I’m using Mame, of course, apart of some other good emulators for Sega and Nintendo game consoles.

Paired with Mame I’m using Mamewah, which is a Mame front-end that let you browse your rom list with the arcade controls, rather than with a keyboard and a mouse. It let you use other emulators as well, so we can select any rom, from any emulator we have installed, without leaving Mamewah.

In the following posts I will be explaining each step of the construction of the cabinet.

Wish me luck :mrgreen:


Jul 7 2008

Dependency injection between two local EJBs with Netbeans

This a simple tutorial about how to create a local dependecy injection within two EJBs 3.0.

The point is creating one EJB that calls a method from another local EJB with Netbeans and Glassfish.

Start Netbeans and create a new EJB project called Util and add a new session bean to it. Make it stateless and local.



@Local
public interface UtilLocal
{
    int returnInt();
}

@Stateless
public class UtilBean implements UtilLocal
{
    public int returnSomething()
    {
        return 0;
    }
}


Now create a second EJB project called Main and add a new session bean to it, like in the Util EJB. Include the Util EJB inside the Main EJB project.



@Local
public interface MainLocal
{
    int doSomeLogic();
}

@Stateless
public class MainBean implements MainLocal
{
    @EJB(beanName="UtilBean")
    UtilLocal utilEJB;

    public int doSomeLogic()
    {
        return utilEJB.returnSomething();
    }
}


Note that we use @EJB to instantiate the Util EJB object.


Simple yet effective :mrgreen: