Multi-Threaded Libevent Server Example

Libevent is great for handling and dispatching events and doing nonblocking I/O. However, its single-threaded architecture results in under-utilized CPU resources on hyperthreading, multi-core or multi-CPU hardware. The solution: a Multi-Threaded Libevent Server Implementation.

Jax Framework: AJAX Web Applications Made Easy

AJAX, the Best Thing since Sliced Bread

I love AJAX (Asynchronous JavaScript And XML). I've been using XmlHttpRequest for many years. It's just really cool to be able to make a request to the server, possibly perform some processing on the server, get the response, and update part of the page -- all without doing a page reload. And with modern desktop computers getting faster and JavaScript interpreters becoming more optimized, it makes perfect sense to offload the lion's share of the user interface work to the client -- the web browser.

AJAX doesn't necessarily involve any XML at all. In fact, a lot of applications are using AJAX to return JSON (JavaScript Object Notation)-encoded results which are then processed on the client using -- you guessed it -- JavaScript.

Getting Started with Symfony 1.4

I've recently started using the Symfony framework for web application development, and I like it quite a bit. In this article, I share some notes I took for myself while I was learning to use Symfony.

Without any further ado, let's get started.

Download the prerequisites checker here: http://sf-to.org/1.4/check.php
Run it like this: php php check_configuration.php
Fix any problems it finds.

Paradise Junction Beach House

Today I thought I'd write a little about our beach house.

We've named it "Paradise Junction", because being there is like being in paradise, and also because it's located at the junction of the Intracoastal Waterway and the canal in Sargent, Texas. It has a beautiful ocean view from the upper deck.

Data Access Objects Generator for PHP

As part of another open-source project which I recently (as of Aug, 2010) have been developing, I put together a nice Data Access Object generator for PHP. The project is called "phpdaogen".

This DAO generator is BSD-licensed, and includes a PHP PreparedStatement implementation which does not use mysqli (which is unstable and tends to crash).

Personal Finance Management Software

Recently (August, 2010), I've been developing a Personal Finance Manager package for managing our household budget, checkbook, credit cards, etc.

This has actually evolved into a nice little package. It uses JQuery, DataTables, AJAX, Data Access Objects, PHP and MySQL. It runs under the Apache web server, which is nice because you can run it on a web server and both you and your wife or husband can post transactions, reconcile bank statements and run reports.

Since it is a web-based application, you do need a web server to run it. So it's not for the faint of heart.

How to Remove Stains from Fine China

Have you ever noticed how dishes, especially fine china, tend to accumulate rust stains, water stains or food stains? If they're left in the sink for a while, or washed in a dishwasher, this can happen fairly often.

Well, there is a way to get rid of most of these stains. In fact, there are two ways. I'll discuss both of them.

Usually the stains tend to accumulate on the bottom surfaces of the dishes, but can actually occur anywhere.

By Hand

The first way requires some elbow grease (also known as hard work). You'll need a box of baking soda and some paper towels.

Tic-Tac-Toe: An Experiment in Machine Learning

I've been interested in artificial intelligence and machine learning for quite some time. Some time back, I had experimented with using a Neural Network to attempt to predict whether a stock would go up or down. I had some limited success, but I'm not sure how accurately you can predict something which, without sufficient causal data to describe what is actually happening, generally appears pretty much random.

So, I thought I would apply some machine learning algorithms to something more consistent: the game of Tic-Tac-Toe. I won't describe the game, since anyone over the age of about six has probably played it. What I will describe, is two different approaches I took to teaching a computer to play this game so well as to be unbeatable.

Java Bar Code Decoder and Generator

Today's article deals with bar codes. Specifically, it deals with generating and decoding UPC-A and Code 3 of 9 bar codes in Java. A Java library and sample code are provided to demonstrate the functionality.

How it Works

This bar code engine is implemented as a Java library, along with a few demo applications which show the library in action.

Java OCR

Several years back, I was working on an imaging project in Java which was going to require some Optical Character Recognition (OCR) functionality. After an exhaustive search, I could find nothing to fit the bill. My requirements were:

  • Must be written in Java
  • Must be freely redistributable, with or without source code
  • Must not be proprietary
  • Must be able to recognize the fonts of various printers, even if that means that it has to be trained for each new font
  • Must be reasonably fast

Syndicate content