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.


Download

 

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.


Download

Feb 26

NetBeans PHP Tutorial – Quicksort Algorithm #16

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

Code:

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

Eddy

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

 

Download

Jul 12

NetBeans PHP Tutorial – Binary Search #15

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

Code:

<?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.

Code:

package tutorials;
 
import java.util.ArrayList;
 
/**
 *
 * @author Edward
 */
public class Searches {
	public static void main(String[] args) {
		Searches searches = new Searches();
		searches.testBinarySearch();
	}
 
	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

Jun 14

EM Captcha – Visual PHP Captcha Class – 1.2 BETA

EM Captcha 1.2 BETA is now available. Version 1.2 is more secure than previous versions and also more efficient.

Link to original post with example as to how to use the class

Extra Information

PHP version: 5.4.0 or above

PHP extension / library requirements: SQLite3 and GD (Version 2.0)

License:  Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)

True Type Fonts: 3Dumb, LimeLight, SpecialElite – Note, these fonts are subject to their own licenses which are included in the download under the “fonts” directory.

Download

May 13

NetBeans Java Tutorial – Linear Search #3

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

 

 

Code:

package tutorials;
 
import java.util.ArrayList;
 
/**
 *
 * @author Edward
 */
public class Searches {
	public static void main(String[] args) {
		Searches searches = new Searches();
		searches.testLinearSearch();
	}
 
	public void testLinearSearch() {
		ArrayList<String> myArray = new ArrayList<>();
		myArray.add("lemon");
		myArray.add("lime");
		myArray.add("pear");
		myArray.add("apple");
 
		System.out.println(linearSearch(myArray, "orange"));
	}
 
	private int linearSearch(ArrayList<String> array, String toFind) {
		int i = 0;
		for (String val : array) {
			if (val.equals(toFind)) {
				return i;
			}
			i++;
		}
		return -1;
	}
}

Older posts «