This file contains hidden or 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
#include "ClangSACheckers.h" | |
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h" | |
#include "clang/StaticAnalyzer/Core/Checker.h" | |
#include "clang/StaticAnalyzer/Core/CheckerManager.h" | |
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" | |
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h" | |
#include "clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h" | |
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" | |
#include <cstdio> | |
#include <iostream> |
This file contains hidden or 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
// 电话号码问题 | |
// 商业单位需要容易记忆的电话号码,有一些方法可以让电话号码变得更容易记忆。譬如,可以把电话号码写成单词或短语,如 MON-GLOP | |
// 可以代表滑铁卢大学的电话。有时仅仅是把号码的一部分写成单词,如打 310-GINO 便可向 GINO | |
// 比萨饼店定购比萨。另一种让电话号码容易记忆的方法是将数字用一种容易记的方式组合起来,譬如 3-10-10-10 也可以代表 GINO | |
// 比萨饼店。 | |
// 电话号码的标准形式是七位十进制数字,在它的第三位和第四位之间用连字符连接(例如:666-1200)。电话的键盘提供了字符与数字之间的映 | |
// 射关系,如下所示: | |
// 2 A、B和C 3 D、E和F 4 G、H和I 5 J、K和L 6 M、N和O 7 P、R和S 8 T、U和V 9 |
This file contains hidden or 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
// 魔方是一种常见的玩具。2010年7月,美国加利福尼亚州科学家利用计算机证明任意组合的魔方均可以在20步之内还原。作为一个入门级的程序员 | |
// ,我们决定先写一个验证魔方是否复原的程序。对于魔方的一个操作,我们用一个字母来表示。将魔方的一个面正对玩家,就有了前后上下左右六个面, | |
// 分别用F(Front),B(Back),U(Up),D(Down):,L(Left),R(Right)来表示将这个面顺时针旋转90度, | |
// 具体玩魔方的时候将右手覆盖到对应的面上,这六个操作时右手的旋转方向都是相同的。同时用X,Y, Z,表示顺时针旋转中间一层,分别对应U, | |
// R,F。具体情况可以参照下图。与这九个操作对应的还有f,b,u,d,l,r,x,y,z,表示逆时针旋转。 | |
// http://i.imgur.com/hggwjka.png | |
// 现在我们给出一个操作序列,问在这么旋转之后,魔方是否和原来的时候完全一样。比如UXd被认为是不一样。 | |
// 输入为一个长度不超过200的字符串,仅包含之上定义的18个字母。 如果能复原,输出Yes,否则输出No。 |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>The End of the Internet.</title> | |
<meta name="description" content="The End of the Internet."> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
::selection { background: #3399FF; color: #fff; text-shadow: none; } | |
body{ |
This file contains hidden or 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
// Portrait | |
// iPad = 768*264 (303) | |
// iPhone 4s = 320*216 (253) | |
// iPhone 5s = 320*216 (253) | |
// iPhone 6 = 375*216 (258) | |
// iPhone 6 Plus = 414*226 (271) | |
// Landscape | |
// iPad = 1024*352 (391) | |
// iPhone 4s = 480*162 (193) |
This file contains hidden or 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
# BEGIN GZIP | |
# http://httpd.apache.org/docs/2.2/mod/mod_deflate.html | |
<IfModule mod_deflate.c> | |
# Enabling Compression | |
SetOutputFilter DEFLATE | |
# Insert filters | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css |
This file contains hidden or 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
// | |
// DLMultiSelectionControl.h | |
// DLMultiSelectionControl | |
// | |
// Created by Darcy Liu on 8/31/14. | |
// Copyright (c) 2014 Close To U. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
This file contains hidden or 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
export PATH="/Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode6-Beta.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift hello.swift | |
clang world.c -oworld |
This file contains hidden or 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
CGContextRef context = UIGraphicsGetCurrentContext(); | |
// // Flip the coordinate system | |
// CGContextSetTextMatrix(context, CGAffineTransformIdentity); | |
// CGContextTranslateCTM(context, 0, self.bounds.size.height); | |
// CGContextScaleCTM(context, 1.0, -1.0); | |
UIFont *customFont = [UIFont systemFontOfSize:20]; | |
CTFontRef font = CTFontCreateWithName((CFStringRef)customFont.fontName, 20, NULL); |
This file contains hidden or 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
CGContextRef context = UIGraphicsGetCurrentContext(); | |
// Flip the coordinate system | |
CGContextSetTextMatrix(context, CGAffineTransformIdentity); | |
CGContextTranslateCTM(context, 0, self.bounds.size.height); | |
CGContextScaleCTM(context, 1.0, -1.0); | |
NSDictionary *attrs = @{NSFontAttributeName: [UIFont systemFontOfSize:20], | |
NSForegroundColorAttributeName: [UIColor blueColor], | |
NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle), |