(Taken from Xcode 10)
- 2x - 40px
- 3x - 60px
| #! /usr/bin/env python2 | |
| # Requires: PIL, colormath | |
| # | |
| # Improved algorithm now automatically crops the image and uses much | |
| # better color matching | |
| from PIL import Image, ImageChops | |
| from colormath.color_conversions import convert_color | |
| from colormath.color_objects import LabColor | |
| from colormath.color_objects import sRGBColor as RGBColor |
| The objective of this post is to get you from absolutely nothing, to a fully functional nodejs environment. | |
| Software used: Ubuntu 11.10, Nodejs v0.6.12, Nginx, MongoDB, Redis, and NPM modules. | |
| 1. Download and install the latest version of Ubuntu: http://www.ubuntu.com/download (don't select any extra items to install when prompted) | |
| 2. Once you are logged in and are at your Ubuntu command prompt, install the necessary software you will need: | |
| a. sudo apt-get install openssh-server | |
| b. sudo apt-get install libssl-dev | |
| c. sudo apt-get install git | |
| d. sudo apt-get install g++ | |
| e. sudo apt-get install make |
| @interface myViewController: UIViewController <CLLocationManagerDelegate> | |
| CLLocationManager *locationManager; | |
| CLLocation *currentLocation; | |
| @end |
| ######################### | |
| # .gitignore file for Xcode4 and Xcode5 Source projects | |
| # | |
| # Apple bugs, waiting for Apple to fix/respond: | |
| # | |
| # 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
| # | |
| # Version 2.6 | |
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
| # |
| function validateImei($imei, $use_checksum = true) { | |
| if (is_string($imei)) { | |
| if (ereg('^[0-9]{15}$', $imei)) { | |
| if (!$use_checksum) return true; | |
| for ($i = 0, $sum = 0; $i < 14; $i++) { | |
| $tmp = $imei[$i] * (($i%2) + 1 ); | |
| $sum += ($tmp%10) + intval($tmp/10); | |
| } | |
| return (((10 - ($sum%10)) %10) == $imei[14]); | |
| } |