Archive for December, 2009

How To Set Up a Samba Server in Ubuntu

Samba

So you have a Linux desktop or server and want to share files and/or printers to your Windows PCs or Macs. Luckily, all three operating systems support SMB so let’s use that. With Samba you can share files and printers on your home network and protect your shares with a username and password.

Read the rest of this entry »

Review: Monoprice iPhone External Battery (2200mAh)

Monoprice

Let’s be frank: the iPhone 3G has the worst battery life out of all the iPhones. Add to that the fact that I use my iPhone like a laptop and the battery can die in less than one day. The Monoprice backup battery is only $15 from Monoprice.com and does the job very well. The battery pack should work with all iPods too.

Let’s take a look…

Read the rest of this entry »

Sudoku Solver in Java

SudokuSolver

This is a Sudoku solver that uses arc consistency and domain splitting. Also able to tell if a board has no or many solutions.

Download SudokuSolver

Great iPhone Apps (Free & Paid)

one-billion-apps-hero-20090418

I’ll just list out a few of the apps I have right this moment. If an app costs money, I’ll try to list out some free alternatives. Hopefully you’ll find that they’re useful!

Read the rest of this entry »

How to Use the PS3 Controller (Dualshock 3/Sixaxis) on Windows 7 64-bit via USB

DS3Windows

Get your PS3 controller to work on your PC with MotionInJoy drivers for 32 and 64-bit Windows. This guide will show you how to connect your PS3 controller via USB.

Read the rest of this entry »

Deterministic Linear Time k-Select Algorithm

Code

This is an implementation of linear time selection by Blum, Floyd, Pratt, Rivest, and Tarjon in Java.

Pseudocode:

BSelect(A,k):
    If |A| == 1 return A[1]
    p = GoodPivot(A)
    S = { A[i] | A[i] < p }
    L = { A[i] | A[i] > p }
    If |S| >= k return BSelect(S,k)
    else if |S| == k-1 return p
    else return BSelect(L, k-|S|-1)

GoodPivot(A):
    Divide A into n/5 groups of 5 elements each
    Find the median of each group
    Use BSelect to find the median, p, of the n/5 medians
    Return p

View implementation