PHPUnit test error – headers already sent by phpunit.phar:2

While phpUnit-testing i got the following error:

Cannot modify header information - headers already sent by (output started at /usr/bin/phpunit.phar:2)

The solution is to redirect the phpunit output to the standard error output.

phpunit --stderr ...

Musical Note Symbol as List Bullets

How to use Unicodes for Music Note Symbols as List Bullets?

Ok, here we go. Firstly, select your desired Musical Note Symbol:

2669 = ♩
266A = ♪
266B = ♫
266C = ♬
266D = ♭
266E = ♮
266F = ♯

Secondly, add the musical note symbol as content to a li:before tag.
Instead of adding the symbol directly, you might try escaping the Unicode (“/2669″).
Thirdly, remove the default bullets by applying “list-style-type: none;” to the li tag.

Marry Netbeans and SQLite

How to add a SQLite driver as a Database Service into Netbeans for accessing SQLite database files?

  1. You will need a SQLite driver.  I suggest to use  the one from
  2. Direct Download:
  3. Start Netbeans
  4. Open the Services Window via Menu: Window -> Services (or just Ctrl+5)
  5. Expand the “Databases” node and right-click on “Drivers”.
  6. The dialog “New JDBC Driver” appears.  Click “Add…” and in the  “Select Driver” dialog, select the downloaded driver file.
  7. Click Find to scan for the proper class name.  Now  “org.sqlite.JDBC” should appear in the Driver Class text field.
  8. Give this driver a name field like “SQLite Driver”
  9. Expand the Drivers node, and you should see the SQlite entry
  10. Done!

Next question:

How do i access a SQLite database file with this thingy?

  1. Expand the Drivers node, right-click on “SQLite Driver”.
  2. Click “New Connection..”.
  3. The “New Connection Wizard” dialog appears.
  4. Specify a JDBC URL to your SQLite file, like so jdbc:sqlite://C:/folder-where-your-database-file-resides/sampledb.sqlite
  5. Done!



I’m tired of typing “help”…


HipHop VM v2.1.0-dev (rel)


hhvm [-m <mode>] [<options>] [<arg1>] [<arg2>]


–help display this message

–version display version number

–compiler-id display the git hash for the compiler id

–repo-schema display the repo schema id used by this app

-m [ --mode ] arg (=run) run | debug (d) | server (s) | daemon | replay | translate (t)

-c [ --config ] arg load specified config file

-v [ --config-value ] arg individual configuration string in a format of name=value, where name can be any valid configuration for a config file

-p [ --port ] arg (=-1) start an HTTP server at specified port

–port-fd arg (=-1) use specified fd instead of creating a socket

–ssl-port-fd arg (=-1) use specified fd for SSL instead of creating a socket

–admin-port arg (=-1) start admin listener at specified port

-h [ --debug-host ] arg connect to debugger server at specified address

–debug-port arg (=-1) connect to debugger server at specified port

–debug-extension arg PHP file that extends y command

–debug-cmd arg executes this debugger command and returns its output in stdout

–debug-sandbox arg (=default) initial sandbox to attach to when debugger is started

-u [ --user ] arg run server under this user account

-f [ --file ] arg executing specified file

-l [ --lint ] arg lint specified file

-w [ --show ] arg output specified file and do nothing else

–parse arg parse specified file and dump the AST

–temp-file file specified is temporary and removed after execution

–count arg (=1) how many times to repeat execution

–no-safe-access-check arg (=0) whether to ignore safe file access check

–arg arg arguments

–extra-header arg extra-header to add to log lines

–build-id arg unique identifier of compiled server code

–xhprof-flags arg (=0) Set XHProf flags

a conservative garbage collector for c/c++

I’m playing around with a conservative garbage collector for C/C++ written by Hans-J. Boehm, Al Demers and Mark Weiser.

The correct name is “The Boehm-Demers-Weiser Conservative Garbage Collector”.  It’s is a C malloc or C++ new replacement. It allows to allocate memory, without explicitly deallocating memory that is no longer useful. When the collector determines that the memory can no longer be otherwise accessed it is automatically recycled. It is also possible to use the collector only as a debugging tool to locate leaks and remove it completely from the end product.  This library is a sweet little gem with 20 years of creeping features, so be warned: Awesomeness ahead!!


And check out the tutorial slides (pdf):

And if you don’t like garbage collectors at all, stay away and use explicit memory management (malloc/free or new/delete).

Take care icon smile a conservative garbage collector for c/c++

Next Page →