├── 2015 ├── 8 │ └── 2015年8月31日.markdown ├── 9 │ ├── img │ │ ├── 2015-9-22-1.jpg │ │ ├── 2015-9-22-2.jpg │ │ ├── 2015-9-22-2.png │ │ ├── 2015-9-22-3.jpg │ │ ├── 2015-9-25-1.png │ │ ├── 2015-9-25-2.png │ │ ├── 2015-9-25-3.jpg │ │ ├── 2015-9-25-4.jpg │ │ ├── 2015-9-25-5.jpg │ │ ├── 2015-9-26-1.jpg │ │ ├── 2015年9月16日-1.jpg │ │ └── gongchangmoshi.jpg │ ├── 2015年9月22日.markdown │ ├── 2015年9月26日.markdown │ ├── 2015年9月9日.markdown │ ├── 2015年9月7日.markdown │ ├── 2015年9月3日.markdown │ ├── 2015年9月25日.markdown │ ├── 2015年9月19日.markdown │ ├── 2015年9月16日.markdown │ ├── 2015年9月29日.markdown │ ├── 2015年9月17日.markdown │ ├── 2015年9月6日.markdown │ ├── 2015年9月10日.markdown │ ├── 2015年9月11日.markdown │ ├── 2015年9月12日.markdown │ └── 2015年9月4日.markdown ├── 10 │ ├── img │ │ ├── HTTP-2.jpg │ │ ├── HTTP.jpg │ │ ├── math函数.jpg │ │ ├── random.jpg │ │ ├── math函数-2.jpg │ │ └── box-sizing.png │ ├── 2015年10月29日.markdown │ ├── 2015年10月8日.markdown │ ├── 2015年10月31日.markdown │ ├── 2015年10月15日.markdown │ ├── 2015年10月20日.markdown │ ├── 2015年10月9日.markdown │ ├── 2015年10月19日.markdown │ ├── 2015年10月10日.markdown │ ├── 2015年10月18日.markdown │ ├── 2015年10月26日.markdown │ └── 2015年10月28日.markdown ├── 11 │ ├── 2015-11-16-1.jpg │ ├── 2015年11月22日.markdown │ ├── 2015年11月25日.markdown │ ├── 2015年11月30日.markdown │ ├── 2015年11月20日.markdown │ ├── 2015年11月19日.markdown │ ├── 2015年11月11日.markdown │ ├── 2015年11月12日.markdown │ ├── 2015年11月29日.markdown │ ├── 2015年11月2日.markdown │ ├── 2015年11月28日.markdown │ ├── 2015年11月13日.markdown │ ├── 2015年11月18日.markdown │ ├── 2015年11月17日.markdown │ ├── 2015年11月24日.markdown │ ├── 2015年11月16日.markdown │ ├── 2015年11月23日.markdown │ └── 2015年11月27日.markdown └── 12 │ ├── img │ ├── btn.jpg │ ├── bs-btn.jpg │ ├── bs-hor.jpg │ ├── bs-tr.jpg │ ├── btn-2.jpg │ ├── icon.jpg │ ├── skew-x.png │ ├── skew-y.png │ ├── bs-code.jpg │ ├── bs-form.jpg │ ├── bs-hor-2.jpg │ ├── bs-text.jpg │ ├── bs-title.jpg │ ├── scale-x.png │ ├── scale-y.png │ ├── skew-x-y.png │ ├── bs-form-1.jpg │ ├── bs-form-2.jpg │ ├── bs-form-3.jpg │ ├── bs-form-4.jpg │ ├── scale-x-y.png │ ├── animation-pro.png │ ├── transition-suji.png │ ├── 20100513052116804.jpg │ ├── 20100513052913196.jpg │ ├── 20100513071353897.gif │ ├── 20100513071354656.gif │ ├── 20100513071356624.gif │ ├── 20100513071356825.gif │ ├── 20100515092156201.gif │ ├── repeating-linear-gradient.png │ └── transition-timing-function.png │ ├── 2015年12月11日.markdown │ ├── 2015年12月17日.markdown │ ├── 2015年12月18日.markdown │ ├── 2015年12月27日.markdown │ ├── 2015年12月13日.markdown │ ├── 2015年12月7日.markdown │ ├── 2015年12月29日.markdown │ ├── 2015年12月10日.markdown │ ├── 2015年12月14日.markdown │ ├── 2015年12月26日.markdown │ └── 2015年12月3日.markdown ├── 2016 ├── 1 │ ├── img │ │ ├── form.jpg │ │ ├── json.jpg │ │ ├── btn-1.jpg │ │ ├── btn-2.jpg │ │ ├── movejs.jpg │ │ └── dropdown.jpg │ ├── 2016年1月7日.markdown │ ├── 2016年1月25日.markdown │ ├── 2016年1月28日.markdown │ └── 2016年1月3日.markdown ├── 2 │ ├── img │ │ ├── ajax.jpg │ │ ├── ajax-2.jpg │ │ └── ajax-3.jpg │ ├── 2016年2月23日.markdown │ ├── 2016年2月29日.markdown │ ├── 2016年2月11日.markdown │ ├── 2016年2月5日.markdown │ ├── 2016年2月13日.markdown │ ├── 2016年2月6日.markdown │ └── 2016年2月12日.markdown ├── 3 │ ├── 2016年3月31日.markdown │ ├── img │ │ ├── pic1.png │ │ ├── flex1.png │ │ ├── order.png │ │ ├── flex-grow.png │ │ ├── flex-wrap.jpg │ │ ├── align-items.png │ │ ├── align-self.png │ │ ├── flex-shrink.jpg │ │ ├── align-content.png │ │ ├── flex-direction.png │ │ ├── justify-content.png │ │ ├── ct_css_margin_collapsing_example_1.gif │ │ ├── ct_css_margin_collapsing_example_2.gif │ │ ├── ct_css_margin_collapsing_example_3.gif │ │ └── ct_css_margin_collapsing_example_4.gif │ ├── 2016年3月2日.markdown │ ├── 2016年3月30日.markdown │ ├── 2016年3月16日.markdown │ ├── 2016年3月22日.markdown │ ├── 2016年3月13日.markdown │ ├── 2016年3月6日.markdown │ ├── 2016年3月21日.markdown │ ├── 2016年3月5日.markdown │ ├── 2016年3月9日.markdown │ ├── 2016年3月3日.markdown │ ├── 2016年3月19日.markdown │ ├── 2016年3月15日.markdown │ ├── 2016年3月17日.markdown │ ├── 2016年3月8日.markdown │ ├── 2016年3月14日.markdown │ ├── 2016年3月25日.markdown │ └── 2016年3月18日.markdown ├── 4 │ ├── img │ │ ├── ie.png │ │ ├── SASS.jpg │ │ ├── log.jpg │ │ ├── css-01.jpg │ │ ├── proto.jpg │ │ ├── prototype.png │ │ └── scope作用域.jpg │ ├── 2016年4月7日.markdown │ ├── 2016年4月3日.markdown │ ├── 2016年4月6日.markdown │ ├── 2016年4月1日.markdown │ ├── 2016年4月29日.markdown │ ├── 2016年4月19日.markdown │ ├── 2016年4月23日.markdown │ ├── 2016年4月4日.markdown │ ├── 2016年4月5日.markdown │ └── 2016年4月24日.markdown └── 5 │ ├── 2016年5月23日.markdown │ ├── 2016年5月26日.markdown │ ├── 2016年5月4日.markdown │ └── 2016年5月5日.markdown ├── Todo.md ├── Vue ├── Directory.md └── Vue模块.md ├── CSS ├── img │ ├── cssPx.jpg │ ├── exANDch.jpg │ ├── baseline.png │ ├── line-box.png │ ├── css_selector.jpg │ ├── line-height.png │ ├── line-height2.png │ ├── vmaxANDvmin.jpg │ ├── css_selector_2.jpg │ └── css_selector_3.jpg ├── Directory.md └── CSS选择器.md ├── MOOC ├── img │ ├── IP地址.png │ ├── 广播地址.jpg │ ├── 机器指令.jpg │ ├── 机器数.jpg │ ├── kuaisu.jpg │ ├── maopao.jpg │ ├── 二叉树遍历.jpg │ ├── 机器指令-2.jpg │ ├── shell-1.jpg │ ├── shell-2.jpg │ ├── shell-3.jpg │ ├── shell-4.jpg │ ├── shell-5.jpg │ ├── 二叉树遍历-2.jpg │ ├── 计算机组成部件.jpg │ ├── OSI与TCP-IP.png │ └── 1482024465706.png ├── Directory.md ├── 计算机导论.md ├── C语言.md ├── 数据结构.md └── 树与二叉树.md ├── 后端开发 ├── img │ ├── http.png │ ├── mysql.jpg │ ├── mysql_int.jpg │ ├── mysql_sq.jpg │ ├── mysql_str.jpg │ ├── Inner_Join.png │ ├── mysql_float.jpg │ ├── mysql_time.jpg │ └── Left_Outer_Join.png ├── Directory.md ├── 爬虫技术.md ├── nginx.md └── Mongoose.md ├── HTML5 ├── img │ ├── TCP4.jpg │ ├── TCP5.png │ ├── 浏览器渲染.jpg │ ├── 浏览器渲染_2.jpg │ ├── 浏览器渲染_3.jpg │ └── asyncAndDefer.jpg ├── Directory.md ├── 本地存储.md └── meta标签.md ├── Java ├── img │ ├── dataType.jpg │ ├── keyWord.jpg │ └── dataType01.jpg ├── Directory.md ├── 继承.md └── 对象容器.md ├── javascript ├── img │ ├── rect.png │ ├── element.jpg │ ├── DataTransfer.jpg │ └── what-is-webpack.png ├── Directory.md ├── 数组.md ├── CommonJS.md ├── 标准对象.md ├── Object对象.md └── DOM样式.md ├── Nodejs ├── img │ ├── EventEmitter.jpg │ └── http-request.png ├── Directory.md ├── module.md ├── Cluster.md └── timer.md ├── tool ├── img │ └── what-is-webpack.png ├── Directory.md ├── atom.md ├── typings.md └── reactRouter.md ├── React_Native └── Directory.md ├── CodeLibrary ├── Directory.md ├── cookie.md ├── CSS3_Code.md ├── ajax.md └── Nodejs新建服务器.md ├── .gitignore ├── .gitattributes ├── ECMAScript ├── Decorator.md ├── Directory.md ├── let与const命令.md ├── 字符编码.md └── ES6基础.md ├── README.md ├── styles └── website.css ├── LICENSE └── book.json /Todo.md: -------------------------------------------------------------------------------- 1 | # Todo 2 | 3 | - [ ] 正则表达式向前匹配 4 | -------------------------------------------------------------------------------- /2016/3/2016年3月31日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年3月31日 略。 -------------------------------------------------------------------------------- /Vue/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [Vue.js](Vue.js.md) 3 | 2. [Vue模块](Vue模块.md) 4 | -------------------------------------------------------------------------------- /2016/4/img/ie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/4/img/ie.png -------------------------------------------------------------------------------- /CSS/img/cssPx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/cssPx.jpg -------------------------------------------------------------------------------- /MOOC/img/IP地址.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/IP地址.png -------------------------------------------------------------------------------- /MOOC/img/广播地址.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/广播地址.jpg -------------------------------------------------------------------------------- /MOOC/img/机器指令.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/机器指令.jpg -------------------------------------------------------------------------------- /MOOC/img/机器数.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/机器数.jpg -------------------------------------------------------------------------------- /后端开发/img/http.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/http.png -------------------------------------------------------------------------------- /2015/12/img/btn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/btn.jpg -------------------------------------------------------------------------------- /2016/1/img/form.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/1/img/form.jpg -------------------------------------------------------------------------------- /2016/1/img/json.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/1/img/json.jpg -------------------------------------------------------------------------------- /2016/2/img/ajax.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/2/img/ajax.jpg -------------------------------------------------------------------------------- /2016/3/img/pic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/pic1.png -------------------------------------------------------------------------------- /2016/4/img/SASS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/4/img/SASS.jpg -------------------------------------------------------------------------------- /2016/4/img/log.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/4/img/log.jpg -------------------------------------------------------------------------------- /CSS/img/exANDch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/exANDch.jpg -------------------------------------------------------------------------------- /HTML5/img/TCP4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/HTML5/img/TCP4.jpg -------------------------------------------------------------------------------- /HTML5/img/TCP5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/HTML5/img/TCP5.png -------------------------------------------------------------------------------- /HTML5/img/浏览器渲染.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/HTML5/img/浏览器渲染.jpg -------------------------------------------------------------------------------- /MOOC/img/kuaisu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/kuaisu.jpg -------------------------------------------------------------------------------- /MOOC/img/maopao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/maopao.jpg -------------------------------------------------------------------------------- /MOOC/img/二叉树遍历.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/二叉树遍历.jpg -------------------------------------------------------------------------------- /MOOC/img/机器指令-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/机器指令-2.jpg -------------------------------------------------------------------------------- /后端开发/img/mysql.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/mysql.jpg -------------------------------------------------------------------------------- /2015/10/img/HTTP-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/10/img/HTTP-2.jpg -------------------------------------------------------------------------------- /2015/10/img/HTTP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/10/img/HTTP.jpg -------------------------------------------------------------------------------- /2015/10/img/math函数.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/10/img/math函数.jpg -------------------------------------------------------------------------------- /2015/10/img/random.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/10/img/random.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-btn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-btn.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-hor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-hor.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-tr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-tr.jpg -------------------------------------------------------------------------------- /2015/12/img/btn-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/btn-2.jpg -------------------------------------------------------------------------------- /2015/12/img/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/icon.jpg -------------------------------------------------------------------------------- /2015/12/img/skew-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/skew-x.png -------------------------------------------------------------------------------- /2015/12/img/skew-y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/skew-y.png -------------------------------------------------------------------------------- /2016/1/img/btn-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/1/img/btn-1.jpg -------------------------------------------------------------------------------- /2016/1/img/btn-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/1/img/btn-2.jpg -------------------------------------------------------------------------------- /2016/1/img/movejs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/1/img/movejs.jpg -------------------------------------------------------------------------------- /2016/2/img/ajax-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/2/img/ajax-2.jpg -------------------------------------------------------------------------------- /2016/2/img/ajax-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/2/img/ajax-3.jpg -------------------------------------------------------------------------------- /2016/3/img/flex1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/flex1.png -------------------------------------------------------------------------------- /2016/3/img/order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/order.png -------------------------------------------------------------------------------- /2016/4/img/css-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/4/img/css-01.jpg -------------------------------------------------------------------------------- /2016/4/img/proto.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/4/img/proto.jpg -------------------------------------------------------------------------------- /CSS/img/baseline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/baseline.png -------------------------------------------------------------------------------- /CSS/img/line-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/line-box.png -------------------------------------------------------------------------------- /HTML5/img/浏览器渲染_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/HTML5/img/浏览器渲染_2.jpg -------------------------------------------------------------------------------- /HTML5/img/浏览器渲染_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/HTML5/img/浏览器渲染_3.jpg -------------------------------------------------------------------------------- /Java/img/dataType.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/Java/img/dataType.jpg -------------------------------------------------------------------------------- /Java/img/keyWord.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/Java/img/keyWord.jpg -------------------------------------------------------------------------------- /MOOC/img/shell-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/shell-1.jpg -------------------------------------------------------------------------------- /MOOC/img/shell-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/shell-2.jpg -------------------------------------------------------------------------------- /MOOC/img/shell-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/shell-3.jpg -------------------------------------------------------------------------------- /MOOC/img/shell-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/shell-4.jpg -------------------------------------------------------------------------------- /MOOC/img/shell-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/shell-5.jpg -------------------------------------------------------------------------------- /MOOC/img/二叉树遍历-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/二叉树遍历-2.jpg -------------------------------------------------------------------------------- /MOOC/img/计算机组成部件.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/计算机组成部件.jpg -------------------------------------------------------------------------------- /后端开发/img/mysql_int.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/mysql_int.jpg -------------------------------------------------------------------------------- /后端开发/img/mysql_sq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/mysql_sq.jpg -------------------------------------------------------------------------------- /后端开发/img/mysql_str.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/mysql_str.jpg -------------------------------------------------------------------------------- /2015/10/img/math函数-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/10/img/math函数-2.jpg -------------------------------------------------------------------------------- /2015/11/2015-11-16-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/11/2015-11-16-1.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-code.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-form.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-form.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-hor-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-hor-2.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-text.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-text.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-title.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-title.jpg -------------------------------------------------------------------------------- /2015/12/img/scale-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/scale-x.png -------------------------------------------------------------------------------- /2015/12/img/scale-y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/scale-y.png -------------------------------------------------------------------------------- /2015/12/img/skew-x-y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/skew-x-y.png -------------------------------------------------------------------------------- /2016/1/img/dropdown.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/1/img/dropdown.jpg -------------------------------------------------------------------------------- /2016/3/img/flex-grow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/flex-grow.png -------------------------------------------------------------------------------- /2016/3/img/flex-wrap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/flex-wrap.jpg -------------------------------------------------------------------------------- /2016/4/img/prototype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/4/img/prototype.png -------------------------------------------------------------------------------- /2016/4/img/scope作用域.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/4/img/scope作用域.jpg -------------------------------------------------------------------------------- /CSS/img/css_selector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/css_selector.jpg -------------------------------------------------------------------------------- /CSS/img/line-height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/line-height.png -------------------------------------------------------------------------------- /CSS/img/line-height2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/line-height2.png -------------------------------------------------------------------------------- /CSS/img/vmaxANDvmin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/vmaxANDvmin.jpg -------------------------------------------------------------------------------- /Java/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [Java基础](Java基础.md) 3 | 2. [对象容器](对象容器.md) 4 | 3. [继承](继承.md) 5 | -------------------------------------------------------------------------------- /Java/img/dataType01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/Java/img/dataType01.jpg -------------------------------------------------------------------------------- /MOOC/img/OSI与TCP-IP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/OSI与TCP-IP.png -------------------------------------------------------------------------------- /javascript/img/rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/javascript/img/rect.png -------------------------------------------------------------------------------- /后端开发/img/Inner_Join.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/Inner_Join.png -------------------------------------------------------------------------------- /后端开发/img/mysql_float.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/mysql_float.jpg -------------------------------------------------------------------------------- /后端开发/img/mysql_time.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/mysql_time.jpg -------------------------------------------------------------------------------- /2015/10/img/box-sizing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/10/img/box-sizing.png -------------------------------------------------------------------------------- /2015/12/img/bs-form-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-form-1.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-form-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-form-2.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-form-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-form-3.jpg -------------------------------------------------------------------------------- /2015/12/img/bs-form-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/bs-form-4.jpg -------------------------------------------------------------------------------- /2015/12/img/scale-x-y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/scale-x-y.png -------------------------------------------------------------------------------- /2015/9/img/2015-9-22-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-22-1.jpg -------------------------------------------------------------------------------- /2015/9/img/2015-9-22-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-22-2.jpg -------------------------------------------------------------------------------- /2015/9/img/2015-9-22-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-22-2.png -------------------------------------------------------------------------------- /2015/9/img/2015-9-22-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-22-3.jpg -------------------------------------------------------------------------------- /2015/9/img/2015-9-25-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-25-1.png -------------------------------------------------------------------------------- /2015/9/img/2015-9-25-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-25-2.png -------------------------------------------------------------------------------- /2015/9/img/2015-9-25-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-25-3.jpg -------------------------------------------------------------------------------- /2015/9/img/2015-9-25-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-25-4.jpg -------------------------------------------------------------------------------- /2015/9/img/2015-9-25-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-25-5.jpg -------------------------------------------------------------------------------- /2015/9/img/2015-9-26-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015-9-26-1.jpg -------------------------------------------------------------------------------- /2015/9/img/2015年9月16日-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/2015年9月16日-1.jpg -------------------------------------------------------------------------------- /2016/3/img/align-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/align-items.png -------------------------------------------------------------------------------- /2016/3/img/align-self.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/align-self.png -------------------------------------------------------------------------------- /2016/3/img/flex-shrink.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/flex-shrink.jpg -------------------------------------------------------------------------------- /CSS/img/css_selector_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/css_selector_2.jpg -------------------------------------------------------------------------------- /CSS/img/css_selector_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/CSS/img/css_selector_3.jpg -------------------------------------------------------------------------------- /HTML5/img/asyncAndDefer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/HTML5/img/asyncAndDefer.jpg -------------------------------------------------------------------------------- /MOOC/img/1482024465706.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/MOOC/img/1482024465706.png -------------------------------------------------------------------------------- /Nodejs/img/EventEmitter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/Nodejs/img/EventEmitter.jpg -------------------------------------------------------------------------------- /Nodejs/img/http-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/Nodejs/img/http-request.png -------------------------------------------------------------------------------- /javascript/img/element.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/javascript/img/element.jpg -------------------------------------------------------------------------------- /2015/12/img/animation-pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/animation-pro.png -------------------------------------------------------------------------------- /2015/9/img/gongchangmoshi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/9/img/gongchangmoshi.jpg -------------------------------------------------------------------------------- /2016/3/img/align-content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/align-content.png -------------------------------------------------------------------------------- /2016/3/img/flex-direction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/flex-direction.png -------------------------------------------------------------------------------- /tool/img/what-is-webpack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/tool/img/what-is-webpack.png -------------------------------------------------------------------------------- /后端开发/img/Left_Outer_Join.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/后端开发/img/Left_Outer_Join.png -------------------------------------------------------------------------------- /2015/12/img/transition-suji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/transition-suji.png -------------------------------------------------------------------------------- /2016/3/img/justify-content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/justify-content.png -------------------------------------------------------------------------------- /javascript/img/DataTransfer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/javascript/img/DataTransfer.jpg -------------------------------------------------------------------------------- /2015/11/2015年11月22日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月22日 2 | ##javascript 3 | 4 | `clearInterval()`把定时器停了,是在下一次把定时器关了,这次的函数会执行一次。 5 | 6 | -------------------------------------------------------------------------------- /2015/12/img/20100513052116804.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/20100513052116804.jpg -------------------------------------------------------------------------------- /2015/12/img/20100513052913196.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/20100513052913196.jpg -------------------------------------------------------------------------------- /2015/12/img/20100513071353897.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/20100513071353897.gif -------------------------------------------------------------------------------- /2015/12/img/20100513071354656.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/20100513071354656.gif -------------------------------------------------------------------------------- /2015/12/img/20100513071356624.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/20100513071356624.gif -------------------------------------------------------------------------------- /2015/12/img/20100513071356825.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/20100513071356825.gif -------------------------------------------------------------------------------- /2015/12/img/20100515092156201.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/20100515092156201.gif -------------------------------------------------------------------------------- /javascript/img/what-is-webpack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/javascript/img/what-is-webpack.png -------------------------------------------------------------------------------- /2015/12/img/repeating-linear-gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/repeating-linear-gradient.png -------------------------------------------------------------------------------- /2015/12/img/transition-timing-function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2015/12/img/transition-timing-function.png -------------------------------------------------------------------------------- /CSS/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [CSS选择器](CSS选择器.md) 3 | 2. [CSS单位](CSS单位.md) 4 | 3. [line-height与vertical-align](line-height与vertical-align.md) 5 | -------------------------------------------------------------------------------- /React_Native/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [Reactjs](Reactjs.md) 3 | 2. [ReactNative样式](ReactNative样式.md) 4 | 3. [ReactNative](ReactNative.md) 5 | -------------------------------------------------------------------------------- /2016/3/img/ct_css_margin_collapsing_example_1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/ct_css_margin_collapsing_example_1.gif -------------------------------------------------------------------------------- /2016/3/img/ct_css_margin_collapsing_example_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/ct_css_margin_collapsing_example_2.gif -------------------------------------------------------------------------------- /2016/3/img/ct_css_margin_collapsing_example_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/ct_css_margin_collapsing_example_3.gif -------------------------------------------------------------------------------- /2016/3/img/ct_css_margin_collapsing_example_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Niefee/My-study-records/HEAD/2016/3/img/ct_css_margin_collapsing_example_4.gif -------------------------------------------------------------------------------- /CodeLibrary/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [Ajax](ajax.md) 3 | 2. [cookie](cookie.md) 4 | 3. [CSS_Code](CSS_Code.md) 5 | 4. [Nodejs新建服务器](Nodejs新建服务器.md) 6 | -------------------------------------------------------------------------------- /HTML5/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [本地存储](本地存储.md) 3 | 2. [SVG](SVG.md) 4 | 3. [浏览器渲染](浏览器渲染.md) 5 | 4. [meta标签](meta标签.md) 6 | 5. [WebSocket](WebSocket.md) 7 | 6. [跨域](跨域.md) 8 | -------------------------------------------------------------------------------- /MOOC/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 3 | 1. [数据结构](数据结构.md) 4 | 2. [C语言](C语言.md) 5 | 3. [树与二叉树](树与二叉树.md) 6 | 4. [算法排序](算法排序.md) 7 | 5. [计算机网络](计算机网络.md) 8 | 6. [IP地址](IP地址.md) 9 | 7. [计算机导论](计算机导论.md) 10 | -------------------------------------------------------------------------------- /2016/4/2016年4月7日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年4月7日 ##markdown 一下是一段流程图的语句,显示成代码形式的代表不支持markdown流程图解释。 ```flow st=>start: Start e=>end op=>operation: My Operation cond=>condition: Yes or No? st->op->cond cond(yes)->e cond(no)->op ``` -------------------------------------------------------------------------------- /tool/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [typings](typings.md) 3 | 2. [reactjs](reactjs.md) 4 | 3. [reactRouter](reactRouter.md) 5 | 4. [atom](atom.md) 6 | 5. [正则表达式](正则表达式.md) 7 | 6. [Git](Git.md) 8 | 7. [webpack](webpack.md) 9 | -------------------------------------------------------------------------------- /2016/4/2016年4月3日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年4月3日 今天主要是忙工作,希望未来的三个月实习可以收获更多。老板叫PC端不用浮动,今天一查,浮动是IE11以上才完全支持,所以今天把之前的项目的浮动样式都清楚。 晚上还研究了angularjs的ng-include指令,感觉对开发非常有帮助。 好像第一次在这里写日志那样写东西,其实我小学都一直保持写日记的习惯。家里还有几本日记本放在,可能现在都封尘了,一想那都已经快是十年前的事了。 -------------------------------------------------------------------------------- /2015/11/2015年11月25日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月25日 2 | ##Python 3 | 图素法和像素法的区别: 4 | 图形---矢量图 5 | 图像---像素图 6 | 7 | 图形用户界面 8 | GUI 9 | 10 | Tkinter--Python 标准GUI 11 | 12 | Graphics--基于Tkinter扩展 13 | 14 | Turtle--Python内置的图形库 15 | 16 | 17 | -------------------------------------------------------------------------------- /2015/9/2015年9月22日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月22日 2 | ##前端工程师和美工 3 | 图片理论基础 4 | ![test](img/2015-9-22-1.jpg) 5 | 6 | ##全栈架构师 7 | ![](img/2015-9-22-2.png) 8 | 9 | ##HTTP协议 10 | ![test](img/2015-9-22-2.jpg) 11 | 12 | ##cookie 13 | ![test](img/2015-9-22-3.jpg) -------------------------------------------------------------------------------- /后端开发/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [MongoDB](MongoDB.md) 3 | 2. [Mongoose](Mongoose.md) 4 | 3. [爬虫技术](爬虫技术.md) 5 | 4. [Linux命令](Linux命令.md) 6 | 5. [nginx](nginx.md) 7 | 6. [MySQL](MySQL.md) 8 | 7. [MySQL-2](MySQL-2.md) 9 | 8. [MySQL笔记大全](MySQL笔记大全.md) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 使用方法: 2 | 3 | # /mtk/ 过滤整个文件夹 4 | 5 | # *.zip 过滤所有.zip文件 6 | 7 | # /mtk/do.c 过滤某个具体文件 8 | 9 | # gitignore还可以指定要将哪些文件添加到版本管理中: 10 | # !*.zip 11 | # !/mtk/one.txt 12 | 13 | #忽略自动生成的HTML文件目录 14 | 15 | /_book/ 16 | /node_modules/ 17 | .DS_Store 18 | test.js 19 | -------------------------------------------------------------------------------- /2015/9/2015年9月26日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月26日 2 | ##IP 协议详解 3 | 4 | **IP服务特点** 5 | 6 | IP协议为上层协议提供无状态、无连接、不可靠的服务。 7 | 8 | **IPv4头部结构** 9 | 10 | ![text](img/2015-9-26-1.jpg) 11 | 12 | 13 | **IP分片** 14 | IP数据报的长度超过帧的MTU时,将会被分片传输。 15 | IP头部中的三个字段给IP分片和重组提供了足够的信息:数据报标识、标识和片偏移。 16 | 以太网的MTU为1500字节,因此它携带的IP数据报最大为1480字节。 -------------------------------------------------------------------------------- /2016/3/2016年3月2日.markdown: -------------------------------------------------------------------------------- 1 | #2016年3月2日 2 | ##javascript 3 | ###数据结构 4 | 5 | - 数据:是指所有能输入计算机并能被计算机系统和程序识别、存储、加工和处理的符号的总称。 6 | - 数据元素:数据的基本单位,在计算机程序中通常把数据元素作为一个整体来存储和处理。有时一个数据元素可由若干个数据项组成。 7 | - 数据项:是数据不可分割的,具有独立含义的最小数据单位。 8 | 9 | 10 | **算法**: 11 | 12 | 即对数据施加的操作。数据的运算定义在数据的逻辑结构上,每种逻辑结构都有一个运算的集合。最常用的检索、插入、删除、更新、排序等运算实际上只是在抽象的数据上所施加的一系列抽象的操作。 13 | 14 | -------------------------------------------------------------------------------- /2016/1/2016年1月7日.markdown: -------------------------------------------------------------------------------- 1 | #2016年1月7日 2 | ##bootstrap 3 | 4 | ###媒体查询 5 | 6 | ```html 7 | 8 | 9 | 10 | 17 | ``` 18 | -------------------------------------------------------------------------------- /2015/9/2015年9月9日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月9日 2 | ##jQuery Mobile 事件 3 | 4 | - `pageinit()`:加载完后触发。 5 | - `tap()`:点击后触发。 6 | - `taphold()`:长按后触发。 7 | - `swipe()/swipeleft()/swiperight()`:滑动触发。 8 | - `scrollstart()/scrolstop()`:开始或者结束滑动时触发。 9 | - `orientationchange()`:屏幕方向改变。 10 | 11 | 12 | ##AngularJS 13 | AngularJS的四个核心思想 14 | 15 | 1. 依赖注入 16 | 2. 模块化 17 | 3. 双向绑定 18 | 4. 语义化标签 19 | 20 | -------------------------------------------------------------------------------- /2016/3/2016年3月30日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年3月30日 ##转义字符 字符型常量所表示的值是字符型变量所能包含的值。 我们可以用**ASCII表达式**来表示一个字符型常量,或者用**单引号**内加**反斜杠**表示转义字符。 >其中:\x表示后面的字符是十六进制数,\表示后面的字符是八进制数。 `P`(P):用十六进制的方式表示编码为**50**的字符。 `2`(2):用十进制的方式表示编码为**50**的字符。 `\045`:在javascript中可解释成八进制的ASCII 码\"**%**\"。 `\x24`:在javascript中可以解释成十六进制的ASCII码\"**$**\" 在CSS中表示ASCII码: ```css #t1:after{ content: "\45\0a\55\045" } ``` -------------------------------------------------------------------------------- /2015/9/2015年9月7日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月7日 2 | ##jQuery mobile 3 | 4 | 基本格式 5 | ```jQuery 6 |
7 | //头部 8 |
9 |

在此处写入标题

10 |
11 | //主题内容 12 |
13 |

在此处写入正文

14 |
15 | //尾部 16 |
17 |

在此处写入页脚文本

18 |
19 | 20 |
21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /2016/1/2016年1月25日.markdown: -------------------------------------------------------------------------------- 1 | #2016年1月25日 2 | ##css 3 | 4 | **系统自带中文字体编码:** 5 | 6 | - 宋体 **SimSun** 7 | - 黑体 **SimHei** 8 | - 微软雅黑 **Microsoft YaHei** 9 | - 微软正黑 **体Microsoft JhengHei** 10 | - 新宋体 **NSimSun** 11 | - 新细明体 **PMingLiU** 12 | - 细明体 **MingLiU** 13 | - 标楷体 **DFKai-SB** 14 | - 仿宋 **FangSong** 15 | - 楷体 **KaiTi** 16 | - 仿宋 **_GB2312FangSong_GB2312** 17 | - 楷体 **_GB2312KaiTi_GB2312** 18 | -------------------------------------------------------------------------------- /2016/2/2016年2月23日.markdown: -------------------------------------------------------------------------------- 1 | #2016年2月23日 2 | ##MySQL 3 | ###数据库分类 4 | 5 | - 关系型数据库 6 | 7 | - 非关系型数据库 8 | 9 | 10 | - sql语言 11 | + 数据定义语言(DDL):DROP、CREATE、ALTER等。 12 | + 数据操作语言(DML):INSERT、UPDATE、DELETE。 13 | + 数据查询语言(DQL):SELECT。 14 | + 数据控制语言(DCL):GRANT、REVOKE、COMMIT等。 15 | 16 | - 其他数据库操作语言 17 | 18 | **数据库(Database)**是按照数据结构来组织、存储和管理数据的仓库, 19 | 每个数据库都有一个或多个不同的API用于创建,访问,管理,搜索和复制所保存的数据。 20 | 21 | -------------------------------------------------------------------------------- /HTML5/本地存储.md: -------------------------------------------------------------------------------- 1 | ##localStorage与sessionStorage 2 | 3 | ###两个共有的接口: 4 | 5 | - getItem(key):获取指定key本地存储的值。 6 | - setItem(key,value):将value存储到key字段。 7 | - removeItem(key):删除指定key本地存储的值。 8 | - lenth:存储的项目数。 9 | - clear():会清除所有数据。 10 | 11 | ###sessionStorage与 localStorage 的异同 12 | 13 | `sessionStorage`会在关闭浏览器后删除数据,在`chrome51`版本下,关闭同一域名下的所有页面也会删除数据。 14 | 15 | `localStorage`是一个持久化的存储,它并不局限于会话。 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /2015/11/2015年11月30日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月30日 2 | ##Ajax 3 | 4 | 阻止缓存,加上时间毫秒数`new Date().getTime()`。 5 | 6 | 读取的是字符串,通过`eval()`函数转成javascript能识别的语句。 7 | 8 | 9 | get:通过网址,容量小; 10 | 11 | post:不通过网址,容量大(2G),安全性好一点; 12 | 13 | 最安全是使用HTTPS; 14 | 15 | 网址的长度是有限的, 16 | 17 | ``` 18 | var a=12; 19 | alert(a)=window.alert(window.a);//全局变量是window上的一个属性。 20 | 21 | ``` 22 | 23 | 用没有定义的变量---报错; 24 | 用没有定义的属性---underfined 25 | 26 | 27 | -------------------------------------------------------------------------------- /2015/11/2015年11月20日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月20日 2 | ##javascript 3 | 4 | `toLowerCase()`:字符串转成小写; 5 | 6 | `search()`:找到 并返还字符串出现的位置,如果没有 返回-1; 7 | 8 | `split()`:把字符串按指定符号分割,返回一个数组; 9 | 10 | `sppendChild()`:1.先把元素从原有的父级上删掉,2.添加到新的父级; 11 | 12 | `children`:非标准的,它返回指定元素的子元素集合。经测试,它只返回HTML节点,甚至不返回文本节点。 13 | 14 | `sort()`:是数组Array特有的属性,`aLi=document.getElementsByTagName("li");`中,`aLi`是一个元素集合,不算是数组。 15 | 16 | onkeyup,onblur 在输入时,失去焦点时的事件。 -------------------------------------------------------------------------------- /Nodejs/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 3 | 1. [HTTP服务器](HTTP服务器.md) 4 | 0. [基础笔记](基础笔记.md) 5 | 0. [EventEmitter](EventEmitter.md) 6 | 0. [Buffer](buffer.md) 7 | 0. [Stream](Stream.md) 8 | 0. [module](module.md) 9 | 0. [FileSystem](FileSystem.md) 10 | 0. [http模块](http模块.md) 11 | 0. [process](process.md) 12 | 0. [Error](Error.md) 13 | 0. [timer](timer.md) 14 | 0. [net](net.md) 15 | 0. [child_process](child_process.md) 16 | 0. [Cluster](Cluster.md) 17 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /MOOC/计算机导论.md: -------------------------------------------------------------------------------- 1 | # 计算机导论 2 | ## 冯诺依曼计算机 3 | ### 机器指令 4 | 5 | 机器指令是CPU可以直接分析并执行的指令,一般用0和1编码表示。 6 | 指令≈操作码+地址码 7 | 8 | 操作码(如取数,加法等操作)|地址码(操作中的数据来源) 9 | ----|----- 10 | 000001 | 00 00000111 11 | 000100 | 00 00001010 12 | 13 | ![](img/机器指令.jpg) 14 | ![](img/机器指令-2.jpg) 15 | 16 | ### 机器级程序的执行 17 | 18 | ![计算机组成部件](img/计算机组成部件.jpg) 19 | 20 | 注释: 21 | **PC**:程序计数器--存储下一个要执行指令的地址 22 | **IR**:指令寄存器--存储当前指令内容 23 | >课程地址:http://www.icourse163.org/course/HIT-437006 24 | 25 | ## 现代计算机 26 | -------------------------------------------------------------------------------- /2015/11/2015年11月19日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月19日 2 | ##javascript 3 | 4 | ###创建DOM元素 5 | 6 | ```javascript 7 | var oLi=document.createElement("li"); 8 | 9 | oUl.appendChild(oLi);//插入到最后; 10 | ``` 11 | 12 | `createElement(标签名)`:创建一个节点 13 | `appendChild(节点)`:追加一个节点 14 | 15 | `insertBefore(节点,原有节点)`:在已有元素前插入; 16 | 17 | ###表格 18 | getElementsByTagName("tbody")[0] : tBodies[0] 19 | getElementsByTagName("tr")[0] : rows[0] 20 | getElementsByTagName("td") : cells[0] 21 | 22 | -------------------------------------------------------------------------------- /ECMAScript/Decorator.md: -------------------------------------------------------------------------------- 1 | # Decorator(修饰器) 2 | 3 | --- 4 |

暂停更新

5 | 由于这个特性支持有限,以后再更新。 6 | 2017年04月23日 7 | --- 8 | 修饰器(Decorator)是一个函数,用来修改类的行为。 9 | 10 | 修饰器对类的行为的改变,是代码编译时发生的,而不是在运行时。 11 | 12 | ```js 13 | function testable(target) { 14 | target.isTestable = true; 15 | } 16 | 17 | @testable 18 | class MyTestableClass {} 19 | 20 | console.log(MyTestableClass.isTestable) // true 21 | ``` 22 | 23 | `@testable`就是一个修饰器。它修改了`MyTestableClass`这个类的行为,为它加上了静态属性`isTestable`。 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My-study-records 2 | [![web](https://img.shields.io/badge/Preview-web-brightgreen.svg)](https://note.niefee.com/) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/Niefee/My-study-records/blob/master/LICENSE) 3 | 4 | 5 | 我只是做了一些微小的工作。 🐠🌹😝愿我努力那么大🤡😎😇 ,内容那么多👨‍💻‍👩‍🎓‍‍🐠。 6 | 7 | 以上的文件内容都是我平时学习时所记录的,也是自己知识增长过程的一份留念。 8 | 9 | 我有故事,你有酒吗? 10 | 11 | >[在线电子书笔记](https://note.niefee.com/) 12 | >>[Github地址](https://github.com/Niefee/My-study-records) 13 | -------------------------------------------------------------------------------- /2015/10/2015年10月29日.markdown: -------------------------------------------------------------------------------- 1 | #2015年10月29日 2 | ##css 3 | 4 | **content-box**:此值为其默认值,其让元素维持W3C的标准Box Model,也就是说元素的宽度/高度(width/height)等于元素边框宽度(border)加上元素内边距(padding)加上元素内容宽度 /高度(content width/height)即:Element Width/Height = border+padding+content width/height。 5 | 6 | **border-box**:此值让元素维持IE传统的Box Model(IE6以下版本),也就是说元素的宽度/高度等于元素内容的宽度/高度。这里的content width/height包含了元素的border,padding,内容的width/height。即此处的内容宽度/高度=width /height-border-padding。 7 | 8 | ![txt](img/box-sizing.png) 9 | 10 | **z-index** 11 | 决定元素层次的属性,拥有较高堆叠数值的元素在上层。 12 | -------------------------------------------------------------------------------- /styles/website.css: -------------------------------------------------------------------------------- 1 | /* CSS for website */ 2 | 3 | p.comments-section code { 4 | background: rgba(252, 228, 236, 0.4); 5 | color: #d70d5c; 6 | border-radius: 2px; 7 | } 8 | .markdown-section b, .markdown-section strong { 9 | font-weight: bolder; 10 | color: #000 !important; 11 | } 12 | 13 | .markdown-section ol li code,.markdown-section ul li code{ 14 | background: rgba(252, 228, 236, 0.4); 15 | color: #d70d5c; 16 | border-radius: 2px; 17 | } 18 | #book-search-input input{ 19 | text-align: center!important; 20 | } -------------------------------------------------------------------------------- /2016/4/2016年4月6日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年4月6日 ##javascript 每隔一个字母就变成大写。 ```js function (str){ var len=str.length; var arr=[]; var newStr=""; var cc=""; for(var i=0;i笔记目录 2 | 3 | 1. [window对象](window对象.md) 4 | 2. [HTML网页API](HTML网页API.md) 5 | 3. [DOM样式](DOM样式.md) 6 | 4. [DOM对象](DOM对象.md) 7 | 5. [数组](数组.md) 8 | 6. [JavaScript数值](JavaScript数值.md) 9 | 7. [移动端事件](移动端事件.md) 10 | 8. [函数](函数.md) 11 | 9. [CommonJS](CommonJS.md) 12 | 10. [npm](npm.md) 13 | 11. [export、import与require](export、import与require.md) 14 | 12. [Ajax](Ajax.md) 15 | 13. [Object对象](Object对象.md) 16 | 14. [标准对象](标准对象.md) 17 | 15. [JSON](JSON.md) 18 | 16. [面向对象编程](面向对象编程.md) 19 | 17. [数据类型转换](数据类型转换.md) 20 | 18. [二进制数据事件](二进制数据事件.md) 21 | -------------------------------------------------------------------------------- /2015/10/2015年10月8日.markdown: -------------------------------------------------------------------------------- 1 | #2015年10月8日 2 | ##querySelector和querySelectorAll 3 | ```js 4 | document.querySelector("body");//放回body节点 5 | document.querySelector("#k");//返回id为k的节点 6 | document.querySelector("#k span");//返回id为k的节点下的第一个span节点 7 | document.querySelector("#k").querySelector("span");//返回id为k的节点下的第一个span节点 8 | 9 | document.querySelectorAll("li");//返回所用tagName为li的节点集合(NodeList) 10 | document.querySelectorAll("div .li");//返回class为li的div 11 | ``` 12 | 13 | >querySelectorAll 方法接收的参数是一个 **CSS 选择符**。而 getElementsBy 系列接收的参数只能是单一的*className*、*tagName* 和*name*。 14 | querySelectorAll比较耗费性能。 -------------------------------------------------------------------------------- /CodeLibrary/cookie.md: -------------------------------------------------------------------------------- 1 | # cookie使用函数 2 | ```js 3 | function setCookie(name, value, iDay) 4 | { 5 | var oDate=new Date(); 6 | oDate.setDate(oDate.getDate()+iDay); 7 | 8 | document.cookie=name+'='+value+';expires='+oDate; 9 | } 10 | 11 | function getCookie(name) 12 | { 13 | var arr=document.cookie.split('; '); 14 | 15 | for(var i=0;i加上圆括号的目的是迫使eval函数在处理JavaScript代码的时候强制将括号内的表达式(expression)转化为对象,而不是作为语句(statement)来执行。 10 | 11 | ```json 12 | //示例1:此示例使用 JSON.parse 将 JSON 字符串转换为对象 13 | var jsontext = '{"firstname":"Jesper","surname":"Aaberg","phone":["555-0100","555-0120"]}'; 14 | var contact = JSON.parse(jsontext); 15 | document.write(contact.surname + ", " + contact.firstname + ", "+ contact.phone); 16 | 17 | ``` 18 | 19 | >建议使用JSON.parse(),eval()存在安全隐患。 20 | -------------------------------------------------------------------------------- /ECMAScript/Directory.md: -------------------------------------------------------------------------------- 1 |

笔记目录

2 | 1. [字符串](字符串.md) 3 | 2. [ES6基础](ES6基础.md) 4 | 3. [let与const命令](let与const命令.md) 5 | 4. [解构赋值](解构赋值.md) 6 | 5. [字符编码](字符编码.md) 7 | 6. [ES6正则表达式扩展](ES6正则表达式扩展.md) 8 | 7. [ES6数组扩展](ES6数组扩展.md) 9 | 8. [ES6函数扩展](ES6函数扩展.md) 10 | 9. [ES6对象扩展](ES6对象扩展.md) 11 | 10. [Symbol](Symbol.md) 12 | 11. [Set与Map数据结构](Set与Map数据结构.md) 13 | 12. [Promise](Promise.md) 14 | 13. [Proxy](Proxy.md) 15 | 14. [Reflect](Reflect.md) 16 | 15. [Iterator和for...of循环](Iterator和for...of循环.md) 17 | 16. [Generator](Generator.md) 18 | 17. [async](async.md) 19 | 18. [Class](Class.md) 20 | 19. [Decorator](Decorator.md) 21 | 20. [Module](Module.md) 22 | 21. [ArrayBuffer](ArrayBuffer.md) 23 | -------------------------------------------------------------------------------- /2016/3/2016年3月16日.markdown: -------------------------------------------------------------------------------- 1 | #2016年3月16日 2 | ##javascript 3 | ###实参与形参 4 | 5 | ```js 6 | function addNum(var para1,var para2){ 7 | var sum = para1+para2; 8 | return sum; 9 | } 10 | ``` 11 | 12 | 形参指函数定义时候的参数,在这里就是para1和para2。实参是实际传送给函数的参数,在这里就是20和30。 13 | 14 | ###angularjs 15 | - MVC 16 | + model 17 | + view 18 | + controller 19 | * MV的桥梁 20 | 21 | - service服务 22 | + $内部 23 | + $scope 24 | + $apply 25 | + $watch 26 | + $rootScope 27 | + $http 28 | + $timeout 29 | + $filter 30 | 31 | 32 | - directive指令 33 | + ng内部 34 | + ng-app 35 | + ng-controller 36 | + ng-repeat 37 | + ng-click 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /2016/3/2016年3月22日.markdown: -------------------------------------------------------------------------------- 1 | #2016年3月22日 2 | ##nginx 3 | 4 | **反向代理** 5 | 6 | 我们有时候,用自己的计算机A想访问国外的某个网站B,但是访问不了,此时,有一台中间服务器C可以访问国外的网站B,那么,我们可以用自己的电脑访问服务器C,通过C来访问B这个网站。那么这个时候,服务器C称为代理服务器,这种访问方式叫做正向代理。正向代理有一个特点,就是我们明确知道要访问哪个网站。再如,当我们有一个服务器集中,并且服务器集群中的每台服务器的内容一样的时候,同样我们要直接从个人电脑访问到服务器集中的服务器的时候无法访问,且此时第三方服务器能访问集群,这个时候,我们通过第三方服务器访问服务器集群的内容,但是此时我们并不知道是哪一台服务器提供的内容,此时的代理方式称为反向代理。 7 | 8 | 9 | **负载均衡** 10 | 11 | 当一台服务器的单位时间内的访问量越大的时候,服务器的压力会越大。当一台服务器压力大得超过自身的承受能力的时候,服务器会崩溃。为了避免服务器崩溃,让用户有更好地体验,我们通常通过负载均衡的方式来分担服务器的压力。那么什么是负载均衡呢?是这样,我们可以建立很多很多个服务器,这些服务器组成一个服务器集群,然后,当用户访问我们网站的时候,先访问一个中间服务器,再让这个中间服务器在服务器集群中选择一个压力较小的服务器,然后将该访问请求引入该选择的服务器。这样,用户的每次访问,都会保证服务器集群中的每个服务器的压力趋于平衡,分担了服务器压力,避免了服务器崩溃的情况。 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /2015/11/2015年11月11日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月11日 2 | ##学习资料 3 | 4 | 入门三板斧: 5 | 6 | http://www.cnblogs.com/jikey/p/3613082.html 7 | 8 | 入门看这个系列。 9 | 10 | http://pan.baidu.com/s/1pJqJvAV 11 | 12 | 入门JS视频。 13 | 14 | http://pan.baidu.com/s/1o6DTGro 15 | http://pan.baidu.com/s/1qWPntdq 16 | 17 | 入门HTML5视频 18 | 19 | http://pan.baidu.com/s/1bnlHT3x 20 | 21 | 前端开发 资料都在这里边。 22 | 23 | http://t.cn/Rv38Wg7 24 | 25 | API参考手册大全 26 | 27 | http://www.cnblogs.com/sb19871023/p/3894452.html 28 | 29 | 前端知识结构 30 | 31 | http://pan.baidu.com/s/1pJqJvAV 32 | 33 | 这个视频我当时花了一年的时间看完看懂,看完视频里边的代码敲了2边,前前后后2年。 34 | 35 | http://www.cnblogs.com/jikey/p/3613082.html 36 | 37 | 这个系列是重点,看完在看我博客,准备面试,作品什么的。 38 | 39 | http://www.cnblogs.com/jikey 40 | 41 | -------------------------------------------------------------------------------- /javascript/数组.md: -------------------------------------------------------------------------------- 1 | ##数组遍历操作 2 | 3 | - forEach():没有返回值,只是针对每个数组项调用指定的函数(callbackfn) 4 | 5 | - every(): 返回一个布尔值(true或false) ,判断每个数组项是否符合指定函数的条件,符合为true,反之为false 6 | 7 | - some(): 返回一个布尔值(true或false),判断每个数组项是否符合指定函数的条件,只要有任何一项返回为true,就会返回true 8 | 9 | - filter(): 每个数组项调用指定的函数,条件为true的将返到一个新数组中 10 | 11 | - map(): 每个数组项调用指定的函数,返回每次函数调用的结果组成一个新数组 12 | 13 | >语法都类似的,`array.keyWord(function(currentValue,index,arr), thisValue)`。 14 | 15 | 16 | `function(currentValue, index,arr)`,必须。函数,数组中的每个元素都会执行这个函数 17 | 函数参数: 18 | 19 | 参数 | 描述 20 | -----|---- 21 | currentValue | 必须。当前元素的值 22 | index | 可选。当期元素的索引值 23 | arr | 可选。当期元素属于的数组对象 24 | 25 | `thisValue` ,可选。对象作为该执行回调时使用,传递给函数,用作 "this" 的值。 26 | 如果省略了 thisValue ,"this" 的值为 "undefined" -------------------------------------------------------------------------------- /2015/11/2015年11月12日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月12日 2 | ##javascript 3 | 4 | getElementById 5 | 6 | - FF下直接使用ID存在问题 7 | - 引入document.getElementById() 8 | - document.getElementById在任何浏览器下均可以使用 9 | 10 | 网站换肤 11 | 12 | - 任何标签都可以加ID,包括link 13 | - 任何标签的属性,都可以修改 14 | - HTML里怎样写 ,javascript就怎样写 15 | 16 | 在DOM中,class要写成className; 17 | 18 | 字面量:看到的东西,自然知道什么。12、"abc"。 19 | 20 | 变量:var a=? 21 | 22 | style和className 23 | 24 | - 元素.style.属性=xxx是修改行间样式 25 | - 之后再修改className不会有效果 26 | 27 | **提取行间样式** 28 | 提取事件 29 | 30 | - 为元素添加事件 31 | + 时间和其他属性一样,可以用javascript添加; 32 | + window.onload的意义; 33 | + 行为、样式、结构三者分离; 34 | 35 | >元素的样式与属性,一次只能设置一次。 36 | 37 | 或者一组元素 38 | 39 | - getElementById 40 | + 数组的使用 41 | + 里面的 42 | 43 | -------------------------------------------------------------------------------- /2015/9/2015年9月3日.markdown: -------------------------------------------------------------------------------- 1 | # 2015年9月3日 2 | 3 | 4 | `each()` : 遍历一个jQuery对象,为每个匹配元素执行一个函数。 5 | `eq(index)` : 匹配指定的元素。 6 | 7 | ##标签切换 8 | ``` 9 | HTML: 10 | 11 | 16 |
17 |
18 |
19 |
20 |
21 | 22 | jQuery: 23 | 24 | $("#tabsecond li").each(function(index) { 25 | $(this).click(function(){ 26 | $("#tabsecond li.tabin").removeClass("tabin"); 27 | $(this).addClass("tabin"); 28 | }) 29 | }) 30 | ``` 31 | 32 | --- 33 | 34 | - `
`是更长远的使用方式。 35 | - HTML 标签对大小写不敏感。 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /2016/3/2016年3月13日.markdown: -------------------------------------------------------------------------------- 1 | #2016年3月13日 2 | ##javascript 3 | ###转义字符 4 | 5 | 6 | |转义字符|意义|ASCII码值(十进制)| 7 | |:---:|---|---| 8 | |\a|响铃(BEL)|007| 9 | |\b|退格(BS) ,将当前位置移到前一列|008| 10 | |\f|换页(FF),将当前位置移到下页开头|012| 11 | |\n|换行(LF) ,将当前位置移到下一行开头|010| 12 | |\r|回车(CR) ,将当前位置移到本行开头|013| 13 | |\t|水平制表(HT) (跳到下一个TAB位置)|009| 14 | |\v|垂直制表(VT)|011| 15 | |\\|代表一个反斜线字符''\'|092| 16 | |\'|代表一个单引号(撇号)字符|039| 17 | |\"|代表一个双引号字符|034| 18 | |\?|代表一个问号|063| 19 | |\0|空字符(NULL)|000| 20 | |\ddd|1到3位八进制数所代表的任意字符| 三位八进制| 21 | |\xhh|1到2位十六进制所代表的任意字符 | 二位十六进制| 22 | 23 | >常用转义字符:http://tool.oschina.net/commons?type=2 24 | 25 | >HTML、CSS特殊字符表: http://www.w3cplus.com/resources/HTML-special-character-sheets.html 26 | >HTML 特殊符号编码对照表: http://tool.chinaz.com/Tools/HtmlChar.aspx -------------------------------------------------------------------------------- /Java/继承.md: -------------------------------------------------------------------------------- 1 | # 继承 2 | 3 | 面向对象程序设计语言有三大特性:封装、继承和多态性。 4 | 5 | ## 概要 6 | 7 | 类是规则,用来制造对象的规则,所以类定义了对象的属性和行为。 8 | 9 | >继承:父类的所有方法和属性子类都会拥有,还可以拥有自己特有的方法和属性。 10 | 11 | Java的继承只允许单继承,即一个类只能有一个父类。 12 | 13 | 基本语法: 14 | ```Java 15 | class ThisClass extends SuperClass { 16 | //… 17 | } 18 | ``` 19 | 20 | 示例: 21 | 22 | ```Java 23 | // 父类 24 | public class Animal(){ 25 | public int age; 26 | 27 | //private属性不能被继承 28 | private String name; 29 | public void eat(){ 30 | System.out.println("吃东西"); 31 | } 32 | } 33 | 34 | // 子类 35 | class Dog extends Animal { 36 | 37 | } 38 | 39 | public static void main(String[] args){ 40 | Dog dog = new Dog(); 41 | 42 | dog.age = 10; 43 | dog.nane = "xiaotia n"; 44 | } 45 | ``` 46 | -------------------------------------------------------------------------------- /tool/atom.md: -------------------------------------------------------------------------------- 1 | ## atom手动安装使用 2 | 3 | 1. 本地安装 4 | 以activate-power-mode插件为例 5 | 6 | ```js 7 | cd ~/.atom/packages 8 | 9 | git clone https://github.com/JoelBesada/activate-power-mode.git 10 | 11 | cd activate-power-mode 12 | 13 | npm install 14 | 15 | ``` 16 | 17 | 然后重启。 18 | 19 | 2. 命令行安装 20 | 21 | ``` 22 | apm install atom-ternjs 23 | ``` 24 | 25 | 国内需要科学上网。 26 | 27 | 3. 下载插件文件到本地 28 | 29 | 在插件地址里点击Repo就能进到插件对应的GitHub项目页面,然后你可以选择Clone or download下载项目到本地的/Users/username/.atom/packages路径下。 30 | 31 | `.atom`默认情况下隐藏文件,Mac下的隐藏文件可以通过命令行显示出来。 32 | 33 | 显示隐藏文件: 34 | 35 | defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder 36 | 37 | 再次隐藏: 38 | 39 | defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder 40 | -------------------------------------------------------------------------------- /2015/12/2015年12月11日.markdown: -------------------------------------------------------------------------------- 1 | #2015年12月11日 2 | ##Git 3 | ###vi & vim 打开 关闭 保存 文件 4 | 5 | - 创建、打开文件: 6 | 输入`$ vi [filename]`,此时 vi 处于默认的命令模式,键盘输入字母 ‘ i ’ 进入最常用的插入编辑模式. 7 | 8 | - 保存文件 9 | 按下 “ ESC ” 键,退出编辑模式,切换到命令模式. 10 | 在命令模式下键入: 11 | " ZZ " 12 | 或者: 13 | " :wq " 14 | 保存修改并且退出 vi 15 | 16 | 如果只想保存文件,则键入: 17 | " :w " 18 | 19 | 放弃所有文件修改: 20 | 按下 " ESC " 键进入命令模式,键入 " :q! " 21 | 22 | 放弃所有文件修改,但不退出 vi ,即回退到文件打开后最后一次保存操作的状态,继续进行文件操作: 23 | 按下 " ESC " 键进入命令模式,键入 " :e! " : 24 | 25 | >参考资料[连接](http://blog.chinaunix.net/uid-20671208-id-3721795.html) 26 | 27 | `cd`:根目录; 28 | 29 | `ls`:显示目录列表 30 | 31 | `touch Readme`:生成一个叫`Readme`的文件。 32 | 33 | `git mv hellogit.rb helloworld.rb`:重命名; 34 | 35 | `git commit -m "rename hellogit.rb"`:再次 提交。 -------------------------------------------------------------------------------- /2015/9/2015年9月25日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月24日 2 | ##TCP/IP 协议族概述 3 | OSI七层模型 4 | 1. 应用层 5 | 2. 表示层 6 | 3. 会话层 7 | 4. 传输层 8 | 5. 网络层 9 | 6. 数据链路层 10 | 7. 物理层 11 | 12 | TCP/IP协议族四层模型 13 | 1. 应用层 14 | 2. 传输层 15 | 3. 网络层 16 | 4. 链路层 17 | 18 | 四层模型中各个层次的作用和特点 19 | 20 | ![test](img/2015-9-25-1.png) 21 | 22 | 四层模型中各个层次的协议 23 | 24 | ![test](img/2015-9-25-2.png) 25 | 26 | TCP报文段传输过程 27 | ![](img/2015-9-25-3.jpg) 28 | 29 | 最大传输单元 30 | 在数据链路层传输的数据包称为帧,帧的最大传输单元称为MTU。 31 | 32 | 数据分用过程 33 | 34 | ![](img/2015-9-25-4.jpg) 35 | 36 | ARP协议工作原理 37 | 38 | ARP协议作用:能实现任意网络地址到任意物理地址的转换。 39 | ARP工作原理:广播一个ARP请求,被请求的机器回应一个ARP应答,其中包含自己的物理地址。 40 | 41 | ARP请求、应答报文详解 42 | ![](img/2015-9-25-5.jpg) 43 | 44 | **DNS协议工作原理** 45 | DNS的作用:讲机器的域名转换成IP地址 46 | DNS的工作原理:解释器通过一个或者多个名字服务器来完成这种相互转换。 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /2016/3/2016年3月6日.markdown: -------------------------------------------------------------------------------- 1 | #2016年3月6日 2 | ##nodejs 3 | 4 | 在一个模块中通过var定义的变量,其作用域范围是当前模块,外部不能够直接的访问 5 | 如果我们想一个模块能够访问另外一个模块中定义的变量,可以: 6 | 7 | 1. 把变量作为global对象的一个属性,但是这样的做法是推荐 8 | 2. 使用模块对象 module 9 | 10 | **module** : 保存提供和当前模块有关的一些信息; 11 | 在这个**module**对象,有一个子对象:**exports** 对象 12 | 我们可以通过这个对象把一个模块中的局部变量对象进行提供访问 13 | 14 | 15 | ```js 16 | 17 | module.exports.a = a; 18 | 19 | 20 | 21 | var m5 = require('./5'); //这个方法的返回值,其实就被加载模块中的module.exports 22 | 23 | console.log(module); 24 | 25 | //{ a: 100 } 26 | // 27 | //module.exports = [1,2,3]; //exports 和 module.exports 的指向关系已经断开了,module.exports 给改写了,不是在这个对象上添加属性那样了 28 | //。 29 | ``` 30 | 31 | **__filename **: 返回当前模块文件解析后的绝对路径,该属性其实并非全局的,而是模块作用域下的 32 | **__dirname** : 返回当前模块文件所在目录解析后的绝对路径,该属性也不是全局的,而是模块作用域下的。 33 | 34 | -------------------------------------------------------------------------------- /2016/3/2016年3月21日.markdown: -------------------------------------------------------------------------------- 1 | #2016年3月21日 2 | ##angularjs 3 | 4 | **npm操作使用教程** 5 | 6 | ``` 7 | cd xxx //访问某个文件夹 8 | 9 | npm install angular//安装angularjs文件包 10 | 11 | npm uninstall angular //删除angularjs文件包 12 | 13 | 使用npm help 可查看某条命令的详细帮助,例如npm help install。 14 | 15 | 输入 "npm -v" 来测试是否成功安装 16 | 17 | npm install //使用 npm 命令安装模块 18 | 19 | npm install express # 本地安装 20 | npm install express -g # 全局安装 21 | 22 | npm ls -g//使用以下命令来查看所有全局安装的模块 23 | 24 | ``` 25 | 26 | - **本地安装** 27 | 28 | 1. 将安装包放在 ./node_modules 下(运行 npm 命令时所在的目录),如果没有 node_modules 目录,会在当前执行 npm 命令的目录下生成 node_modules 目录。 29 | 2. 可以通过 require() 来引入本地安装的包。 30 | 31 | 32 | - **全局安装** 33 | 34 | 1. 将安装包放在 /usr/local 下。 35 | 2. 可以直接在命令行里使用。 36 | 3. 不能通过 require() 来引入本地安装的包。 37 | 接下来我们使用全局方式安装 express -------------------------------------------------------------------------------- /2015/11/2015年11月29日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月29日 2 | ##javascript 3 | 4 | **默认行为** 5 | 6 | ```javascript 7 | document.oncontextmenu=function(ev){ 8 | var oEvent=ev||event; 9 | var oDiv=document.getElementById('div1'); 10 | oDiv.style.display='block'; 11 | oDiv.style.left=oEvent.clientX+'px'; 12 | oDiv.style.top=oEvent.clientY+'px'; 13 | 14 | return false;//阻止默认事件; 15 | } 16 | ``` 17 | 18 | >阻止默认的右键菜单,弹出自定义菜单; 19 | 20 | **事件绑定** 21 | 22 | >添加事件会相会覆盖; 23 | 24 | `attachEvent(事件名,函数)`:IE10一下支持,对应的接触绑定函数是`detachEvent(事件名,函数)`; 25 | 26 | `addEventListener(事件名,函数,false)`:支持火狐、Chrome,接触绑定函数是`removeEventListener(事件名,函数,false)`; 27 | 28 | **事件捕获** 29 | 30 | //只适用于IE; 31 | `setCapture()`:事件捕获函数; 32 | 事件就是把时间都集中到一个对象(例如按钮)中处理; 33 | 34 | `releaseCapture()`:取消事件捕获; 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /MOOC/C语言.md: -------------------------------------------------------------------------------- 1 | # C语言 2 | 3 | ## 数据类型 4 | 5 | 整数 6 | 7 | - int 8 | - printf("%d",...) 9 | - scanf("%d",...)• 10 | 11 | 带⼩小数点的数 12 | 13 | - double•printf("%f",...) 14 | - scanf("%lf",...) 15 | 16 | ### 类型区别 17 | 18 | - 类型名称:int、long、double 19 | - 输⼊入输出时的格式化:%d、%ld、%lf 20 | - 所表达的数的范围:char < short < int < float < double 21 | - 内存中所占据的⼤大⼩小:1个字节到16个字节 22 | - 内存中的表达形式:二进制数(补码)、编码 23 | 24 | 25 | ## 机器数以及源码、反码和补码 26 | 27 | 各种数据在计算机中表示的形式称为`机器数`。`机器数`有无符号和带符号之分。 28 | 29 | 原码就是原始的机器数。 30 | 31 | 原码表示法在数值前面增加了一位符号位(即最高位为符号位):正数该位为0,负数该位为1,其余位表示数值的大小。 32 | 33 | 正数: 原码、反码、补码相同; 34 | 35 | - 负数: 36 | 1. 原码的符号位为1,数值部分去绝对值的二进制。 37 | 2. 反码的符号位为1,其他位置是原码取反。 38 | 3. 补码是符号位为1,其他位置原码取反,末尾加1(等于补码加1)。 39 | 40 | 41 | ![机器数](img/机器数.jpg) 42 | 43 | 机器数的加减法建议换算成补码来计算的,然后再换回原码。 44 | >参考:http://www.cnblogs.com/zhangziqiu/archive/2011/03/30/ComputerCode.html 45 | -------------------------------------------------------------------------------- /2016/2/2016年2月29日.markdown: -------------------------------------------------------------------------------- 1 | #2016年2月29日 2 | ##javascript 3 | 4 | ###nodeType 5 | 6 | nodeType 属性可返回节点的类型。 7 | 8 | 最重要的节点类型是: 9 | 10 | |元素类型 | 节点类型| 11 | |--|--| 12 | |元素| 1| 13 | |属性| 2| 14 | |文本| 3| 15 | |注释| 8| 16 | |文档| 9| 17 | 18 | ```html5 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
JohnDoeJack
27 | 28 | 34 | 35 | 36 | //分析运行结果,其三个属性的值分别为: 37 | 38 | 分析运行结果,其三个属性的值分别为: 39 | 40 | nodeType:ATTRIBUTE_NODE 41 | 42 | nodeType值:2 43 | 44 | nodeName:属性名 // name 45 | 46 | nodeValue:属性值 //myname 47 | 48 | ``` -------------------------------------------------------------------------------- /MOOC/数据结构.md: -------------------------------------------------------------------------------- 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 | ## 抽象数据类型(Abstract Data Type) 29 | 30 | - 数据类型 31 | - 数据对象集 32 | - 数据集合相关联的操作集 33 | 34 | - 抽象:描述数据类型的方法不依赖于具体实现 35 | - 与存放数据的机器无关 36 | - 与数据存储的物理结构无关 37 | - 与实现操作的算法和编程语言均无关 38 | 39 | 40 | ## 复杂度 41 | 42 | - `空间复杂度S(n)`——根据算法写成的程序在执行时占用存储单元的长度。这个长度往往与输入数据的规模有关。空间复杂度过高的算法可能导致使用的内存超限,造成程序非正常中断。 43 | 44 | - `时间复杂度T(n)`——根据算法写成的程序在执行时耗费时间的长度。这个长度往往也与输入数据的规模有关。时间复杂度过高的低效算法可能导致我们在有生之年都等不到运行结果。 45 | 46 | 一个`for循环`的时间复杂度等于循环次数乘以循环体代码的复杂度。 47 | `if-else`结构的复杂度取决于`if`的条件判断复杂度和两个分枝部分的复杂度,总体复杂度取三者中最大。 48 | -------------------------------------------------------------------------------- /2015/9/2015年9月19日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月19日 2 | ##JavaScript高级技巧 3 | - javascript是函数级别作用域,在内部都能访问,外部不能访问内部的,内部可以访问外部的。 4 | - 函数会先收集变量。 5 | 6 | ``` 7 | function test(){ 8 | var j; 9 | alert(j); 10 | j=10; 11 | } 12 | test(); 13 | ``` 14 | >结果为:`Undefined`,注意`j`的顺序。 15 | 16 | 17 | ``` 18 | var j=100; 19 | ~function test(){ 20 | console.log(j); 21 | }(); 22 | ``` 23 | >`~`把当前函数转为表达式输出。 24 | 25 | - this的使用 26 | - dd 27 | 28 | ``` 29 | window.m=100; 30 | funciton test(){ 31 | alert(this.m); 32 | } 33 | window.test(); 34 | 35 | ``` 36 | >谁调用指代谁,this指向window。 37 | 38 | 39 | 40 | ``` 41 | this.m=1000; 42 | var obj={ 43 | m:100, 44 | test:function(){ 45 | alert(this.m); 46 | return function(){ 47 | alert(this.m); 48 | } 49 | } 50 | }; 51 | (obj.test())(); 52 | 53 | ``` 54 | >里面的function指向到了外面的window。 55 | 56 | ##前端开发调试基础 57 | `console.log(result)`打印结果; 58 | `console.error(result)`打印错误; 59 | `console.info(result)`打印信息; 60 | 61 | 62 | -------------------------------------------------------------------------------- /HTML5/meta标签.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | * [meta标签](#meta标签) 5 | * [viewport指令](#viewport指令) 6 | 7 | 8 | 9 | # meta标签 10 | ## viewport指令 11 | 12 | ```html 13 | 14 | 15 | 16 | 17 | ``` 18 | 19 | 20 | - `width`和`height`指令分别指定视区的逻辑宽度和高度。他们的值要么是以像素为单位的数字,要么是一个特殊的标记符号。`width`指令使用`device-width`标记可以指示视区宽度应为设备的屏幕宽度。类似地`height`指令使用`device-height`标记指示视区高度为设备的屏幕高度。 21 | 22 | - `user-scalable`指令指定用户是否可以缩放视区,即缩放Web页面的视图。值为yes时允许用户进行缩放,值为no时不允许缩放。 23 | 24 | - `initial-scale`指令用于设置Web页面的初始缩放比例。默认的初始缩放比例值因智能手机浏览器的不同而有所差异。通常情况下设备会在浏览器中呈现出整个Web页面,设为1.0则将显示未经缩放的Web文档。 25 | 26 | - `maximum-scale`和`minimum-scale`指令用于设置用户对Web页面缩放比例的限制。值的范围为`0.25`至`10.0`之间。与`initial-scale`相同,这些指令的值是应用于视区内容的缩放比例。 27 | -------------------------------------------------------------------------------- /2015/11/2015年11月2日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月2日 2 | ##Ajax 3 | `push()` 方法可向数组的末尾添加一个或多个元素,并返回新的长度。 4 | 5 | ```js 6 | 7 | var arr = new Array(3) 8 | arr[0] = "George" 9 | arr[1] = "John" 10 | arr[2] = "Thomas" 11 | 12 | document.write(arr + "
") 13 | document.write(arr.push("James") + "
") 14 | document.write(arr) 15 | 16 | 17 | //输出 18 | George,John,Thomas 19 | 4 20 | George,John,Thomas,James 21 | ``` 22 | 23 | `join()` 方法用于把数组中的所有元素放入一个字符串。 24 | 元素是通过指定的分隔符进行分隔的。 25 | 26 | ```js 27 | var arr = new Array(3) 28 | arr[0] = "George" 29 | arr[1] = "John" 30 | arr[2] = "Thomas" 31 | 32 | document.write(arr.join(".")) 33 | 34 | //输出: 35 | George.John.Thomas 36 | ``` 37 | 38 | Ajax的POST请求 39 | ```js 40 | xhr.setRequestHeader("Content-Type",application/json); 41 | xhr.send(json.stringify({ 42 | keyword:'c', 43 | other:'test' 44 | })); 45 | ``` 46 | 47 | Ajax超市设置 48 | ```js 49 | xhr.timeout=5000; 50 | xhr.ontimeout=function(){ 51 | console.log('timeout!'); 52 | } 53 | ``` -------------------------------------------------------------------------------- /CodeLibrary/ajax.md: -------------------------------------------------------------------------------- 1 | # Ajax请求代码 2 | ```js 3 | function ajax(url, fnSucc, fnFaild) 4 | { 5 | //1.创建Ajax对象 6 | /*if(window.XMLHttpRequest) 7 | { 8 | var oAjax=new XMLHttpRequest(); 9 | } 10 | else 11 | { 12 | var oAjax=new ActiveXObject("Microsoft.XMLHTTP");//为了我兼容IE6. 13 | 14 | }*/ 15 | 16 | var oAjax=new XMLHttpRequest()||new ActiveXObject("Microsoft.XMLHTTP"); 17 | 18 | //2.连接服务器(打开和服务器的连接) 19 | oAjax.open('GET', url, true); 20 | 21 | 22 | 23 | //3.发送 24 | oAjax.send(); 25 | 26 | //4.接收 27 | oAjax.onreadystatechange=function () 28 | { 29 | if(oAjax.readyState==4) 30 | { 31 | if(oAjax.status==200) 32 | { 33 | //alert('成功了:'+oAjax.responseText); 34 | fnSucc(oAjax.responseText); 35 | } 36 | else 37 | { 38 | //alert('失败了'); 39 | if(fnFaild) 40 | { 41 | fnFaild(); 42 | } 43 | } 44 | } 45 | }; 46 | } 47 | function fnFaild() { 48 | console.log(arguments); 49 | } 50 | 51 | function fnSucc() { 52 | console.log(arguments); 53 | } 54 | 55 | ``` 56 | -------------------------------------------------------------------------------- /2015/12/2015年12月17日.markdown: -------------------------------------------------------------------------------- 1 | #2015年12月17日 2 | ##配色 3 | 4 | 描述一个色彩有三种途径,按色彩的**色相**,**饱和度**,**亮度**。 5 | 6 | - 彩度 7 | 8 | 下图显示的是彩度(Chroma)或者称为饱和度(saturation):反应的是色彩相对于灰度的纯度 9 | 10 | ![](img/20100513052116804.jpg) 11 | 12 | - 亮度 13 | 14 | 下图显示的是彩度(Chroma)或者称为饱和度(saturation):反应的是色彩相对于灰度的纯度。 15 | 16 | ![](img/20100513052913196.jpg) 17 | 18 | - 减色 19 | 20 | 当使用颜料或者使用涂料等方式时候,我们使用减色法。减色法意味着由白色开始,随色色彩的叠加,直到黑色。 21 | 22 | ![](img/20100513071353897.gif) 23 | >CMYK 色彩模型用于减色法 24 | 25 | ![](img/20100513071354656.gif) 26 | >这个色轮用于颜料色彩搭配--减色法 27 | 28 | - 加色 29 | 30 | 如果你使用电脑来处理色彩,那么电脑上的色彩是由加色法呈现的。加色法意味着色彩是从黑色开始,随着色彩的叠加,逐渐变亮,最后成为白色。 31 | 32 | ![](img/20100513071356825.gif) 33 | >这是RGB色彩模型表示加色法,白色由R红色,G绿色,蓝色叠加而成。 34 | 35 | ![](img/20100513071356624.gif) 36 | >这个色轮用于加色。 37 | 38 | - 色环 39 | 40 | ![](img/20100515092156201.gif) 41 | >色环中根据亮度又分为积极色( Active colors,也可以称为暖色)和消极色( Passive colors也可以叫做冷色),积极色表现出活跃,积极的一面,消极色则相反。 42 | 此外还有**原色**、**间色(次色)**、**三级色**、**互补色**、**类似色**。 43 | 参考:链接; 44 | 45 | 46 | -------------------------------------------------------------------------------- /2016/2/2016年2月11日.markdown: -------------------------------------------------------------------------------- 1 | #2016年2月11日 2 | ##php 3 | 4 | **定义变量** 5 | 6 | $变量名称=值; 7 | 8 | 第一位只可以是字母、下划线。命名只能使用字母、下划线、数字。 9 | 10 | **预定义变量** 11 | 12 | - 传值中接受数据变量 13 | 14 | - $_GET 数据量小,不安全 经由HTTP GET方式来传递数据 15 | - $_POST 数据量打,安全 经由HTTP POST方式来传递数据 16 | - $_REQUEST $_GET+$_POST效率低 17 | - $_FILES 经由HTTP POST方式来上传文件 18 | 19 | 20 | - 会话 21 | 22 | - $_SESSION 23 | - $_COOKIE 24 | 25 | - 系统的环境信息 26 | 27 | - $_SERVER 28 | 29 | **数据类型** 30 | 31 | 1. 基础数据类型 32 | - 字符串 33 | 在双引号内。 34 | $str="dfswe23423"; 35 | 单引号('')会把转为字符串输出,双引号("")会作为代码执行。 36 | 转义字符:\ 37 | \n:换行 38 | \r:回车 39 | \t:水平制表符 40 | \f:换页符 41 | 42 | 43 | - 整型 44 | $a=123;//不带引号 45 | 46 | 47 | - 浮点型 48 | 正整数、负整数、0 49 | $num=3.14;// 50 | 51 | - 布尔型 52 | true、false 53 | 54 | 55 | 2. 复合类型 56 | 57 | - 数组 array 58 | - 对象 object 59 | 60 | 3. 特殊类型 61 | 62 | - 资源 resource 63 | 64 | - 空值 null 没有值 65 | 66 | $m=null; 67 | $t=""; 68 | unset($m);//释放变量 69 | 70 | 71 | var_dump();结果返回变量的数据类型。 -------------------------------------------------------------------------------- /2015/10/2015年10月15日.markdown: -------------------------------------------------------------------------------- 1 | #2015年10月15日 2 | ##Python 3 | 4 | - 数字类型的运算 5 | 6 | |运算符和运算函数 |操作含义| 7 | |-------- |--------- | 8 | |x+y |x与y之和| 9 | |x-y |x与y之差| 10 | |x*y |x与y之积| 11 | |x/y |x与y之商| 12 | |x//y| 不大于x与y之商的最大整数| 13 | |x%y |x与y之商的余数| 14 | |+x |x| 15 | |-x |x的负值| 16 | |x**y| x的y次幂| 17 | |abs(x)| x的绝对值| 18 | |divmod(x,y) |(x//y,x%y)| 19 | |pow(x,y)| x的y次幂| 20 | 21 | - 字符串处理方法 22 | 23 | |操作 | 含义 | 24 | |------------------------|-----------------------| 25 | |+| 连接| 26 | |* |重复| 27 | |< string>[ ]| 索引| 28 | |< string>[ : ]| 剪切| 29 | |len(< string>)| 长度| 30 | |< string>.upper()| 字符串中字母大写| 31 | |< string>.lower()| 字符串中字母小写| 32 | |< string>.strip()| 去两边空格及去指定字符| 33 | |< string>.split()| 按指定字符分割字符串为数组| 34 | |< string>.join()| 连接两个字符串序列| 35 | |< string>.find()| 搜索指定字符串| 36 | |< string>.replace()| 字符串替换| 37 | |for < var> in < string>|字符串迭代 | 38 | 39 | ```python 40 | 41 | # month.py 42 | months="JanFebMarAprMayJunJulAugSepOctNovDec" 43 | n=input("请输入月份数(1-12):") 44 | pos=(int(n)-1)*3 45 | monthAbbrev=months[pos:pos+3] 46 | print("月份数是"+monthAbbrev+".") 47 | 48 | 49 | ``` -------------------------------------------------------------------------------- /2015/12/2015年12月18日.markdown: -------------------------------------------------------------------------------- 1 | #2015年12月18日 2 | ##javascript 3 | ###面向对象 4 | 5 | ```js 6 | oDiv.onclick=function(){ 7 | alert(this); 8 | } 9 | ``` 10 | 11 | >给一对象添加**事件**(click事件),等于给一个对象添加**方法**(function); 12 | 13 | **this** 14 | 15 | - 当前发生事件的对象 16 | - 当前的方法属于谁,this就是谁。 17 | 18 | **对象的组成** 19 | 20 | - 方法——函数:过程、动态的 21 | - 属性——变量:状态、静态的 22 | 23 | **类与对象** 24 | 25 | 类:模子 26 | 对象:产品 27 | 28 | var arr=new Array(1,2,3,4,5) 29 | 30 | Array----- 类 31 | arr ----- 对象 32 | 33 | 用构造函数加属性 34 | 用原型加方法 35 | 36 | **继承** 37 | 38 | ```javascript 39 | A.prototype.show=function () 40 | { 41 | alert(this.abc); 42 | }; 43 | for(var i in A.prototype) 44 | { 45 | B.prototype[i]=A.prototype[i]; 46 | 47 | } 48 | B.prototype.fn=function(){ 49 | alert('abc'); 50 | } 51 | var objA=new A(); 52 | var objB=new B(); 53 | 54 | objA.fn();//error. 55 | 56 | ``` 57 | 58 | `call()`:可以改变函数`this`的指向。 59 | 60 | ```javascript 61 | function A(){ 62 | this.abc=12; 63 | } 64 | 65 | function B(){ 66 | //这里的this指-->new B(),把A的this指向了B的this,本来给A加的属性,变成给B加的属性。 67 | A.call(this); 68 | } 69 | ``` 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 沐霖 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /2016/5/2016年5月26日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年5月26日 ##jQuery **滚动监听** ```js $(window).scroll(function () { var $currentWindow = $(window); //当前窗口的高度 var windowHeight = $currentWindow.height(); console.log("current widow height is " + windowHeight); //当前滚动条从上往下滚动的距离 var scrollTop = $currentWindow.scrollTop(); console.log("current scrollOffset is " + scrollTop); //当前文档的高度 var docHeight = $(document).height(); console.log("current docHeight is " + docHeight); //当 滚动条距底部的距离 + 滚动条滚动的距离 >= 文档的高度 - 窗口的高度 //换句话说:(滚动条滚动的距离 + 窗口的高度 = 文档的高度) 这个是基本的公式 if ((BOTTOM_OFFSET + scrollTop) >= docHeight - windowHeight) { createListItems(); } }); ``` window.innerHeight – 浏览器窗口的内部高度,包括滚动条 window.innerWidth – 浏览器窗口的内部宽度,包括滚动条 document.documentElement.clientHeight,根元素html的高度。 document.documentElement.clientWidth,根元素html的宽度。 >documentElement 是整个节点树的根节点root,即 标签; document.body.clientHeight,body元素的高度,可有元素撑起,或者自定义。 document.body.clientWidth,body元素的宽度,可有元素撑起,或者自定义。 >clientTop实际上就是border的高度; -------------------------------------------------------------------------------- /2015/9/2015年9月16日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月16日 2 | ##Git 3 | **Git使用40个16进制字符的SHA-1 Hash来唯一标识对象。** 4 | 5 | e98757d0598ab6eeaf1df0d87dd00826048bd80b 6 | ![Alt text](img/2015年9月16日-1.jpg) 7 | 8 | ### 远程仓库相关命令 9 | 10 | 检出仓库:$ git clone git://github.com/jquery/jquery.git 11 | 12 | 查看远程仓库:$ git remote -v 13 | 14 | 添加远程仓库:$ git remote add [name] [url] 15 | 16 | 删除远程仓库:$ git remote rm [name] 17 | 18 | 拉取远程仓库:$ git pull [remoteName] [localBranchName] 19 | 20 | 推送远程仓库:$ git push [remoteName] [localBranchName] 21 | 22 | ###分支(branch)操作相关命令 23 | 24 | 查看本地分支:$ git branch 25 | 26 | 查看远程分支:$ git branch -r 27 | 28 | 创建本地分支:$ git branch [name] ----注意新分支创建后不会自动切换为当前分支 29 | 30 | 切换分支:$ git checkout [name] 31 | 32 | 创建新分支并立即切换到新分支:$ git checkout -b [name] 33 | 34 | 删除分支:$ git branch -d [name] ---- -d选项只能删除已经参与了合并的分支,对于未有合并的分支是无法删除的。如果想强制删除一个分支,可以使用-D选项 35 | 36 | 合并分支:$ git merge [name] ----将名称为[name]的分支与当前分支合并 37 | 38 | 创建远程分支(本地分支push到远程):$ git push origin [name] 39 | 40 | 删除远程分支:$ git push origin :heads/[name] 41 | 42 | 43 | 44 | 45 | ##慕课笔记 46 | 互联网创业发展方向 47 | - 互联网+ 48 | >对传统行业的改造。 49 | 50 | 51 | - 文化+ 52 | >情感连接。 53 | >小米是一种情感的连接。 54 | 55 | BAT不形成垄断,小团队执行力、创新力都比较高。 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /2015/9/2015年9月29日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月29日 2 | ##CSS内部的分类及其顺序 3 | - 布局(grid)(.g-):将页面分割为几个大块,通常有头部、主体、主栏、侧栏、尾部等! 4 | - 模块(module)(.m-):通常是一个语义化的可以重复使用的较大的整体!比如导航、登录、注册、各种列表、评论、搜索等! 5 | - 元件(unit)(.u-):通常是一个不可再分的较为小巧的个体,通常被重复用于各种模块中!比如按钮、输入框、loading、图标等! 6 | - 功能(function)(.f-):为方便一些常用样式的使用,我们将这些使用率较高的样式剥离出来,按需使用,通常这些选择器具有固定样式表现,比如清除浮动等!不可滥用! 7 | - 皮肤(skin)(.s-):如果你需要把皮肤型的样式抽离出来,通常为文字色、背景色(图)、边框色等,非换肤型网站通常只提取文字色!非换肤型网站不可滥用此类! 8 | - 状态(.z-):为状态类样式加入前缀,统一标识,方便识别,她只能组合使用或作为后代出现(.u-ipt.z-dis{},.m-list li.z-sel{})。 9 | 10 | ```css 11 | /* 重置 */ 12 | div,p,ul,ol,li{margin:0;padding:0;} 13 | /* 默认 */ 14 | strong,em{font-style:normal;font-weight:bold;} 15 | /* 统一调用背景图 */ 16 | .m-logo a,.m-nav a,.m-nav em{background:url(images/sprite.png) no-repeat 9999px 9999px;} 17 | /* 统一清除浮动 */ 18 | .g-bdc:after,.m-dimg ul:after,.u-tab:after{display:block;visibility:hidden;clear:both;height:0;overflow:hidden;content:'.';} 19 | .g-bdc,.m-dimg ul,.u-tab{zoom:1;} 20 | /* 布局 */ 21 | .g-sd{float:left;width:300px;} 22 | /* 模块 */ 23 | .m-logo{width:200px;height:50px;} 24 | /* 元件 */ 25 | .u-btn{height:20px;border:1px solid #333;} 26 | /* 功能 */ 27 | .f-tac{text-align:center;} 28 | /* 皮肤 */ 29 | .s-fc,a.s-fc:hover{color:#fff;} 30 | ``` 31 | -------------------------------------------------------------------------------- /Vue/Vue模块.md: -------------------------------------------------------------------------------- 1 | # Vue模块 2 | 3 | ## vue-cli工程目录 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 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 |
目录/文件说明
build最终发布的代码存放位置。
config配置目录,包括端口号等。我们初学可以使用默认的。
node_modulesnpm 加载的项目依赖模块
src

这里是我们要开发的目录,基本上要做的事情都在这个目录里。里面包含了几个目录及文件:

28 |
    29 |
  • assets: 放置一些图片,如logo等。
  • 30 |
  • components: 目录里面放了一个组件文件,可以不用。
  • 31 |
  • App.vue: 项目入口文件,我们也可以直接将组建写这里,而不使用 components 目录。
  • 32 |
  • main.js: 项目的核心文件。
  • 33 |
34 |
static静态资源目录,如图片、字体等。
test初始测试目录,可删除
.xxxx文件这些是一些配置文件,包括语法配置,git配置等。
index.html首页入口文件,你可以添加一些 meta 信息或同统计代码啥的。
package.json项目配置文件。
README.md项目的说明文档,markdown 格式
-------------------------------------------------------------------------------- /2015/9/2015年9月17日.markdown: -------------------------------------------------------------------------------- 1 | #2015年9月17日 2 | ##javascript模块化 3 | 参看文章:http://www.ruanyifeng.com/blog/2012/10/javascript_module.html 。 4 | 5 | 6 | **匿名函数自调用** 7 | ``` 8 | (function foo() {...})// 这里是故意换行,实际上可以和下面的括号连起来 9 | (); 10 | 11 | 这就等价于: 12 | 13 | var foo = function () {...};// 这就不是定义,而是表达式了。 14 | foo(); 15 | ``` 16 | >` (function(){...})()` 与 `(function(){...}())`没有区别。 17 | 18 | 函数的定义,大致可分为三种方式 19 | 20 | 第一种:这也是最常规的一种 21 | ``` 22 | function double(x){ 23 | return 2 * x; 24 | } 25 | ``` 26 | 27 | 第二种:这种方法使用了Function构造函数,把参数列表和函数体都作为字符串,很不方便,不建议使用。 28 | ``` 29 | var double = new Function('x', 'return 2 * x;'); 30 | ``` 31 | 32 | 第三种: 33 | ``` 34 | var double = function(x) { return 2* x; } 35 | ``` 36 | 注意“=”右边的函数就是一个匿名函数,创造完毕函数后,又将该函数赋给了变量double。 37 | 38 | >上面三种方法定义了同一个方法函数fnMethodName,第1种就是最常用的方法,后两种都是把一个函数复制给变量fnMethodName,而这个函数是没有名字的,即匿名函数。 39 | 40 | 41 | **闭包** 42 | ```   43 | function f1(){ 44 |     var n=999; 45 |     function f2(){ 46 |       alert(n); 47 |     } 48 |     return f2; 49 |   } 50 |   var result=f1(); 51 |   result(); // 999 52 | ``` 53 | >代码中的f2函数,就是**闭包**。 54 | 各种专业文献上的"闭包"(closure)定义非常抽象,很难看懂。我的理解是,闭包就是能够读取其他函数内部变量的函数。 55 | 由于在Javascript语言中,只有函数内部的子函数才能读取局部变量,因此可以把闭包简单理解成"定义在一个函数内部的函数"。 56 | 所以,在本质上,闭包就是将函数内部和函数外部连接起来的一座桥梁。 57 | 58 | -------------------------------------------------------------------------------- /2016/3/2016年3月5日.markdown: -------------------------------------------------------------------------------- 1 | #2016年3月5日 2 | ##javascript 3 | 4 | - parseInt(string, radix) 函数 5 | 6 | **radix**: 可选。表示要解析的数字的基数。该值介于 2 ~ 36 之间。 7 | 8 | 函数可解析一个字符串,并返回一个十进制整数。 9 | 10 | - 进制转换 11 | 12 | ```javascript 13 | //十进制转其他 14 | var x=110; 15 | alert(x); 16 | alert(x.toString(8)); 17 | alert(x.toString(32)); 18 | alert(x.toString(16)); 19 | //其他转十进制 20 | var x='110'; 21 | alert(parseInt(x,2)); 22 | alert(parseInt(x,8)); 23 | alert(parseInt(x,16)); 24 | //其他转其他 25 | //先用parseInt转成十进制再用toString转到目标进制 26 | alert(String.fromCharCode(parseInt(141,8)))//"a" 27 | alert(parseInt('ff',16).toString(2));//"11111111" 28 | ``` 29 | 30 | ##nodejs 31 | 32 | 在ecmascript部分node和js其实是一样的,比如数据类型的定义,语法结构,内置对象 33 | 34 | 在js中的顶层对象: window 35 | 36 | 在node中的顶层对象: global 37 | 38 | 39 | > 注意:在node中也没有什么window 40 | 41 | 42 | 一个文件就是一个模块 43 | 44 | 每个模块都有自己的作用域 45 | 46 | 我们使用var来申明的一个变量,他并不是全局的,而是属于当前模块下 47 | 48 | **__filename**:当前文件被解析过后的绝对路径; 49 | 50 | **require('模块')**:模块加载; 51 | 52 | 模块加载机制: 53 | 54 | - 路径 55 | - 绝对路径 56 | - 相对路径 57 | 58 | - 查找方式 59 | 60 | 1. 首先按照加载的模块的文件名称进行查找 61 | 2. 如果没有找到,则会在模块文件名称后加上.js的后缀,进行查找 62 | 3. 如果还没有找到,则会在文件名称后加上.json的后缀,进行查找 63 | 4. 如果还没有,则会在文件名称后加上.node的后缀,进行查找 64 | 65 | >文件名称 -> .js -> .json -> .node 66 | -------------------------------------------------------------------------------- /2016/2/2016年2月5日.markdown: -------------------------------------------------------------------------------- 1 | #2016年2月5日 2 | ##javascript 3 | ###面向对象 4 | 5 | - 方法---函数:过程、动态的 6 | - 属性---变量:状态、静态的 7 | 8 | 属性、方法:属于一个对象; 9 | 变量、函数:自由的,不属于任何人。 10 | 11 | ```js 12 | oDiv.onclick=function(){ 13 | alert(this); 14 | } 15 | ``` 16 | 17 | 给一个对象添加事件,等于给这个对象添加方法。 18 | 19 | **this**:当前发生事件的对象,当前的方法属于谁,this就属于谁。 20 | 21 | ```js 22 | function createPerson(name,qq){//构造函数 23 | obj.name=name; 24 | obj.qq=qq; 25 | 26 | obj.showName=function(){ 27 | alert(this.name); 28 | }; 29 | .... 30 | 31 | } 32 | ``` 33 | 34 | **原型** 35 | 36 | ```js 37 | var arr1=new Array(12,23,43,43); 38 | var arr2=new Array(33,3,45); 39 | 40 | Array.prototype.sum=function(){//类似于class,Array可以看作一个标签。 41 | //arr1.sum=function() //类似行间样式 42 | var result=0; 43 | 44 | for(var i=0;i函数调用时加上**new**,系统会默认执行以下函数: 63 | var this=new Object(); 64 | 65 | > //把this指向新创建的对象, 66 | //而且,最后系统会默认返回这个**this**: 67 | 68 | > return this; 69 | > 70 | 71 | 72 | Array 类 73 | arr 对象 74 | 75 | 用构造函数加属性,用原型加方法。 -------------------------------------------------------------------------------- /2016/2/2016年2月13日.markdown: -------------------------------------------------------------------------------- 1 | #2016年2月13日 2 | ##php 3 | 4 | **字符串函数** 5 | 6 | - strlen() 7 | 8 | 函数返回字符串的长度。 9 | 10 | $str1="sdfsdsgFDGr32";//13,字符位置从0~12 11 | 12 | 13 | - strtolower() 14 | 15 | 字符串都转化成全小写 16 | 17 | - strtoupper() 18 | 19 | 字符串大写 20 | 21 | - ucfirst() 22 | 23 | 把字符串中的首字符转换为大写。 24 | 25 | 26 | - ucwords() 27 | 28 | 把字符串中每个单词的首字符转换为大写。 29 | 30 | 31 | - strrev() 32 | 33 | 反转字符串。 34 | 35 | - trim() 36 | 37 | 移除字符串两侧的空白字符和其他字符。 38 | 则移除以下所有字符: 39 | 40 | - "\0" - NULL 41 | - "\t" - 制表符 42 | - "\n" - 换行 43 | - "\x0B" - 垂直制表符 44 | - "\r" - 回车 45 | - " " - 空格 46 | 47 | - str_replace(find,replace,string,count) 48 | 49 | 以其他字符替换字符串中的一些字符(区分大小写)。 50 | 51 | ```php 52 | 55 | ``` 56 | 57 | - strpos() 58 | 59 | 查找字符串在另一字符串中第一次出现的位置。 60 | 61 | 类似的: 62 | 63 | - stripos() - 查找字符串在另一字符串中第一次出现的位置(不区分大小写) 64 | - strripos() - 查找字符串在另一字符串中最后一次出现的位置(不区分大小写) 65 | - strrpos() - 查找字符串在另一字符串中最后一次出现的位置(区分大小写) 66 | 67 | - substr(string,start,length) 68 | 69 | 函数返回字符串的一部分。 70 | 71 | - md5(string,raw) 72 | 73 | 计算字符串的 MD5 散列。 74 | 75 | - unset ( mixed $var [, mixed $... ] ) 76 | 77 | 释放变量 78 | 79 | 80 | -------------------------------------------------------------------------------- /2015/10/2015年10月20日.markdown: -------------------------------------------------------------------------------- 1 | #2015年10月20日 2 | ##Ajax 3 | 概念介绍 4 | - 运动HTML和css实现页面,表达信息。 5 | - 运行XMLHttpRequest和web服务器进行数据的异步交换。 6 | - 运行javascript操作DOM,实现动态局部刷新。 7 | 8 | 首先要构建XML对象 9 | 10 | ```js 11 | var xmlhttp; 12 | if (window.XMLHttpRequest) 13 | {// code for IE7+, Firefox, Chrome, Opera, Safari 14 | xmlhttp=new XMLHttpRequest(); 15 | } 16 | else 17 | {// code for IE6, IE5 18 | xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 19 | } 20 | ``` 21 | 22 | **`HTTP`一种无状态协议。** 23 | HTTP请求的七个步骤: 24 | - 建立TCP连接 25 | - Web浏览器向Web服务器发送请求命令 26 | - Web浏览器发送请求头信息 27 | - Web服务器应答 28 | - Web服务器发送应答头信息 29 | - Web服务器向浏览器发送数据 30 | - Web服务器关闭TCP连接 31 | 32 | **HTTP请求** 33 | ![txt](img/HTTP.jpg) 34 | 35 | **XHR发送请求** 36 | - open(method,url,async) 37 | - send(string) 38 | 39 | **XMLHttpRequest取得响应** 40 | ![txt](img/HTTP-2.jpg) 41 | 42 | **readyState属性** 43 | - 0:请求未初始化,open还没有调用。 44 | - 1:服务器连接已建立,open已经调用了。 45 | - 2:请求已接受,也就是接收到头信息。 46 | - 3:请求处理中,也就是接收到响应主体。 47 | - 4:请求已完成,且响应已就绪,也就是响应完成了。 48 | 49 | 监听代码: 50 | ```js 51 | var request=new XMLHttpRequest(); 52 | request.open("GET","get.php",true); 53 | request.send(); 54 | request.onreadystatechange=function{ 55 | if(request.readyState===4&&request.status===200){ 56 | //做一些事情 request.responseText 57 | } 58 | } 59 | ``` 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /2015/11/2015年11月28日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月28日 2 | ##javascript 3 | 4 | alert(document.childNodes[1].tagName); 5 | //HTML 6 | 7 | `document`是文件的最顶层标签,一般隐藏。 8 | 9 | 事件处理函数 10 | 11 | ```js 12 | //IE 13 | //alert(event.clientX+','+event.clientY); 14 | // 15 | //FF 16 | //alert(ev.clientX+','+ev.clientY); 17 | // 18 | // 19 | //兼容写法 20 | oEvent=ev||event; 21 | 22 | 23 | ``` 24 | 25 | 事件冒泡 26 | 27 | 冒泡从最底层的标签开始,然后一层层向上触发事件。 28 | 29 | oEvent.cancelBubble=true;//取消事件冒泡。 30 | 31 | 32 | **onmousemove** 33 | 34 | scrollTop=document.documentElement.scrollTop||document.body.scrollTop; 35 | 36 | 封装函数 37 | 38 | ```javascript 39 | function getPos(ev){ 40 | var scrollTop=document.documentElement.scrollTop||document.body.scrollTop; 41 | var scrollLeft=document.documentElement.scrollLeft||document.body.scrollLeft; 42 | 43 | return{x:ev.clientX+scrollLeft,y:ev.clientY+scrollTop}; 44 | 45 | } 46 | ``` 47 | 48 | **onkeydown、onkeyup** 49 | 50 | ```javascript 51 | document.onkeyup=function (ev) 52 | { 53 | var oEvent=ev||event; 54 | 55 | alert(oEvent.keyCode);//弹出按键字母对应的ASCII表的数字。 56 | }; 57 | 58 | ``` 59 | 60 | `oEvent.keyCode==13 && oEvent.ctrlKey`:回车加`ctrl`触发事件函数; 61 | 62 | `oEvent.keyCode==13 && oEvent.keyCode==16`在浏览器中没有反应; 63 | 64 | >还有`shiftKey`,`altKey`,用来确定按键有没有被按下去。 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /tool/typings.md: -------------------------------------------------------------------------------- 1 | ##安装 2 | 3 | 使用npm全局安装typings 4 | 5 | npm install -g typings 6 | 7 | 8 | ##安装插件 9 | 10 | 以安装`node.js`自动补全为例,在项目根目录下使用bash或者cmd,输 11 | 12 | typings install dt-node --global 13 | 14 | 其中`dt~`为使用DefinitelyTyped类型定义的意思,vscode可以识别这种定义。 15 | 16 | 同理,安装`express`、`lodash`: 17 | 18 | ``` 19 | typings install dt~express --global 20 | typings install dt~lodash --global 21 | ``` 22 | 23 | ##typings基本语法 24 | 25 | ```nodejs 26 | # 安装Typings的命令行代码. 27 | npm install typings --global 28 | 29 | # 搜索对应模块的typings定义. 30 | typings search tape 31 | 32 | # 根据名称寻找一个可获得的typings定义. 33 | typings search --name react 34 | 35 | # 如果你用一个独立包的模块: 36 | # 或者并不是安装全局模块 37 | # 比如并不是在命令行通过输入npm install -g typings这种方式安装的. 38 | typings install debug --save 39 | 40 | # 如果是通过script标记 41 | # 或者是子环境的一部分 42 | # 或者全局typings命令不可用的时候: 43 | typings install dt~mocha --global --save 44 | 45 | # 从其他版本处安装typings定义(比如env或者npm). 46 | typings install env~atom --global --save 47 | typings install npm~bluebird --save 48 | 49 | # 使用该文件`typings/index.d.ts` (在`tsconfig.json`文件使用或者用 `///` 定义). 50 | cat typings/index.d.ts 51 | ``` 52 | 53 | ##typings使用 54 | 55 | 添加文件链接到`js`文件头部 56 | 57 | /// 58 | 59 | >参看:http://www.cnblogs.com/Leo_wl/p/5455619.html 60 | >http://blog.csdn.net/liyijun4114/article/details/51658087 61 | -------------------------------------------------------------------------------- /2016/3/2016年3月9日.markdown: -------------------------------------------------------------------------------- 1 | #2016年3月9日 2 | ##nodejs 3 | 4 | ###fs模块 5 | 6 | **fs.open(path, flags, [mode], callback)** 7 | >异步打开一个文件 8 | 9 | - path : 要打开的文件的路径 10 | 11 | - flags : 打开文件的方式 读/写 12 | 13 | - mode : 设置文件的模式 读/写/执行 4/2/1(可以不填,意义不大)) 14 | 15 | - callback : 回调 16 | + err : 文件打开失败的错误保存在err里面,如果成功err为null 17 | + fd : 被打开文件的标识,和定时器 18 | 19 | ```js 20 | fs.open('1.txt', 'r', function(err, fd) { 21 | 22 | //console.log(err); 23 | //console.log(fd); 24 | 25 | if (err) { 26 | console.log( '文件打开失败' ); 27 | } else { 28 | console.log( '文件打开成功' ); 29 | console.log( fd ); 30 | } 31 | 32 | }); 33 | 34 | //结果: 35 | 36 | null 37 | 3 38 | 文件打开成功 39 | 3 40 | 41 | 42 | 43 | fs.open('1.txt', 'r', function(err, fd) { 44 | console.log(fd); 45 | }); 46 | 47 | console.log("hello"); 48 | 49 | //结果 50 | hello 51 | 3 52 | //两个操作独自运行,打开文件需要一定时间,所以先输出"hello"。 53 | ``` 54 | 55 | 56 | **fs.openSync(path, flags, [mode])** 57 | >fs.open() 的同步版. 58 | 59 | 60 | **fs.read(fd, buffer, offset, length, position, callback)** 61 | >从指定的文档标识符fd读取文件数据。 62 | 63 | - fd : 通过open方法成功打开一个文件返回的编号 64 | - buffer : buffer对象 65 | - offset : 新的内容添加到buffer中的起始位置 66 | - length : 添加到buffer中内容的长度 67 | - position :读取的文件中的起始位置 68 | - callback : 回调 69 | + err 70 | + buffer的长度 71 | + buffer对象 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /CSS/CSS选择器.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | * [CSS选择器](#css选择器) 5 | * [元素选择器](#元素选择器) 6 | * [关系选择器](#关系选择器) 7 | 8 | 9 | 10 | # CSS选择器 11 | 12 | ## 元素选择器 13 | 14 | ```css 15 | p {line-height:1.5em; margin-bottom:1em;} 16 | ``` 17 | 18 | ## 关系选择器 19 | 20 | - E F:后代选择器,该选择器选择元素E的后代中所有元素F: 21 | 22 | ```css 23 | ul li {margin-bottom:0.5em;} 24 | ``` 25 | 26 | - E > F:子选择器,该选择器选择元素E的直接子元素中的所有元素F。 27 | 28 | ```css 29 | ul>li{color: blue;} 30 | ``` 31 | 32 | ```html 33 |
    34 |
  • ao
  • 35 |
  • bo
  • 36 |
  • co
  • 37 |
  • 38 | do 39 |
      40 |
    • 1121
    • 41 |
    • 1121
    • 42 |
    • 1121
    • 43 |
    • 1121
    • 44 |
    45 |
  • 46 |
47 | ``` 48 | 49 | 以上都`li`标签字体颜色都是蓝色。 50 | 51 | - E + F:相邻兄弟选择器,元素F与元素E具有相同父元素,且位于E元素后面的F元素会被选中,这个选择器只会选择一个,但可以循环下去。 52 | 53 | 54 | ```css 55 | .test +li{ 56 | color: blue; 57 | } 58 | ``` 59 | ![css_selector](img/css_selector.jpg) 60 | 61 | ```css 62 | li +li { 63 | color: blue; 64 | } 65 | ``` 66 | ![css_selector](img/css_selector_2.jpg) 67 | 68 | >1121这个数字是蓝色,原因是继承了父元素样式。 69 | 70 | - E ~ F:通用兄弟选择器,该选择器要求有共同父元素的,且E元素后面的所有F元素会被选中。 71 | 72 | ![css_selector](img/css_selector_3.jpg) 73 | 74 | >参考:http://www.w3cplus.com/css3/basic-selectors 75 | -------------------------------------------------------------------------------- /2016/2/2016年2月6日.markdown: -------------------------------------------------------------------------------- 1 | #2016年2月6日 2 | ##javascript 3 | ###面向对象 4 | 5 | **自执行函数** 6 | 7 | ```js 8 | (function () { /* code */ } ()); // 推荐使用这个 9 | (function () { /* code */ })(); // 但是这个也是可以用的 10 | ``` 11 | 12 | 13 | **命名空间** 14 | ```js 15 | 16 | zns.common.getUser=function () 17 | { 18 | alert('a'); 19 | }; 20 | 21 | zns.fx.getUser=function () 22 | { 23 | alert('b'); 24 | }; 25 | 26 | zns.site.getUser=function () 27 | { 28 | alert('c'); 29 | }; 30 | 31 | zns.common.getUser(); 32 | zns.fx.getUser(); 33 | zns.site.getUser(); 34 | 35 | ``` 36 | 37 | **继承** 38 | 39 | **call()**可以改变**this**的指向。 40 | 41 | ```javascript 42 | function show(a, b) 43 | { 44 | alert('this是:'+this+'\na是:'+a+'\nb是:'+b); 45 | } 46 | 47 | //show(12, 5); 48 | 49 | 50 | //第一个是**call**的指向。 51 | show.call('abc', 12, 5); 52 | ``` 53 | 54 | 继承 55 | 56 | ```js 57 | function A(){ 58 | this.abc=12; 59 | } 60 | A.prototype.show=function(){ 61 | alert(this.abc); 62 | } 63 | 64 | //继承A的属性 65 | function B(){ 66 | //this->new B() 67 | A.call(this); 68 | } 69 | var obj=new B(); 70 | alert(obj.abc);//12 71 | 72 | 73 | //继承方法 74 | B.prototype=A.prototype;//会引用相同的内容 75 | var obj=new B(); 76 | obj.show();//12 77 | 78 | ``` 79 | 80 | ```js 81 | //B.prototype=A.prototype; 82 | //会引用相同的内容 83 | // 84 | //不引用复制 85 | for(var i in A.prototype){ 86 | B.prototype[i]=A.prototype[i]; 87 | } 88 | ``` 89 | 90 | -------------------------------------------------------------------------------- /2016/5/2016年5月4日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年5月4日 ##移动端开发 alert(document.documentElement.clientWidth);//文档屏幕宽度 window.screen.width//设备屏幕宽度 alert(window.devicePixelRatio);//设备物理像素与设备独立像素的比值 - **事件** 1. touchstart 手指按上 2. touchmove 手指按着移动 3. touchend 手指移开 - **touchEvent** 1. touches 当前位于屏幕上的所有手指的一个列表 2. targetTouches 位于当前DOM元素上的手指的一个列表 3. changedTouches 涉及当前事件的手指的一个列表 ```js box.ontouchend=function(ev){ console.log("3..."); console.log(ev.touches); console.log(ev.targetTouches); console.log(ev.changedTouches); } ``` - **自定义属性** 使用JavaScript操作dataset: 1. 我们在添加或读取属性的时候需要去掉前缀data-*,像上面的例子我们没有使用test.dataset.data-my = 'Byron';的形式。 2. 如果属性名称中还包含连字符(-),需要转成驼峰命名方式,但如果在CSS中使用选择器,我们需要使用连字符格式 ```css div[data-birth-date] { background-color: #0f0; width:100px; margin:20px; } ``` 使用getAttribute/setAttribute操作 ```js var test = document.getElementById('test'); test.dataset.birthDate = '19890615'; test.setAttribute('age', 25); test.setAttribute('data-sex', 'male'); console.log(test.getAttribute('data-age')); //24 console.log(test.getAttribute('data-birth-date')); //19890516 console.log(test.dataset.age); //24 console.log(test.dataset.sex); //male ``` 所有自定义属性在dataset对象中统一管理,方便调用遍历。 ```html ``` -------------------------------------------------------------------------------- /2016/4/2016年4月1日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年4月1日 ##js ###constructor 属性 对象的`constructor`属性用于返回创建该对象的函数,也就是我们常说的**构造函数**。 ```js // 字符串:String() var str = "张三"; document.writeln(str.constructor); // function String() { [native code] } document.writeln(str.constructor === String); // true // 数组:Array() var arr = [1, 2, 3]; document.writeln(arr.constructor); // function Array() { [native code] } document.writeln(arr.constructor === Array); // true // 数字:Number() var num = 5; document.writeln(num.constructor); // function Number() { [native code] } document.writeln(num.constructor === Number); // true // 自定义对象:Person() function Person(){ this.name = "CodePlayer"; } var p = new Person(); document.writeln(p.constructor); // function Person(){ this.name = "CodePlayer"; } document.writeln(p.constructor === Person); // true // JSON对象:Object() var o = { "name" : "张三"}; document.writeln(o.constructor); // function Object() { [native code] } document.writeln(o.constructor === Object); // true // 自定义函数:Function() function foo(){ alert("CodePlayer"); } document.writeln(foo.constructor); // function Function() { [native code] } document.writeln(foo.constructor === Function); // true // 函数的原型:bar() function bar(){ alert("CodePlayer"); } document.writeln(bar.prototype.constructor); // function bar(){ alert("CodePlayer"); } document.writeln(bar.prototype.constructor === bar); // true ``` >代码中的`[native code]`这是JavaScript的底层内部代码实现,无法显示代码细节。 -------------------------------------------------------------------------------- /javascript/CommonJS.md: -------------------------------------------------------------------------------- 1 | ##概述 2 | 3 | **CommonJS**规范中,每个模块可以是一个文件,一个文件也可以就是一个函数。 4 | 所以每个模块就是一个单独的作用域。 5 | 6 | ```js 7 | // example.js 8 | var x = 5; 9 | var addX = function(value) { 10 | return value + x; 11 | }; 12 | ``` 13 | 14 | global.warning = true; 15 | 16 | **global**对象可以在多个文件分享,但不建议使用。 17 | 18 | **CommonJS**规定,每个文件的对外接口是**module.exports**对象。 19 | 20 | ```js 21 | var x = 5; 22 | var addX = function(value) { 23 | return value + x; 24 | }; 25 | module.exports.x = x; 26 | module.exports.addX = addX; 27 | ``` 28 | 29 | 在另一个文件,可以利用`require`对象加载这个文件, 30 | 31 | ```js 32 | var example = require('./example.js'); 33 | 34 | console.log(example.x); // 5 35 | console.log(example.addX(1)); // 6 36 | ``` 37 | 38 | **CommonJS**的特点: 39 | 40 | - 所有模块都运行在模块作用域,不会污染全局作用域。 41 | - 模块可以多次加载,但是只会在第一次加载时运行一次,然后运行结果就会被缓存,以后再加载都是读取缓存。 42 | - 模块加载的顺序,按照其在代码中出现的顺序。 43 | 44 | 45 | **CommonJS**规范加载模块是同步的,也就是说,只有加载完成,才能执行后面的操作。 46 | 47 | ##基本用法 48 | 49 | 内置的`require`命令用于加载模块文件。 50 | 51 | `require`命令的基本功能是,读入并执行一个`JavaScript`文件,然后返回该模块的exports对象。 52 | 53 | 如果模块输出的是一个函数,那就不能定义在`exports`对象上面,而要定义在`module.exports`变量上面。 54 | 55 | ```js 56 | module.exports = function () { 57 | console.log("hello world") 58 | } 59 | //如何module.exports还有其他子对象,将会给覆盖,不建议这样使用。 60 | 61 | 62 | //另一个文件 63 | require('./example2.js')() 64 | ``` 65 | 66 | 67 | >http://javascript.ruanyifeng.com/nodejs/module.html 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /2015/11/2015年11月13日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月13日 2 | ##HTML&CSS 3 | **CSS content内容生成技术以及应用** 4 | 5 | ```css 6 | h2:before { 7 | content: "我是额外文字!"; 8 | } 9 | ``` 10 | 11 | >h2标签前面添加文字; 12 | 13 | ```html5 14 | a.content:after { 15 | content: attr(href); 16 | } 17 | 此标签的href值是: 18 | ``` 19 | 20 | >结果:"此标签的href值是:http ://www.zhangxinxu.com/" ; 21 | 22 | >content属性的值除了使用文本值外,还可以使用标签的一些属性值,方法是attr() 23 | 24 | **HTMLElement.dataset** 25 | 26 | 自定义的数据属性名称是以 data- 开头的。 27 | 这种方式通过访问一个元素的`dataset` 属性来存取 `data-*` 自定义属性的值。这个 dataset 属性是HTML5 JavaScript API的一部分,用来返回一个所有选择元素 data- 属性的DOMStringMap对象。 28 | 29 | 使用这种方法时,不是使用完整的属性名,如 `data-uid` 来存取数据,应该去掉`data-` 前缀。 30 | 31 | 带连字符连接的名称在使用的时候需要命名驼峰化,即大小写组合书写. 32 | 33 | `data-meal-time`,则我们要获取相应的值可以使用:`expenseday2.dataset.mealTime` 34 | 35 | ```js 36 |
码头
37 | s 49 | ``` -------------------------------------------------------------------------------- /2015/12/2015年12月27日.markdown: -------------------------------------------------------------------------------- 1 | #2015年12月27日 2 | ##bootstrap 3 | 4 | ```html5 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | Bootstrap 101 Template 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 |

你好,世界!

31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | ``` -------------------------------------------------------------------------------- /2015/9/2015年9月6日.markdown: -------------------------------------------------------------------------------- 1 | # 2015年9月6日 2 | 3 | ##列表 4 | 无序列表符号: 5 | `disc`:实心原点; 6 | `circle`:空心原点; 7 | `square`:方形点; 8 | 9 | 有序列表符号: 10 | `A`:大写字母; 11 | `a`:小写字母; 12 | `I`:大小罗马字母; 13 | `i`:小写罗马字母; 14 | 15 | 自定义列表: 16 | 自定义列表以`
` 标签开始。每个自定义列表项以 `
`开始。每个自定义列表项的定义以`
`开始。 17 | ``` 18 |
19 |
Coffee
20 |
Black hot drink
21 |
Milk
22 |
White cold drink
23 |
24 | ``` 25 | 26 | --- 27 | ##表单 28 | 29 | ``` 30 |
31 |
32 | 健康信息 33 | 身高: 34 |
35 |
36 | ``` 37 | 38 | --- 39 | ##图片映射 40 | `` 标签用于客户端图像映射。图像映射指带有可点击区域的一幅图像。 41 | ``中的 usemap 属性可引用 `` 中的 id 属性,所以我们应向 `` 添加 id 属性。 42 | area 元素永远嵌套在 map 元素内部。area 元素可定义图像映射中的区域。 43 | ``` 44 | 示例: 45 | 46 | Planets 47 | 48 | Sun 49 | Mercury 50 | Venus 51 | 52 | <-- 53 | shape : 有几个选择: 54 | rect : 矩形,coords对应的坐标为左上角和右下角。 55 | 56 | circle:圆,coords对应的是圆心(x,y),和半径r。 57 | 58 | poly: 多边形,coords对应的是每个点的坐标,每两个为一组表示一个点。 59 | 60 | coords:坐标,根据shape的值去定义。 61 | href:链接。 62 | --> 63 | ``` 64 | 65 | ##< meta > 元素 66 | >参看:[`meta()`标签使用参考](http://segmentfault.com/a/1190000002407912) 67 | 68 | -------------------------------------------------------------------------------- /后端开发/爬虫技术.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | * [爬虫](#爬虫) 5 | * [Http知识](#http知识) 6 | * [get与post请求](#get与post请求) 7 | 8 | 9 | 10 | # 爬虫 11 | 12 | 爬虫的本质就是**模拟浏览器来打开网页**。 13 | 14 | ## Http知识 15 | 16 | 每个网页链接,或者称作url,通常包含以下几个部分,`协议://域名:端口/路由?参数`。 17 | 18 | - 协议:数据传输所使用的协议,例如 `http` ; 19 | 20 | - 域名:所访问服务器的域名,例如 `sina.com.cn` ,如果没有域名则为服务器IP; 21 | 22 | - 端口:链接所使用的端口,Http请求的默认端口是`80`,可以省略; 23 | 24 | - 路由:不同的路由会请求到不同的功能,例如 `college/scorelist` 请求的是查看大学的分数线列表这一功能; 25 | 26 | - 参数:请求数据时所提供的参数,参数的 key 和 value 由 = 连接,参数之间以 `&`分隔,例如` tab=batch&wl=1` 27 | 28 | 下爬虫,要对目标网站进行分析。在Chrome浏览器中,`Network`标签记录网页请求资源及其时间。写爬虫,`XHR`、`JS`、`Doc`等资源是获取数据的关键。 29 | 30 | ## get与post请求 31 | 32 | `GET`请求,参数直接写在url中,因此是显式可见的,即 `所访问的服务 + 参数`。 33 | 34 | `POST`请求,在POST请求中,参数并不是直接写在url中,而是在数据包内部提供,所以不是显示可见的。 35 | 36 | **HTTP协议--协议结构** 37 | 38 | ![http协议](img/http.png) 39 | 40 | >[HTTP Header详解](https://kb.cnblogs.com/page/92320/) 41 | >[HTTP协议](https://zhuanlan.zhihu.com/p/25301841?refer=pachong) 42 | 43 | **HTTP格式** 44 | 45 | GET请求的格式: 46 | ```js 47 | GET /path HTTP/1.1 48 | Header1: Value1 49 | Header2: Value2 50 | Header3: Value3 51 | ``` 52 | 53 | POST请求的格式: 54 | ```js 55 | POST /path HTTP/1.1 56 | Header1: Value1 57 | Header2: Value2 58 | Header3: Value3 59 | 60 | body data goes here... 61 | ``` 62 | 63 | HTTP响应的格式: 64 | 65 | ```js 66 | HTTP/1.x 200 OK 67 | Header1: Value1 68 | Header2: Value2 69 | Header3: Value3 70 | 71 | body data goes here... 72 | ``` 73 | -------------------------------------------------------------------------------- /javascript/标准对象.md: -------------------------------------------------------------------------------- 1 | ## 包装对象 2 | 3 | ```js 4 | var n = new Number(123); // 123,生成了新的包装类型 5 | var b = new Boolean(true); // true,生成了新的包装类型 6 | var s = new String('str'); // 'str',生成了新的包装类型 7 | 8 | typeof new Number(123); // 'object' 9 | new Number(123) === 123; // false 10 | 11 | typeof new Boolean(true); // 'object' 12 | new Boolean(true) === true; // false 13 | 14 | typeof new String('str'); // 'object' 15 | new String('str') === 'str'; // false 16 | ``` 17 | 18 | 包装对象的类型会变成`object`,所有与原值比较不相等。 19 | 20 | 21 | 如果没有关键字`new`,`Number()`、`Boolean()`和`String()`被当做普通函数,把任何类型的数据转换为`number`、`boolean`和`string`类型。 22 | 23 | ```js 24 | var n = Number('123'); // 123,相当于parseInt()或parseFloat() 25 | typeof n; // 'number' 26 | 27 | var b = Boolean('true'); // true 28 | typeof b; // 'boolean' 29 | 30 | var b2 = Boolean('false'); // true! 'false'字符串转换结果为true!因为它是非空字符串! 31 | var b3 = Boolean(''); // false 32 | 33 | var s = String(123.45); // '123.45' 34 | typeof s; // 'string' 35 | ``` 36 | 37 | javascript标准对象使用建议 38 | 39 | - 不要使用new Number()、new Boolean()、new String()创建包装对象; 40 | 41 | - 用parseInt()或parseFloat()来转换任意类型到number; 42 | 43 | - 用String()来转换任意类型到string,或者直接调用某个对象的toString()方法; 44 | 45 | - 通常不必把任意类型转换为boolean再判断,因为可以直接写if (myVar) {...}; 46 | 47 | - typeof操作符可以判断出number、boolean、string、function和undefined; 48 | 49 | - 判断Array要使用Array.isArray(arr); 50 | 51 | - 判断null请使用myVar === null; 52 | 53 | - 判断某个全局变量是否存在用typeof window.myVar === 'undefined'; 54 | 55 | - 函数内部判断某个变量是否存在用typeof myVar === 'undefined'。 56 | -------------------------------------------------------------------------------- /javascript/Object对象.md: -------------------------------------------------------------------------------- 1 | ##属性判断 2 | 3 | - in 4 | 5 | `in`可以判断一个对象是否存在某个属性。 6 | 7 | ```js 8 | var xiaoming = { 9 | name: '小明', 10 | birth: 1990, 11 | }; 12 | 'name' in xiaoming; // true 13 | 'grade' in xiaoming; // false 14 | ``` 15 | 16 | 但是对于继承的属性,也同样判断为`true`。 17 | 18 | ```js 19 | 'toString' in xiaoming; // true 20 | ``` 21 | 22 | - hasOwnProperty() 23 | 24 | 25 | `hasOwnProperty()`可以判断一个属性是否自身拥有,而不是继承。 26 | 27 | >`Object.keys`方法和`Object.getOwnPropertyNames`方法都可以遍历对象自身的属性,返回数组,只是后者还返回不可枚举的属性。 28 | 29 | ```js 30 | var o = { 31 | p1: 123, 32 | p2: 456 33 | }; 34 | 35 | Object.keys(o) 36 | // ["p1", "p2"] 37 | 38 | Object.getOwnPropertyNames(o) 39 | // ["p1", "p2"] 40 | ``` 41 | 42 | ##this 43 | 44 | 在函数内部定义的`this`,指向`window`; 45 | 46 | 在`'use strict';`严格模式下,`this`指向`undefined`。 47 | 48 | ```js 49 | function tt(){console.log(this)} 50 | 51 | tt(); 52 | 53 | //window{/.../} 54 | ``` 55 | 56 | 绑定到对象上的函数称为方法,方法上的`this`,指向这个对象; 57 | 58 | ```js 59 | var xiaoming = { 60 | name: '小明', 61 | birth: 1990, 62 | age: function(){ 63 | var y = new Date().getFullYear(); 64 | return y - this.birth; 65 | } 66 | }; 67 | 68 | xiaoming.age() 69 | //26 70 | ``` 71 | 72 | 如何在方法函数里面再定义函数,`this`指向`window`。 73 | 74 | ##apply()、call() 75 | 76 | 这两个方法可以改变函数的`this`指向。 77 | 78 | - `apply()`把参数打包成`Array`再传入; 79 | 80 | - `call()`把参数按顺序传入。 81 | 82 | 83 | ```js 84 | Math.max.apply(null, [3, 5, 4]); // 5 85 | Math.max.call(null, 3, 5, 4); // 5 86 | ``` 87 | 88 | 对普通函数调用,我们通常把`this`绑定为`null`。 89 | -------------------------------------------------------------------------------- /2015/10/2015年10月9日.markdown: -------------------------------------------------------------------------------- 1 | #2015年10月9日 2 | ##javascript 3 | 4 | ###javascript中的[ ] { }是什么意思 5 | ```js 6 | //用{}定义一组对像 7 | var obj = {a:1111,b:2222,c:'abc',d:function(){ 8 | alert('对像:d函数'); 9 | }}; 10 | alert('对像:'+obj.b);//调用对像b 11 | obj.d(); //调用对像d函数 12 | 13 | 14 | //[]是数组形式,{}是对象形式,都可以包含其他类型. 15 | var a= ["A","B",{a:1,b:2}]; 16 | //a[1] 取得的是B,a[2].b取得的是2; 17 | var s = {a:1,b:["A","B"]} 18 | //s.a取得的是1,s.b[1]取得的是A 19 | // 20 | // 21 | ////JSON中同时使用[]和{} 22 | var json = [{"arr1":{"a":123,"b":456},"arr2":{"a":789,"c":"abcdefg"}},{"arr1":{"a":"uuuuu","b":"oooo"},"arr2":{"a":"aaa9999","c":"abcdefg"}}]; 23 | alert('JSON1:'+json[0].arr2.a); 24 | alert('JSON2:'+json[1].arr2.a); 25 | ``` 26 | 27 | ###split() 28 | **split()** 方法用于把一个字符串分割成字符串数组。 29 | 语法:`stringObject.split(separator,howmany)`。 30 | 31 | ###join() 32 | **join()** 方法用于把数组中的所有元素放入一个字符串。 33 | 语法:`arrayObject.join(separator)`。 34 | 35 | 36 | ###indexOf() 37 | **indexOf()**方法可返回某个指定的字符串值在字符串中首次出现的位置。. 38 | 39 | ###substring() 40 | **substring()** 方法用于提取字符串中介于两个指定下标之间的字符。substring() 不接受负的参数。 41 | 42 | ###decodeURIComponent()与encodeURIComponent() 43 | 44 | `encodeURIComponent() `函数可把字符串作为 URI 组件进行编码。 45 | `decodeURIComponent() `函数可对` encodeURIComponent()` 函数编码的 URI 进行解码。 46 | 47 | ```js 48 | var test1="http://www.w3school.com.cn/My first/" 49 | 50 | document.write(encodeURIComponent(test1)+ "
") 51 | document.write(decodeURIComponent(test1)) 52 | 53 | ``` 54 | 55 | 输出 56 | 57 | ```js 58 | http%3A%2F%2Fwww.w3school.com.cn%2FMy%20first%2F 59 | http://www.w3school.com.cn/My first/ 60 | ``` -------------------------------------------------------------------------------- /Nodejs/module.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | * [module](#module) 5 | * [模块简介](#模块简介) 6 | 7 | 8 | 9 | # module 10 | ## 模块简介 11 | 12 | 13 | * 1.首先按照加载的模块的文件名称进行查找 14 | * 2.如果没有找到,则会在模块文件名称后加上.js的后缀,进行查找 15 | * 3.如果还没有找到,则会在文件名称后加上.json的后缀,进行查找 16 | * 4.如果还没有,则会在文件名称后加上.node的后缀,进行查找 17 | 18 | 19 | >文件名称 -> .js -> .json -> .node 20 | 21 | 所有的exports收集到的属性和方法,都赋值给了`module.exports`。当然,这有个前提,就是`module.exports`本身不具备**相同**属性和方法。如果,`module.exports`已经具备一些属性和方法,那么exports收集来的**相同**信息将被忽略。 22 | 23 | Nodejs加载模块 24 | 25 | ```js 26 | //导出函数 27 | exports.a = function() { 28 | console.log(); 29 | }; 30 | 31 | //导出变量 32 | exports.b=10; 33 | 34 | ``` 35 | 36 | * 在模块中定义的变量,其作用域范围是当前模块,外部不能够直接的访问 37 | * 如果我们想一个模块能够访问另外一个模块中定义的变量,可以: 38 | * 1.把变量作为global对象的一个属性,但是这样的做法是推荐 39 | * 2.使用模块对象 module 40 | 41 | ```js 42 | //使用`global`定义的是全局模块, 43 | global.a = 200; 44 | ``` 45 | 46 | `exports`是`module.exports`的引用。 47 | 48 | 可以使用`exports.xxx`或者`module.exports.xxx`写入变量或者函数方法等。 49 | 50 | 不能有`module.exports=xxx`,这样`module.exports`与`exports`的关系就会断开。 51 | 52 | 53 | `exports`错误引用 54 | ```js 55 | //bar.js 56 | console.log( module.exports === exports ); 57 | var bar = function(){ 58 | console.log(‘it is bar’); 59 | }; 60 | console.log( module.exports === exports ); 61 | exports = bar; 62 | console.log( module.exports === exports ); 63 | //output 64 | //true 65 | //true 66 | //false 67 | 68 | 69 | //use-bar.js 70 | var bar = require(‘./bar.js’); 71 | bar(); //这个会报错:TypeError: object is not a function 72 | 73 | ``` 74 | -------------------------------------------------------------------------------- /2016/4/2016年4月29日.markdown: -------------------------------------------------------------------------------- 1 | [TOC] #2016年4月29日 ##移动端开发 CSS像素是一个抽象的单位,主要使用在浏览器上,用来精确的度量(确定)Web页面上的内容。一般情况下,CSS像素被称为与设备无关的像素(**device-independent**像素),简称为“**DIPs**”。在一个标准的显示密度下,一个CSS像素对应着一个设备像素。 在javascript中,**“window.devicePixelRatio**”可以用来获得相同的比率。 **window.devicePixelRatio**是设备上物理像素和设备像素(device-independent pixels (dips))的比例。他有一个计算公式:window.devicePixelRatio = 物理像素/dips。 dips可以用来区分视网膜设备还是非视网膜设备。 >http://www.w3cplus.com/css/towards-retina-web.html ###Emulation 模拟器 1. Device 设备设置 + model 模型选择 + resolution 分辨率设置 + Device pixel ratio 像素比设置 ###viewport 1. width [pixel_value | device-width] 2. user-scalable 是否允许缩放 (no||yes) 3. initial-scale 初始比例 4. minimum-scale 允许缩放的最小比例 5. maximum-scale 允许缩放的最大比例 6. target-densitydpi [dpi_value | device-dpi | high-dpi | medium-dpi | low-dpi] ---安卓系统开始放弃此属性。 ###媒体查询 引入方式: 一、 二、 @import url("css/reset.css") all and (min-width: 600px) ; 使用@import的话,你必须时刻记得要将@import放到样式代码的最前面,否则它将会不起作用。避免使用@import 同样对网站性能有益。 三、 ```js @media all and (min-width: 600px) { .box { width:100px; } } ``` ####媒体类型 1. all 所有媒体 2. braille 盲文触觉设备 3. embossed 盲文打印机 4. print 手持设备 5. projection 打印预览 6. screen 彩屏设备 7. speech '听觉'类似的媒体类型 8. tty 不适用像素的设备 9. tv 电视 ####媒体特性 1. (max-width:599px) 2. (min-width:600px) 3. (orientation:portrait) 竖屏 4. (orientation:landscape) 横屏 5. (-webkit-min-device-pixel-ratio: 2) 像素比 ####关键字 1. and 2. not not关键字是用来排除某种制定的媒体类型 3. only only用来定某种特定的媒体类型 -------------------------------------------------------------------------------- /2015/11/2015年11月18日.markdown: -------------------------------------------------------------------------------- 1 | #2015年11月18日 2 | ##JavaScript 3 | 4 | offsetLeft:综合考虑 所有因素,获取物体的左边距. 5 | obj.offsetLeft 指 obj 相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置. 6 | 如果当前元素的父级元素中有CSS定位(position为absolute或relative),offsetParent取最近的那个父级元素。 7 | 8 | offsetWidth = width + padding + border 9 | 10 | offsetHeight = height + padding + border 11 | 12 | 13 | width是字符串;offsetWidth是数字; 14 | style.left是**读写**的,offsetLeft是**只读**的,所以要改变div的位置,只能修改style.left。 15 | 16 | ###DOM 17 | 18 | `childNodes`:子节点,包括文本节点与元素节点. 19 | 20 | `nodeType`:文本节点的类型; 21 | >1:元素节点;3:文本节点; 22 | 23 | `children`:非标准属性; 24 | 25 | `parentNode`:父节点; 26 | 27 | `offsetParent`:获取元素用来定位的父级` 28 | 29 | `firstElementChild`:第一个元素节点; 30 | 31 | `firstChild`:低版本指元素节点,高版本浏览器指文本节点; 32 | 33 | >`lastChild1`与`lastElementChild`,`nextSibling`与`nextElementSibling`,`previousSibling`与`previousElementSibling`; 34 | 35 | **元素属性操作** 36 | 37 | - oDiv.style.display="block"; 38 | - oDiv.style.["display"]="block"; 39 | - DOM方式 40 | 41 | DOM方式操作元素属性 42 | 43 | - 获取:getAttribute(名称) 44 | - 设置:setAttribute(名称,值) 45 | - 删除:removeAttribute(名称) 46 | 47 | ```js 48 | alert(oTxt.getAttribute("value")) 49 | 50 | oTxt.setAttribute("value","hello world"); 51 | 52 | oTxt.removeAttribute("value"); 53 | ``` 54 | 55 | 56 | **获取指定class元素** 57 | 58 | ```js 59 | function getByClass(oParent,sClass){ 60 | var aResult=[]; 61 | var aEle=oParent.getElementsByTagName("*"); 62 | for(var i=0;i") 36 | document.write(arr.push([12,324,345]) + "
") 37 | document.write(arr[3]) 38 | //George,John,Thomas 39 | //4 40 | //1,2,3,4 41 | 42 | //concat() 43 | 44 | brr=arr.concat([1,2,3]); 45 | document.write(brr[3]) 46 | //1 47 | ``` 48 | 49 | ```js 50 | var d; // 声明变量。 51 | d = new Date(); // 创建 Date 对象。 52 | document.write(d.toLocaleString()+"
"); // 转换为当前区域,返回转换的日期。 53 | 54 | document.write(d.toString()); // 返回转换的日期。 55 | 56 | 结果: 57 | 2016/3/4 上午10:28:51 58 | 59 | Fri Mar 04 2016 10:28:51 GMT+0800 (中国标准时间) 60 | ``` 61 | 62 | **toLocaleString()**方法返回一个 String 对象 ,这个对象中包含了用当前区域设置的默认格式表示的日期。 63 | 64 | **toString()**返回值与没有参数的 join() 方法返回的字符串相同。 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /2015/10/2015年10月19日.markdown: -------------------------------------------------------------------------------- 1 | #2015年10月19日 2 | ##Ajax 3 | **创建 XMLHttpRequest 对象** 4 | 5 | variable=new XMLHttpRequest(); 6 | 7 | **Ajax调用示例** 8 | ```js 9 | //创建XHR对象 10 | var xhr=new XMLHttpRequest(); 11 | //处理返还数据 12 | xhr.onreadystatechange=function(callback){ 13 | if(xhr.readyState==4){ 14 | if((xhr.status>=200&&xhr.status<300)||xhr.status==304){ 15 | callback(xhr.responseText); 16 | }else{ 17 | alert("Request was unsuccessful:"+xhr.status); 18 | } 19 | } 20 | } 21 | //发送请求 22 | xhr.open('get','example.json',true); 23 | xhr.setRequestHeader('myHeader','myValue'); 24 | xhr.send(null); 25 | ``` 26 | 27 | - xhr.open(method,url[,async=true); 28 | 29 | method一般有`get`、`post`等方法。 30 | url[ :请求资源相对文档路径。 31 | async :是一个布尔值。 32 | 33 | - xhr.setRequestHeader('myHeader','myValue'); 34 | 35 | **XMLHttpRequest 对象的三个重要的属性** 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
属性描述
onreadystatechange存储函数(或函数名),每当 readyState 属性改变时,就会调用该函数。
readyState 51 |

存有 XMLHttpRequest 的状态。从 0 到 4 发生变化。

52 |
    53 |
  • 0: 请求未初始化
  • 54 |
  • 1: 服务器连接已建立
  • 55 |
  • 2: 请求已接收
  • 56 |
  • 3: 请求处理中
  • 57 |
  • 4: 请求已完成,且响应已就绪
  • 58 |
59 |
status

200: "OK"

404: 未找到页面

67 | 68 | ##慕课 69 | 70 | - 金牌用户策略 71 | - 信息平衡策略 72 | - 资源聚焦策略 -------------------------------------------------------------------------------- /2015/12/2015年12月13日.markdown: -------------------------------------------------------------------------------- 1 | #2015年12月13日 2 | ##CSS 3 | 4 | - Transition 5 | 6 | >css的transition允许css的属性值在一定的时间区间内平滑地过渡。这种效果可以在鼠标单击、获得焦点、被点击或对元素任何改变中触发,并圆滑地以动画效果改变CSS的属性值。 7 | 8 | **语法** 9 | 10 | 11 | transition : [<'transition-property'> || <'transition-duration'> || <'transition-timing-function'> || <'transition-delay'> [, [<'transition-property'> || <'transition-duration'> || <'transition-timing-function'> || <'transition-delay'>]]* 12 | 13 | - transition-property: 14 | 15 | ```html 16 | transition-property : none | all | [ ] [ ',' ]* 17 | ``` 18 | 19 | >transition-property是用来指定当元素其中一个属性改变时执行transition效果,其主要有以下几个值:none(没有属性改变);all(所有属性改变)这个也是其默认值;indent(元素属性名)。当其值为none时,transition马上停止执行,当指定为all时,则元素产生任何属性值变化时都将执行transition效果,ident是可以指定元素的某一个属性值。 20 | 21 | - transition-duration: 22 | 23 | ```html 24 | transition-duration :