A quick example of how to handle comma separated input from a POST variable in PHP. The code below will turn your POST variable into an array containing the user’s input which you can further validate or store in a database. This is useful for letting users add tags to items on your website. $tagsString [...]
iOS tip: Center UILabel in tableFooterView
If you’re building an app that supports portrait and landscape you will probably run into an issue with keeping things centered after device rotation. Below is a quick example of adding a UILabel to a UITableView’s footer and keeping it centered regardless of device rotation. The trick is to use autoresizingMask which does all the [...]

SDWebImage fixed width cell images
While looking for a easy solution to load uitableview images remotely, I came across a great library called SDWebImage. It’s very simple to use and provides a lot of flexibility for loading and caching images in your iOS project. As I started to use it, I ran into a issue when loading inconsistant thumbnail image [...]

JQuery: Sorting JSON results
This is a follow up to a previous post on sorting elements using JQuery. A few people messaged me asking how to modify the code to sort JSON results from a ajax request so here it goes. The JSON (json.php): [{"id":600385,"name":"Featured Titles","url": "http://www.example.com"}, {"id":562680,"parentId":567182,"name":"Business","url": "http://www.example.com"}, {"id":562677,"parentId":567186,"name":"Other Misc.","url": "http://www.example.com"}, {"id":562664,"parentId":567186,"name":"News \u0026 History","url": "http://www.example.com"}, {"id":562678,"parentId":567186,"name":"Men\u0027s General","url": "http://www.example.com"}, [...]
Check image type in PHP
Quick PHP tip: If you’re looking to determine the type of uploaded image you can use the following code: $type = exif_imagetype($_FILES['uploaded_image']['tmp_name']); if ($type == 1 || $type == 2 || $type == 3) { //image type is jpg, gif or png } The code above shows a snippet to check if the uploaded image [...]

Starting iOS development
Over the past couple weeks I’ve shifted to developing more and more for iOS devices. The plan is to share what I learn as I go. The first tutorial i’m working on is creating a “log in” view for your app, along with explaining how to use delegates to notify your application of the results. [...]
About The Author
I blog about stuff I learn as a developer. Mostly iOS, AS3, PHP, MySQL. I run a lot, too. Follow @lostincode
- JQuery sort() February 11, 2009
- PHP5 Email Validation February 10, 2009
- Error calling method on NPObject! February 12, 2009
- Getting Upcoming Birthdays From MySQL March 31, 2009
-
SDWebImage fixed width cell images
November 20, 2011
- PHP: Handle comma separated input February 21, 2012
- iOS tip: Center UILabel in tableFooterView February 6, 2012
-
SDWebImage fixed width cell images
November 20, 2011
-
JQuery: Sorting JSON results
November 7, 2011
- Check image type in PHP November 7, 2011
-
Bill Richards: Hi, what's not working? Your image sizes are off?...
-
Bill Richards: Hello, try changing UITableViewCellStyleDefault t...
-
Hdkhiem: I used that, but the cell could not show the detai...
-
Chrysalist: Hi Bill, it's not working. ...
-
Hm: helpful ...
Categories
- Actionscript 2.0 (1)
- Actionscript 3.0 (2)
- Amazon S3 (1)
- Flash (3)
- iPhone (4)
- JavaScript (2)
- JQuery (2)
- MySQL (2)
- PHP (7)
- Uncategorized (2)