dracoblue.net

DModule development started

Today I started to develop on DModule. Concepts and architecture was already ready but today started the implementation.

Check out the dmodule official wiki page at dev.dracoblue.net

In dmodule, open source, pawn by DracoBlue @ 30 Nov 2007 | 28 Words

DCallbacks 1.1 released

Today I have a little update for the DCallbacks library. Its been about one year since it was updated last time, so 0.2 of samp is released and the user [em]NeedAName[/em] found an issue, while using the library.

So I took some minutes, fixed that issue, and released DCallbacks 1.1.

In dcallbacks, open source, pawn by DracoBlue @ 25 Nov 2007 | 51 Words

Fast in_array or in_list implemented Lua?

On lua mailing list somebody asked if there is any way to check very short if an element is in a specific list of elements.

In php you would do for example

if (in_array("A",array("A","B","C")) ) { echo "hello"; }

Of course, everyone can write a short in_table function in lua:

Continue reading ...

In lua, open source by DracoBlue @ 11 Nov 2007 | 260 Words

Hellgate:London Server Status for your Guildpage/FanSite

How to add the Hellgate:London-Server Status to your Website? Thats quite easy!

Default icons: The image: results in:

Custom icons: Add that little html+javascript code to your website and it will load the on.png or off.png in your webfolder! Of course you can change this source snippet so it fits your needs!


All you need to use is the correct Server-ID:

[ol]
  • Shulgoth US
  • Sydonai EU
  • Alliance
  • Command
  • Korea
  • Test Center
  • [/ol]

    XML for the geeks: I have also finished an xml-feed at [em]http://hglondon.net/server/list.xml[/em] so if you are expirienced in xml-encoding you can write a interpreter for it in any language you want!

    In hglondon.net, project by DracoBlue @ 09 Nov 2007 | 134 Words

    PHP script to order builds, release numbers and versions

    I had the problem, that I wanted to sort an array of builds by name, but names could be 1.1 or, 2.10.0.1 or even 2.0.9.

    Thatswhy I made the following sort alogrithm in PHP by using usort and an own compare function.

    function builds_sort($a, $b) {
        if ($a['name']==$b['name']) {
            return 0;
        }
        $ap=explode('.',$a['name']);
        $bp=explode('.',$b['name']);
        foreach ($ap as $pos => $number) {
            if (!isset($bp[$pos])) {
              return 1;
            } elseif ($number > $bp[$pos]) {
              return 1;
            } elseif ($number < $bp[$pos]) {
              return -1;
            }
        }
        return -1;
    }
    
    // Testarray
    $builds=array(
        array("name"=>"2.1.0","id"=>"210","suite_id"=>1),
        array("name"=>"2.1.1","id"=>"211","suite_id"=>1),
        array("name"=>"3.0.0","id"=>"3","suite_id"=>1),
        array("name"=>"10","id"=>"3","suite_id"=>1),
        array("name"=>"2.1.10","id"=>"2110","suite_id"=>1),
        array("name"=>"2.1.2","id"=>"212","suite_id"=>1)
    );
    
    usort ($builds,"builds_sort");
    

    This function sorts each element by "name" with DESC.

    In open source, php by DracoBlue @ 06 Nov 2007 | 113 Words

    Page 36 - Page 37 - Page 38

    Give something back

    Were my blog posts useful to you? If you want to give back, support one of these charities, too!

    Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

    Recent Dev-Articles

    Read recently

    Recent Files

    About