Sudoku Solver: Straight out of the mothballs…

I was digging around in my long-abandoned Windows partition, and I found some old backups of some old stuff. One particular program I used to be so proud of is my Sudoku Solver. It is a C++ program that I wrote as a final project my sophomore year of high school; I opened the files and made the necessary modifications to make it compile (stripped a couple of mistakes out of the header file; removed a system() call that only works under Windows) and stuck the GPL on it. It isn’t particularly clean, or a great solution, and it has next to no comments, but here’s the source of Sudoku Solver. You can compile it under Linux by issuing the command “g++ board_handler.cpp main.cpp”. As for Windows, I used Bloodshed Dev-C++ for the longest time; I believe it has a Windows version of g++ behind the scenes, so it should behave the same. I included a simple unsolved file for it to read; pointing it at sudoku.sdk saved a lot of time in debug…

Is it bad to be barely an adult and already have nostalgic moments?

Posted in Code snips. No Comments »

Getting K3b to burn MP3s

K3b is a good CD burning app for Ubuntu. But it won’t burn MP3 files right out of the box. A bit of Googling and trial and error reveals the fix for this. (more…)

Getting your user-agent

I just whipped up a short PHP script to display the user-agent and IP of a client’s browser. I wanted this because I was writing to Citizens Bank about a bug in their home page (a broken browser detection script). The script can be used here and the content of it is very simple:

<?php
echo "Your browser is reporting the agent string: '";
echo $_SERVER['HTTP_USER_AGENT'];
echo "'<br>Your IP address is ".$_SERVER['REMOTE_ADDR'];
?>

Yeah.

Posted in Code snips. No Comments »

Ubuntu: Changing file associations

In Windows, if you want to change the program that is used when you double-click a file, you would need to dig into Control Panel’s Folder Options applet. This is the case of one of those illogical steps Microsoft users memorized becuase of its consistency across all Windows platforms. However, this more logical location in Ubuntu threw me off… (more…)

Posted in Linux tidbits. No Comments »

Make your Verizon phone your own

Here’s a tutorial I wrote up to make custom ringtones for Verizon phones.

NOTE: This tutorial is still in beta, meaning that it may have some rough patches. I am still revising it, and need to test it on other platforms and with other phones. I am not responsible if this causes any physical, mental, or emotional damage to you or anyone else.

Introduction:

Verizon likes to sell things. That in itself is not evil. What is evil is the scheme they have come up with to profit from ringtones. The only way most customers know of to get ringtones is through Verizon’s Tones Deluxe. It has a fairly limited selection of songs (Gummibär doesn’t get any love…) and the ringtones are downright overpriced (a full-length MP3 from Amazon MP3: $0.99. A 30-second clip from Tones Deluxe: $2.99. You do the math). Also, these tones are lost once the time comes to upgrade to a new phone. What most customers don’t know is that they can create their own ringtones and send them via e-mail to their handset.

Let me say that again. It is easy and, depending on your plan, free, to create and send ringtones via e-mail to your phone. Let me show you how. (more…)

Posted in Tutorials. 1 Comment »

[solved] WordPress: Broken Thumbnail Maker

I can’t figure this out just yet, but I haven’t had a lot of time to figure it out either. It looks like the option to insert a thumbnail is broken in the latest release of WordPress. (see bottom of this post. I did figure it out)

Broken thumbnail creator

The thumbnail creation buttons are greyed out. (click to see full image)

I go to insert a picture into a post, and I get the screen with information about the picture I just uploaded. The option buttons allowing me to use a thumbnail-sized version of the picture are greyed out, however. The picture inserted into this post is not a thumbnail, but rather a full-size, scaled down by the browser, not the server.

Since this site is currently hosted out of my own basement, I need to conserve bandwidth. I have a cap on my server’s upload speeds, so ultimately not being able to use thumbnails is going to hurt the end user; the site will just take forever to load.

Now, I’ve gotten some hints that this is an indication that I am missing GD in my Apache installation. It doesn’t show up in my phpinfo() dump, so that’s the first thing I’m going to try. I will post back when I’ve got it figured out.

EDIT: Well, I figured out how to install GD; a bit of Googling around found this. It seems to be a bit dated; also, I am using PHP5, not PHP4. Issuing the command “apt-cache search gd” showed me all of the Debian packages with “gd” in the name; the one I want is “php5-gd – GD module for php5″. I ran “apt-get install php5-gd” to install the package. I restarted Apache by issuing the command “apache2ctl restart”, and the option buttons were enabled. Mystery solved!

I give up.

I don’t want to spend all my time messing with the PHP needed to make this nice. Therefore, I give up. I installed WordPress. Now I’m not up to my nose in code.

This might actually be fun!

Posted in Uncategorized. No Comments »