From d5933c459ba6625373a9a5c418146f94146878b4 Mon Sep 17 00:00:00 2001 From: AceVest Date: Wed, 1 Mar 2017 23:49:28 +0800 Subject: [PATCH] ... --- .gitignore | 1 + .../Basics.xcplaygroundpage/Contents.swift | 124 +++++++++++++++++- .../UserInterfaceState.xcuserstate | Bin 18967 -> 18964 bytes .../UserInterfaceState.xcuserstate | Bin 15044 -> 15257 bytes learn/cc/string.cc | 34 +++++ learn/doc/mac_bash_profile | 3 +- learn/doc/vimrc | 8 +- learn/python/dictionary.py | 15 ++- learn/python/list.py | 24 +++- learn/python/set.py | 6 + learn/python/utils.py | 15 ++- tools/comm/htc.c | 4 +- 12 files changed, 214 insertions(+), 20 deletions(-) create mode 100644 learn/cc/string.cc diff --git a/.gitignore b/.gitignore index 687f5a3..9d63951 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ ish *.swp *.ef *.conf +*.diff dvwa diff --git a/learn/AcePlay/AcePlay.playground/Pages/Basics.xcplaygroundpage/Contents.swift b/learn/AcePlay/AcePlay.playground/Pages/Basics.xcplaygroundpage/Contents.swift index 1f82280..4890fa0 100644 --- a/learn/AcePlay/AcePlay.playground/Pages/Basics.xcplaygroundpage/Contents.swift +++ b/learn/AcePlay/AcePlay.playground/Pages/Basics.xcplaygroundpage/Contents.swift @@ -2,18 +2,134 @@ import UIKit -let str = "Hello, playground.小狗:🐶 锤子:🔨" +// String values can be constructed by passing an array of Character values +let catCharacters: [Character] = ["C", "a", "t", " ", "猫"] +let catString = String(catCharacters) +print(catString) + +// Character 加到String的方法 +var welcome = "Hello World" +let exclamationMark: Character = "!" +welcome.append(exclamationMark) +print(welcome) + +// ############# Type Alias ################ +typealias AudioSample = UInt + +let maxAmplitudeFound = AudioSample.max + + +// ############# Tuple ################ +let http404Error = (404, "Page Not Found") +let (httpRetCode, _) = http404Error +print("Http RetCode \(httpRetCode) Error Message \(http404Error.1)") + +let httpStatus = (statusCode: 200, description: "OK") +print("Http RetCode \(httpStatus.statusCode) Message \(httpStatus.description)") + + +// ############# Optionals ################ +let possibleNumber = "123" +let convertNumber : Int? = Int(possibleNumber) // of type Int? + +if convertNumber != nil { + print("ConvertNumber is \(convertNumber)") + print("ConvertNumber is \(convertNumber!)") +} else { + print("ConvertNumber is nil") +} + +// ############# Optionals Binding ################ +if let actualNumber = Int(possibleNumber) { + print("\"\(possibleNumber)\" has an integer of \(actualNumber)") +} else { + print("\"\(possibleNumber)\" could not to be converted to an integer") +} + +if let firstNumber = Int("4"), let secondNumber = Int("42"), firstNumber < secondNumber && secondNumber < 100 { + print("\(firstNumber) < \(secondNumber) < 100") +} + +// ############# Implicitly Unwrapped Optionals ################ +let possibleString: String? = "An Optional String" +let forcedString: String = possibleString! + +let assumedString: String! = "An Implicitly Unwrapped Optional String" +let implicitString: String = assumedString + +print("\(possibleString!) \(forcedString) \(assumedString) \(implicitString)") + +// ############# Nil-Coalescing Operator ################ +let defaultColorName = "yellow" +var userDefinedColorName: String? +// 等价于 userDefinedColorName == nil ? defaultColorName : userDefinedColorName +var colorNameToUse = userDefinedColorName ?? defaultColorName +print(colorNameToUse) + +userDefinedColorName = "red" +colorNameToUse = userDefinedColorName ?? defaultColorName +print(colorNameToUse) +// ############# Nil-Coalescing Operator ################ +for index in 1...5 { + print("Closed Range Operator \(index) of [1,5]") +} + +for index in 0..<5 { + print("Half-Open Range Operator \(index) of [0,5)") +} + +var word = "cafe" +print("the number of characters of \(word) is \(word.characters.count)"); +word += "\u{301}" +print("the number of characters of \(word) is \(word.characters.count)"); + + +let str = "Hello, playground.小狗:🐶 锤子:🔨" // Index -let strInx:String.Index = str.startIndex +var strInx:String.Index = str.startIndex str.index(after: strInx) -print(strInx) +print(str[strInx]) +for strInx in str.characters.indices { + print("\(str[strInx])", terminator: "") +} +print() +// utf8 编码格式 +for c in str.utf8 { + print(c, terminator: "-") +} +print() + +// unicode +for c in str.unicodeScalars { + print("\(c)\t\(c.value)") +} + +welcome.insert("~", at: welcome.endIndex) +print(welcome) +// contentsOf 是一个 Collection 所以要加 .characters +welcome.insert(contentsOf: " Hello Swift".characters, at: welcome.index(before: welcome.endIndex)) +print(welcome) + +welcome.remove(at: welcome.index(before: welcome.endIndex)) +print(welcome) + +let range = welcome.index(welcome.endIndex, offsetBy: -12).. = [ "Apple", "Google", "Facebook", "Tencent" ] print(company[0], company[1], company[2], company[3], separator: "#", terminator: " $$$$$\n") @@ -101,4 +217,4 @@ for value in DictD.values.sorted() { } let keys = [Int](DictD.keys) -print(keys) +print(keys) \ No newline at end of file diff --git a/learn/AcePlay/AcePlay.playground/playground.xcworkspace/xcuserdata/Ace.xcuserdatad/UserInterfaceState.xcuserstate b/learn/AcePlay/AcePlay.playground/playground.xcworkspace/xcuserdata/Ace.xcuserdatad/UserInterfaceState.xcuserstate index dde461ff1d914a43b20e7ded157907d50ca6841a..a208718ee0cd558cb5f6d0c14f210a5583fb4d80 100644 GIT binary patch literal 18964 zcmd5k30zdw-sjwfO_s|HFf$AT2r`2Rvv0r*iUOv&C5pIC1B^Hd49*NHl69`8W?5#I zsbwnenroJ2YMQ0ymP=}ynVQwJ#nQ~R>^pZZ!=h=v>b>{DPiF4D=lu8W{Li_TR984X zUbXrY0099=Kmi&A(4W#Lirb8GxIIo+RdE|v$#6%h*VDg^-Ca7&iEsC5<8@UF0Gu>` zO(c991cD$S1W_OwC_pM`3(`P4kPb3{5~zRF@yWbZ^2FQUAP%;gWKWza3|aY_rl}wQ+NWNgrC80 z;J@Gn_$~YnUW8ZRFYqQo5F|knG!a0A6A=VM2nh)hOC%Dl2|1x8RD_x^6PZL7kwfGW zU5H1B-b5iWkQhV^CCZ6mgp;Tx#u9bJW5hV(apDPLA~A`WN<2%vOw1x?6LW}Hhy}z_ zVimEP*g(8ZyhD6U93&1AhlwM^C&W?W7;&8Vl=zJJf;dNfMf{8Sj<`fzBYr0V3CUnG zglt6$$tW_Kj3JZAWU>vJLdr=UX(G*}g|w2nWJj`q>`XpPb|ZU{kC1)IB60vZkhGDH zl4YcWbdojXC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pS--XZoDH(c?11dx?2zo}Y;m?UJ1#phyGM5KY;$&A Zc1iZAY@6@KGav}=oj%CD`~PR#{~u#}7vTT^ diff --git a/learn/AppleSwift/AppleSwift.xcodeproj/project.xcworkspace/xcuserdata/Ace.xcuserdatad/UserInterfaceState.xcuserstate b/learn/AppleSwift/AppleSwift.xcodeproj/project.xcworkspace/xcuserdata/Ace.xcuserdatad/UserInterfaceState.xcuserstate index bb26f9734b72b24ab42034dd4560642fa9ed7102..5079663a0e3f7fff8127c4e2fbe7669eb2b4868c 100644 GIT binary patch delta 8231 zcmaJ_2Yl1T+rQ`T((E=(n$@OB+B8kl29lJr5hxoAWfYJN9idc8TRW&w`{sUZ6ch|Y zHf`AgB8Y%2Q8ri+5gCH$UquiFM4X84rKJqt|L5(mpZt=$=bn4U_ZfGG$`@D6?F1F` zI=2iAM%WI;AO59JU52Ge0S%z=5Z02ad% zSOwLv1~$MJ*aq*yd+8c0Dd1I#2?@f@gZD?KgOr= zC-?%sjIZFY1NcAqI=+E_!oT2q_*eWF0fI>wkrM@pA_ih4c9KXO#7SHvi6j#@X+>I- zHl!`-OuCaEq!;N;Mv>7Zi)51=l1uz#49O$o$P1)|RFD8+L?DyN6!Hq0P3DkS$?Iex zSw@zV6=W@0N7j?T2C|X7MRt;1WH)(_93#ic338I0A|H{@$T{*kIZv*TFUdFLCi#*4 zL~fDa$nWGn1&S%5a;l(8s-aO-OI>Aq0MM2ZBARzjx>#SqMd0v z9Y_b!=jdQMgbt;{sGp8$NAu`dT0%={87-#)%BVo6(OGmcT|$@AWpp{MrmN{1x|VLF zTj@J=2i-^a(*yK$YfCrOJlC>cL{}v)K*n)Yo#xxmDg=;nbJBK zCJJg|n2E)*B$mkru^5)cvY9LRktoKh>e;1h=GdZ&jI0Uyd0AyeCByi@fUN9ZS=s)A zQK}}vt7>BqhrQZ-1Rw93o6jlIO8i+WBpo_FE5ER5X+{2+vQLo|$&eh4LRl!W8jWV= zYLv|^e2ZQxqZf@q`86mHjb&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GFalxn{U#yXLwUxE8sVx|X{(xVE^qy1sGkbnSOlx(>UJx{kU2a@*V~ z?%wWnceZ_q!|IhutUKr`_k=7u}cL z*WI_=kKM0g`LUs~qFA3aRvoL0jf{T!5tJoP+{Jxx7Ho>rc=o(`Ulp03fJKAucZj%S2ttjFj1 f*fZWU(c|~b^DOWz^4#(~^ZZ+r_(wI4g8csj4;BN@ diff --git a/learn/cc/string.cc b/learn/cc/string.cc new file mode 100644 index 0000000..293e22a --- /dev/null +++ b/learn/cc/string.cc @@ -0,0 +1,34 @@ +/* + * ------------------------------------------------------------------------ + * File Name: string.cc + * Author: Zhao Yanbai + * 2017-01-02 12:04:22 Monday CST + * Description: none + * ------------------------------------------------------------------------ + */ +#include +#include +using namespace std; + +int main(int argc, char *argv[]) { + + string s = "Hello World!!\n"; + decltype(s.size()) punct_cnt = 0; + + for(auto c : s) { + cout << c; + if(ispunct(c)) { + punct_cnt++; + } + } + + cout << punct_cnt << " punctuation characters in " << s; + + for(auto &c : s) { + c = toupper(c); + } + + cout << s; + + return 0; +} diff --git a/learn/doc/mac_bash_profile b/learn/doc/mac_bash_profile index 591b4fb..995e648 100644 --- a/learn/doc/mac_bash_profile +++ b/learn/doc/mac_bash_profile @@ -2,8 +2,8 @@ #HISTCONTROL=ignorespace # 命令前加空格避免记入历史 HISTCONTROL=ignoreboth -export PATH=/usr/local/sbin:$PATH #export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH" +export PATH=/usr/local/sbin:$PATH export PATH=/Users/Ace/.local/bin:$PATH export GOBIN=/Users/Ace/.local/bin export PATH=/Users/Ace/workspace/github/metasploit-framework:$PATH @@ -18,3 +18,4 @@ alias cls='clear' alias grep='grep --color' alias egrep='egrep --color' alias msf='msfconsole' +alias cdw='cd ~/workspace/' diff --git a/learn/doc/vimrc b/learn/doc/vimrc index 851a41e..cf110be 100644 --- a/learn/doc/vimrc +++ b/learn/doc/vimrc @@ -95,10 +95,10 @@ set nobomb " "为不同的文件类型设置不同的空格数替换TAB -"autocmd FileType php,python,c,java,perl,shell,bash,vim,ruby,cpp set ai -"autocmd FileType php,python,c,java,perl,shell,bash,vim,ruby,cpp set sw=4 -"autocmd FileType php,python,c,java,perl,shell,bash,vim,ruby,cpp set ts=4 -"autocmd FileType php,python,c,java,perl,shell,bash,vim,ruby,cpp set sts=4 +autocmd FileType php,python,h,c,java,perl,shell,bash,vim,ruby,cc,cpp set ai +autocmd FileType php,python,h,c,java,perl,shell,bash,vim,ruby,cc,cpp set sw=4 +autocmd FileType php,python,h,c,java,perl,shell,bash,vim,ruby,cc,cpp set ts=4 +autocmd FileType php,python,h,c,java,perl,shell,bash,vim,ruby,cc,cpp set sts=4 "golang默认使用TAB "autocmd FileType go set ai diff --git a/learn/python/dictionary.py b/learn/python/dictionary.py index 64259a7..68ff7cc 100755 --- a/learn/python/dictionary.py +++ b/learn/python/dictionary.py @@ -29,6 +29,9 @@ print D for name, value in D.items() : print "{0:10} : {1:10d}".format(name, value) +D = {x:x**2 for x in range(10)} +print(D) + D = dict(a=1, b=2, c=3) print D @@ -38,17 +41,21 @@ file_sz = {name : os.path.getsize(name) for name in os.listdir(".")} for item in file_sz.items() : print "{1}:\t{0}".format(item[0], item[1]) - - - x = dict() for i in range(0, 10) : x[i] = x.get(i, i) for i in sorted(x.keys()) : - print x[i] + print x[i], +print("") +# Another Make Empty Dictionary Method +x = { } +for i in range(0, 10) : + x[i] = x.get(i, i) +for i in sorted(x.keys()) : + print x[i], diff --git a/learn/python/list.py b/learn/python/list.py index 856c021..6354dd5 100755 --- a/learn/python/list.py +++ b/learn/python/list.py @@ -111,12 +111,34 @@ for k, v in reversed(zip(a, b)): for x in range(len(a)) : print x, +else : + print("") a += b print a +questions = ['name', 'quest', 'favorite color'] +answers = ['lancelot', 'the holy grail', 'blue'] +for q, a in zip(questions, answers): + print('What is your {0}? It is {1}.'.format(q, a)) + # 按下标循环 print L for i, v in enumerate(L) : - print i, v + print("[{0},{1}]".format(i, v)), +else : + print("") + + +# list 只适合快速后入后出,可以很方便地利用append 和 pop实现栈的功能 +# 要实现前出后入的队列功能就很慢,此时比较适合deque,用append 和 popleft实现 +from collections import deque + +queue = deque(['Apple', 'Microsoft', 'Google']) +queue.append('Tencent') +queue.append('Baidu') +queue.append('Alibaba') +queue.popleft() +print queue + diff --git a/learn/python/set.py b/learn/python/set.py index 43771fc..d5c7322 100755 --- a/learn/python/set.py +++ b/learn/python/set.py @@ -24,3 +24,9 @@ print "a&b: ", a&b print "a^b: ", a^b +Set = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} +print(Set) + + +#Empty Set +EmptySet = set() # not { } diff --git a/learn/python/utils.py b/learn/python/utils.py index 9dd28ab..175e0d6 100755 --- a/learn/python/utils.py +++ b/learn/python/utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------ # File Name: utils.py @@ -16,6 +16,13 @@ print('OLDPWD:\t' + os.getenv('OLDPWD')) #判断一个对象是否可以迭代 -print isinstance('0xACE', collections.Iterable) -print isinstance([1, 2, 3, 4], collections.Iterable) -print isinstance(0xACE, collections.Iterable) +print(isinstance('0xACE', collections.Iterable)) +print(isinstance([1, 2, 3, 4], collections.Iterable)) +print(isinstance(0xACE, collections.Iterable)) + + +s = u'这是一个中文字符串' + +print('{!a}'.format(s)) # !a apply ascii() +print('{!s}'.format(s)) # !s apply str() +print('{!s}'.format(s)) # !r apply repr() diff --git a/tools/comm/htc.c b/tools/comm/htc.c index 7b4b549..b5be73b 100644 --- a/tools/comm/htc.c +++ b/tools/comm/htc.c @@ -20,9 +20,9 @@ #include int main() { - char ch; + unsigned int ch; while(scanf("%x",&ch) != EOF) - printf("%c",ch); + printf("%c",(unsigned char)ch); return 0; } -- 2.44.0