Skip to content

Instantly share code, notes, and snippets.

Avatar

Tang Qiao tangqiaoboy

View GitHub Profile
View iOS 技能图谱.md

编程语言

  • Swift
  • Objective-C
  • C++/C
  • JavaScript

操作系统

  • Mac OSX
  • iOS
@tangqiaoboy
tangqiaoboy / 0_reuse_code.js
Created May 28, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tangqiaoboy
tangqiaoboy / UIView+frameAdjust.h
Last active Mar 25, 2020
Adjust UIView frame category
View UIView+frameAdjust.h
//
// UIView+frameAdjust.h
// fenbi
//
// Created by Tang Qiao on 12-5-31.
// Copyright (c) 2012年 Fenbi.com . All rights reserved.
//
#import <Foundation/Foundation.h>
View Transition.m
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext
{
UIView *container = transitionContext.containerView;
UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
UIView *fromView = fromVC.view;
UIView *toView = toVC.view;
CGRect beginFrame = CGRectMake(UI_SCREEN_WIDTH, 0, UI_SCREEN_WIDTH, UI_SCREEN_HEIGHT);
@tangqiaoboy
tangqiaoboy / javascript.js
Created Aug 23, 2012
编程计算,由1、2、3、4、5、6六个数码中的五个不同数码组成五位数,把所有组成的五位数按由小到大排序输出。
View javascript.js
var flag = [];
var ans = [];
function solve(idx) {
if (idx == 5) {
console.log(ans.join(''));
return;
}
for (var i = 1; i <= 6; ++i) {
if (!flag[i]) {
flag[i] = true;
@tangqiaoboy
tangqiaoboy / git-svn-diff.sh
Created Feb 14, 2012 — forked from MikePearce/git-svn-diff.sh
生成git-svn下svn兼容的diff文件
View git-svn-diff.sh
#!/bin/bash
# Get the tracking branch (if we're on a branch)
TRACKING_BRANCH=`git svn info | grep URL `
# If the tracking branch has 'URL' at the beginning, then the sed wasn't successful and
# we'll fall back to the svn-remote config option
if [[ "$TRACKING_BRANCH" =~ URL.* ]]
then
@tangqiaoboy
tangqiaoboy / gist:1519172
Created Dec 25, 2011
objective c test code
View gist:1519172
+ (ImageCache *) sharedInstance {
if (instance == nil) {
@synchronized(self) {
if (instance == nil) {
instance = [[ImageCache alloc] init];
}
}
}
return instance;
}