- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
This file contains 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
let decimalInteger = 17 | |
let binaryInteger = 0b10001 // 17 in binary notation | |
let octalInteger = 0o21 // 17 in octal notation | |
let hexadecimalInteger = 0x11 // 17 in hexadecimal notation | |
let decimalNumber = 1.25e2 // 125.0 e2 means 10^2 | |
let decimalNumber2 = 1.25e-2 // 0.0125 e-2 means 10^-2 | |
let hexadecimalExponent = 0xFp2 // 60.0 means 15x2^2 | |
let hexadecimalExponent2 = 0xFp-2 // 3.75 means 15x2^-2 |
This file contains 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
private void textBoxKeyPressNumber(object sender, KeyPressEventArgs e) | |
{ | |
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && | |
(e.KeyChar != '.')) | |
{ | |
e.Handled = true; | |
} | |
// only allow one decimal point | |
if ((e.KeyChar == '.') && ((sender as TextBox).Text.IndexOf('.') > -1)) |
This file contains 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
private void textBoxKeyPressLetter(object sender, KeyPressEventArgs e) | |
{ | |
if (!char.IsControl(e.KeyChar) && !char.IsLetter(e.KeyChar) && | |
(e.KeyChar != '.')) | |
{ | |
e.Handled = true; | |
} | |
// only allow one decimal point | |
if ((e.KeyChar == '.') && ((sender as TextBox).Text.IndexOf('.') > -1)) |
This file contains 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
if(MessageBox.Show("Are you sure?", "Yes", MessageBoxButtons.YesNo) == DialogResult.Yes) | |
{ | |
//code here... | |
} | |
else | |
{ | |
//code here... | |
} |
This file contains 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
let date = NSDate() // Today's date. | |
let dateFormatter = NSDateFormatter() // Creating a dateFormatter object for making readable date | |
var array = [String]() // Store the today's date and last 7 date. | |
let secondInADay: NSTimeInterval = 24 * 60 * 60 // A day NSTimeInterval | |
let timeInterval = date.timeIntervalSince1970 // Today's NSTimeInteval | |
dateFormatter.dateFormat = "EE-yyyyMMdd" // Making a dateFormat | |
dateFormatter.locale = NSLocale(localeIdentifier:"us") // | |
array.append(dateFormatter.stringFromDate(date)) // Adding today's date in to the array |
This file contains 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
let urlString: String = "http://example.com" | |
var url: NSURL = NSURL(string: urlString)! | |
var data = NSData() | |
var request = NSMutableURLRequest(URL: url, cachePolicy: .UseProtocolCachePolicy, timeoutInterval: 60) | |
request.HTTPMethod = "GET" | |
var response: AutoreleasingUnsafeMutablePointer<NSURLResponse?> = nil | |
var error: NSErrorPointer = nil | |
This file contains 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
#import <Foundation/Foundation.h> | |
#if DEBUG == 0 | |
#define DebugLog(...) | |
#elif DEBUG == 1 | |
#define DebugLog(...) NSLog(__VA_ARGS__) | |
#endif | |
int main() | |
{ |
This file contains 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
git log --graph --full-history --all --color \ | |
--pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s" | |
#Example Output: | |
* 3876a55 (origin/master, origin/HEAD, master) Merge branch 'master' of https://github.com/ArslanBilal/Instagram-Client | |
|\ | |
| * 7d677fa Merge pull request #1 from ArslanBilal/develop | |
| |\ | |
* | | d799dbc (HEAD, origin/develop, develop) Update README.md for new "Infinite scroll through paginated set of results" feature | |
* | | 88ac929 Infinite scroll through paginated set of results is added |
This file contains 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
#!/bin/sh | |
echo downloading pdf.. | |
wget www.pdf995.com/samples/pdf.pdf | |
echo pdf downloaded. | |
echo changing the name from pdf.pdf to new-name.pdf.. | |
mv pdf.pdf new-name.pdf |
OlderNewer