Blog by Andreas Glaser

Development

Portfolio - Ajax/PHP Navigation Guide for renowned Clinic

by Andreas Glaser on Nov.04, 2008, under Development, JavaScript, Joomla 1.x, My Portfolio, PHP, Various

Navigation Guide written in JavaScript/Ajax/PHP

My order was to develop a navigation guide which should help the visitors to discover the most important content of a website. This “NaviGuide” had to be realized as JavaScript/Ajax/CSS pop up on the fact that much users are using pop up blocker.

This NaviGuide runs since 24.July 2008 at www.stz-baden-baden.de implemented in the well known Content Managment System “Joomla”.

Leave a Comment :, , , , more...

.htaccess - How to restrict browsing through directories

by Andreas Glaser on Oct.28, 2008, under Computer, Development

If you want to prevent users from browsing certain directories on your website you can use the powerful .htaccess  file (Apache only). With the .htaccess file you are able to override some default settings like allowing / denying users to browse through directories. This is very useful when you use a certain directory to save for instance: templates, pictures, files or similar things (e.g. http://www.yourdomain.com/files).

How to prevent users from browsing through directories…

  1. Create a new file (txt) and rename it to .htaccess
  2. Insert the following string into your new .htaccess file:
    1
    2
    3
    
    # DENY CLIENTS TO BROWSE THE CURRENT AND ALL SUB DIRECTORIES
     
    Options All -Indexes
  3. Upload this file into the directory which shall be not allowed to browse.

Thats it!

So long,
Andreas Glaser (aka JaZz)

1 Comment :, , , more...

SQL / Mysql - How to find and count duplicates

by Andreas Glaser on Oct.22, 2008, under Computer, Development, SQL

Some developers facing the problem of duplicates in sql/mysql tables. To find and count them use the following statement.

1
2
3
4
SELECT ID, count(*) as Amount
FROM name_of_the_table
GROUP BY ID
HAVING  Amount > 1

Just replace the used table “name_of_the_table” and the column “ID” which is inspected for duplicates. The output shows you the record which is multiple times in the table and the amount of it.

So long,
Andreas Glaser (aka JaZz)

Leave a Comment :, , more...

Release - Imageloader

by Andreas Glaser on Oct.14, 2008, under Computer, Development, Imageloader, PHP, Projects

A couple of weeks ago I developed a little “Online Image Uploader” based on my private “JaZzPHP Framework”. The website just consists of a simple upload form as well as rudimentary archive page.

Screenshot

The purpose is to simplify sharing screen shots, images etc..

This is basically a private tool, but if someone needs such a function - fell free to use it.

Have fun with it!

Andreas Glaser (aka JaZz)

Leave a Comment :, , , more...

Starship - Update - 1.3

by Andreas Glaser on Sep.28, 2008, under Computer, Development, Gaming

I just finished a new version of my new 80s arcade game “Starship”.
For more information read on…

Changelog

  • Added new Weapon levels
  • Added dynamic enemy strength
  • Added new player model
  • Added new features

It is possible from now on to upgrade your weapons to level nine. Every new level increases the damage of the bullets as well as the speed.

The enemies getting now stronger with every kill.

Download

  Starship 1.3 (2 MiB, 80 hits)

Have fun!

So long,
Andreas Glaser (aka JaZz)

Leave a Comment :, , , , , , more...

Starship - Release

by Andreas Glaser on Sep.25, 2008, under Announcement, Computer, Development, Gaming, Linux, PHP, Reports, Software, Various

Hello everybody,

I would like to present you my first little game - called “Starship”.
It is basically a 2D space shooter in a great 80’s look with some funny features.

Screenshots

Controls

  • S - Start game
  • Arrow keys - Steering
  • Space - Fire
  • ESC - Quit


Please post me some comments and your improvement suggestions!
Have fun with this little pastime game!

Download

  Starship 1.2 (2 MiB, 38 hits)


So long,
Andreas Glaser (aka JaZz)

Leave a Comment :, , , , , more...

Warcraft 3 - Footmen Frenzy 5.4b Pro

by Andreas Glaser on Sep.09, 2008, under Computer, Development, Gaming

Hey everyone,

almost a year ago I modified one of the most popular Warcraft 3 - The Frozen Throne maps all time.I altered this map because one day there were cheats found in it… which causes that the map was nearly immediately unplayable.

On the fact that this was my absolute favorite map I started my investigation, how to change a encrypted wc3 map. The afford was fruit full and so I changed the maps which now is called “Pro” under my gaming name “ZORROX”.

The map is gaining in popularity since its initial release. There are currently more than 15000 downloads counted.

Footmen Frenzy 5.4b Pro

Footmen Frenzy 5.4b Pro

Download

  1. http://epicwar.com/maps/rate/29165/5/
  2.   Footmen Frenzy 5.4b Pro (177.8 KiB, 136 hits)

I really hope you enjoy Footmen Frenzy as much as i do.

So long,
Andreas Glaser (JaZz)

Leave a Comment :, , , , , , more...

CounterStrike Source Linux Server Startscript

by Andreas Glaser on Sep.05, 2008, under Computer, Development, Gaming, Linux, Linux Shell Script, Operating system

Here it is… a well commented and easy for rookies to understand CounterStrike Source Linux Server Startscript. It includes all basic start parameter as well as a good error display system.

How to use:

After you successfully installed a Counterstrike Source Server under Linux with the SRCDS tool you just have to download the startscript at the bottom of this post.
Save the “startscript” into the root directory of your CSS server and change the permission to “u + x” (chmod u+x startscript).

Now open the start script with your preferred editor (vim, joe, mono etc.) and customize the configuration variables to your system.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
############################*
# Configuration (Required):
#
 
# |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
# |~~ 1. SYSTEM PARAMETERS ~~~~~~~~~~|
# |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
 
# ~~ Description: Set the user who owns the CounterStrike Server (root is not recommended)
# ~~ Params: Existing user on your system
SYS_USER="root";
 
# ~~ Description: Path to the root directory of the server
# ~~ Params: System path
SYS_DIR="/path/to/your/server/";
 
# ~~ Description: Server daemon
# ~~ Default Value: srcds_run
SYS_DAEMON="srcds_run";
 
# ~~ Description: Name of the server on your system
SYS_NAME="CSS001";
 
# ~~ Description: Description of the server
SYS_DESC="My first CSS Server";
 
# |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
# |~~ 2. SERVER START PARAMETER ~~~~~|
# |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
 
# ~~ Description: IPv4 Address of your server
# ~~ Params: XXX.XXX.XXX.XXX
START_PARAMS_IP="127.0.0.1";
 
# ~~ Description: Port of your server
# ~~ Params: Between 0 and 65535
# ~~ Default Value: 27015
START_PARAMS_PORT="27016";
 
# ~~ Description: Defines the default maps
# ~~ Params: Every on the server installed map is possible
START_PARAMS_MAP="de_dust2";
 
# ~~ Description: Defines the amount of player slots
# ~~ Params: Between 1 and 32
START_PARAMS_MAXPLAYERS="24";
 
# ~~ Description: Defines wether VAC (Valve Anti Cheat) is activated
# ~~ Params: secure / insecure
# ~~ Default Value: secure
START_PARAMS_SECURE="secure";
 
# ~~ Description: Pingboost
# ~~ Params: 0 / 1 / 2 / 3
# ~~ Default Value: 0
START_PARAMS_PINGBOOST="0";
 
# ~~ Description: Defines the tickrate
# ~~ Params: 33 / 66 / 100
# ~~ Default Value: 33
START_PARAMS_TICKRATE="100";
 
#
# CONFIGURATION END
############################*

After this step just execute the start script (./startscript start).

Thats it!

Required Linux packages

Download

  CounterStrike Source Linux Server Startscript v1.0 (6.8 KiB, 169 hits)

So long,
Andreas Glaser (aka JaZz)

Leave a Comment :, , , , , , , , more...

Online MD5 Hash Generator

by Andreas Glaser on Sep.04, 2008, under Computer, Development, PHP

Hi guys,

since I’m so often converting strings into MD5 hashs I thought I could quickly set up a little page for doing that. So if you need such a function as well… have a look at the following web address.

http://www.md5.andreas-glaser.com/

Screenshot

online_md5_hash_generator

Have fun with this little tool.

So long,
Andreas Glaser (aka JaZz)

Leave a Comment :, , , , , more...

PHP - count() vs. sizeOf()

by Andreas Glaser on Aug.19, 2008, under Computer, Development, PHP

I was wondering whether there is a performance difference between count() and sizeof().

Test code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?PHP
 
  // CREATE TEST ARRAY
  $a = array('a','b','c','d','e','f','g','h','i','j');
 
  // START TIMER ONE
  $TimerOne = benchmarkTimerStart();
 
  // CALL COUNT FUNCTION 1000000 TIMES
  for($i=0;$i<1000000;$i++)
  {
    count($a);
  }
 
  // STOP TIMER ONE
  $ResultOne = benchmarkTimerStop($TimerOne);
 
  // START TIMER TWO
  $TimerTwo = benchmarkTimerStart();
 
  // CALL SIZEOF FUNCTION 1000000 TIMES
  for($i=0;$i<1000000;$i++)
  {
    sizeOf($a);
  }
 
  // STOP TIMER TWO
  $ResultTwo = benchmarkTimerStop($TimerTwo);
 
  // PRINT RESULTS
  echo 'Count: '.$ResultOne.' Seconds<br />';
  echo 'SizeOf: '.$ResultTwo.' Seconds';
 
  // TIMER FUNCTIONS
  function benchmarkTimerStart()
  {
    $timeExplode = explode(" ", microtime());
    $time = $timeExplode[1] + $timeExplode[0];
    return $time;
  }
 
  function benchmarkTimerStop($timer=0)
  {
    $timeExplode = explode(" ", microtime());
    $time = $timeExplode[1] + $timeExplode[0];
    $finish = $time - $timer;
    $endTime = sprintf("%4.3f", $finish);
    return $endTime;
  }
?>

My test proved that there is no difference at all! sizeof() is just an alias for count().
So I suggest you to use count() - its the original name of this function.

So long,
Andreas Glaser (aka JaZz)

Leave a Comment :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...