Aug 23

NetBeans Java Tutorial – If Statement and Variables #5

In this tutorial I show how to use different types of variables in Java as well as how to use a basic if statement.


package tutorials;
 * @author Edward
public class Variables {
    public static void main(String args[]) {
        String myFirstVariable = "hi"; // Declaration and instantiation
        // Camel-case naming convention
        char myChar = 'd';
        int i = 3;
        double myDouble = 1.1;
        float myFloat = 1;
        if ((i * 2) != 2) { // True
        } else { // False

May 22

Canadian Facts version 1.3 released!

Canadian Facts

Version 1.3 of the Canadian Facts Android app has now been released!

There’s not much to see on the front-end but the update consists of a change to way facts are stored on the back-end of the app. This should make updating the app with new facts easier in the future.

Click here to install!

May 16

ecoCart – RESTful Web eCommerce solution released!

I’m pleased to announce that ecoCart a RESTful eCommerce web application which I’ve been working as my University web-script programming unit coursework is available for anyone to download and use here.



Full description:

ecoCart is an “online shopping cart” web application which can be installed
and fully managed, as well as maintained by English-speaking businesses worldwide.
It includes functionality allowing business owner’s customers to browse and search
through products (organised into categories) and make online purchases through
the web application.

The product also allows staff to update company information, the colour scheme
(of the user interface), manage their product catalogue (updating product descriptions, image and whether a product is “featured” or not) and delivery options at any time
as well as supplying staff with customer delivery information, reports on sales and
present them with real-time information concerning their organisation’s product stock levels.

The product further implements exclusive environmentally friendly features, encouraging
their customers to make environmentally friendly choices. Including: placing the
most environmentally friendly delivery options first (at the checkout stage). The application is also
designed to run on low powered and low performance server hardware in order to help
reduce the business’ carbon footprint.

*An important note to anyone intending to use ecoCart for their live business

ecoCart does not currently support any built in authentication for access to admin areas of the application, nor does it support any payment gateways to make payments for products. However anyone is free to continue development of ecoCart to include these features.


Feb 26

NetBeans PHP Tutorial – Quicksort Algorithm #16

In this tutorial I show how to implement a Quicksort algorithm in PHP.


$arr = generateArr();
print("UNSORTED ARRAY:<br />");
print("<br />SORTED ARRAY:<br />");
quickSort($arr, 0, sizeof($arr) - 1);
function generateArr()
	$a = [];
	for ($i = 0; $i < 10; $i++) {
		$a[] = rand(0, 100);
	return $a;
function quickSort(&$array, $lowOrig, $highOrig)
	if (sizeof($array) < 2) {
	$pivot = $array[($lowOrig + $highOrig) / 2];
	$low = $lowOrig;
	$high = $highOrig;
	while ($low <= $high) {
		while ($array[$low] < $pivot) {
		while ($array[$high] > $pivot) {
		if ($low <= $high) {
			// Swap their values
			$temp = $array[$low];
			$array[$low] = $array[$high];
			$array[$high] = $temp;
	if ($lowOrig < $high) {
		quickSort($array, $lowOrig, $high);
	if ($low < $highOrig) {
		quickSort($array, $low, $highOrig);

Oct 09

UoP Bus Timetable (Android App) released!

UoP Bus Timetable


UoP (University of Portsmouth) Bus Timetable is now available for free on the Google Play store!

UoP Bus Timetable Screenshot


Get it on Google Play

Status update


This is just a quick post to say that I’ve started working on a simple Android app for the purpose of quickly and conveniently showing students of The University of Portsmouth the bus timetable. This app should be ready soon.

Jul 24

SA-MP PHP Query and RCON API version 1.1 released

Version 1.1 of my SA-MP (San Andreas Multiplayer) PHP Query and RCON API is now available. There’s no major changes however it should be slightly more efficient and secure now.


Original post with examples



Jul 12

NetBeans PHP Tutorial – Binary Search #15

In this tutorial I show how to implement a binary search algorithm in PHP.


$binaryArray = generateOrderedArray();
print(binarySearch($binaryArray, 640));
function binarySearch($array, $searchFor) {
	$low = 0;
	$high = count($array) - 1;
	$mid = 0;
	while ($low <= $high) { // While the high pointer is greater or equal to the low pointer
		$mid = floor(($low + $high) / 2);
		$element = $array[$mid];
		if ($searchFor == $element) { // If this is the value we're searching for
			return $mid;
		} else if ($searchFor < $element) {
			$high = $mid - 1;
		} else {
			$low = $mid + 1;
	return -1;
function generateOrderedArray() {
	$array = [];
	for ($i = 0; $i <= 99; $i++) {
		$array[$i] = $i * 10;
	return $array;

Jul 12

NetBeans Java Tutorial – Binary Search #4

In this tutorial I show how to implement a binary search algorithm in Java.


package tutorials;
import java.util.ArrayList;
 * @author Edward
public class Searches {
	public static void main(String[] args) {
		Searches searches = new Searches();
	public void testBinarySearch() {
		System.out.println(binarySearch(this.generateOrderedArray(), 640));
	private int binarySearch(int[] array, int toFind) {
		int low = 0;
		int high = array.length - 1;
		int mid = 0;
		while (low <= high) {
			mid = (int) Math.floor((low + high) / 2);
			int element = array[mid];
			if (toFind == element) {
				return mid;
			} else if (toFind < element) {
				high = mid - 1;
			} else {
				low = mid + 1;
		return -1;
	private int[] generateOrderedArray() {
		int[] array = new int[100];
		for (int i = 0; i <= 99; i++) {
			array[i] = i * 10;
		return array;

Jul 10

101 CMS Released on GitHub

As of the 10th of July 2014 I’m pleased to announce that 101 CMS has been released publicly on GitHub.

101 CMS Preview Picture

101 CMS Preview

101 CMS is a gaming clan content management system, developed mainly in PHP. The project was being worked on by myself and other members of the 101st Division gaming clan

The project is now free for anyone to look at or work on, if you’re interested you can find the repository here.

101 CMS GitHub Repository

Older posts «