std::set phoenix;
phoenix.key_comp();| KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:" | |
| find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/" |
| #!/usr/bin/env ruby | |
| # Determines the coordinates (latitude and longitude) of the places or | |
| # addresses passed as arguments (either on the command line or via stdin) | |
| # and prints the results. | |
| # This script requires the Ruby Geocoder gem by Alex Reisner | |
| # (http://www.rubygeocoder.com). | |
| # To install the gem, run this command from a Terminal session: | |
| # |
-com.apple.CoreData.SQLDebug 1-3- print all SQL queries called by Core Data-com.apple.CoreData.Logging.stderr 1-3- needed alongside with theSQLDebugfrom iOS 10+ because of new logging system, more on that in changelog
-com.apple.CoreData.SyntaxtColoredLogging YES- probably syntax colored logging (not tried)-com.apple.CoreData.SQLiteDebugSynchronous 1- preference controls some aspects of the SQLite store. See the "Configuring a SQLite Store's Save Behavior" section of the Core Data Programming Guide for details-com.apple.CoreData.SQLiteIntegrityCheck 1- the SQLite store does extra integrity checking-com.apple.CoreData.MigrationDebug 1- Core Data will log information about exceptional cases as it migrates data-com.apple.CoreData.ThreadingDebug- preference enables assertions to enforce Core Data's multi-threading policy. It is a number, where incre
| #import "CTTelephonyNetworkInfo+ConnectionClassifier.h" | |
| @implementation CTTelephonyNetworkInfo (ConnectionClassifier) | |
| // Naive implementation. | |
| - (BOOL)isFast:(NSString*)radioAccessTechnology { | |
| if ([radioAccessTechnology isEqualToString:CTRadioAccessTechnologyGPRS]) { | |
| return NO; | |
| } else if ([radioAccessTechnology isEqualToString:CTRadioAccessTechnologyEdge]) { |
Greetings, NSHipsters!
As we prepare to increment our NSDateComponents -year by 1, it's time once again for NSHipster end-of-the-year Reader Submissions! Last year, we got some mind-blowing tips and tricks. With the release of iOS 7 & Mavericks, and a year's worth of new developments in the Objective-C ecosystem, there should be a ton of new stuff to write up for this year.
Submit your favorite piece of Objective-C trivia, framework arcana, hidden Xcode feature, or anything else you think is cool, and you could have it featured in the year-end blowout article. Just comment on this gist below!
Here are a few examples of the kind of things I'd like to see:
- Using
NSStringFromSelector(@selector())as a safer way to do KVC / KVO / NSCoding. - Panic's [rather surprising discovery about the internals of the Lightning Digital AV Adapter](http://www.panic.com/blog/the-lightning-di
This guide will explain how you can make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier.
We will also explain how the process can be automatically started each time you log in to your Mac and ensure the connection to the server is kept alive.
| class Enum < Hash | |
| def initialize(*members) | |
| super() | |
| @rev = {} | |
| members.each_with_index {|m,i| self[i] = m } | |
| end | |
| def [](k) | |
| super || @rev[k] # || raise ArgumentError, "#{k} is not a member of this enum" | |
| end | |
| def []=(k,v) |
| # This code is demonstrating a default queue_classic worker. | |
| # The biggest issue is, that requests made by its jobs are blocking | |
| require 'rubygems' | |
| require 'queue_classic' | |
| require 'typhoeus' | |
| trap('INT') { exit } | |
| trap('TERM') { worker.stop } |
