Appcelerator - Titanium Studio Proxies

by justin carlson on 08/28/2012
I've set up the Titanium packages a few times recently, and found the entire process to be rather cumbersome in both Win7 and OSX while on a network that uses a proxy, or products such as websense, etc.  Let me help you out. There are 4 different proxy settings in 4 different places.

Disable Tooltip Animation in HighCharts JS (v2.2.1)

by justin carlson on 04/24/2012
Here's a quick post to explain the issue (which the Highcharts folks know about and may already be fixing), and how to remedy it.

PHP COM() access to Outlook Calendar

by justin carlson on 02/01/2012
PHPIn this article you will find sample code for accessing Microsoft Outlook Calendar events using PHP and COM(). This sample includes recurring events and was tested on Windows XP with Outlook 2003.

PHP COM() Access to Microsoft Word

by justin carlson on 01/11/2012
PHPIn this article you will find very basic sample code for accessing Microsoft Word using PHP and COM(). This sample includes a table and some alignment settings.

file_put_contents() vs fwrite() in PHP

by justin carlson on 08/16/2011
PHPIt should be obvious, but there are forum comments discussing the possibility of file_put_contents caching the file handle and/or not closing it until the script ends. This is not the case. If you need make successive writes to a file, use fopen and fwrite instead. I've included a benchmark below so you can see the difference.

MySQL Workbench Troubleshooting

by justin carlson on 06/30/2011
I've recently changed development machines. When I migrated my databases I decided to try out MySQL Workbench. I received the error "Column count of mysql.proc is wrong. Expected 20, found 16" because I imported old databases into a much newer version of MySQL Server. The fix was very simple.

Keep'n It Simple

by justin carlson on 02/16/2011
Twitter shrinks urls to t.co versions to protect users from clicking shady links. This is all fine until you encounter a shrunk url in say, the search API, and you need to know what page on your site it references.

Regex This

by justin carlson on 01/11/2011
Some commonly used regex examples.

A to Z PHP 5.3 Windows Environment Setup

by justin carlson on 11/08/2010
I thought I had this somewhere but since I'm re-instaling from scratch on top of Windows 7 I thought I would post it again. I will send this link to coworkers and friends that need their environment setup.

Windows: Apache with SSL Quick Guide

by justin carlson on 11/07/2010
This is a quickie guide I put together to help you get Apache installed and running with SSL support. (https).

LDAP php_ldap.dll extension for PHP 5.3.3 VC6

by justin carlson on 10/21/2010
I noticed the missing dll today when I went to work on an older project that uses ldap. It seems it was left out of the package, possibly due to a bug fix. The ldap extension seems to only be available using the VC9 builds (ts and nts builds).

How to Run a Contest Using Twitter

by justin carlson on 09/23/2010
Promoting your business or product on Twitter can be fun and rewarding for both you and your customers, but how do you create a Twitter contest or giveaway?  It turns out it's pretty easy because there are websites like http://www.tweetsw.in/ out there that handle everything for you.  All you have to do is decide what you want to give away and how you can relate it to your business.

Styling Checkboxes and Radio Buttons With CSS and jQuery

by justin carlson on 09/22/2010
There are probably a hundred ways to do this, I just wanted a simple drop-in to style check-boxes and radio buttons with basic css. I whipped this jQuery out and it seems to be working well in IE7+, Firefox 3.6+, Opera 10.x, Chrome, and Safari. It supports label binding as well. Oh, and it fails nicely for those that don't use JavaScript. ಠ_ಠ I'm sure it could be reduced further but I don't care to over optimize.  I have not actually used this on a radio button yet, but since the elements operate about the same I'd guess it should just work.

jQuery: Simple example of table row cloning with form element incrementation / renaming.

by justin carlson on 09/15/2010
Someone at work asked about this, putting this out as an example of how it can be done. The question, is there a simple way to dynamically add/remove table rows that may contain form fields that doesn't create name conflicts. This example changes all name and id attributes on cloned rows. It also removes the last td and replaces it with a remove icon that links back to the remove JavaScript. 

PHP mCrypt blowfish interop with Java, .NET

by justin carlson on 07/20/2010
PHPWhile writing a PHP ePayment client for USBank's service, I noticed strings that were blowfish encrypted with PHP's mCrypt in ecb mode were not matching the encrypted values from Java and .NET. This was frustrating as the Java client was not using any specific settings for block size or pad type, and, sorry guys, Java documentation seems lacking.  Luckily the solution was very simple.

PHP 5.3 mCrypt dll for Windows

by justin carlson on 07/14/2010
There isn't one. Just a reminder, mcrypt is built in for PHP 5.3.x on windows, you don't need to do anything with a dll anymore.

Appcelerator, Titanium Mobile and Android

by justin carlson on 07/09/2010

I finally have a working development environment to test out Appcelerator's products. I'll step you through some of the gotchas I come across and do a bit of a review of the whole process as I work with Titanium Mobile.

Apple 4.0, New Terms, Worried Developers

by justin carlson on 04/08/2010
Check out this little gem in the Apple iPhone SDK 4.0 terms:

3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

Does this mean Titanium Mobile, Unity3D, Ansca, MonoTouch, and possibly PhoneGap are headed to the deadpool?

Download Census.gov Tiger/Line shape files (2009 Edition)

by justin carlson on 12/21/2009
PHPUse the php script or wget example to pull down census.gov Tiger/Line shape files. It would be easier to just use wget, but I'm using windows.

PHP DOMNode::removeChild, Whitespace

by justin carlson on 11/05/2009
PHPJust a quick note to remind myself later. DOMNode::removeChild leaves whitespace unless you tell it not via:
$document->preserveWhiteSpace = false;