How to connect LibreOffice Base to MySQL using JDBC on Mac OS X

In this article I’ll explain how to connect LibreOffice Base to MySQL database on Mac OS X. This guide should be useful for Windows as well, as there shouldn’t be too many differences.

First, you’ll need to download MySQL Connector/J, which is the official MySQL JDBC driver. Go to official download page to get it. Select Platform Independent option and download either zip or tar.gz file.

Once file is downloaded, extract it to a location in your home directory, e.g. $Home/Development/MySQLJDBC.

Now we’ll need to set up LibreOffice to use the driver. Open LibreOffice and go to Preferences. Then go to LibreOffice -> Advanced and click on Class Path. Click on Add Archive and browse to the jar file that is in the extracted directory you’ve created previously.

After adding new class path, restart LibreOffice.

Now create new Base database and select “Connect to an existing database”. Choose JDBC from the list.
In the next step, enter Datasource URL and JDBC driver class.

Datasource URL is in the format mysql://servername:port/databasename. If you are running MySQL on the default port (3306), you don’t have to specify it.

For JDBC driver class, enter com.mysql.jdbc.Driver. If you click on Test class button, message saying “The JDBC driver was loaded successfully” should appear.

Click on next. Specify user name, select Password required if selected user name requires password. You can test the connection by clicking on Test connection.

Click on Finish to save the Base file. When you open the Base file you’ve just created, it will be connected to the MySQL database and you will have access to all MySQL database tables.


How to add reference to Entity Framework 5 in Visual Studio 2012

To add Entity Framework 5 reference in Visual Studio 2012, you’ll need to install EF5 NuGet package.

In the project to which you want to add EF5 reference, right click References and select Manage NuGet Packages.

Go to Online -> All, select EntityFramework and click on Install.
Accept the licence agreement and wait for the installer to finish. You’re all set to start using EF5 in your project.

MAME OS X – Arcade emulator for Mac OS X

MAME OS X allows you to play arcade machine games on your Mac. It is a native OS X port of the popular MAME emulator.

To play games in MAME OS X, you’ll need to have game ROMs. These ROMs need to be put in a place where MAME OS X can find them. You can configure this under application’s Preferences -> General. You should create folders in your home directory for ROMs, disk images, samples and artwork (e.g. $Home/MAME/ROMs, $Home/MAME/Disk Images, $Home/MAME/Samples and $Home/MAME/Artwork), and then change configuration to use these directories. To “install” a game ROM, all you need to do then is to copy it into ROMs folder that you’ve created.

Google is your friend when it comes to finding ROM sources, and if you need to have a look at MAME OS X manual, you can find it here.

Keyboard controls:
– 5, 6, 7, 8 – Insert coin (players 1, 2, 3, 4)
– 1, 2, 3, 4 – Start (players 1, 2, 3, 4)
– Arrow keys – Move Joystick
– Left Control – Button 1
– Left Option – Button 2
– Space – Button 3
– ESC – Quits the game

You may have an issue when pressing Left Control and arrow keys together, as these are OS X shortcuts for switching desktop spaces and showing mission control / application windows. To get around this, open System Preferences and go to Keyboard. Under Mission Control deselect shortcuts for Mission Control, Application Windows, Move left a space and Move right a space.

Happy gaming!

How to show / hide Library folder in your home directory in OS X

By default, Library folder inside your home directory in OS X is hidden. Library folder contains a lot of application related files, so you probably won’t need to go inside it. But what if you do?

To show Library folder, open Terminal and use the following command:

chflags nohidden ~/Library

To hide Library folder again, use:

chflags hidden ~/Library


Windows 2.03 on Amstrad PPC640

I’ve been feeling retro all weekend, and one of the things I’ve done is to install Windows 2.03 on my Amstrad PPC640. I’ve already written a post on my PPC640, which you can read here. Quick summary of the PPC640 – 16 bit 8086 compatible CPU running on 8MHz, 640KB RAM and a monochrome 9″ LCD display.

Why Windows 2? Well Amstrad only has 2 720KB floppy drives, and Windows 2 is the last version of Windows that can be installed onto floppies – no hard drive required. It installs itself on 2 720KB floppies, which gives you the bare bones Windows 2.03 environment. A third floppy gives you a bunch of Windows applications, some of which you still get with new versions of Windows (modern versions of course).

Applications that you get are:
– CALC.EXE – Calculator
– CALENDAR.EXE – Calendar application
– CARDFILE.EXE – Personal database
– CLOCK.EXE – Clock
– NOTEPAD.EXE – Notepad
– PAINT.EXE – Paint
– REVERSI.EXE – Reversi game (no Minesweeper or Solitaire in those days)
– TERMINAL.EXE – Terminal emulator application
– WRITE.EXE – Windows Write word processor

There are also a few other system utilities, like spooler, pif editor, image converter and configuration utility. Amazing what you could fit on a single 720KB floppy in those days.

Windows 2.03 takes 238KB of memory when loaded, which leaves a whole 402KB free to run applications (as you can see on one of the screenshots). It was enough to run multiple apps at the same time, though.

Here are a few screenshots of the system up and running.

Run Mac OS 9 on Mac OS X

SheepShaver is Mac OS run time environment, with a built in PowerPC emulator. As well as being available for OS X, it can also be run on Linux and Windows.

With SheepShaver you can set up a virtual environment to run your old OS 9 (and earlier) applications. Have a look at this Emaculation article on how to set up SheepShaver on OS X.

You may also want to do a Google search for Chubby Bunny, which is already preinstalled and preconfigured SheepShaver running OS 9, ready to be used out of the box on your OS X.

I have found SheepShaver to be generally stable, and was able to install and use applications on it. If you have a need to run some of your old Mac software, but don’t have PowerPC based Mac anymore, this might be useful.

FS-UAE – Amiga emulator for Windows, Mac OS X and Linux

FS-UAE is an Amiga emulator that runs on Windows, Mac OS X and Linux. It supports emulation of Amiga 500, 500+, 600, 1000, 1200, 4000, CD32 and CDTV, including support for floppy images (ADF and IPF file formats), CD ROM images (ISO and BIN/CUE formats) and mounting local folders on your computer as hard drives. This last feature is very handy, as it makes copying files to your virtual Amiga machine very easy.

FS-UAE provides wealth of configuration options. Most of them are obvious and understandable, but you may want to have a look at the documentation page.

To create an actual Amiga virtual machine, you will need a copy of the actual Kickstart ROMs and floppy images of Workbench. FS-UA website contains information on how to purchase these, or use Google to find other sources.

I suggest having a look at The Green Amiga Alien Guide for a great tutorial on setting up very useable (including Internet access) Amiga 1200 virtual machine. It was written for WinUAE emulator, but I found it to be also of good use for FS-UAE.