Bubble.ro - because there is always something new to learn about

Aetolia - The Midnight Age

 

Category: Online Games

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

...
Posted by: Quarc on February 6, 2012 at 13:27. (9 comments)
 

How to create the histogram of an image using PHP

 

Category: Programming/PHP

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.

Overlay histogram

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 ...
Posted by: Indy on October 30, 2006 at 14:37. (26 comments)
 

How to convert an image to grayscale using PHP

 

Category: Programming/PHP

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.

Convert an image to grayscale

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.
                ...
Posted by: Indy on October 30, 2006 at 07:51. (14 comments)
 

How to check if an image is grayscale in PHP

 

Category: Programming/PHP

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 ...
Posted by: Indy on October 28, 2006 at 12:15. (6 comments)
 

Interchanging 2 variables without the use of a third

 

Category: Programming/PHP

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.

a b a XOR b 0 ...
Posted by: Nitro on September 16, 2006 at 09:30. (7 comments)
 

Error launching browser window:no XBL binding for browser

 

Category: Web Surfing

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.

Error launching browser window:no XBL binding for browser

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.

Just go to Start -> Run and in there type "

...
Posted by: Indy on September 16, 2006 at 07:07. (12 comments)
 

Convert the AOL user session collection to a MySQL database

 

Category: Programming/PHP

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.

The first step would be to create the database structure:

...
Posted by: Indy on August 10, 2006 at 20:53. (5 comments)
 

Introduction to Matlab

 

Category: Math software

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 ...
Posted by: Quarc on August 10, 2006 at 12:14. (1 comment)
 

Creating a customized session handling system in PHP (part II)

 

Category: Programming/PHP

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.

I've decided to identify an unique session by ...
Posted by: Indy on August 4, 2006 at 11:54. (5 comments)
 

Creating a customized session handling system in PHP (part I)

 

Category: Programming/PHP

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 ...
Posted by: Indy on July 29, 2006 at 12:57. (3 comments)
 

Random Article


Search


Feeds


Bubble.ro RSS Feed

All Categories


Articles


Aetolia - The Midnight Age
How to create the histogram of an image using PHP
How to convert an image to grayscale using PHP
How to check if an image is grayscale in PHP
Interchanging 2 variables without the use of a third
Error launching browser window:no XBL binding for browser
Convert the AOL user session collection to a MySQL database
Introduction to Matlab
Creating a customized session handling system in PHP (part II)
Creating a customized session handling system in PHP (part I)
Firefox crashing with Yahoo! Messenger
ADL Search for oDC
Video codecs explained
Browsershots
How to use Auto-Away Message with oDC
Create complete Windows XP disk with SP2 and all updates
Data Execution Prevention error message in Windows XP
Google Mars
Logarithmic scale graphs in Excel
Urban Dictionary (or wtf does l33t mean?)
Learn more about BIOS
Backup your Firefox and Thunderbird settings
Syndicate your Yahoo 360 profile
What is Google PageRank?
'Cannot Open the File: Mk:@MSITStore' Error Message
Get your Gmail with Mozilla Thunderbird
E-Books links
Change the size of your Explorer thumbnails
Remove previews from Windows Explorer
How can I turn off system beeps?
How do I disable Internet Explorer?
What are proxies or how do I protect my anonymity?
How to set aliases triggers or macros in MushClient
What is RSS?
Palm Zire 31 fast review
oDC Installation and Basic Configuration
How I built a 2x80W amplifier (using power modules)
Leech/HotLink Protection
How to block referrer detection?
How to find out your IP address
Getting started with Mushclient
What is spyware and how do I protect my PC from it?
Stumble Upon - random surfing around the web
Automatic file backup for Windows users
How can I read foreign language sites?
Protect your web surfing privacy!
What is BitTorrent?
No more ads! Adblock for Firefox
Why use Firefox instead of Internet Explorer?
How do I create my own Yahoo ID?
© Copyright 2006-2020 Bubble. All rights reserved. Sitemap - Contact