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
// | |
// LORichTextLabel.m | |
// RichTextLabel | |
// | |
// Created by Locassa on 19/06/2011. | |
// Copyright 2011 Locassa Ltd. All rights reserved. | |
// | |
#import "LORichTextLabel.h" | |
#import "UIView+Layout.h" |
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
fact(i) | |
{ | |
int f = 1; | |
for(j=1;j<=i;j++) | |
f *= j; | |
return f; | |
} |
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
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view, typically from a nib. | |
int arr[10] = {3, 9, 15, 3, 9, 6, 6, 3, 15, 5}; | |
PrintSpecialAverage(arr, sizeof(arr) / sizeof(arr[0])); | |
} | |
void PrintSpecialAverage(int arr[], int arrlen) | |
{ |
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
fact(i) | |
{ | |
return i*fact(i-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
fact(i) | |
{ | |
if(i > 1) | |
return i*fact(i-1); | |
else | |
return 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
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
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
txtblk='\e[0;30m' # Black - Regular | |
txtred='\e[0;31m' # Red | |
txtgrn='\e[0;32m' # Green | |
txtylw='\e[0;33m' # Yellow | |
txtblu='\e[0;34m' # Blue | |
txtpur='\e[0;35m' # Purple | |
txtcyn='\e[0;36m' # Cyan | |
txtwht='\e[0;37m' # White | |
bldblk='\e[1;30m' # Black - Bold | |
bldred='\e[1;31m' # Red |
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
- (void)viewDidAppear:(BOOL)animated | |
{ | |
[super viewDidAppear:animated]; | |
if (!self.tabBarIsShowing) { | |
self.tabBar.hidden = YES; | |
} | |
} |
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
// paperlesspost.com/api/v100/event?id=3948 | |
//{ | |
// id: 3948, | |
// eventName: "The Party For the LOLZ", | |
// hostName: "datFoolCuzzo" | |
// | |
//} | |
protocol JSONDecodable { | |
static func decode(json: JSON) -> Self? |
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
//adding without currying | |
func add(a: Int, b:Int) -> Int { | |
return a + b | |
} | |
//when we use the swift curry form this is what is happening behind the scenes | |
func addCurry(a: Int) -> (Int -> Int) { |