Archive for 'Technology'


PHP: Check For An Empty Value In An Array

Recently, I need to check for an empty value in an array. While empty() is good for checking a specific value it does not allow the checking of a whole array. I didn’t want to do multiple if statements/empty checks and also empty was not always accurate, i.e. if a variable has a value of 0 (zero) then empty considers it empty - but for my purposes this was not empty. How to solve this problem?

Well, I decide to create my own function. It’s a fairly simple one - returns FALSE if no empty array item is detected, otherwise TRUE if one is. For my purposes, I did not need to know in the check which one specifically is empty as the error message for individual items would always be reported by another function (it was for a HTML form, so the error is displayed next to each field based upon a conditional check for that specific field).

Read more…

Share and Enjoy:
  • Digg
  • del.icio.us
  • BlinkList
  • Furl
  • Netscape
  • Reddit
  • StumbleUpon
  • YahooMyWeb


The Bidvertiser Experiment

After spending a lot of time reading mixed reviews, I have finally decided to test out Bidvertiser and see how it compares first-hand to other services I have used. Overall, Bidvertiser perhaps had as many reviews for as it has against. I am first going to test it out on my blog and only on the post page for the first few days (I will later add it everywhere on my blog).

What I did notice at first is some problems with how the ads are displayed, although this seemed to go away after a few page refreshes (and it was not caching issues as I cleared my cache a few times). Aside from this small niggle, the control panel is easy enough to use and Bidvertiser allows for a greater control over advertisement sizes (a custom size can be specified) than many other services.

Bidvertiser allows better filtering of unwanted adverts. I have not tested it yet, but you can select for pre-approval of an advert before it will be featured on your site. They also display if the ad is geo-targeted and to which country (or countries).

I’ll report back on the progress (if any) within 7 days of The Bidvertiser Experiment.

Perhaps you too can Make money from your Website or Blog with BidVertiser?

Share and Enjoy:
  • Digg
  • del.icio.us
  • BlinkList
  • Furl
  • Netscape
  • Reddit
  • StumbleUpon
  • YahooMyWeb


Pidgin Plugin For Amarok

I was recently looking for a plugin for Amarok (it seems to be the best mp3 player provided with openSUSE 10.2) which will display the song title and artist of the music track I’m currently listening to in Pidgin’s status. After spending some time researching available plugins and reading user comments I found AmarokPidgin at KDE-Apps.org which does what I want and appeared to have straight-forward installation.

So, I installed the plugin and once up-and-running it worked like a charm. However, the plugin was unable to generate the default configuration so I had to do this manually. Just copy the config file below in to a text editor and save it to ~/.kde/share/apps/amarok/scripts-data/ as AmarokPidgin.ini.

Read more…

Share and Enjoy:
  • Digg
  • del.icio.us
  • BlinkList
  • Furl
  • Netscape
  • Reddit
  • StumbleUpon
  • YahooMyWeb


A List Of Google’s Official Blogs

Google has quite a few blogs, almost 40 of them in fact (possibly more as I can’t guarantee this list is comprehensive), but there was not one central (and official) list that I could find (perhaps I need to look harder?) nonetheless I did usefully find a feed of all the blogs and also an OPML file containing all the blogs (this can be imported in to your favourite feed-reader). However, while this is useful many readers won’t be interested in every blog so below I have included below a list links for official feeds in order to make it easier for you to choose which ones you’re interested in and subscribe.

Read more…

Share and Enjoy:
  • Digg
  • del.icio.us
  • BlinkList
  • Furl
  • Netscape
  • Reddit
  • StumbleUpon
  • YahooMyWeb


Changing The Default Editor In Linux

I recently needed to set up some cron jobs for new scripts I had been developing and found an ugly blue screen when editing the cron file with crontab -e (which opens the current user’s cron file in the default editor). I had been expecting vim (Vi Improved) but instead I was faced with "joe", which is not my editor of choice.

Fortunately, though, it is a simple enough task to change which editor is used when editing cron jobs. For anyone else in the same situation as myself, instructions are provided below on how to change the default editor. Note: This changes the editor used by all software which respects the EDITOR variable.

Read more…

Share and Enjoy:
  • Digg
  • del.icio.us
  • BlinkList
  • Furl
  • Netscape
  • Reddit
  • StumbleUpon
  • YahooMyWeb