• ## Implementing the Dense Array Interface in Julia

A DenseArray describes a multidimensional array that has regular offets in memory. Implementing multidimensional arrays with the API flexibility of MATLAB (range indexing, colon indexing, etc.) is hard. Julia makes this easy by requiring only four methods to implement a DenseArray (five for copy semantics).

• ## Zero-Truncated Poisson Sampling Algorithm

The Zero-Truncated Poisson distribution is a sample variant of the Poisson distribution that has no zero value. A simple example of this is a the distribution of items a customer has in their shopping cart before approaching a register where it is common to presume that the customer will not approach the cash register without any items to purchase. Efficient sampling algorithms exist and are common for the Poisson distribution, however, few sampling algorithms exist for the Zero-Truncated Poisson distribution. We derive such an algorithm here using the inverse transform method.

• ## Exploring the Hailstone Sequence with Julia

The hailstone sequence is a sequence of positive integers from an initial value that is popular through the Collatz conjecture, an unsolved problem in mathematics. We are interested in simulating the sequence at various initial values to gain insights to how the stopping time property relates to the initial value.

• ## Planning a Dual Boot Partition Scheme with OS and Data Separation

Operating System and data separation on a drive is important for failure isolation.

• ## Illustrated Decomposition of Combinatorial Game Move Enumeration with Basis Vectors

Partisan, combinatorial games such as Checkers, Chess and Othello are easily implemented on a matrix implemented as a square array; however, the enumeration of feasible game moves on the game board is a laborious coding effort if implemented naively.

• ## Concise Implementation of Minimax through Higher-Order Functions

The Minimax algorithm is the core of several game-playing AI for making decisions on the best move. This algorithm finds the best move for an AI on a two-player, combinatorial game state on games such as Checkers, Chess or Othello.

• ## MinDispatch: Event-Driven Framework In Java Part 2

From the last post in this series, we developed a fixed, event-driven chat simulation. In this post, we will extend this example by refactoring. The objective of this tutorial is to teach effective design patterns in an event-driven model.

• ## Partioning Discussion Sections for Lecture-Hall Sized Classes

Eric Hennigan had recently pitched a new partitioning problem to ACM: partitioning his discussion sections among two TAs such that students are equally distributed to each TA. Although the problem may be trivial to do by hand, it's easy to decompose into discrete mathematics, and therefore, easy to analyze.

• ## Writing a Lexer in Java 1.7 using Regex Named Capturing Groups

One of my favorite features in the new Java 1.7 aside from the try-with-resources statement are named capturing groups in the regular expression API.

• ## Round-Robin Scheduling Algorithm for Group Looting

In my previous post, I mentioned the Round-Robin Scheduling algorithm which was an alternative solution to the Josephus Problem. Although the algorithm is slow for the Josephus Problem, it excels at fair scheduling; so, I'll describe how the Round-Robin Scheduler can be used to equally distribute a finite set of resources such as Group Looting in World of Warcraft (with some variations).

• ## A Dynamic Programming Solution to the Josephus Problem

I found an interesting problem in the book Data Structures and Algorithms in Java known as the Josephus Problem. In the book, there is a naive solution using the Round-Robin scheduling algorithm; however, I considered dynamic programming to solve this problem discretely.

• ## Bypassing UCI Resnet's Cisco NAC Appliance for Windows Users

On a school night, homework piles up, stress accumulates and the Cisco NAC Appliance denies you Internet Access because "your virus definitions are out of date." This obnoxious, little appliance consumes precious time from college students for trivial problems such as Microsoft updates.

• ## MySQL Database Creation for Web Hosts on Ubuntu 11.04 using Python

Following up on my recent studies with Python for system administration, I learned to handle database creation through Python. Database creation and MySQL user management are common tasks as a web hosting provider because many public websites use MySQL. Most web hosting providers already enable the creation of databases through an interface but I'll focus on the implementation of that interface today.

• ## Creating Simple File Templates in Python

I manage hosting for all sites networked within MetaZaku but the servers themselves are unmanaged; thus, I must manually configure all hosting accounts.

• ## Overcome DNS Propagation Time with Hosts File Hacks

Many new sites joined the MetaZaku Network and many of them migrated servers. Standard migration routine: Copy all files and change the nameservers.

• ## Custom BIOS Splash Screen for New Thinkpad Series

For people who like to customize to their thinkpad laptops, we can create custom BIOS splash screens instead of having the default Thinkpad logo. Unfortunately, the old tutorial on thinkwiki is outdated; however, it only takes a little ingenuity to add that splash screen again.

• ## Installing PHPUnit on Ubuntu 11.04 (Natty Narwhal)

Unfortunately, PHPUnit does not work out of the box on Ubuntu 11.04 through apt-get. We also need to use PEAR to install the dependencies.

• ## Installing APC for PHP-FPM on Ubuntu 11.04 (Natty Narwhal)

My new development environment, Ubuntu 11.04, contains the php5-fpm package that hasn't been available on 10.04. PHP-FPM is especially important when developing on the LEMP stack which uses Nginx instead of Apache. In this tutorial, you will not build anything from source.

• ## Faulty Operating System Detections for JRE Packages?

Ronnie, on his pale horse, asked me for help regarding JDK installations after he received the 1723 error. He, like the other horsemen of the apocalypse, also had a 64-bit Windows Vista/Windows 7.

• ## Introducing Avaku: Customizing Avatars with HTML5 Canvas

Avaku was formerly an avatar module for Wishtides but the downfall of the project left the code unused. The poor avatar engine never had a chance to flaunt the power of HTML5 canvases; thus, I revived it with some nifty improvements: doubly linked lists, algorithms, and event-bindings all in JavaScript.

• ## Public Repositories in Gitolite with umasks

At ZeroZaku, we use Git and Gitolite to easily push updates from our local computers to the server; however, the problem is that a fresh installation of Gitolite would prevent apache from reading the working tree because of its default permissions.

• ## Puffer Fish Inspired My Blog Design

Yep, this blog design was inspired by a puffer fish: a green spotted puffer fish. Joanne Leung took an amazing photo of her puffer, Blinky, that inspired the colors of my blog design.