Technology Category

Jun 07, 2009 PHP5 GD Error: libt1.so.5: cannot open shared object file

Do you have GD and the PHP GD extension installed and yet it's not getting loaded into your PHP? If you getting the following error logged to your php error log, then the source of the problem is simple.

Jun 07, 2009 Are you getting weird behavior or odd errors while developing with Google Gears?

Are you getting weird behavior or odd errors while developing with Google Gears? I spent at least four hours trying to debug a strange and passive bug in a Google Gears app I am working on. After picking apart a couple hundred lines of code and reducing the script to the absolute basic functionality of just a few lines, I was completely stupefied that I still had not found the source of the problem.

May 29, 2009 Javascript: passing object self reference to anonymous functions nested within multiple objects

I know the title of this post is a little complicated but I feel it best describes the problem at hand. In Javascript, objects, arrays and variables are all technically the same thing which allows you to do some interesting stuff - such as nesting functions inside arrays inside variables inside objects inside variables. There are of course issues of scope when doing this sort of thing, though. One problem I recently came across was that I needed to reference the parent object's self from within an anonymous function that is nested within an array.

Dec 04, 2008 How to style HR elements with decorative horizontal rules

There are many ways to make your online writings accessible and more pleasant to read: multi-tier headings, short paragraphs, justified text alignment, spacious line-height and clean gutter spacing. There is, however, one additional element that always seems to be forgotten when it comes to online publishing: The horizontal rule.

Oct 21, 2008 Shorthand PHP IF statement without the else notation

Shorthand PHP IF statement without the else notation In an earlier post I explained how to do Ternary shorthand if/else statements in PHP. One of the major benefits of using a shorthand if/else statement is that you can use it inline with a string. But what if you only need to do in inline if statement, without the else?

Oct 19, 2008 How to fix var-use-before-def-global PHP5 error within included files

How to fix var-use-before-def-global PHP5 error within included files If you make use of the code analyzer available in many modern IDE environments when coding strictly to PHP5 standards, you may have noticed that you will get errors thrown at you for using variables before they are declared in included files. For example, lets say you have two files, header.php and index.php.

Oct 11, 2008 How to insert text into a textarea where the cursor is

How to insert text into a textarea where the cursor is This javascript function will allow you to easily inject text into a textarea wherever the caret/cursor is currently at. In addition, it also makes sure that the cursor and textarea scroll amount are in the correct place after the insertion. I have tested and verified this works in Firefox, IE7, Opera, Flock, Safari, and Maxthon.

Oct 06, 2008 How to grab thumbnails for youtube and google video

How to grab thumbnails for youtube and google video Today I modified my blog topic listing layout from just a simple link list to a more traditional blog style with a summary for each topic. It was a major improvement but I felt that it was a little too bland and decided that thumbnails of the videos and images contained within each topic would make it more appealing.

Aug 25, 2008 Solution for when buttons randomly stop working in linux

If some of your keys intermittently stop working, you can resolve the issue much easier than rebooting. This problem seems to be a common ailment in linux environments using VMware. I'm not sure exactly for what reason it happens, but there is a simple command you can run that will fix it.

Apr 10, 2008 Linux: Failed to load the NVIDIA kernel module

After upgrading to the 64 bit version of Mandriva Linux, my ATI video card ran even worse than before. This was the last straw and so I finally came into possession of a new Nvidia based video card. While slapping it in my computer, In the back of my mind i had a pretty good feeling that it wasn't going to be as smooth as one would hope. I was right.