├── .gitattributes
├── .gitignore
├── .idea
├── demos.iml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── 3dBomb
├── 3dBomb.html
├── img
│ └── zoro.jpg
└── js
│ └── bomb.js
├── DOM
└── index.html
├── README.md
├── audioVisualizer
├── index.html
└── js
│ ├── loader.js
│ └── main.js
├── contacts
├── contacts.css
├── contacts.html
├── icon.jpg
├── jquery.qrcode.min.js
└── zoro.jpg
├── fakeZhihu
├── 0001.html
├── 0002.html
├── 0003.html
├── README.md
├── collections.html
├── css
│ ├── header.css
│ ├── index.css
│ ├── login.css
│ └── navigator.css
├── draft.html
├── img
│ ├── 002.gif
│ ├── favicon.ico
│ ├── icons@2x_a9b07ecead.58bad5a6.png
│ ├── new_logo.ede2316d.png
│ ├── new_logo@2x.9187366b.png
│ ├── pictest.png
│ ├── pictest001.png
│ ├── sprites-1.9.2.4c54885a-old.png
│ ├── sprites-1.9.2.4c54885a.png
│ ├── sprites@2x.auto.1cc5b15c.png
│ ├── sprites@2x.auto.40df1bd9.png
│ └── user_001.jpg
├── index.html
├── js
│ └── main.js
├── login.html
├── topics.html
└── user.html
├── hashtabel
├── book.txt
├── index.html
├── keywords.txt
└── search.js
├── heal
├── heal.css
├── heal.html
└── lib
│ ├── cubes.js
│ ├── hexagons.js
│ ├── rectangle.js
│ └── require.js
├── index.css
├── index.html
├── license
├── lottery
├── img
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ ├── 5.png
│ ├── 6.png
│ ├── 7.png
│ ├── 8.png
│ ├── arrow.png
│ ├── bg-dither-boom.gif
│ ├── bg-dither.gif
│ ├── bg.jpg
│ ├── buttons_01.png
│ ├── disc-bg.gif
│ └── disc-rotate.gif
├── lottery_01.html
└── lottery_02.html
├── particlesLoader
├── js
│ └── loader.js
└── particlesLoader.html
├── rippleEffect
├── ripple.css
└── ripple.html
├── somecode.html
├── svg
└── svg.html
├── template
├── index.css
├── index.html
├── index.js
└── widget
│ └── list.html
└── wxShake
├── css
└── index.css
├── js
└── shaked.js
├── source
├── 000.jpg
├── 001.jpg
├── 002.jpg
├── favicon.ico
├── shakBox.png
└── shake_sound.mp3
└── wxShake.html
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
--------------------------------------------------------------------------------
/.idea/demos.iml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 |
1
24 |2
25 |3
26 |4
27 |5
28 | 29 |HTML5 Audio visualizer
55 | 56 | Click me to select an audio file. 57 | 58 | 59 |输入文件必须为纯文本文件、UTF-8编码。结果请看console输出。
19 |测试结果:关键词300个成语,目标文本《搜神记1》,约50万字;总耗时:1.1s。
26 | 27 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /hashtabel/keywords.txt: -------------------------------------------------------------------------------- 1 | 行尸走肉、 2 | 金蝉脱壳、 3 | 百里挑一、 4 | 金玉满堂、 5 | 背水一战、 6 | 霸王别姬、 7 | 天上人间、 8 | 不吐不快、 9 | 海阔天空、 10 | 情非得已、 11 | 满腹经纶、 12 | 兵临城下、 13 | 春暖花开、 14 | 插翅难逃、 15 | 黄道吉日、 16 | 天下无双、 17 | 偷天换日、 18 | 两小无猜、 19 | 卧虎藏龙、 20 | 珠光宝气、 21 | 簪缨世族、 22 | 花花公子、 23 | 绘声绘影、 24 | 国色天香、 25 | 相亲相爱、 26 | 八仙过海、 27 | 金玉良缘、 28 | 掌上明珠、 29 | 皆大欢喜、 30 | 逍遥法外、 31 | 生财有道、 32 | 极乐世界、 33 | 情不自禁、 34 | 愚公移山、 35 | 魑魅魍魉、 36 | 龙生九子、 37 | 精卫填海、 38 | 海市蜃楼、 39 | 高山流水、 40 | 卧薪尝胆、 41 | 壮志凌云、 42 | 金枝玉叶、 43 | 四海一家、 44 | 穿针引线、 45 | 无忧无虑、 46 | 无地自容、 47 | 三位一体、 48 | 落叶归根、 49 | 相见恨晚、 50 | 惊天动地、 51 | 滔滔不绝、 52 | 相濡以沫、 53 | 长生不死、 54 | 原来如此、 55 | 女娲补天、 56 | 三皇五帝、 57 | 万箭穿心、 58 | 水木清华、 59 | 窈窕淑女、 60 | 破釜沉舟、 61 | 天涯海角、 62 | 牛郎织女、 63 | 倾国倾城、 64 | 飘飘欲仙、 65 | 福星高照、 66 | 妄自菲薄、 67 | 永无止境、 68 | 学富五车、 69 | 饮食男女、 70 | 英雄豪杰、 71 | 国士无双、 72 | 塞翁失马、 73 | 万家灯火、 74 | 石破天惊、 75 | 精忠报国、 76 | 养生之道、 77 | 覆雨翻云、 78 | 六道轮回、 79 | 鹰击长空、 80 | 日日夜夜、 81 | 厚德载物、 82 | 亡羊补牢、 83 | 万里长城、 84 | 黄金时代、 85 | 出生入死、 86 | 一路顺风、 87 | 随遇而安、 88 | 千军万马、 89 | 郑人买履、 90 | 棋逢对手、 91 | 叶公好龙、 92 | 后会无期、 93 | 守株待兔、 94 | 凤凰于飞、 95 | 一生一世、 96 | 花好月圆、 97 | 世外桃源、 98 | 韬光养晦、 99 | 画蛇添足、 100 | 青梅竹马、 101 | 风花雪月、 102 | 滥竽充数、 103 | 没完没了、 104 | 总而言之、 105 | 欣欣向荣、 106 | 时光荏苒、 107 | 差强人意、 108 | 好好先生、 109 | 无懈可击、 110 | 随波逐流、 111 | 袖手旁观、 112 | 群雄逐鹿、 113 | 血战到底、 114 | 唯我独尊、 115 | 买椟还珠、 116 | 龙马精神、 117 | 一见钟情、 118 | 喜闻乐见、 119 | 负荆请罪、 120 | 三人成虎、 121 | 河东狮吼、 122 | 程门立雪、 123 | 金戈铁马、 124 | 笑逐颜开、 125 | 千钧一发、 126 | 纸上谈兵、 127 | 风和日丽、 128 | 邯郸学步、 129 | 大器晚成、 130 | 庖丁解牛、 131 | 甜言蜜语、 132 | 雷霆万钧、 133 | 浮生若梦、 134 | 大开眼界、 135 | 汗牛充栋、 136 | 百鸟朝凤、 137 | 以德服人、 138 | 白驹过隙、 139 | 难兄难弟、 140 | 鬼哭神嚎、 141 | 声色犬马、 142 | 指鹿为马、 143 | 龙争虎斗、 144 | 雾里看花、 145 | 男大当婚、 146 | 未雨绸缪、 147 | 南辕北辙、 148 | 三从四德、 149 | 一丝不挂、 150 | 高屋建瓴、 151 | 阳春白雪、 152 | 杯弓蛇影、 153 | 闻鸡起舞、 154 | 四面楚歌、 155 | 登堂入室、 156 | 张灯结彩、 157 | 而立之年、 158 | 饮鸩止渴、 159 | 杏雨梨云、 160 | 龙凤呈祥、 161 | 勇往直前、 162 | 左道旁门、 163 | 莫衷一是、 164 | 马踏飞燕、 165 | 掩耳盗铃、 166 | 大江东去、 167 | 凿壁偷光、 168 | 色厉内荏、 169 | 花容月貌、 170 | 越俎代庖、 171 | 鳞次栉比、 172 | 美轮美奂、 173 | 缘木求鱼、 174 | 再接再厉、 175 | 马到成功、 176 | 红颜知己、 177 | 赤子之心、 178 | 迫在眉睫、 179 | 风流韵事、 180 | 相形见绌、 181 | 诸子百家、 182 | 鬼迷心窍、 183 | 星火燎原、 184 | 画地为牢、 185 | 岁寒三友、 186 | 花花世界、 187 | 纸醉金迷、 188 | 狐假虎威、 189 | 纵横捭阖、 190 | 沧海桑田、 191 | 不求甚解、 192 | 暴殄天物、 193 | 吃喝玩乐、 194 | 乐不思蜀、 195 | 身不由己、 196 | 小家碧玉、 197 | 文不加点、 198 | 天马行空、 199 | 人来人往、 200 | 千方百计、 201 | 天高地厚、 202 | 万人空巷、 203 | 争分夺秒、 204 | 如火如荼、 205 | 大智若愚、 206 | 斗转星移、 207 | 七情六欲、 208 | 大禹治水、 209 | 空穴来风、 210 | 孟母三迁、 211 | 绘声绘色、 212 | 九五之尊、 213 | 随心所欲、 214 | 干将莫邪、 215 | 相得益彰、 216 | 借刀杀人、 217 | 浪迹天涯、 218 | 刚愎自用、 219 | 镜花水月、 220 | 黔驴技穷、 221 | 肝胆相照、 222 | 多多益善、 223 | 叱咤风云、 224 | 杞人忧天、 225 | 作茧自缚、 226 | 一飞冲天、 227 | 殊途同归、 228 | 风卷残云、 229 | 因果报应、 230 | 无可厚非、 231 | 赶尽杀绝、 232 | 天长地久、 233 | 飞龙在天、 234 | 桃之夭夭、 235 | 南柯一梦、 236 | 口是心非、 237 | 江山如画、 238 | 风华正茂、 239 | 一帆风顺、 240 | 一叶知秋、 241 | 草船借箭、 242 | 铁石心肠、 243 | 望其项背、 244 | 头晕目眩、 245 | 大浪淘沙、 246 | 纵横天下、 247 | 有问必答、 248 | 无为而治、 249 | 釜底抽薪、 250 | 吹毛求疵、 251 | 好事多磨、 252 | 空谷幽兰、 253 | 悬梁刺股、 254 | 白手起家、 255 | 完璧归赵、 256 | 忍俊不禁、 257 | 沐猴而冠、 258 | 白云苍狗、 259 | 贼眉鼠眼、 260 | 围魏救赵、 261 | 烟雨蒙蒙、 262 | 炙手可热、 263 | 尸位素餐、 264 | 出水芙蓉、 265 | 礼仪之邦、 266 | 一丘之貉、 267 | 鹏程万里、 268 | 叹为观止、 269 | 韦编三绝、 270 | 今生今世、 271 | 草木皆兵、 272 | 宁缺毋滥、 273 | 回光返照、 274 | 露水夫妻、 275 | 讳莫如深、 276 | 贻笑大方、 277 | 紫气东来、 278 | 万马奔腾、 279 | 一诺千金、 280 | 老马识途、 281 | 五花大绑、 282 | 捉襟见肘、 283 | 瓜田李下、 284 | 水漫金山、 285 | 苦心孤诣、 286 | 可见一斑、 287 | 五湖四海、 288 | 虚怀若谷、 289 | 欲擒故纵、 290 | 风声鹤唳、 291 | 毛遂自荐、 292 | 蛛丝马迹、 293 | 中庸之道、 294 | 迷途知返、 295 | 自由自在、 296 | 龙飞凤舞、 297 | 树大根深、 298 | 雨过天晴、 299 | 乘风破浪、 300 | 筚路蓝缕 -------------------------------------------------------------------------------- /hashtabel/search.js: -------------------------------------------------------------------------------- 1 | // tree结构,也是利用哈希表快速查找 2 | function keywordSearch() { 3 | 4 | "use strict"; 5 | var tblRoot; 6 | 7 | function buildTree(keywords) { 8 | var tblCur = {}, 9 | key, 10 | str_key, 11 | Length, 12 | j, 13 | i; 14 | 15 | tblRoot = tblCur; 16 | var couter = new Date(); 17 | 18 | for(j = keywords.length - 1; j >= 0; j -= 1) { 19 | str_key = keywords[j]; 20 | Length = str_key.length; 21 | for(i = 0; i < Length; i += 1) { 22 | key = str_key.charAt(i); 23 | if(tblCur.hasOwnProperty(key)) { //生成子节点 24 | tblCur = tblCur[key]; 25 | } else { 26 | tblCur = tblCur[key] = {}; 27 | } 28 | } 29 | tblCur.end = true; //最后一个关键字没有分割符 30 | tblCur = tblRoot; 31 | } 32 | console.log("Time cost to build tree: " + (new Date() - couter) + "mm"); 33 | } 34 | 35 | function search(content) { 36 | var tblCur, 37 | p_star = 0, 38 | n = content.length, 39 | p_end, 40 | match, //是否找到匹配 41 | match_key, 42 | match_str, 43 | arrMatch = [], //存储结果 44 | arrLength = 0; //arrMatch的长度索引 45 | var couter = new Date(); 46 | 47 | while(p_star < n) { 48 | tblCur = tblRoot; //回溯至根部 49 | p_end = p_star; 50 | match_str = ""; 51 | match = false; 52 | do { 53 | match_key = content.charAt(p_end); 54 | //本次匹配结束 55 | if(!(tblCur = tblCur[match_key])) { 56 | p_star += 1; 57 | break; 58 | } else { 59 | match_str += match_key; 60 | } 61 | p_end += 1; 62 | //是否匹配到尾部 //找到匹配关键字 63 | if(tblCur.end) { 64 | match = true; 65 | } 66 | } while (true); 67 | //最大匹配 68 | if(match) { //增强可读性 69 | arrMatch[arrLength] = { 70 | key: match_str, 71 | begin: p_star - 1, 72 | end: p_end 73 | }; 74 | arrLength += 1; 75 | p_star = p_end; 76 | } 77 | } 78 | console.log("Time cost to search keywords: " + (new Date() - couter) + "mm"); 79 | return arrMatch; 80 | } 81 | 82 | this.init = function(keywords) { 83 | if(Object.prototype.toString.call(keywords) !== '[object Array]') { 84 | console.log(Object.prototype.toString.call(keywords)); 85 | throw new Error('check input!'); 86 | } 87 | buildTree(keywords); 88 | return this; 89 | }; 90 | 91 | this.search = function(content) { 92 | if(typeof(content) !== "string") { 93 | console.log(typeof(content)); 94 | throw new Error('check input!'); 95 | } 96 | return search(content); 97 | }; 98 | 99 | }; -------------------------------------------------------------------------------- /heal/heal.css: -------------------------------------------------------------------------------- 1 | /* common CSS start */ 2 | 3 | html { 4 | -ms-text-size-adjust: 100%; 5 | -webkit-text-size-adjust: 100%; 6 | } 7 | 8 | body { 9 | line-height: 1.6; 10 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 11 | -webkit-font-smoothing: antialiased; 12 | } 13 | 14 | body, 15 | h1, 16 | h2, 17 | h3, 18 | h4, 19 | h5, 20 | h6, 21 | p, 22 | ol, 23 | ul, 24 | li { 25 | margin: 0; 26 | padding: 0; 27 | } 28 | 29 | li { 30 | list-style-type: none; 31 | } 32 | 33 | a img { 34 | border: 0; 35 | } 36 | 37 | a { 38 | text-decoration: none; 39 | } 40 | 41 | 42 | /* common CSS end */ 43 | 44 | .main-ls { 45 | margin: 15px 0; 46 | } 47 | 48 | .wrp { 49 | box-sizing: border-box; 50 | margin: 0 15px; 51 | display: inline-block; 52 | border: 1px solid black; 53 | } 54 | 55 | canvas { 56 | box-sizing: border-box; 57 | border: 1px solid hsl(0, 100%, 50%); 58 | } -------------------------------------------------------------------------------- /heal/heal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |![]() |
56 | ![]() |
57 | ![]() |
58 | ![]() |
59 |
![]() |
62 | 63 | | ![]() |
64 | |
![]() |
67 | ![]() |
68 | ||
![]() |
71 | ![]() |
72 | ![]() |
73 | ![]() |
74 |