Categoriearchief: Geen categorie

PHP SPL data structure: SplFixedArray

PHP 5.3 introduced some new data structures. The talk of Jurriën Stutterheim on PFCongres 2011 on SPL structures and their performance triggered me to have a closer look at the performance of these structures. I was kind of fooled by two comments on the PHP.net page, so it was time to find out myself.

Verder lezen

Getagged , , , ,

Using SimpleAdapter for populating simple_list_item_2 with Strings

I don’t know it it’s my searching skills which are fading or the lack of examples, but I wasn’t able to find a simple example on how to use the simple_list_item_2 which is built into Android. I’ve used some custom layouts to establish the same result, and sometimes some extras (display an icon on the right for example). However, now I wanted to use the built-in feature, but had to search quite some time. If you experience the same, hopefully this post will save you time.

Verder lezen

Getagged , ,

Custom checkboxes for CheckBoxPreferences on Android

For an App I’m writing I need to use custom checkboxes in a PreferenceScreen. I want to use the CheckboxPreferences as it’s designed for that. Many searches lead to StackOverflow, but caused me a stack overflow as well as they didn’t work. In this (short) post I outline my findings and provide a working solution step by step. Verder lezen

Propel and the zero date issue

Today I was unpleasantly surprised by a change in behavior when upgrading Propel from version 1.5.4 to 1.6. I frequently use zero dates in MySQL (‘0000-00-00’) and these dates are affected by the upgrade. As it was deployment time I had to find a solution quickly. This post outlines what the problem is and what I did to solve it. Verder lezen

Getagged , ,

Your Plesk Watchdog in 2011

Plesk users (version 8.x up to 10.x as far as I’ve heared) are getting errors from the Watchdog module. Parallels is coming out with an update for this error in the future, but they can’t tell when (yet). These errors occur on daily basis and are actually pretty easy to fix. You might have two errors (after each other), but this fix will solve them both.

Verder lezen

Getagged , ,

Installing packages on Synology NAS through ipkg

Recently I bought a Synology DS210j NAS. This is a linux-based NAS with an ARM processor. As this basically is a full linux server, there are some interesting options for geeks familiar with the command-line. Verder lezen

Getagged , , , ,

Starting a CLI script from PHP

For quite some time I’ve searched for a way to start a command line script from within a page in PHP without using the crontab. Basically I just wanted to start a script which does some processing in the background. The solution is pretty simple, but it took me some time to find it. Verder lezen

Getagged , , , , , , ,

PHP multidimensional array to plain text tree structure

Not for the first time I’ve searched for a way to visualize a multidimensional array in a tree view in my web browser without directly using echo or print. I wasn’t able to find a concrete solution for this previously. However, this time I was put on the right track by a post of Kevin van Zonneveld. Verder lezen

Getagged ,

K Means clustering and Histogram equalization source code

As there was some interest in source code in two earlier posts (post 1, post 2) I’ve posted the source code here.

It’s also available through the download page.

Please note that the code itself is at least 4 years old and there are far better ways to solve some things. I therefore suggest that it is used for studying purposes only. Comments and improvments are very much appreciated.

Getagged , , , ,

Getting YUM to work on CentOS

One of my servers is running CentOS. As I wanted to upgrade PHP, I was looking how to do that. I’ve found the YUM command to be useful (yum upgrade php). However, for being able to upgrade this way, one needs yum to be installed.

I was ‘fortunate’ it wasn’t so another task was born: installing YUM on CentOS. Verder lezen

Getagged , , ,