Category Archives: Open Source

Simple internal phone list with php and mysql

Here is a simple piece of PHP code to create a internal phone list.  It has no styles applied to it so you can integrate it to your own site.  I used MySQL for the database.  You need to create a database called telephone and create a table in that database called employee.  You can also modify the db.php file if you wish to use another name.  The following sql will create the database for you.

CREATE DATABASE telephone;
USE telephone;
CREATE TABLE `employees` (
 `number` varchar(10) NOT NULL,
 `name` varchar(50) NOT NULL,
 `department` varchar(50) NOT NULL,
 `extension` varchar(10) NOT NULL,
 PRIMARY KEY (`number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `employees` (`number`, `name`, `department`, `extension`) VALUES
('1', 'Frank', 'Finance', '200'),
('2', 'Joe', 'HR', '201');

Continue reading

Advertisements

Mongodb and Java a simple example

MongoDB (from “humongous”) is an open source document-oriented database system developed and supported by 10gen. It is part of the NoSQL family of database systems.  It is extremely easy to install and use and supports most popular programming languages.  Here is a simple java application to add and query data.

import com.mongodb.MongoClient;
import com.mongodb.MongoException;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCursor;

Continue reading

locked out of windows pc

Padlock-q mark

Image via Wikipedia

I recently could not log in to a pc when its trust relationship with the domain was broken and I did not have the local username or password.  A colleague recommend a utility called NTPassword which can be booted from a CD, USB, or floppy disk.  With this I was able to clear the password of the local administrator and also enable the account.  It is linux based and doesn’t look very pretty but it is menu driven and relatively easy to use.

http://pogostick.net/~pnh/ntpasswd/

Spiceworks for Network Management

Image representing Spiceworks as depicted in C...

Image via CrunchBase

For small to mid size business it can be difficult to keep track of whats happening on your network.  There are plenty of solutions out there but they can be expensive and difficult to configure and support.  Spiceworks is a free browser-based network management and administration program. It provides the user with a single dashboard from which he or she can inventory, monitor and troubleshoot the network and even track Helpdesk calls.

Continue reading

Learning about micro-controllers using the Minipov

If you are interested in learning about micro controllers and building your own projects then I would recommend the MiniPOV kit from Adafruit Industries.  This is a kit and will need to be assembled so if you do not have a soldering iron you will need to borrow one.  From this you will learn to build kits and solder, program a AVR micro-controller, and control some LED‘s.

Continue reading

Ubuntu 11.10 Released

Canonical have release version 11.10 of their desktop Linux distribution.  I have been using Ubuntu for quite a while now but was not a fan of the unity desktop released in 11.04 and had switched to the standard Gnome desktop.  I am glad to say that with the latest release Canonical are back on track and a lot of the issues have been resolved.  The first thing that strikes you is how well it looks.  It is very polished and professionally finished.  The unity desktop now works as it should and is seamless you will be comfortable using it within minutes.  This version comes with Libre Office 3 and Firefox which for most people is all they need.  Performance is also good and desktop animations are very smooth.

If you are a Ubuntu user it is definitely worth upgrading.  For me I am now only using Windows for .Net development.  Everything else is available on Linux.

 

Developing android applications


I have just published an application on the android marketplace, you can scan the bar code or click here to install it.  This application was created as a training exercise so is not very complicated.  The application will convert miles per gallon (imperial) to litres per 100kms.

The whole android development process is well documented on the internet and if you have java experience you are off to a flying start.  There is very little required to get started and the only cost is a $25 registration fee if you wish to publish on the android market (this is not required for developing).

I have used Linux and Windows to test the developers kit and it works fine on both.  It also runs on macs but I haven’t tested this personally.

Continue reading