Computer Programming

Yes, a bit specific, but I need to store some links!

HTML and CSS in Email

I was having lots of problems with HTML email layouts. After doing some research, I came up with a method to get almost pixel-perfect positioning and sizing. It's not that hard.

Shared Memory Example

Here's one for the noobs (from a noob). This demonstrates the use of shared memory. It's a program that spawns 10 children, and each one gets a special "babytalk" word to say.

BODY ID in HTML

I've never put a ID onto the BODY tag, but here's a situation where it's useful.

Normally, an article has an H1 tag that contains the title for the page.  You do this for SEO reasons, as well as semantics.

Loop Faster

nzakas has a great presentation about speeding up Javascript loops but it applies to any language that uses C-like loop structures.

SFF Computers

This rant is so right. SFF computers with power bricks suck.

Code Is Usually Not Data

One of the big problems with PHP is the include statement. You can include a file. You can define that file at runtime, and alter it during runtime.

AJAX Caching Data with Javascript

Here's a way to cache data on the client side, via javascript. This was tested on Firefox 3.6.3 on Ubuntu.

The idea is to convert your data into Javascript, and then load it with the SCRIPT tag. You then use the Expires HTTP header to tell the client how long to cache the data. Finally, you use some Javascript code to display the data.

Image with Transparent Caption

Here's some HTML and CSS to make an image with a transparent caption that displays over the image.

<style type="text/css">
  .caption-background {
      width: 500px;

CodeIgniter loader class? WTF?

Here is something I can't understand The CodeIgniter Loader class.

It's just weird. When you load a class, it's instantiated and made an attribute of the $this object. That has a real "Javascript" feel to it.

Beyond that, I think class loaders sometimes obfuscate where the included files reside. That might seem okay, or even "cool", but I find it annoying.

What is dirname(__FILE__) about?

The old Slaptech framework had the old PHP includes problem, where one cannot to include() a file relative to the current file.

PHPList Tweak for Plain Text Version of HTML Mail

This small alteration to the PHPList code will produce better line breaks.

sendemaillib.php:

  $text = preg_replace("/<\/p\s*?>/i","<\/p>\n\n",$text);

So much "stuff" in Java

So, the tokenizer's done, and the parser's code is written but not tested. The standard testing system included with NetBeans is JUnit.

MS Access: Automatically Jumping to the Only Record that Matches

Many years back, just before web pages got popular, I remember that some programs sent you as close as possible to your desired data whenever you searched.

Keyword Analysis or Discovery (a first try)

I was messing around with some textual analysis, trying to figure out how to do a "related articles" feature in Drupal.

Method Chaining, some opinions

A few years back, method chaining got to be all the rage, and now it's common.

.

Syndicate content