Posted by Emanuele Feronato on 06/1/08 in Actionscript 2, Flash, Php, Tutorials
This is a very importat thing to know when you are about to design Flash forms, or any application that needs to manage data such as an highscore table.
This is a standalone tutorial, but the basics explained will be useful in the Creation of a Flash highscores API course.
The only method we need to know [...]
tag this | permalink | trackback url | comments(19)
Posted by Emanuele Feronato on 05/30/08 in Flash, Php, Tutorials
You all should know Facebook. I think it would be interesting to integrate your Flash game into a Facebook application.
There are more options than you can imagine, but at the moment I'll just embed a game, nothing more. Just remember there will be a lot more.
Obviously, first you have to have a Facebook account and [...]
tag this | permalink | trackback url | comments(11)
Posted by Emanuele Feronato on 04/21/08 in Ajax, Php, Tutorials
One interesting Web 2.0 effect is the sortable list, and we are going to make one in less than five minutes thanks to Prototype and script.aculo.us libraries.
Prototype is a JavaScript Framework that aims to ease development of dynamic web applications and can be downloaded here, while script.aculo.us (scriptaculous from now on) provides you with easy-to-use, [...]
tag this | permalink | trackback url | comments(15)
Posted by Emanuele Feronato on 02/15/08 in Php, Tutorials, WordPress
I think it's time to learn how to create a WordPress Widget. WordPress (WP from now on) is the most used blogging platform, and I want to help everybody to code their favorite widgets.
From the official site (where you can find a lot of widgets): WordPress Widgets (WPW) is like a plugin, but designed to [...]
tag this | permalink | trackback url | comments(10)
Posted by Emanuele Feronato on 02/8/08 in Php, Tutorials, WordPress
As you may notice, at the top of the rightmost column of this blog I am showing the latest posts of the forum.
I did not find any widget fitting my needs so I had to solve the problem by myself. And I am going to tell you how.
At the moment it's not a widget, just [...]
tag this | permalink | trackback url | comments(22)
Posted by Emanuele Feronato on 01/12/07 in Php
Maybe today I found a php bug... try to run this script on your server...
PLAIN TEXT
PHP:
<?php
$a=100.9;
$b = 100;
$c = $a-$b;
echo $c;
?>
What do you get?
I get a 0.90000000000001 on different servers with different php installations
Am I the only one?
If you liked this post buy me a beer (or two)
tag this | permalink | trackback url | comments(10)
Posted by Emanuele Feronato on 09/24/06 in Flash, Php, Tutorials
I want you all to play 100 ROUNDS, a game created for didactic pourpose.
The game is simple: just enter your name, press "Play" and start moving your mouse clockwise trying to make 100 rounds as fast as you can to enter the highscore table.
I took some ideas from a script found on actionscript.org... but I [...]
tag this | permalink | trackback url | comments(41)
Posted by Emanuele Feronato on 08/20/06 in Php, Tutorials
This is a project I made for teaching purpose.
First of all, let's see what is a perfect maze.
From Maze Works: A perfect maze is defined as a maze which has one and only one path from any point in the maze to any other point. This means that the maze has no inaccessible sections, no [...]
tag this | permalink | trackback url | comments(3)
Posted by Emanuele Feronato on 08/2/06 in Php
Today I had to generate some passwords, and I am not so creative in doing this.
So I coded a function I want to share with you.
PLAIN TEXT
PHP:
<?php
function create_password($length=8,$use_upper=1,$use_lower=1,$use_number=1,$use_custom=""){
$upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$lower = "abcdefghijklmnopqrstuvwxyz";
$number = "0123456789";
if($use_upper){
$seed_length += 26;
$seed .= $upper;
[...]
tag this | permalink | trackback url | comments(10)
Posted by Emanuele Feronato on 07/27/06 in Php
Very simple and useful code, but hard to find in the internet.
You may need it when you code an user authentication script and want to prevent the user to hack it with ascii injection.
I will use regular expressions because it is the quickest way, and we want to be quick (almost) everytime...
PLAIN TEXT
PHP:
<?php
$string_to_be_stripped = "Hi, [...]
tag this | permalink | trackback url | comments(15)