More new hardware

This time, I’m forced to replace my old and trusty Ricoh DVD-burner.
You never even knew they made DVD-writers? Neither did I, until I saw mine. ;)

Going for the cheapest writer out there, I found myself in the position to buy a Nec drive, for no more than 20 euros.
It is made by Sony and NEC in their venture OptiArc, and I’ve purchased the AD-7170A.

All you ever want for your dvd-burning needs, DVD+, DVD-. R or RW. It eats’m all.

img_1452.JPGimg_1456.JPGimg_1457.JPGimg_1458.JPG

After a quick fit, it is purring weel and did it’s very first few DVD’s. No more waiting for about 20 minutes to complete a DVD, in less than 7 it’s done ;)

Backpost of pics

I’ve been browsing my pictures lately, and found 3 in the same series as one of my headers.
You’ll quickly figure out which one ;)

These photo’s were taken on the 17th of June 2007, on a beach near the Maasvlakte.

dsc_0283.JPGdsc_0284.JPGdsc_0285.JPG

Lourien going abroad

Temporary migration seems to be hot nowadays!

After Guy leaving for China for 6 months, another friend of mine is going abroad: Lourien is about to embarque on a journey to and in Australia.
She’s going backpacking for 6 months with her best friend and neighbor Saskia. They’ll be touring the country visiting all big cities and generally doing what young folks do when backpacking. Having lots of beers fun and enjoying the freedom that is the ability to do whatever you want, whenever you want to.

Lourien & Saskia: I’d like to wish you a very happy journey through the southern, eastern, western and northern parts down under.
I’ll be reading your blog to see what you’ve been up to ;)

Have a safe flight Thursday, and give my regards to Skippy while you’re at it :P

Simple text search in PHP

To search my music-collection via my browser, I’m currently browsing and searching my webbased interface with the browser itself.
I head my Firefox to http://fileserver/music/, and I get the FancyIndexed list of music on the M-partition. As this list is growing to be quite large nowadays, I can still search for albums by ctrl-f’ing to my desired destination; yet this doesn’t work for individual tracks.

I’ve been building a text-based index of all tracks and albums on the disk, via a daily scheduled bat-file which exports its result to a plain text file.
To search this text file, I’ve created a small search-script in PHP, which can search all entries for a certain string. All is well up until this point.

Now here’s the catch: I want to implement a boolean search with the basic operands such as AND, OR and NOT available to be used in the search-query.
This would be my ideal form of searching with multiple arguments. I’ve got this implemented at this moment, it however searches for the concatenation of the entire string, instead of the existence of all or at least one of the substrings in an entry.

For instance: I want my algorithm to find “(09) – Technohead – I Wanna Be A Hippy.mp3″ when I search for “technohead hippy”. The algorithm should match both “technohead” and “hippy”, regardless of their location in the string. At this moment, the search for the same arguments wouldn’t yield this track as a result as the exact string “technohead hippy” does not occur in the entry. Searching on “technohead” or “hippy” would point to this track, however it is not ideal as many other tracks will also match the widened search.

Now going back to why I’m posting this: Is there anyone who can point me to a proper, text based, solution?
I know it can quite easily be solved with a fulltext search in a database, but I would like to stay away from the DB as long as possible.
Also, re-searching all hits on the first argument (when AND is given in the search) with all other arguments is a possibility. The issue is that the other operands like OR and NOT are a little harder to implement.
I feel a nudge in the right direction would help me a lot, so I’m appealing to the better nature of all readers here. ;)

EDIT:
I started implementing an auto-AND functionailty; while still working from my plain-text file.
I created the following code.

[source=php]// insert some form-stuff

$haystack = file(”filelist.txt”);
$needles = array_reverse(explode(” “, chop($formData['needle'])));
$i = sizeof($haystack);
foreach($needles as $needle) {
$haystack = searchStack($needle, $haystack);
}
$j = sizeof($haystack);
if($j == 0) {
$sOut .= “Helaas is er niets gevonden.

“;
} else {
$sOut .= formatFound($haystack);
}
$sOut .= ‘
Found: ‘.$j.’ items.
Searched ‘.$i.’ files and folders.’;

function searchStack($needle, $haystack) {
$tempstack = array();
foreach($haystack as $straw) {
if(stristr($straw, $needle) !== false) {
array_push($tempstack, $straw);
}
}
return $tempstack;
}

function formatFound($haystack) {
$sOut = “”;
foreach($haystack as $straw) {
// do some magical tricks in modifying the filename & location to a URL
}
return $sOut;
}[/source]

Any comments are always welcome.

Only 2 months to go

The first of November is a milestone date for me.
It’s only 2 short months away from the deadline for my master thesis, and I’m kind of shaky acknowledging this.

So far, I’m still going as planned, with my thesis progressing as scheduled.

My portal quality framework is taking shape real quick and the validation stage is near. I’ll be keeping you posted when need be!