Oct 05

Canadian Facts

Today I have launched my first Android app. Canadian Facts!

Canadian Facts is an app that displays a random fact about Canada is an easy to use and clean interface at any time from your android phone.

 

Download

 

So please go ahead and check it out on Google Play.

Oct 03

How to round the edges of an image with CSS

While at work today I needed to round the edges of an image using CSS, as in the image itself is square.

I quickly browsed the web because I, for some reason, assumed that border-radius wouldn’t work. A lot of examples on how to round the edges of an image mention putting a div around the image you want to round and set a border-radius on that image.

I thought that this seemed a bit more complicated than the task was so I tried setting border-radius directly on the image and it worked perfectly!

Here’s exactly what I did.

I had an image sitting within a div with a class of “countrytext”, so I simply created a new style in my style sheet for .countrytext img and set the borders.

 

Here is what the image looked like before being styled:

 

 

 

 

 

 

 

Here is what it looked like afterwards:

 

 

 

 

 

 

 

And here is the CSS I used:

.countrytext img { 
	border-radius: 10px; 
	-moz-border-radius: 10px; 
	-webkit-border-radius: 10px; 
}

 

Oct 01

NetBeans PHP Tutorial – MySQL Functions #6

In this tutorial I give an introduction to using PHP’s MySQL functions to communicate with a MySQL database. The heart of many web applications.

Sep 24

NetBeans PHP Tutorial – Functions, methods, includes and classes #5

In this tutorial I show how to use functions, methods, includes and classes in PHP.

 

 

 

Sep 16

NetBeans PHP Tutorial – Loops, variables extended and comments #4

In this tutorial I show how to use loops in PHP, how to assign different variable types and also how to use comments.

 

Sep 03

PHP Tutorials

PHP Tutorials

I’m pleased to announce that I’ve started making some YouTube PHP tutorials, if you’re interested in learning a bit of PHP using NetBeans (the Integrated Developer Environment) and XAMPP (a widely used web server package) to develop PHP code then this series of tutorials are probably for you, take a look at my PHP Tutorials Playlist.

YouTube Playlist: http://www.youtube.com/playlist?list=PL6CD0684656778402

Tutorial 1 Getting Started:

 

Tutorial 2 Hello World:

 

Tutorial 3 If Statement and Variables:

 

More tutorials to follow soon..

Jul 26

eBayTemplateCreator.com released!

 

I have finished work on the first version of eBayTemplateCreator.com and it is now free for anyone to use.

Simply head to http://www.ebaytemplatecreator.com and get started creating and customising your eBay listing description to make it stand out from the rest.

 

Here is a preview of a template generated by ebay Template Creator:

Status update

Eddy

Just a quick post as to what I’m currently working on. I’ve decided to make a relatively simple eBay listing template creator system, that will allow you to input some basic information about your eBay listing and will generate the HTML code needed to display your listing with the style that you’ve chosen.

This will be very easy to use and should be ready in the next few days.

Jul 02

uAdmin: SA-MP

 uAdmin Logo

uAdmin: SA-MP

Version: 1.0

uAdmin: SA-MP is a GTA: San Andreas Multiplayer server administration program, which enables you to issue RCON commands to and retrieve information from a server.

Download

Source 

Steps:

  1. To open the program double click uAdminSA-MP.jar (make sure you have Java correctly installed).
  2. The program will create a settings.ini file which should be located in the same directory as uAdminSA-MP.jar.
  3. You might then want to edit your settings by going to the “Tools” menu and click “Settings”.
  4. If you want to run a local server you need to set up the server directory and if you want to use the “Join Server” button you’ll also need to check your game directory.
  5. Once you’ve sorted out your settings click save and restart the program.
  6. To connect to a server press Ctrl+C or go to “Connections” then click “Connect”.

Download

Jun 30

SA-MP Query and RCON API for PHP

Version: 1.0 (30/06/2012)

Download

As well as the examples here; included in the download are SampRconExample.php and SampQueryExample.php files. These are full of examples of how to call functions as well as documentation.

Additional credits: Westie (for the original PHP SA-MP API and inspiration for this API)

SampQuery functions:
SampQuery(serverport)
SampQuery->connect()
SampQuery->close()
SampQuery->getInfo()
SampQuery->getBasicPlayers()
SampQuery->getDetailedPlayers()
SampQuery->getRules()
SampQuery->getPing() - Not in Westie’s API

Example | Output server info and basic players:

<?php 
/** 
 * 
 * @author Edward McKnight (EM-Creations.co.uk) 
 * This example assumes this file is in the same directory as the SampQuery class. 
 */ 
        require("SampQuery.class.php"); 
 
        $query = new SampQuery("127.0.0.1", 7777); 
 
        if ($query->connect()) { // If a successful connection has been made 
 
            print_r($query->getInfo()); // Print server info array 
 
            print_r($query->getBasicPlayers()); // Print basic players array, connection will time out if the player counter is above 100 and will return an empty array if no players are online 
 
            $query->close(); // Close the connection 
        } else { 
            echo "Server did not respond!"; 
        } 
?>

SampRcon functions:
SampRcon(serverportpassword)
SampRcon->connect()
SampRcon->close()
SampRcon->getCommandList()
SampRcon->getServerVariables()
SampRcon->setWeather(weatherID=1)
SampRcon->setGravity(gravity=0.008)
SampRcon->ban(playerID)
SampRcon->kick(playerID)
SampRcon->banAddress(address)
SampRcon->unbanAddress(address)
SampRcon->reloadLog()
SampRcon->reloadBans()
SampRcon->say(message)
SampRcon->changeGameMode(gameMode)
SampRcon->setGameModeText(gameModeText- Not in Westie’s API
SampRcon->nextGameMode()
SampRcon->gmx() {same as SampRcon->nextGameMode()}
SampRcon->execConfig(config)
SampRcon->loadFilterscript(fs)
SampRcon->loadFS(fs{same as SampRcon->loadFilterscript(fs)}
SampRcon->unloadFilterscript(fs)
SampRcon->unloadFS(fs{same as SampRcon->unloadFilterscript(fs)}
SampRcon->reloadFilterscript(fs)
SampRcon->reloadFS(fs{same as SampRcon->reloadFilterscript(fs)}
SampRcon->exitGame()
SampRcon->setHostName(hostName- Not in Westie’s API
SampRcon->setMapName(mapName- Not in Westie’s API
SampRcon->setTime(time- Not in Westie’s API
SampRcon->setURL(url- Not in Westie’s API
SampRcon->setPassword(password- Not in Westie’s API
SampRcon->removePassword() - Not in Westie’s API
SampRcon->setRconPassword(password- Not in Westie’s API
SampRcon->disableRcon() - Not in Westie’s API
SampRcon->enableQuery() - Not in Westie’s API
SampRcon->disableQuery() - Not in Westie’s API
SampRcon->enableAnnounce() - Not in Westie’s API
SampRcon->disableAnnounce() - Not in Westie’s API
SampRcon->setMaxNPCs(maxNPCs- Not in Westie’s API
SampRcon->call(commanddelay)

Example | Output command list:

<?php 
/** 
 * 
 * @author Edward McKnight (EM-Creations.co.uk) 
 * This example assumes this file is in the same directory as the SampRcon class. 
 */ 
 
        require("SampRcon.class.php"); 
        $query = new SampRcon("127.0.0.1", 7777, "changeme1"); 
 
        if ($query->connect()) { // If a successful connection has been made 
            // Output command list 
            print_r($query->getCommandList()); 
 
            $query->close(); // Close the connection 
        } else { 
            echo "Server did not respond!"; 
        } 
        $query->close(); // Close the connection 
?>

Example | Ban player:

<?php 
/** 
 * 
 * @author Edward McKnight (EM-Creations.co.uk) 
 * This example assumes this file is in the same directory as the SampRcon class. 
 */ 
 
        require("SampRcon.class.php"); 
        $query = new SampRcon("127.0.0.1", 7777, "changeme1"); 
 
        if ($query->connect()) { // If a successful connection has been made 
            $query->ban(1); // Ban player ID 1 
            $query->reloadBans(); // Reload the server's bans file 
            $query->close(); // Close the connection 
        } else { 
            echo "Server did not respond!"; 
        } 
        $query->close(); // Close the connection 
?>

Older posts «

» Newer posts