Sonntag, 30. Mai 2010

IPC 2010 Berlin Wifi fix

1. Download:

2. Extract archive

3. open a shell and change to root (pw intellibook): $sudo su

4. $make

5. $make install

6. $modprobe r8192se_pci

7. That's it!

Samstag, 1. Mai 2010

HowTo install ZendDebugger for PHP 5.3.1 and 5.3.2 on Linux

This article is deprecated. Please refer to HowTo install ZendDebugger for PHP 5.4 or PHP 5.5 on Debian

If you try to download a current build of the ZendDebugger from you probably get the following error:
Zend Debugger requires Zend Engine API version 220060519.The Zend
Engine API version 220090626 which is installed, is newer.Contact
Zend Technologies at for a  later version of Zend Debugger.
This happens because there is no Build for PHP 5.3.2 or 5.3.1 available.
But if you take a look at the Zend Server release notes you will see, that Zend Server is shipped with PHP 5.3.2 and an enabled debugging runtime environment.

So if you use debian or ubuntu you can simply add the Zend-Server deb repository to your apt/sources.lit

  1. copy the following line into /etc/apt/sources.list
    deb server non-free
  2. update your local package list:
    $: sudo aptitude update 
  3. install the debugger
    $: sudo aptitude install php-5.3-debugger-zend-server 
  4. The ZendDebugger is now located under /usr/local/zend/lib/debugger/php-5.3.x/
  5. Now create a new ini file under /etc/php5/conf.d/ and add the following lines:
  6. call the following command in your console to see if everything works:
    $: php -i | grep "Zend Debug"
    Output: "with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies"

Donnerstag, 29. April 2010

CABasicAnimation "undeclared"

If you are new on iPhone development or XCode you probably get the following error:

error: 'CABasicAnimation' undeclared (first use in this function)

But how to fix this issue?

  • First of all you have to learn, how to add a new framework to your include path. But what framework? Let's have al look at the class documentation: Link.
    As you can see, CABasicAnimation is part of the QuartzCore framework.
  • Now let's add this framework to your project. Locate in Xcode the "Framework" folder, press the right mouse button, choose "Add" => "Existing Frameworks...".
  • Choose "Quartz.Core.framework" and then press "Add".
  • Now you can go to the .m file where you want to use the CABasicAnimation and add the following line to the existing import statements:
    #import "QuartzCore/CAAnimation.h"
  • Compile your app

Montag, 26. April 2010

HowTo upload images using drag & drop

Notice: This example will only work if you are using Firefox 3.6 or higher. Safari, Chrome, Opera or IE is currently not supported.

This example demonstrates, how to upload a image file from your local desktop to a webserver using drag & drop and Firefox's FileReader API to display a preview of the image.

This example is limited to upload only image files. If you want to upload any types of files you have to modify some lines of code to display a icon instead of the preview image.

View live demo
Download full source code

How does this work?

  1. First of all, we need a div container, which will be our drop target:

    <div style="width: 600px; min-height: 300px; background: url(background.png)" id="imageDrop"></div>

  2. This example uses Mootools as javascript framework but will also work with some changes on other javascript frameworks. You can download all needed files here. Add the following lines to your HTML Header:

    <script src="mt.js"></script>
    <script src="mt-more.js"></script>
    <script src="ImageDrop.js"></script>
  3. Next we need to say the ImageDrop.js script to make our new created div
    drag&dropable and define a target url where files should be posted.

    window.addEvent('domready', function() {
    var drop = new ImageDrop('imageDrop', 'post.php');
  4. That's it! Now drag & drop a image from your desktop to the new created div in your browser.
    You should see a preview image which can be easily removed by clicking the (x) button in the top left corner. If you click the "upload files" button the images will be posted to my server. Notice, i will never save any of your uploaded data.
  5. All the magic is done in the ImageDrop.js file. If you want to have a look behind the scenes click here. This will open the ImageDrop.js file in your browser. Have fun!