slidenumber: true autoscale: true
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 CoreGraphics | |
import Accelerate | |
import CoreImage | |
import UIKit | |
extension CGImage { | |
public enum Error: Swift.Error { | |
case imageResizingFailed | |
case cgContextCreationFailed |
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 ruby -w | |
class String | |
def starts_with?(prefix) | |
prefix.respond_to?(:to_str) && self[0, prefix.length] == prefix | |
end | |
end | |
HEADER_REGEX = /^#import\s+["<](.*)[">]/ |
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
var githubList = [ | |
{ | |
name:'系统基础库', | |
list: [ | |
{name:'Category/Util', | |
list: [ | |
{name:'sstoolkit', owner:'soffes', desc:'一套Category类型的库,附带很多自定义控件 功能不错~'}, | |
{name:'BlocksKit', owner:'pandamonia', desc:'将Block风格带入UIKit和Founcation'}, | |
{name:'cocoa-helpers', owner:'enormego', desc:'一些Cocoa的扩展 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
from Crypto.Cipher import AES | |
from StringIO import StringIO | |
from bplist import BPlistReader #https://github.com/farcaller/bplist-python | |
import M2Crypto | |
import gzip | |
import struct | |
def xor_strings(s, key): | |
res = "" | |
for i in xrange(len(s)): |
The point is, the roundCorner is draw by a subview of UITableViewCell
, and mean while, it's not a public class, there is no way you can get layer.cornerRadius
from any view. So we need to resolve this problem by ourselves.
There are 2 cases.
-
There is only one cell.
This case is ease, just use
cell.contentView.layer.cornerRadius
andcell.contentView.layer.masksToBounds
to make it work. -
There are more than one cell.
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
// From: http://www.bdunagan.com/2009/11/28/iphone-tip-no-nshost/ | |
// MIT license | |
// Remember to add CFNetwork.framework to your project using Add=>Existing Frameworks. | |
#import "BDHost.h" | |
#import <CFNetwork/CFNetwork.h> | |
#import <netinet/in.h> | |
#import <netdb.h> | |
#import <ifaddrs.h> |