Skip to content

Instantly share code, notes, and snippets.

View zzz6519003's full-sized avatar
🏀
Trying to Find a Team

Sam Snowman(赵正中) zzz6519003

🏀
Trying to Find a Team
View GitHub Profile
@zzz6519003
zzz6519003 / test
Created September 3, 2017 05:25
Why gist?
i;m wondering
@zzz6519003
zzz6519003 / 2015-react-rally.md
Created February 25, 2016 14:01 — forked from LoganBarnett/2015-react-rally.md
Notes from the 2015 React Rally conference.
testtest
- (BOOL)isMobileNumber:(NSString *)mobileNum
{
/**
* 手机号码
* 移动:134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188
* 联通:130,131,132,152,155,156,185,186
* 电信:133,1349,153,180,189
*/
NSString * MOBILE = @"^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$";
/**
@zzz6519003
zzz6519003 / gist:5080315
Created March 4, 2013 06:16
This is just a gist to see if it counts
This is just a gist to see if it counts
@zzz6519003
zzz6519003 / anagram.cljs
Created November 29, 2015 14:19 — forked from chenglou/anagram.cljs
ClojureScript anagram implementation
; (group-by f list): call f on each item in list. The return value becomes a key
; of the resulting map, whose keys map to the list of items for which f returned
; that key.
; (vals map): returns a list of the values of the map.
(defn anagram [words] (vals (group-by sort words)))
(= (anagram ["star" "rats" "car" "arc" "stars"])
[["star" "rats"] ["car" "arc"] ["stars"]]) ; true
what the hell
/* though it's not written by me.......*/
/*
http://www.snakedj.ch/2010/09/13/swi-prolog-sudoku-solver/
*/
:- use_module(library(clpfd)).
sudoku([A1,A2,A3, A4,A5,A6, A7,A8,A9,
B1,B2,B3, B4,B5,B6, B7,B8,B9,
C1,C2,C3, C4,C5,C6, C7,C8,C9,

| No | Sadly | There is none |

| Except this, which is a poor alternative |

| There really | should be one |

@zzz6519003
zzz6519003 / gist:e4e1d613ac3978f3b81a
Created August 28, 2014 14:46
mac app Start at login
-(void) addAppAsLoginItem {
NSString * appPath = [[NSBundle mainBundle] bundlePath];
// This will retrieve the path for the application
// For example, /Applications/test.app
CFURLRef url = (__bridge CFURLRef)[NSURL fileURLWithPath:appPath];
// Create a reference to the shared file list.
// We are adding it to the current user only.
// If we want to add it all users, use