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 [...]

Read full story Comments { 0 }

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"}, [...]

Read full story Comments { 0 }

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 [...]

Read full story Comments { 0 }

AS3 – Scrollbar using MOUSE_MOVE instead of startDrag()

There is a million tutorials on how to create a scrollbar in AS3 but I noticed a lot of them use the startDrag function. While it works, when your mouse leaves the swf it will stop tracking the mouse movement and act a little strange when you return. Here is a quick snippet on how [...]

Read full story Comments { 0 }

Google Cr-48 Pics

Today I unexpectedly received a Google Cr-48 in the mail. Sweet – Thank you, Google! For those of you who don’t have the history on this device, Google announced it’s pilot program for their new Chrome OS. It’s a pretty ambitious project, they’re betting the fact that we all live in our browser and use [...]

Read full story Comments { 0 }