Skip to content

Instantly share code, notes, and snippets.

🍣
Eating

杨萧玉 yulingtianxia

View GitHub Profile
View Music_genre_classification.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yulingtianxia
yulingtianxia / ConvertInvocationArguments.m
Created Oct 27, 2017
Convert NSInvocation and NSArray containing arguments. Under Developing!
View ConvertInvocationArguments.m
NSString *MTExtractStructName(NSString *typeEncodeString)
{
NSArray *array = [typeEncodeString componentsSeparatedByString:@"="];
NSString *typeString = array[0];
int firstValidIndex = 0;
for (int i = 0; i< typeString.length; i++) {
char c = [typeString characterAtIndex:i];
if (c == '{' || c=='_') {
firstValidIndex++;
}else {
View LRUCache.swift
class CacheGenerator<T:Hashable> : IteratorProtocol {
typealias Element = T
var counter: Int
let array:[T]
init(keys:[T]) {
counter = 0
array = keys
@yulingtianxia
yulingtianxia / pptp.sh
Last active Aug 29, 2015
VPN pptp 脚本
View pptp.sh
#!/bin/sh
if [ `id -u` -ne 0 ]
then
echo "please run it by root"
exit 0
fi
apt-get -y update
apt-get -y install pptpd || {
@yulingtianxia
yulingtianxia / Credit.h
Last active Aug 29, 2015
一个可以显示数字的类,可以根据数字大小自动控制字号,并在数字变化时建立插值,产生指数渐变效果
View Credit.h
#import <UIKit/UIKit.h>
@interface Credit : UILabel
-(void)autochangeFontsize:(double) number;
-(void)changeFromNumber:(double) originalnumber toNumber:(double) newnumber withAnimationTime:(NSTimeInterval)timeSpan;
@end
@yulingtianxia
yulingtianxia / Graph.h
Last active Aug 29, 2015
用DFS算法计算SpriteKit中复合体的构成
View Graph.h
//
// Graph.h
// ColorAtom
//
// Created by 杨萧玉 on 14-4-21.
// Copyright (c) 2014年 杨萧玉. All rights reserved.
//
#import <Foundation/Foundation.h>
@import SpriteKit;
You can’t perform that action at this time.