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
// | |
// RoundedRectLabel.h | |
// | |
#import <UIKit/UIKit.h> | |
@interface CountLabel : UILabel { | |
NSInteger cornerRadius; | |
UIColor *rectColor; | |
} |
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
1. Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp | |
2. Code: The Hidden Language of Computer Hardware and Software | |
3. An introduction to algorithms | |
4. Artificial Intelligence: a modern approach | |
5. ON LISP | |
6. ANSI COMMON LISP | |
7. LISP IN SMALL PIECES | |
8. THE LITTLE LISPER | |
9. THE SEASONED SCHEMER |
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
;; capitalize | |
M-c | |
M-- M-c | |
;; Upper case | |
M-u | |
M-- M-u | |
;; lower case | |
M-l | |
M-- M-l |
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
;; quit message | |
(fset 'yes-or-no-p 'y-or-n-p) | |
;;把缺省的 major mode 设置为 text-mode, 而不是几乎什么功能也 | |
;;没有的 fundamental-mode. | |
(setq default-major-mode 'text-mode) | |
(setq initial-major-mode 'text-mode) | |
;;光标靠近鼠标指针时,让鼠标指针自动让开,别挡住视线。 | |
(mouse-avoidance-mode 'animate) | |
;;显示列号 | |
(setq column-number-mode t) |
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
#!/usr/bin/env perl | |
use 5.010; | |
use open qw(:locale); | |
use strict; | |
use utf8; | |
use warnings qw(all); | |
use Mojo::UserAgent; | |
# FIFO queue |
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> | |
#import <objc/runtime.h> | |
#import "typestring.h" | |
// clang -g -fobjc-arc -Wall -framework Foundation -o runtime typestring.m runtime.m | |
// Runtime reference, at least until Apple breaks the link | |
// http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html |
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 | |
#ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2 | |
ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3 | |
PLIST_BUDDY=/usr/libexec/PlistBuddy | |
function add_compatibility() { | |
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \ | |
"$1/Contents/Info.plist" |
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
// | |
// Swift-KVO | |
// | |
// Created by Jim Correia on 6/5/14. | |
// Copyright (c) 2014-2015 Jim Correia. All rights reserved. | |
// | |
// Update: 6/17/2014 | |
// | |
// KVOContext has gone away; use the same idiom you'd use from Objective-C for the context | |
// |
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
//In your UIViewController (containing the UICollectionView). | |
//In @interface | |
@property (nonatomic, strong) MyCollectionViewCellSubclass *prototypeCell; | |
//In viewDidLoad | |
//Register your subclassed cell, and load your prototype cell. | |
UINib *cellNib = [UINib nibWithNibName:@"MyCollectionViewCellSubclass" bundle:nil]; | |
[collectionView registerNib:cellNib forCellWithReuseIdentifier:@"MyCollectionViewCellSubclassID"]; | |
self.prototypeCell = [cellNib instantiateWithOwner:nil options:nil][0]; | |
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
// | |
// main.swift | |
// mutablecomposition | |
// | |
// Created by Kevin Meaney on 24/08/2015. | |
// Copyright (c) 2015 Kevin Meaney. All rights reserved. | |
// | |
import Foundation |
OlderNewer