Blogs

PHP's mysql_connect Function Anomalie

Recently, when trying to make 2 similtanious connections to the same mysql server with different databases, I noticed that this is not strictly possible without a little tweak.

The following will not work as expected:

$con1 = mysql_connect('localhost', 'user', 'pass');
mysql_select_db('db1', $con1);

$con2 = mysql_connect('localhost', 'user', 'pass');
mysql_select_db('db2', $con2);

Initial findings concerning iPhone web frameworks (iUI, and jqTouch)

I am in the process of completing a web based application that I will be marketing soon. One of the last features to be added is an iPhone interface. The ubiquity of the mobile platform - most outstandingly, the iPhone - has necessitated this.

There are 2 main ways in which to build any application: hand code everything or use a framework. A framework's job is to take the mundane tasks that need to be done for EVERY application you write and make them simple. Some frameworks also help with code organization.

One-liner: Convert a Directory of wav files

Usually, when I need to convert many wav files, I'll use a perl script I wrote - its on the Helpfull Apps Page.  But today, I didn't care about ID3 Info or anything like that. I use LAME for commandline encoding and here is the one-liner that took care of the directory:

find ./ *.wav | sed 's, ,\\&,g'| xargs -n1 lame -b -96

Google Searches for Which I Am on the First Page of Results

By using a combination of Google Analytics and Google Webmaster Tools I have compiled a list of the most popular pages on my site according to google and its search results.  I find this data very helpful and interesting. So, I thought I would share.  What follows is a list of search phrases, which link to the resulting page on my site, and then a link to the search.  I only inculded the search for which I am on the first page of google results. (Continued...)

Can Throwing Fridge - Part 1

I finally started my project to build a soda-can-throwing-mini-fridge.  I've talked about it for a year or so, but now, I have actually ordered parts AND stated assembling. While I do not have the actual mini-fridge yet, there is much I can do without it. For instance: assembling the electronics, computing multiple throwing distances/angles and the necessary springs and motors necessary to make them. (Continued...)

My Addiction to 'No Fear'

No Fear is a SoBe product that is billed as an energy supplement. It contains numerous Vitamins and Minerals, (C, B, Taurine, Caffeine, etc.). The drink is very lightly carbonated.

DeAd Version .8 Released - Get Rid of Facebook ads For firefox users.

I have updated my DeAd FireFox extension to get rid of Facebook's ads. You can get it here: http://brianseagraves.com/helpful_apps#DeAd

Please give feedback if you use it. GoodBad.

 

Brian

Site Upgrade to Drupal 6

It should be pretty obvious that this site has undergone a change - it looks different. What may not be as obvious is that the software the site runs on, drupal, is now at the latest version 6 release; it was previously at 5. This may not be very helpful to you directly, but it will allow me to make more and better upgrades faster than before.

How to detect if an Iframe is loaded in Internet Explorer (IE)

While working on a project for my day(night) job, I ran into an issue. By the way, The project is pretty cool. It's called NETBibleTagger, and it allows you to add verse recognition and real-time quoteing of scripture to your website with just 1 line of html. Go check it out!

I needed to know if an iframe had completed loading it source. The difficulty was compounded by the fact that the iframe was cross-domain, and, of course, due to security restrictions, you can't access it.

ALU Design

What you see below is an ALU (Arithmetic Logic Unit). It takes 2 4-bit binary numbers and 2 control signals that specify an operation. It then either add the 2 signals, complements them, NOR's them, or OR's them.This is a mini and simplified version of the ALUs inside modern processors. Had to design if for a class; it was fun!

alu