I needed a lightweight PHP library to pull images and image data from a public Google Picasa gallery. The result is a PHP class, based on this work, which was then used as a foundation for a PmWiki cookbook pmGallery. PmGallery allows you to pull Picasa based images from public albums into PmWiki, using a simple markup.
If you want full access to Picasaâs API you have a choice of client-side libraries, including one for PHP, using the Zend framework. The library itself is pretty big weighing in at 1.5Mb.
Recently when Iâve tried to forward an email, Iâve been getting a bounced back error: This message has been rejected because it has a potentially executable attachment "xyz" This form of attachment has been used by recent viruses or other malware., or An error occurred while sending mail. The mail server responded: Potentially executable content. If you meant to send this file then please package it up as a zip and try again.
In order to understand what this means you need to realize that:
When you click Forward the original message is being sent as an attachment.
The attached original email itself contains an attachment, probably with a .eml extension. You may not see this atachment, but itâs there.
PureText solves one of those annoying little problems that is so small and so ingrained that you donât even stop to consider the possiblility that there might even be a solution. Copy a chunk of richly formatted text from one application to another, and all the formatting that existed in the first application is carried over. When Iâm copying text, 99% of the time I simply want the text, not all the formatting. Of course applications provide a way of removing the formatting, but jeez, why go through all that hassle? PureText to the rescue!
A single 13k executable with no installation required
PureText only removes rich formatting from text
Unicode support when running on Windows NT/2K/XP/2003/Vista
Matching brackets is an interesting interview puzzle, but only in so far as getting the basic approach down. Once you work out that you need to retain some form of queue of unmatched open brackets, youâre done. The rest is all syntax, minutiae, and testing.
So an interview with this question shouldnât really be asking for working code. The basic algorithm, or approach should be enough. Really, you want to see if the person can think. If youâre looking for specific language skills, then using this kind of test is going to fail miserably, since it doesnât represent a big enough portion of any language to be valid.
However, it looked fun, so I took this opportunity to learn some PHP. Getting a working solution took 2 hours. Most of that was discovering some weird things about PHP arrays, which was my first implementation, and then some odd things about the PHP functions.
lClock is a replacement for the standard Windows taskbar clock. Despite itâs mere 3-star rating, lClock has remained on my PC in daily use for 5 years. Itâs pretty much a one-trick pony, but it does that trick very well. It provides complete control over the look of the taskbar clock. Along with tClockEx, lClock is destined to become a classic. The taskbar clock is now yours to control!
The Need
Thereâs not much you can do with the standard Windows taskbar clock. Itâs a clock.
Hover the cursor over it and you get the date. Double-click and you get a calendar. Whoo. Not. There are no options that let you see the date, none to change the font, or format the time.
Try switching the Windows taskbar vertically, and now tell me the time. No can do, baby.
The Good
Enter lClock. All your vertical taskbars are belong to us!
lClock was originally created to mimic the look of the then new Longhorn (aka Vista) taskbar clock which got a nice new face-lift. Apart from looking nice, lClock provides total control over every element of the date and time: you can choose colors, fonts, sizes, and positions for each element, for that precision you never knew you needed!
lClock is small (at around 300k), very stable, and causes no conflicts Iâve ever seen.
neat popup calendar.
Basic reminder alarms
And there are skins for those that need that truly custom look.
And the Bad
lClock hasnât been updated for a few years, and itâs starting to show itâs age. If youâre running Windows Vista look elsewhere. If you need features lClock doesnât have, theyâre not going to get added anytime this century, so you may look elsewhere too. Itâs settings interface is not for the uninitiated â thereâs a lot to set.
I just switched the site over from b2evolution to Drupal. In migrating posts I needed to attach some javascript files to a blog-entry. As a security measure Drupal renames files with executable extensions âphp|pl|py|cgi|asp|jsâ, appending an underscore and a â.TXTâ extension. Thatâs reasonable. Whatâs odd is that there is no setting to provide an override, either to specific users, or site-wide.
My initial question asking if there was a setting to override this security feature met with limited response, so a bit of research later hereâs what I came up with.
There are plenty of tutorials explaining how to setup Subversion on a Windows machine. Not so many good tutorials on how to actually use Subversion in the real world. In the rel world you sometimes need to apply Subversion to a bunch of files and folders that already exist. Applying Subversion to an already existing directory is more obfuscated than it needs to be. The user manual would have you believe that you need to Import, delete the directory, do a Checkout.
But what if you donât want to Import all files and sub-folders? Itâs the kind of thing you need to do very rarely, but when you do, itâs always a pain to remember exactly the best way to go about it. But itâs actually pretty simple: the key is to use SVN Add files rather than the SVN Import functionality.
Iâve been using Firefox for a long time, and liked it a lot. Recently that long honey moon period started to wane. Firefox 2.x has some pretty annoying performance and memory management issues, regularly chewing up 700-800Mb of memory (on a 1Gb machine), and hitting 90-100% CPU resource. Admittedly I have 4-5 windows open, with 10-20 tabs in each, and a bunch of extensions installed, so I run it hard, but none the less, the problems are there. I was also sick of fan-boys explaining away issues (even refusing to admit there were problems), with comments like âitâs the extensions, duuudeâ, or âwhat do you expect with so many windows, duuudeâ. Neither of these are reasons for chewing up all resources on a machine. Opera was starting to look mighty shiny.
Hereâs how to hook up a Verizon ActionTec wireless router behind a Smoothwall firewall; actually this should work for getting the ActionTec to work behind pretty much any firewall. The ActionTec menu structure is not well described, and so this took a while to figure out â and when I did it was ridiculously easy.
There were two keys in getting this to work. One was to recognize that the ActionTec and the Smoothwall firewall needed to be on different sub-nets. (Although I admit to not understanding why this is the case.) The second was to realize that the the only settings you need to change on the ActionTec are under âNetwork (Home/Office)â â you do not need to change the âBroadband Connection Ethernet/Coaxâ settings, despite what the ActionTec error message might indicate.
Set the Smoothwall IP to something other than the usual 192.168.1.x; I used 192.168.2.1 for example. I also set the Smoothwall to act as a DCHP server, with a range of 192.168.2.50-99 â this is not required, but makes it easier to setup the ActionTec.
On the ActionTec under My Network->Network Connections, goto the âNetwork (Home/Office)â settings and change the IP address to a different sub-net; I used 192.168.1.1.
On the same settings page mid-way down, enter the DNS Server using the IP of your Smoothwall (in my case that was 192.168.2.1).
Not required, but you likely want to IP addresses automatically assigned on your LAN, so change âIP Address Distributionâ to âDHCP Serverâ and specify a range of something like 192.168.1.50-99.
Update 23-Mar-2010:Code updated to allow multiple TOCs per page, if desired. More information available in the release notes.
A jQuery plugin that creates a table of contents for all header elements within the parent DOM element provided. (Based on original by Dimitri Spassov.)
By default, jqTOC produces a fixed, floating div box with the title âContentâ, in the top right of the browser window. When the box is clicked a new div will display a list of all H1, H2, H3 elements within scope of the parameter element. Each TOC element is a clickable link to the title in the document.
Start and end heading levels can be specified. All heading levels 1, 2, 3, is the default.