This article describes Aetolia, one of the best multiplayer text-based games on the internet. It also gives a few details about MUDs and why you should check them out.

What is a MUD?

In the gaming world, MUD stand for Multi-user dungeon and is a text-based, multiplayer game, usually with roleplaying elements. Text-based means that all game objects have a description which can be read by the player and any interactions with objects or other characters are done by typing specific commands.

The first MUDs appeared in the 1970's, in university centers, played and designed by college students. The inspiration for most of these games was the classical Dungeons & Dragons series, and even today most of the MUDs are set in a classical fantasy environment.

A particular category of MUDs is a MUSH (multi-user shared habitat), which strongly centers around roleplaying and social interaction (but mostly in-charac

A histogram is: a graphical display of tabulated frequencies. In our case, color frequencies that appear in an image. In some image manipulation software this can be named also as Levels.

Statistically speaking, each level has the meaning of probability to appear in the image is a random pixel is chosen. A more practical approach would define each level as the number of pixels of that particular value per total number of pixels contained in the image.

The algorithm to calculate the histogram for an image is pretty straight forward if you know how to extract the RGB value of each pixel, by counting the number of pixels of each value (and then divide by the total number of pixels in order to get a normalized value).

The script described next will output the histogram directly on the page, creating an HTML table which can be then viewed. Of course, this is one of the simplest solu ...

Although converting an image (usually in true color) to grayscale can sound like a simple operation if you are used to image processing software, PHP doesn't have a function for this conversion by default.

Grayscale images

A grayscale image contains only various levels of gray in the image, which can be expressed mathematically by the red, green and blue values (expressed as RGB) all equal.

Still, true color images can have any value for r, g and b, so in order to convert this to a grayscale value a transformation is needed.

RGB and HSV

HSV stands for Hue, Saturation and Value. In order to represent an image in grayscale, all we need is to use the Value, with no Hue or Saturation. There are conversion equations from one to each other, so all we need to do is use them. ...

Images, even if they are big or small are usually full of colour. However, in certain situations you may want to check if an image is indeed grayscale or not. You can do this using PHP and its image manipulation functions.

How to extract RGB values from an image using PHP

RGB stands for Red, Green, and Blue - together forming a colorimetric system (color model) frequently used. Any color image can be represented in this system - the three channels can be used to manipulate the image in various ways.

However, in PHP, user doesn't have direct access to pixel values directly from memory and, most important, doesn't have access even to each channel separately by default.

In order to extract the RGB values, first we need each pixel value - for this, you can simply use the ImageColorAt() function, function bundled into the GD library.

Of course, in order to know the position of each pixel, one important thing to know is the image width and height. Thes ...

There are several ways Iíve seen over the years of interchanging 2 variables. Iíll show you here how you can do it with bitwise operations. This method is most efficient when used in combination with assembler. In C++ it is looked at more like a curiosity than a real method by most. However if you would want to make your C++ code harder to read, then this can be helpful.

A byte of theory

Before seeing how we can interchange two variables we will have to learn the use of the XOR logical operator. It is sometimes called exclusive OR, or exclusive disjunction. It is true when one of the operands (the numbers between which we are using XOR) is true, but not both, while its close brother the OR operator is true even when both are true.

Mozilla Firefox is known for being much safer than other browsers, but sometimes you can get some strange error messages, in most cases because of incompatible extensions. Still, there is no need to despair, it is very easy to fix them.

You can get this particular error message - Error launching browser window:no XBL binding for browser - after installing an extension or after you've updated to a newer version either the program or the extension.

In my case it was an incompatibility in Google Pagerank Status, but then again, this is just an example.

How to fix it

First, you need to open Firefox in Safe mode. If you didn't delete the links in the Start Menu when you installed it, you have a direct link to the Safe mode version there. But if you did, it's very easy to do it manually.

The initial distributed file was AOL-data.tgz (439MB). Inside it contains a simple readme file and 10 .gz archives, each containing a CSV collection. With a packed size of about 45MB each, when extracted they reveal the true treasure: a nice collection of actual user searches (each file at about 200MB).

Although AOL removed the file from their website, it was spread to far too many people already and continues to distribute over the Web or through Torrent systems.

Create the MySQL database

I have only worked with the first file since it's a huge database and quite hard to extract some useful information even from a single file, but the operations are the same for each part.

Why would you want to convert it to an actual database format? Well, if you know the power of SQL this question is very much answered by itself, if not, let's just say you can search, group and order data that you are looking for faster and easier than by other means.

If you are studying engineering or science, sooner or later, you will need to learn how to use Matlab, a programming language which allows easy manipulation of numerical data and implementation of algorithms. This tutorial will help you understand the basic syntax and data types used by the language.

MATLAB stands for "matrix laboratory" and both the programming language and the environment which implements it have this name. It was written in C and it is developed by the Mathworks company.

Most of the objects used in computations are, as it's name suggests, multi-dimensional matrixes. Any scalar value used is treated as a 1x1 matrix, vectors are treated as one dimensional matrixes, etc. Since all operations are optimized for matrix usage, you should get used to this style of programming if you plan on utilising Matlab extensively.

General use

In Matlab, you can enter commands on the command line or write full programs and run them. Entering a command followed by a semicolon will only execute the command, without printing the result. If it is not followed by a semicolon, the ...

In the first part of this article I've explained the basics of sessions and how they can be used. It is now time to see how we can implement these theories and create a functional session management system using a database.

I will use PHP 4 sessions to make all functions well organized and easy to reuse and for the database system MySQL, although the database interface will be created as a separate class so it can be modified according to everyone's needs.

The SQL structure

Here is a sample SQL structure I've used for this example. The ses_id is the session id (sid) which is also the primary key for the table. I used an INT(11) for it managed manually through the script, again this is just my choice, I've explain some others in the previous part.

The start_time and last_time represent time when the session was created (time of the first page load for this user) and the time of the last page load. Both are stored using UNIX timestamps - because integer operations are generally faster and easier to use.

They are used on most websites, yet very few people know they even exist. They use various technologies like "cookies", "SQL", but not many know they can create their very own session handling systems to handle their own need. I will try to explain the technology behind the sessions and very much how to get your own sessions up and running.

What are sessions?

Basically sessions are containers which hold information on the server, each visitor being associated a unique session identified by a session id.

A session has to respect some rules:

- Encapsulation: a session must be able to support a fixed or variable number of variables which can be set or modified.

- Persistence: session data must be available for access after browser reload (or several page reloads).

- Security: data encapsulated within a session must NOT be able for access by unauthorized users, be it remote, local users or even a user with another session. Also, sessions should be removed when a visitor leaves the website. Still, this is not exactly possible to detec ...