I decided to make my own php photo gallery that dynamically renders thumbnails and such, but also uses Slimbox 2 to display the full image.

Download

Installation is easy, just copy and paste the files into your image directory and it will go on it’s own. You can edit the index.php file to change some settings which mainly is just for controlling the images themselves. You can also edit the template.html file in the ‘data’ folder to change the overall look of the page.

I don’t have a demo yet, but I’m working on uploading some pictures now which I’ll use as a demo.

Previous ArticleNext Article
T.

Toshiba M200 and Dual Displays

Like me, most of you who have the infamous Toshiba M200 tablet have probably upgraded that outdated XP installation to either Windows Vista or Windows 7. And you probably upgraded the video drivers from the old 64 Forceware to the 97 or 98 Forceware off of LaptopVideo2Go. But you’ve probably also noticed a few things in regards to the display no longer work, such as Dual Displays. Fortunately there’s a solution for enabling Dual Displays in the BIOS.

Reboot your computer and hold down the ESC key before the TOSHIBA logo appears. The laptop will prompt you with an error message “Check system. Then press [F1] key.”  Press the F1 key. Once in the BIOS setup, navigate using the directional keys to get all the way over to the right side where it says Power On Display in the DISPLAY box. Press the Space key until it changes to LCD+Analog RGB. Press the End key followed by the Y key to save your changes.

And that’s it! You can now plug in your monitor to the VGA output of the tablet and enable dual displays in Windows using the mobility center. I was actually quite surprised when I could run my main monitor at 1920×1080 and the laptop LCD at 1400×1050 with out any issues.

R.

Regex and Anchor tags

I had been looking on the Internet for a solution to a program I had be working on and sadly didn’t come up with one. I was trying to find a way to use regular expressions to find all the html anchor tags in a string along with matching a wild card URL (ie: secnem.com.*test.html). And after many hours of thrusting my head into my keyboard I came up with:

/<a [^><]*href=[\”\’][^\”\’><]*<rule>[^\”\’><]*[\”\’][^>]*>\s*.*\s*<\/a>/iU

You’d replace <rule> with what ever url rule you want, except for any wild cards in the url I needed to use [^\”\’><]* instead of just .* . This would prevent it from matching outside of the anchor. Bascially [^\”\’><]*  means: match any character except a double quote, single quote, greater than sign, or less than sign. All of which should not be in the href field to begin with.

If you wanted to see what the content of the anchor tag was or the matched href, simply put some brackets around like so:

/<a [^><]*href=[\”\’]([^\”\’><]*<rule>[^\”\’><]*)[\”\’][^>]*>(\s*.*\s*)<\/a>/iU

Hope this helps someone. You can of course adapt this to other html tags by replacing ‘a’ for ‘table’ or w/e. Same with the href. larsolavtorvik.com has a great resource for testing regex in real time and addedbytes.com has a great cheat sheet as well.