thanks 4 putting source for a noob to learn a little
-
DocSets-for-iOS and paid 4 it too https://github.com/omz/DocSets-for-iOS/
-
Real Time Congress
extension Array { | |
func first() -> Element? { | |
if isEmpty { | |
return nil | |
} | |
return self[0] | |
} | |
func last() -> Element? { |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.052 0.489 0.482 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.432 0.325 0.276 1</string> |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>1 1 1 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>1 1 1 1</string> |
NSDate *date = [NSDate new]; | |
NSDateFormatter *dateFormatter = [NSDateFormatter new]; | |
dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"nl_NL"]; | |
dateFormatter.dateStyle = NSDateFormatterFullStyle; | |
dateFormatter.formattingContext = NSFormattingContextDynamic; // this is the important setting | |
NSString *dateString = [dateFormatter stringFromDate:date]; | |
NSString *s1 = [NSString stringWithFormat:@"Foo %@", dateString]; // "Foo dinsdag 13 december 2016" |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0 0 0 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0 0 0 1</string> |
thanks 4 putting source for a noob to learn a little
DocSets-for-iOS and paid 4 it too https://github.com/omz/DocSets-for-iOS/
Real Time Congress
// | |
// Warnings.xcconfig | |
// | |
// The list of warnings we (don’t) use, and the reasons why. | |
// | |
// :MARK: Warnings in use: | |
// :MARK: -everything | |
// We want the best possible diagnostics, so we simply enable everything that exists, and then opt–out of what doesn’t make sense for us. | |
// | |
// :MARK: - Warnings not to be promoted: |
enum FizzBuzz { | |
case fizz | |
case buzz | |
case fizzBuzz | |
case number(Int) | |
init(rawValue: Int) { | |
switch (rawValue % 3, rawValue % 5) { | |
case (0, 0): self = .fizzBuzz | |
case (0, _): self = .fizz |
Process: Xcode [59837] | |
Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode | |
Identifier: com.apple.dt.Xcode | |
Version: 7.1 (9069) | |
Build Info: IDEFrameworks-9069000000000000~10 | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: Xcode [59837] | |
User ID: 1199935289 |
import Foundation | |
extension String { | |
var isHomogeneous: Bool { | |
if lengthOfBytesUsingEncoding(NSUTF8StringEncoding) == 0 { | |
return true | |
} | |
var homogeneous = true | |
var character: NSString? |