This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Add Google Analytics tracking code to HTML response | |
| # | |
| # Usage: | |
| # set $tracking_id 'UA-12345678-9'; | |
| # include incl/analytics.conf; | |
| # | |
| # It needs nginx compiled with option --with-http_sub_module. | |
| # Uses optimized GA code from: http://mathiasbynens.be/notes/async-analytics-snippet | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface AppDelegate : NSObject | |
| @property (nonatomic, assign) NSInteger badgeCount; | |
| @end | |
| @implementation AppDelegate | |
| @synthesize badgeCount; | |
| // Override the badgeCount setter to update the dock tile whenever the count is set | |
| - (void)setBadgeCount:(NSInteger)count | |
| { |
NewerOlder