├── 803 ├── computer-organization │ ├── README.md │ └── assets │ │ ├── 1-1计算机系统.png │ │ ├── 1-2计算机分层结构.png │ │ ├── 1-3冯诺依曼型计算机结构.png │ │ ├── 1-4计算机存储系统.jpg │ │ ├── 1-5现代计算机系统组成.jpg │ │ ├── 1-6程序的编译到运行过程.jpg │ │ ├── 3-1双端口RAM示意图.jpg │ │ ├── 3-2低位交叉编址的多体存储器.JPEG │ │ ├── 3-3cache工作原理.JPEG │ │ ├── 3-4数据Cache行结构.png │ │ ├── 3-5Cache地址映射结构.JPEG │ │ ├── 3-6多路组相联映射.JPG │ │ ├── 5-1CPU的结构.png │ │ ├── 5-2指令执行过程.png │ │ ├── 5-2时钟周期-机器周期和指令周期的关系.JPEG │ │ ├── 5-3指令执行周期.jpg │ │ ├── 5-4硬件系统及控制器部件的组成.JPEG │ │ ├── 5-5控制单元图.JPEG │ │ ├── 5-6硬布线控制器.jpg │ │ ├── 5-7微操作时序图.jpg │ │ ├── 5-8微程序控制器组成原理.png │ │ ├── 6-1链式查询.JPEG │ │ ├── 6-2计数器定时查询.JPEG │ │ ├── 6-3独立请求方式.JPEG │ │ ├── 6-4PCI总线结构.jpg │ │ ├── 6-5异步定时方式.JPEG │ │ ├── 6-6分布式仲裁方式.png │ │ ├── 7-10DMA传送过程.jpg │ │ ├── 7-11通道控制方式工作原理.jpg │ │ ├── 7-1外部设备.jpg │ │ ├── 7-2IO接口基本结构.JPEG │ │ ├── 7-3IO方式.png │ │ ├── 7-4程序查询方式.png │ │ ├── 7-5程序中断方式.png │ │ ├── 7-6DMA方式.png │ │ ├── 7-7CPU暂停方式.png │ │ ├── 7-8周期挪用.png │ │ └── 7-9CPU和DMA交替访问内存.png ├── data-structure │ ├── chapter1-绪论.md │ └── chapter2-线性表.md ├── network │ ├── README.md │ ├── Transport.md │ ├── assets │ │ ├── CSMA-CD流程图.png │ │ ├── cs-p2p.JPEG │ │ ├── dns-system.JPEG │ │ ├── dns-theory.JPEG │ │ ├── ftp.jpg │ │ ├── smtp-pop3.jpg │ │ └── 单播和组播的区别.JPEG │ └── overview │ │ ├── README.md │ │ └── assets │ │ ├── 1521374809579.png │ │ ├── 1521375054618.png │ │ ├── 1521375329315.png │ │ ├── 1521375393652.png │ │ ├── 1521377973889.png │ │ ├── 1521466259721.png │ │ ├── 1521467599042.png │ │ ├── 1521548228355.png │ │ ├── 1521548859549.png │ │ ├── 1521550229558.png │ │ ├── 1521550442504.png │ │ ├── 1521550847346.png │ │ ├── 1521551212467.png │ │ ├── 1521638792018.png │ │ ├── 1521639808131.png │ │ ├── 1521724062353.png │ │ ├── 1521725096748.png │ │ ├── 1521725201254.png │ │ ├── 1521725388067.png │ │ ├── 1521725455691.png │ │ ├── 1521804729473.png │ │ ├── 1521804892058.png │ │ ├── 1521805477045.png │ │ └── 1521805590031.png ├── operating-system │ ├── CPU │ │ ├── 1512017159916.png │ │ ├── 1512017167417.png │ │ ├── 1512018336531.png │ │ ├── 1512018708983.png │ │ ├── 1512019403783.png │ │ ├── 1512039580446.png │ │ ├── 1512040054645.png │ │ ├── 1512042565548.png │ │ ├── 1512048568934.png │ │ ├── 1512048647858.png │ │ ├── 1512049808712.png │ │ ├── 1512228100903.png │ │ ├── 1512228871344.png │ │ ├── 1512229045589.png │ │ ├── 1512229258824.png │ │ ├── 1512230631792.png │ │ ├── 1512231352315.png │ │ ├── 1512231567213.png │ │ ├── 1512231603280.png │ │ ├── 1512232716472.png │ │ ├── 1512232729278.png │ │ └── README.md │ ├── FIFO.c │ ├── IO │ │ ├── 1512398382277.png │ │ ├── 1512398610740.png │ │ ├── 1512399735293.png │ │ ├── 1512400055012.png │ │ ├── 1512401569321.png │ │ ├── 1512401612398.png │ │ ├── 1512402051690.png │ │ ├── 1512402391717.png │ │ ├── 1512402851338.png │ │ ├── 1512402919459.png │ │ ├── 1512403774689.png │ │ ├── IO系统的层次结构.png │ │ ├── README.md │ │ ├── SPOOLing.png │ │ ├── 单缓冲区工作示意图.png │ │ ├── 双缓冲区工作示意图.png │ │ ├── 环形缓冲区.png │ │ ├── 磁盘结构图.png │ │ └── 缓冲池.png │ ├── README.md │ ├── assets │ │ ├── 1-1操作系统的发展历程.JPEG │ │ ├── 1-2系统调用的执行过程.JPEG │ │ ├── 2-1进程状态切换.JPEG │ │ ├── 2-2用户级和内核级线程.JPEG │ │ ├── 2-3处理机的三级调度.JPEG │ │ ├── 2-4消息传递.png │ │ ├── 2-5共享存储通信.png │ │ ├── 2-6管道通信.png │ │ ├── 3-1页表的作用.JPEG │ │ ├── 3-2分页存储管理的地址变换机构.JPEG │ │ ├── 3-3具有快表的地址变换机构.JPEG │ │ ├── 3-4二级页表结构示意图.JPEG │ │ ├── 3-5利用段表实现地址映射.JPEG │ │ ├── 3-6分段系统的地址变换过程.JPEG │ │ ├── 3-7请求分页中的地址变换过程.JPEG │ │ ├── 4-1索引顺序存储.JPEG │ │ ├── 4-2文件系统层次结构.JPEG │ │ ├── 4-3连续分配.JPEG │ │ ├── 4-4成组链接法.JPEG │ │ ├── 4-5隐式链接分配.JPEG │ │ └── 4-6索引分配.JPEG │ ├── banker.cpp │ ├── producer-consumer.cpp │ ├── 存储器管理篇 │ │ ├── 1512310702789.png │ │ ├── 1512314513856.png │ │ ├── 1512317007305.png │ │ ├── 1512317100764.png │ │ ├── 1512317112936.png │ │ ├── 1512317256786.png │ │ ├── 1512317781195.png │ │ ├── 1512487511356.png │ │ ├── 1512487746591.png │ │ ├── 1512488051956.png │ │ ├── 1512488250193.png │ │ └── README.md │ └── 文件管理 │ │ ├── 1512461355098.png │ │ ├── 1512461731035.png │ │ ├── 1512462461903.png │ │ ├── 1512462768799.png │ │ ├── 1512462853762.png │ │ ├── 1512463211693.png │ │ ├── 1512463318534.png │ │ └── README.md └── 计算机存储系统-CPU-Cache-主存-辅助存储器.md ├── .gitignore ├── Android架构 ├── Activity │ ├── Fragment.md │ └── README.md ├── ConstraintLayout.md ├── ContentProvider.md ├── MVP和MVVM框架.md ├── Material Design │ ├── README.md │ └── UI │ │ └── ToolBar.md ├── 数据存储.md └── 经典MVC.md ├── DesignPattern ├── Builder模式.md ├── Decorator Pattern │ ├── Decorator.java │ ├── Drink.java │ ├── EggDecorator.java │ ├── README.md │ ├── SoyaBeanMilk.java │ ├── SugerDecorator.java │ └── Test.java ├── Factory Method Pattern │ ├── README.md │ ├── base │ │ ├── Client.java │ │ ├── ConcreteFactoryA.java │ │ ├── ConcreteProductA.java │ │ ├── ConcreteProductB.java │ │ ├── Factory.java │ │ └── Product.java │ ├── example │ │ ├── Client.java │ │ ├── GifReader.java │ │ ├── JpgReader.java │ │ ├── PicReader.java │ │ ├── PicReaderFactory.java │ │ └── ReaderFactory.java │ └── reflect │ │ ├── Client.java │ │ ├── ConcreteFactory.java │ │ └── Factory.java ├── Observer模式.md ├── Simple Factory Pattern │ ├── Client.java │ ├── ConcreteProductA.java │ ├── ConcreteProductB.java │ ├── Factory.java │ ├── Product.java │ └── README.md ├── 单例模式.md ├── 状态模式.md └── 策略模式.md ├── English ├── README.md ├── grammar │ └── passage1.md ├── songs │ ├── Will You Be There - Micheal Jackson.md │ └── vocabulary.md └── speeches │ ├── Madonna-Michael Jackson.md │ ├── The Art of Speaking.md │ ├── The Mathematics of Love.md │ ├── The power of vulnerability解决自卑烦恼型可用.md │ ├── The surprising habits of original ideas.md │ ├── There is more to life than being happy.md │ ├── Time Management of Writing Material.md │ ├── We all special..md │ └── Why are You going to Fail.md ├── JAVA Web ├── 1528097973775.png ├── 1528100326401.png ├── 1528101406116.png ├── README.md └── test2_jsp │ ├── src │ └── com │ │ ├── bean │ │ ├── UserBean.java │ │ ├── UserInfoList.java │ │ └── Userinfo.java │ │ ├── filter │ │ └── CountFilter.java │ │ ├── listener │ │ └── UserInfoTrace.java │ │ └── servlet │ │ ├── AddressServlet.java │ │ └── MyServlet.java │ ├── test2_jsp.iml │ └── web │ ├── WEB-INF │ └── web.xml │ ├── beaninstance │ ├── doreg.jsp │ ├── false.jsp │ ├── login_form.jsp │ └── success.jsp │ ├── chapter10 │ ├── login.jsp │ ├── page.jsp │ └── showUser.jsp │ ├── chapter7 │ ├── application_counter.jsp │ ├── cookie │ │ ├── deal.jsp │ │ └── index.jsp │ ├── out.jsp │ ├── request │ │ ├── exception.jsp │ │ ├── get_client_information.jsp │ │ ├── index.jsp │ │ ├── login.jsp │ │ └── show_exception.jsp │ ├── response_redirect.jsp │ └── session │ │ ├── deal.jsp │ │ ├── dealwith.jsp │ │ ├── exit.jsp │ │ ├── index.jsp │ │ └── main.jsp │ ├── chapter9 │ ├── app1.jsp │ ├── index.jsp │ └── manager.jsp │ ├── compositive6 │ └── book.jsp │ ├── index.jsp │ ├── jspinclude │ ├── copyright.jsp │ ├── image │ │ └── 0.jpg │ ├── index.jsp │ └── top.jsp │ ├── login │ ├── index.jsp │ └── login.jsp │ └── visitNo.jsp ├── Java ├── IOStream.md ├── JVM │ └── Java内存区域.md ├── Java Reflection │ ├── README.md │ └── reflection │ │ ├── Example.java │ │ ├── Father.java │ │ ├── GetClass.java │ │ └── InterA.java ├── 内部类.md └── 异常类.md ├── Others ├── UML类图的阅读.md ├── review │ └── 线性表 │ │ ├── 2010计算机联考真题之大题顺序表.cpp │ │ ├── 2010计算机联考真题之大题顺序表.exe │ │ ├── 2010计算机联考真题之大题顺序表.png │ │ ├── 2010计算机联考真题之大题顺序表测试结果.png │ │ ├── 2010计算机联考真题之大题顺序表测试结果ByReverse.png │ │ ├── 2011计算机联考真题之大题顺序表.png │ │ ├── 2011计算机联考真题之大题顺序表测试结果.png │ │ ├── 2013计算机联考真题之大题顺序表.png │ │ └── 顺序表算法.md ├── 电竞社社团秩序册.md └── 记我的第一次批量抓取网页图片的经历.md ├── README.md ├── Web front ├── Html5 Label.md ├── WEB前端复习笔记 │ ├── 1511230918281.png │ ├── 1511240305928.png │ ├── 1511248366504.png │ ├── 1511249345876.png │ ├── 1511249387435.png │ ├── 1511340922398.png │ ├── 1511354979388.png │ ├── 1511365622432.png │ ├── 1511368296102.png │ ├── 1511368693285.png │ ├── 1511368732199.png │ ├── 1511369302771.png │ ├── 1511369398446.png │ ├── CSS篇.md │ ├── HTML.md │ ├── JavaScript篇.md │ ├── QQ截图20171122161204.png │ └── WEB前端复习笔记.md └── homework │ ├── TEST10_course_table.html │ ├── TEST11_text.html │ ├── TEST12_change_text_size.html │ ├── TEST13_first.html │ ├── TEST14_second.html │ ├── TEST15_list.html │ ├── TEST16_FORM.html │ ├── TEST17_HTML基础.html │ ├── TEST18_zanxuziwo.html │ ├── TEST19_course_Table.html │ ├── TEST1_Alter.html │ ├── TEST20_pass_word_check.html │ ├── TEST21_list.html │ ├── TEST22.html │ ├── TEST23.html │ ├── TEST24.html │ ├── TEST25.html │ ├── TEST26.html │ ├── TEST27.html │ ├── TEST28.html │ ├── TEST29.html │ ├── TEST2_TitleText.html │ ├── TEST30.html │ ├── TEST31.html │ ├── TEST32.html │ ├── TEST33.html │ ├── TEST34.html │ ├── TEST35.html │ ├── TEST36.html │ ├── TEST3_list_css.html │ ├── TEST4_caipiao.html │ ├── TEST5_cssText.html │ ├── TEST6_CSS+DIV.html │ ├── TEST7_gradeTable.html │ ├── TEST8_username.html │ ├── TEST9_newcourse.html │ ├── div.html │ ├── hover.html │ ├── img │ ├── 0.jpg │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── bottom.html │ ├── left.html │ ├── right.html │ └── top.html │ └── syllabus.html ├── assembly ├── Program.md └── 寄存器.md ├── nodejs └── basic │ ├── block.js │ ├── buffer.js │ ├── event.js │ ├── event_loop.js │ ├── express.js │ ├── hello.js │ ├── input.txt │ ├── package-lock.json │ ├── package.json │ └── server.js ├── opencv ├── README.md └── part1 │ ├── 图片操作.md │ ├── 读取视频.md │ └── 边缘检测.png └── 软件工程复习笔记 ├── PAD图.png ├── PAD图的基本符号.png ├── README.md ├── UML图形分类.png ├── 各种逻辑覆盖间的关系.png ├── 基本路径测试法控制流图.png ├── 数据流图基本符号.png ├── 条件组合测试.png ├── 测试程序.png ├── 状态图画法.png ├── 电话系统状态转换图.png ├── 程序流程图.png ├── 系统结构图中模块类型.png ├── 设计过程.png └── 软件开发生命周期.png /.gitignore: -------------------------------------------------------------------------------- 1 | nodejs/basic/node_modules 2 | nodejs/basic/.idea 3 | -------------------------------------------------------------------------------- /803/computer-organization/assets/1-1计算机系统.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/1-1计算机系统.png -------------------------------------------------------------------------------- /803/computer-organization/assets/1-2计算机分层结构.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/1-2计算机分层结构.png -------------------------------------------------------------------------------- /803/computer-organization/assets/1-3冯诺依曼型计算机结构.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/1-3冯诺依曼型计算机结构.png -------------------------------------------------------------------------------- /803/computer-organization/assets/1-4计算机存储系统.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/1-4计算机存储系统.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/1-5现代计算机系统组成.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/1-5现代计算机系统组成.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/1-6程序的编译到运行过程.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/1-6程序的编译到运行过程.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/3-1双端口RAM示意图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/3-1双端口RAM示意图.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/3-2低位交叉编址的多体存储器.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/3-2低位交叉编址的多体存储器.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/3-3cache工作原理.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/3-3cache工作原理.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/3-4数据Cache行结构.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/3-4数据Cache行结构.png -------------------------------------------------------------------------------- /803/computer-organization/assets/3-5Cache地址映射结构.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/3-5Cache地址映射结构.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/3-6多路组相联映射.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/3-6多路组相联映射.JPG -------------------------------------------------------------------------------- /803/computer-organization/assets/5-1CPU的结构.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-1CPU的结构.png -------------------------------------------------------------------------------- /803/computer-organization/assets/5-2指令执行过程.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-2指令执行过程.png -------------------------------------------------------------------------------- /803/computer-organization/assets/5-2时钟周期-机器周期和指令周期的关系.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-2时钟周期-机器周期和指令周期的关系.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/5-3指令执行周期.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-3指令执行周期.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/5-4硬件系统及控制器部件的组成.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-4硬件系统及控制器部件的组成.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/5-5控制单元图.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-5控制单元图.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/5-6硬布线控制器.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-6硬布线控制器.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/5-7微操作时序图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-7微操作时序图.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/5-8微程序控制器组成原理.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/5-8微程序控制器组成原理.png -------------------------------------------------------------------------------- /803/computer-organization/assets/6-1链式查询.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/6-1链式查询.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/6-2计数器定时查询.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/6-2计数器定时查询.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/6-3独立请求方式.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/6-3独立请求方式.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/6-4PCI总线结构.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/6-4PCI总线结构.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/6-5异步定时方式.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/6-5异步定时方式.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/6-6分布式仲裁方式.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/6-6分布式仲裁方式.png -------------------------------------------------------------------------------- /803/computer-organization/assets/7-10DMA传送过程.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-10DMA传送过程.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/7-11通道控制方式工作原理.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-11通道控制方式工作原理.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/7-1外部设备.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-1外部设备.jpg -------------------------------------------------------------------------------- /803/computer-organization/assets/7-2IO接口基本结构.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-2IO接口基本结构.JPEG -------------------------------------------------------------------------------- /803/computer-organization/assets/7-3IO方式.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-3IO方式.png -------------------------------------------------------------------------------- /803/computer-organization/assets/7-4程序查询方式.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-4程序查询方式.png -------------------------------------------------------------------------------- /803/computer-organization/assets/7-5程序中断方式.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-5程序中断方式.png -------------------------------------------------------------------------------- /803/computer-organization/assets/7-6DMA方式.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-6DMA方式.png -------------------------------------------------------------------------------- /803/computer-organization/assets/7-7CPU暂停方式.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-7CPU暂停方式.png -------------------------------------------------------------------------------- /803/computer-organization/assets/7-8周期挪用.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-8周期挪用.png -------------------------------------------------------------------------------- /803/computer-organization/assets/7-9CPU和DMA交替访问内存.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/computer-organization/assets/7-9CPU和DMA交替访问内存.png -------------------------------------------------------------------------------- /803/data-structure/chapter1-绪论.md: -------------------------------------------------------------------------------- 1 | # Chapter 1 绪论 2 | 3 | ## 概念 4 | 5 | ***数据的逻辑结构***:集合、线性结构、树、图 6 | 7 | ***数据的物理结构***:顺序存储、链式存储、索引存储、散列存储 8 | 9 | ### 错题 10 | 11 | 1. 以下与数据的存储结构无关的是:(栈) 12 | 2. 数据的逻辑结构独立于其存储结构;数据的存储结构是逻辑结构在计算机上的映射 13 | 14 | ## 时间复杂度与空间复杂度 15 | 16 | ### 错题 17 | 18 | ```c 19 | int func(int n){ 20 | int i = 0, sum = 0; 21 | while(sum < n) 22 | sum += ++i; 23 | return i; 24 | } 25 | /*第 k 次循环 sum = (k*(k+1))/2,故时间复杂度为 O(n ^ 1/2)*/ 26 | ``` 27 | 28 | ```c 29 | y = 0; 30 | while ((y + 1) * (y + 1) <= n) 31 | y = y+1; 32 | /* 显然此题是 y^2 = n 时跳出循环,只需要执行根号 n 次,故时间复杂度为 O(n^ 1/2 ) */ 33 | ``` 34 | 35 | ps:要注意区分 i = i * 2,此时 2^k = n 故时间复杂度为O(log 2 n) 36 | 37 | -------------------------------------------------------------------------------- /803/data-structure/chapter2-线性表.md: -------------------------------------------------------------------------------- 1 | # Chapter2 - 线性表 2 | 3 | ## 顺序表 4 | 5 | 随机存取,插入删除需要移动大量元素。 6 | 7 | ***插入移动元素*** 8 | 9 | - 在表头插,需后移 n 个元素 10 | - 在表尾插,后移 0 个元素 11 | - **故平均情况 = n(n+1)/2 / (n+1) = n/2** ,n+1 表示有 n+1 个位置可以插入,n+……+1为分别在每个位置插入需要后移的次数之和。 12 | 13 | ***删除移动元素*** 14 | 15 | - 删除表头元素,前移 n-1 个元素 16 | - 删除表尾元素,前移 0 个元素 17 | - 故平均情况 = **n(n-1) /2 / n = (n-1)/2*** 18 | 19 | [408统考题](../assets/线性表/顺序表算法.md) 20 | 21 | ## 链表 22 | 23 | ### 错题 24 | 25 | 1. 单链表中,增加一个头结点的目的是为了:**方便运算**,插入时不需判断是否在第一个元素之前,删除时也无需判断是否为第一个元素。 26 | 2. 在一个长度为 n 的带头结点的单链表 h 上,设有尾指针 r,则执行(删除单链表最后一个元素)操作与链表长度有关。`虽然有尾指针 r,但删除最后一个元素时,依然需要从头到尾遍历到倒数第二个结点设置其 next 域的值为 NULL。` 27 | 3. 某线性表最常见的操作是在最后一个元素之后插入一个元素p和删除第一个元素,则采用(**仅有尾指针的单循环链表**)最合适。`插入操作:p->next = rare->next; rare->next = p; rare = p; rare指针的next域指向第一个元素,故删除操作只需:p = rare->next; rare->next = rare->next->next; free(p)` 28 | 4. 带头结点的**双循环链表** L 为空的条件是:`L->prior = L && L->next = L` 29 | 5. 一个链表最常用的操作是**在末尾插入节点和删除**节点,则选用 **带头结点的双循环链表** 最省时间。`插入: p->next = head->prior->next; p->prior = head->prior; head->prior->next = p; p->next = head; 删除:p = head->prior; head->prior = p->prior; p->prior->next = p->next; free(p); ` -------------------------------------------------------------------------------- /803/network/Transport.md: -------------------------------------------------------------------------------- 1 | # 传输层 2 | 3 | ## User Datagram Protocol 4 | 5 | __用户数据包协议__ 是一个简单的面向数据报的传输协议。 6 | 7 | 8 | ## Transmission Control Protocol 9 | 10 | __传输控制协议__ 是一种面向连接的、可靠的基于字节流的传输层通信协议。 11 | 12 | * 点对点 13 | * 一个发送方,一个接收方 14 | * 可靠的、按序的字节流 15 | * 流水线机制 16 | * TCP拥塞控制和流量控制机制 17 | * 发送方/接收方缓存 18 | * 全双工 19 | * 同一连接中能够传输双向数据流 20 | * 面向连接 21 | * 通信双方在发送数据前必须先建立连接 22 | * 连接状态只在连接的两端中维护,在沿途节点中并不维护状态 23 | * TCP连接 24 | * 两台主机上的缓存 25 | * 连接状态变量 26 | * socket等 27 | 28 | ### TCP报文 29 | 30 | * 序号:4bytes 文本本段所发送的数据的第一字节的序号 31 | * 确认序号:4bytes 期望下次接收的数据的第一字节的编号。表示该编号以前的数据已安全接受 32 | * 数据偏移:4bits 报文段首部的长度 33 | * 标志字段:6个标志位 34 | * 紧急位URG = 1:该报文要尽快传送 35 | * 确认为ACK = 1:表头的确认号有效;ACK = 0:连接请求报文 36 | * 急迫位PSH = 1:请求接收端的TCP将本报文段立即传送到应用层,而不是等到整个缓存都填满后才向上传送 37 | * 复位位RST = 1:出现了严重错误,必须释放连接再重建 38 | * 同步位SYN = 1:该报文段是一个连接请求或连接响应报文 39 | * 终止位FIN = 1:要发送的字符串已经发送完毕,并要求释放连接 40 | * 窗口: 2bytes 该报文发送者接收窗口的大小 41 | * 校验和:2bytes 对首部和数据部分进行校验 42 | * 紧急指针:2bytes 指明本报文段中紧急数据的最后一个字节的序号 和URG配合使用 43 | * 选项:长度可变,若该字段长度不够4bytes,填充对齐 44 | ### TCP连接的建立和释放 45 | #### 46 | >A->B发送请求报文段:SYN = 1,SEQ = x; 47 | 48 | >B->A发送响应报文段:SYN = 1,ACK = x+1,SEQ = y; 49 | 50 | >A->B发送确认报文段:SEQ = x+1 , ACK = y+1; 51 | 52 | #### 释放:四次握手 53 | 54 | 数据传输结束后,任何一方都可以发出释放连接请求。图中加入A向B发起: 55 | 56 | >A->B发送请求释放报文段:FIN = 1,SEQ = x;//x=已经发送数据的最后一个字节序号+1 57 | 58 | >B->A发送确认报文段:ACK= x+1; 59 | 60 | 此时A->B的连接已经释放,连接处于半关闭状态,B不再接受A发来的数据。但是B还可以向A发送数据,A收到B的请求后依然可以做出响应。 61 | 62 | >B->A发送请求释放报文段:FIN = 1,SEQ = y,ACK = x+1; 63 | 64 | >A->B发送确认报文段:ACK = y+1; 65 | -------------------------------------------------------------------------------- /803/network/assets/CSMA-CD流程图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/assets/CSMA-CD流程图.png -------------------------------------------------------------------------------- /803/network/assets/cs-p2p.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/assets/cs-p2p.JPEG -------------------------------------------------------------------------------- /803/network/assets/dns-system.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/assets/dns-system.JPEG -------------------------------------------------------------------------------- /803/network/assets/dns-theory.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/assets/dns-theory.JPEG -------------------------------------------------------------------------------- /803/network/assets/ftp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/assets/ftp.jpg -------------------------------------------------------------------------------- /803/network/assets/smtp-pop3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/assets/smtp-pop3.jpg -------------------------------------------------------------------------------- /803/network/assets/单播和组播的区别.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/assets/单播和组播的区别.JPEG -------------------------------------------------------------------------------- /803/network/overview/assets/1521374809579.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521374809579.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521375054618.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521375054618.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521375329315.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521375329315.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521375393652.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521375393652.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521377973889.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521377973889.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521466259721.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521466259721.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521467599042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521467599042.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521548228355.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521548228355.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521548859549.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521548859549.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521550229558.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521550229558.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521550442504.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521550442504.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521550847346.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521550847346.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521551212467.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521551212467.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521638792018.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521638792018.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521639808131.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521639808131.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521724062353.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521724062353.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521725096748.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521725096748.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521725201254.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521725201254.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521725388067.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521725388067.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521725455691.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521725455691.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521804729473.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521804729473.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521804892058.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521804892058.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521805477045.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521805477045.png -------------------------------------------------------------------------------- /803/network/overview/assets/1521805590031.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/network/overview/assets/1521805590031.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512017159916.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512017159916.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512017167417.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512017167417.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512018336531.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512018336531.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512018708983.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512018708983.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512019403783.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512019403783.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512039580446.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512039580446.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512040054645.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512040054645.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512042565548.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512042565548.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512048568934.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512048568934.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512048647858.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512048647858.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512049808712.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512049808712.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512228100903.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512228100903.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512228871344.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512228871344.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512229045589.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512229045589.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512229258824.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512229258824.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512230631792.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512230631792.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512231352315.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512231352315.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512231567213.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512231567213.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512231603280.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512231603280.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512232716472.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512232716472.png -------------------------------------------------------------------------------- /803/operating-system/CPU/1512232729278.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/CPU/1512232729278.png -------------------------------------------------------------------------------- /803/operating-system/FIFO.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/FIFO.c -------------------------------------------------------------------------------- /803/operating-system/IO/1512398382277.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512398382277.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512398610740.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512398610740.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512399735293.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512399735293.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512400055012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512400055012.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512401569321.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512401569321.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512401612398.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512401612398.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512402051690.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512402051690.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512402391717.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512402391717.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512402851338.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512402851338.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512402919459.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512402919459.png -------------------------------------------------------------------------------- /803/operating-system/IO/1512403774689.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/1512403774689.png -------------------------------------------------------------------------------- /803/operating-system/IO/IO系统的层次结构.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/IO系统的层次结构.png -------------------------------------------------------------------------------- /803/operating-system/IO/SPOOLing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/SPOOLing.png -------------------------------------------------------------------------------- /803/operating-system/IO/单缓冲区工作示意图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/单缓冲区工作示意图.png -------------------------------------------------------------------------------- /803/operating-system/IO/双缓冲区工作示意图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/双缓冲区工作示意图.png -------------------------------------------------------------------------------- /803/operating-system/IO/环形缓冲区.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/环形缓冲区.png -------------------------------------------------------------------------------- /803/operating-system/IO/磁盘结构图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/磁盘结构图.png -------------------------------------------------------------------------------- /803/operating-system/IO/缓冲池.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/IO/缓冲池.png -------------------------------------------------------------------------------- /803/operating-system/assets/1-1操作系统的发展历程.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/1-1操作系统的发展历程.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/1-2系统调用的执行过程.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/1-2系统调用的执行过程.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/2-1进程状态切换.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/2-1进程状态切换.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/2-2用户级和内核级线程.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/2-2用户级和内核级线程.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/2-3处理机的三级调度.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/2-3处理机的三级调度.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/2-4消息传递.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/2-4消息传递.png -------------------------------------------------------------------------------- /803/operating-system/assets/2-5共享存储通信.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/2-5共享存储通信.png -------------------------------------------------------------------------------- /803/operating-system/assets/2-6管道通信.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/2-6管道通信.png -------------------------------------------------------------------------------- /803/operating-system/assets/3-1页表的作用.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/3-1页表的作用.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/3-2分页存储管理的地址变换机构.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/3-2分页存储管理的地址变换机构.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/3-3具有快表的地址变换机构.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/3-3具有快表的地址变换机构.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/3-4二级页表结构示意图.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/3-4二级页表结构示意图.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/3-5利用段表实现地址映射.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/3-5利用段表实现地址映射.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/3-6分段系统的地址变换过程.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/3-6分段系统的地址变换过程.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/3-7请求分页中的地址变换过程.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/3-7请求分页中的地址变换过程.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/4-1索引顺序存储.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/4-1索引顺序存储.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/4-2文件系统层次结构.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/4-2文件系统层次结构.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/4-3连续分配.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/4-3连续分配.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/4-4成组链接法.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/4-4成组链接法.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/4-5隐式链接分配.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/4-5隐式链接分配.JPEG -------------------------------------------------------------------------------- /803/operating-system/assets/4-6索引分配.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/assets/4-6索引分配.JPEG -------------------------------------------------------------------------------- /803/operating-system/banker.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/banker.cpp -------------------------------------------------------------------------------- /803/operating-system/producer-consumer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/producer-consumer.cpp -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512310702789.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512310702789.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512314513856.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512314513856.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512317007305.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512317007305.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512317100764.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512317100764.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512317112936.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512317112936.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512317256786.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512317256786.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512317781195.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512317781195.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512487511356.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512487511356.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512487746591.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512487746591.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512488051956.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512488051956.png -------------------------------------------------------------------------------- /803/operating-system/存储器管理篇/1512488250193.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/存储器管理篇/1512488250193.png -------------------------------------------------------------------------------- /803/operating-system/文件管理/1512461355098.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/文件管理/1512461355098.png -------------------------------------------------------------------------------- /803/operating-system/文件管理/1512461731035.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/文件管理/1512461731035.png -------------------------------------------------------------------------------- /803/operating-system/文件管理/1512462461903.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/文件管理/1512462461903.png -------------------------------------------------------------------------------- /803/operating-system/文件管理/1512462768799.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/文件管理/1512462768799.png -------------------------------------------------------------------------------- /803/operating-system/文件管理/1512462853762.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/文件管理/1512462853762.png -------------------------------------------------------------------------------- /803/operating-system/文件管理/1512463211693.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/文件管理/1512463211693.png -------------------------------------------------------------------------------- /803/operating-system/文件管理/1512463318534.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/803/operating-system/文件管理/1512463318534.png -------------------------------------------------------------------------------- /803/operating-system/文件管理/README.md: -------------------------------------------------------------------------------- 1 | ## 文件管理 2 | 3 | ***数据项*** 4 | 5 | * 基本数据项:描述一个对象某种属性的字符集。`数据组织中可以命名的最小逻辑单位`。比如学生的学号、姓名、年龄等 6 | * 组合数据项:若干个基本数据项组成的。比如工资项由基本工资和奖金等组成 7 | 8 | ***记录***:描述一个对象在某方面的属性。 9 | 10 | *关键字*:唯一表示一个记录的数据项 11 | 12 | ***文件***:由创建者定义具有文件名的一组相关元素的集合。 13 | 14 | * 文件类型 15 | * 文件长度 16 | * 文件的物理位置 17 | * 建立时间:最后一次的修改时间 18 | 19 | ![文件](./1512461355098.png) 20 | 21 | *分类* 22 | 1. 用途 23 | * 系统文件 24 | * 用户文件 25 | * 库文件:允许用户调用但不可修改 26 | 2. 文件中数据 27 | * 源文件 28 | * 目标文件 29 | * 可执行文件 30 | 3. 存取控制 31 | * 只执行文件 32 | * 只读文件 33 | * 读写文件 34 | 35 | ***文件系统*** 36 | 37 | ![文件系统三次模型](./1512461731035.png) 38 | 39 | 40 | *管理对象*:文件、目录、磁盘存储空间 41 | 42 | 43 | *文件操作*:创建、删除、读、写、设置文件读/写位置 44 | 45 | *文件的打开和关闭操作*:将文件的属性从外存拷贝到内存打开文件表的一个表项中。关闭就是断开内外存连接。 46 | 47 | #### 文件的逻辑结构 48 | 49 | ***分类*** 50 | 51 | * 有结构文件 52 | * 定长记录 53 | * 变长记录 54 | * 无结构文件(流式文件):源程序、可执行文件、库函数等 55 | 56 | *按文件的组织方式分类* 57 | 58 | * 顺序文件:记录按某种顺序排列的文件 59 | * 索引文件:为可变长记录文件建立一张索引表 60 | * 索引顺序文件:为一组记录中的第一个记录建立索引表 61 | 62 | ***顺序文件***:便于批量存取,不方便增加删除记录 63 | 64 | * 串结构:按存入时间的先后排序 65 | * 顺序结构:用户定义的关键字 66 | 67 | ***记录寻址***:隐式和显式 68 | 69 | ![记录寻址](./1512462461903.png) 70 | 71 | ***索引文件***:按关键字建立索引,由主文件和索引表构成 72 | 73 | ![Alt text](./1512462768799.png) 74 | 75 | ***索引顺序文件***:一级和多级。变长记录顺序文件中的所有记录分组,为顺序表建立索引文件。 76 | 77 | ![Alt text](./1512462853762.png) 78 | 79 | 80 | #### 文件目录 81 | 82 | ***要求***: 83 | 84 | * 实现按名存取 85 | * 提高对目录的检索速度 86 | * 文件共享 87 | * 允许文件重名 88 | 89 | ***文件控制块FCB***:描述文件相关信息 90 | 91 | *索引结点*:文件名和描述信息分开,描述信息单独形成索引结点这样的数据结构。包括磁盘索引结点和内存索引结点 92 | 93 | ![索引结点](./1512463211693.png) 94 | 95 | *简单文件目录*:单级和两级 96 | 97 | ***树形结构目录*** 98 | 99 | ![Alt text](./1512463318534.png) 100 | 101 | *目录查询方法*:线性检索法、Hash方法(系统把文件名变换为文件目录的索引值再查找) 102 | 103 | >*冲突*:把n个不同文件名转换为相同的Hash值。 104 | >解决方法: (1) 该目录项为空则未找到 105 | >(2) 文件名(或子目录名)匹配则找到 106 | >(3) 该目录项非空则发生冲突,将Hash值加一常数(与目录长度互质)继续查找 107 | 108 | #### 文件共享 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /Android架构/Activity/Fragment.md: -------------------------------------------------------------------------------- 1 | # Fragment 2 | -------------------------------------------------------------------------------- /Android架构/Activity/README.md: -------------------------------------------------------------------------------- 1 | Activity是Android四大组件中出现频率最高的组件,为用户提供任务交互的画面。 2 | 3 | 4 | 5 | ## Activity的生命周期 6 | ![](http://www.android-doc.com/images/activity_lifecycle.png) 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Android架构/ConstraintLayout.md: -------------------------------------------------------------------------------- 1 | ## ConstraintLayout(复杂布局) 2 | -------------------------------------------------------------------------------- /Android架构/ContentProvider.md: -------------------------------------------------------------------------------- 1 | # Content Provider(内容提供器) 2 | 3 | * 主要应用于在不通的应用程序间的实现数据共享的功能 4 | 5 | ## 运行时权限 6 | * [查看完整权限列表](https://developer.android.com/reference/android/Manifest.permission.html) 7 | #### 权限的申请 8 | 在AndroidManifest.xml文件声明即可: 9 | ```xml 10 | 11 | ``` 12 | 13 | ## 访问其他程序中的数据 14 | ### ContentReslover的基本用法 15 | * ContentReslover中提供了一系列的方法用于对数据进行CRUD操作 16 | * insert() 添加 17 | * update() 更新 18 | * delete() 删除 19 | * query() 查询 20 | 21 | * ContentResolover中的增删改查方法都是使用一个Uri参数代替,这个参数被称为内容URI。 22 | 23 | * 内容URI由两部分组成 标准写法 `content://com.example.app.provider/table` 24 |         25 | * authority 对不同的应用程序做区分 `com.example.app.provider` 26 | 27 | * path 对同一个应用程序中的不同的表作区分,一般添加在authority后面 `com.example.app.provider/table` 28 | 29 | `把内容URI解析为Uri对象: Uri uri = Uri.parse("content://com.example.app.provider/table");` 30 | -------------------------------------------------------------------------------- /Android架构/MVP和MVVM框架.md: -------------------------------------------------------------------------------- 1 | Model-View-Presenter 2 | ===================== 3 | 4 | * Persenter:交互中间人 5 | * View:用户界面 6 | * Model:数据存储 7 | 8 | ## 特点 9 | 10 | ![MVP](http://image.beekka.com/blog/2015/bg2015020109.png) 11 | 12 | * 各部分间的通信都是双向的 13 | * Model和View分离 14 | * Presenter作为View和Model的桥梁 15 | 16 | ## Android中的MVP 17 | * 把Activity当作了View层 18 | * View和Presenter主要通过接口的方式连接 19 | 20 | Activity中没有任何Model层的代码,把相应的代码放在Presenter层,Presenter获取Model的数据后,通过接口的方式返回给View层。 21 | 22 | ## 优点 23 | 24 | * 减少了Activity中的代码逻辑 25 | 26 | * Model和View完全解耦 27 | 28 | 每个类型的代码量大幅减少,职责单一,易于维护。 29 | 30 | Model-ViewModel-Model 31 | ====================== 32 | 基本与VMP模式完全一致,只是View和Model采用双向绑定(data-binding) 33 | 34 | ![MVVM](http://image.beekka.com/blog/2015/bg2015020110.png) 35 | 36 | ## 特点 37 | 两者间有任何一方变化便会反应到另一方上。Model的数据变化后会自动更新View,View的修改也会直接导致数据的变更。 38 | -------------------------------------------------------------------------------- /Android架构/Material Design/README.md: -------------------------------------------------------------------------------- 1 | # Material Design 2 | Material Design是google在2048在I/O大会上重磅推出的一套全新的视觉设计语言。2015年推出了一个Design Support库,这个库将Material Design中最具代表性的一些控件和效果进行了封装,使得开发者能很轻松的将自己的应用Material化。 3 | * ToolBar `被进化的ActionBar` 4 | * 滑动菜单 5 | * DrawerLayout `实现滑动菜单` 6 | * NavigationView `定制滑动菜单页面` 7 | * CircleImageView `图片圆形化` 8 | * 悬浮按钮和可交互提示 9 | * FloatingActionButton `悬浮按钮` 10 | * SnackBar `更加先进的提示工具` 11 | * CoordinatorLayout `加强的FrameLayout` 12 | * 卡片式布局 13 | * CardView `卡片式布局` 14 | * AppBarLayout `解决覆盖问题` 15 | * SwipeRefreshLayout `下拉刷新` 16 | * 可折叠式标题栏 17 | * CollapsingToolbarLayout `丰富ToolBar效果` 18 | * 充分利用系统状态栏控件 19 | -------------------------------------------------------------------------------- /Android架构/Material Design/UI/ToolBar.md: -------------------------------------------------------------------------------- 1 | ActionBar被设计成只能位于活动的顶部,从而不能实现Material Design的效果。ToolBar不仅继承了ActionBar的效果,而且更灵活,可以配合其他控件来完成一些Material Design的效果。 2 | ### 隐藏ActionBar 3 | * 打开`res/values/styles.xml`文件 4 | 5 | ```xml 6 | 12 | ``` 13 | -------------------------------------------------------------------------------- /Android架构/经典MVC.md: -------------------------------------------------------------------------------- 1 | Model-View-Controller 2 | ===================== 3 | * View:用户界面 4 | * Model:数据保存 5 | * Controller:业务逻辑 6 | 7 | 特点 8 | ------- 9 | ![MVC](http://image.beekka.com/blog/2015/bg2015020108.png) 10 | * 用户可以向View发送指令,再由View直接要求Model改变状态 11 | * 用户也可以直接向Controller发送指令,再由Controller发送给View 12 | * Controller起到事件路由的作用 13 | 14 | Android中的MVC 15 | -------------- 16 | * Layout中的xml文件相当于View层 17 | * 可以是Values里的xml文件,也可以是Java代码,类似repository类 18 | * Controller层则是对外部世界响应。例如点击事件等 19 | 20 | 缺点 21 | ----- 22 | View和Model是相互可以访问的,耦合性较高。因此衍生出了[MVP和MVVM](https://github.com/Joki-memeda/MyLearning/blob/master/DesignPattern/MVP%E5%92%8CMVVM%E6%A1%86%E6%9E%B6.md)两种框架 23 | -------------------------------------------------------------------------------- /DesignPattern/Builder模式.md: -------------------------------------------------------------------------------- 1 | Builder(建造者)模式 2 | =================== 3 | Builder模式是一步一步创建一个复杂对象的创建型模式。一个复杂对象有很多大量组成的部分,Builder模式可以使得构建对象过程和部件的表示隔离开来,两者都可以自由扩展,使得耦合性降到最低。 4 | 5 | ## 定义 6 | 将一个复杂对象的构建与它的表示分离,使得童杨的构建过程可以创建不同的表示。 7 | ## 使用场景 8 | * 相同的方法,不同的执行顺序,产生不同的事件结果。 9 | * 初始化一个对象特别复杂,如参数多,且很多参数都有默认值时。 10 | * 多个部件或零件都可以装配到一个对象中,但是产生的运行结果又不相同时。 11 | ## UML类图 12 | ![Builder模式的UML类图](http://pic002.cnblogs.com/images/2011/328668/2011112120433967.jpg) 13 | 14 | 15 | * Product--产品的抽象类 16 | * Builder--抽象Builder类,规范产品的组建,由子类实现具体的组件过程 17 | * ConcreatBuilder--具体Builder类 18 | * Director--统一组建过程 19 | 20 | `在现实开发过程中,Director角色常常会被省略,而直接使用一个Builder来进行对象的组装。这个Builder通常为链式调用,它的关键点在每个setter方法都返回自身,return this,setter链式调用的代码如下:` 21 | ```Java 22 | new TestBuilder().setA("A).setB("B").create(); 23 | ``` 24 | 25 | ## Android源码中的Builder模式 26 | Android源码中最常用的Builder模式就是AlertDialog.Builder,使用该Builder来构建复杂的AlertDialog对象。 27 | 28 | ```Java 29 | //显示基本的AlertDialog 30 | private void showDialog(Context context) { 31 | AlertDialog.Builder builder = new AlertDialog.Builder(context); 32 | builder.setIcon(R.drawable.icon); 33 | builder.setTitle("Title"); 34 | builder.setMessage("Message"); 35 | builder.setPositiveButton("Button1", 36 | new DialogInterface.OnClickListener() { 37 | public void onClick(DialogInterface dialog, int whichButton) { 38 | setTitle("点击了对话框上的Button1"); 39 | } 40 | }); 41 | builder.setNeutralButton("Button2", 42 | new DialogInterface.OnClickListener() { 43 | public void onClick(DialogInterface dialog, int whichButton) { 44 | setTitle("点击了对话框上的Button2"); 45 | } 46 | }); 47 | builder.setNegativeButton("Button3", 48 | new DialogInterface.OnClickListener() { 49 | public void onClick(DialogInterface dialog, int whichButton) { 50 | setTitle("点击了对话框上的Button3"); 51 | } 52 | }); 53 | builder.create().show(); // 构建AlertDialog, 并且显示 54 | } 55 | ``` 56 | 57 | ## 优点 58 | * 具有良好的封装性,使用建造者模式可以使客户端不必知道产品内部组成的细节 59 | * 建造者独立,容易扩展 60 | ## 缺点 61 | * 会产成多余的Builder对象以及Director对象,消耗内存 62 | -------------------------------------------------------------------------------- /DesignPattern/Decorator Pattern/Decorator.java: -------------------------------------------------------------------------------- 1 | package decorator; 2 | 3 | /** 4 | * abstract Decorator 5 | */ 6 | public abstract class Decorator implements Drink { 7 | /** 8 | * private reference to the drink being decorated 9 | */ 10 | private Drink drink; 11 | 12 | public Decorator(Drink drink){ 13 | this.drink = drink; 14 | } 15 | 16 | @Override 17 | public String description() { 18 | return this.drink.description(); 19 | } 20 | 21 | @Override 22 | public float coast() { 23 | return this.drink.coast(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DesignPattern/Decorator Pattern/Drink.java: -------------------------------------------------------------------------------- 1 | package decorator; 2 | 3 | /** 4 | * Drink Interface 5 | * Component drink 6 | */ 7 | public interface Drink { 8 | String description(); 9 | float coast(); 10 | } 11 | -------------------------------------------------------------------------------- /DesignPattern/Decorator Pattern/EggDecorator.java: -------------------------------------------------------------------------------- 1 | package decorator; 2 | 3 | /** 4 | * Concrete Decorator extends Decorator 5 | * EggDecorator creates a milk adds egg 6 | */ 7 | public class EggDecorator extends Decorator { 8 | public EggDecorator(Drink drink) { 9 | super(drink); 10 | } 11 | 12 | @Override 13 | public String description() { 14 | return super.description()+" With Egg"; 15 | } 16 | 17 | @Override 18 | public float coast() { 19 | return super.coast() + 1.0F; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /DesignPattern/Decorator Pattern/SoyaBeanMilk.java: -------------------------------------------------------------------------------- 1 | package decorator; 2 | 3 | /** 4 | * Drink implemention 5 | * 6 | * Concrete implemention 7 | */ 8 | public class SoyaBeanMilk implements Drink { 9 | @Override 10 | public String description() { 11 | return "SoyaBeanMilk"; 12 | } 13 | 14 | @Override 15 | public float coast() { 16 | return 2.0F; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DesignPattern/Decorator Pattern/SugerDecorator.java: -------------------------------------------------------------------------------- 1 | package decorator; 2 | 3 | /** 4 | /** 5 | * Concrete Decorator extends Decorator 6 | * SugerDecorator creates a milk adds suger 7 | */ 8 | public class SugerDecorator extends Decorator { 9 | public SugerDecorator(Drink drink) { 10 | super(drink); 11 | } 12 | 13 | @Override 14 | public String description() { 15 | return super.description() + " With Suger"; 16 | } 17 | 18 | @Override 19 | public float coast() { 20 | return super.coast() + 0.5F; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /DesignPattern/Decorator Pattern/Test.java: -------------------------------------------------------------------------------- 1 | package decorator; 2 | 3 | /** 4 | * Created by Joki on 2017/4/19. 5 | */ 6 | public class Test { 7 | public static void main(String[] args){ 8 | //create a new soyaBeanMilk 9 | Drink drink = new SoyaBeanMilk(); 10 | System.out.println("This is a " + drink.description() + ",and it's costs " + drink.coast()); 11 | 12 | //decorate Milk add Suger 13 | drink = new SugerDecorator(drink); 14 | System.out.println("This is a " + drink.description() + ",and it's costs " + drink.coast()); 15 | 16 | //decorate SugerMilk add Egg 17 | drink = new EggDecorator(drink); 18 | System.out.println("This is a " + drink.description() + ",and it's costs " + drink.coast()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/base/Client.java: -------------------------------------------------------------------------------- 1 | package factorymethod; 2 | 3 | /** 4 | * Created by Joki on 2017/6/30. 5 | */ 6 | public class Client { 7 | public static void main(String[] args){ 8 | Factory factory = new ConcreteFactoryA(); 9 | Product p = factory.factoryMethod(); 10 | p.method(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/base/ConcreteFactoryA.java: -------------------------------------------------------------------------------- 1 | package factorymethod; 2 | 3 | /** 4 | * 产品A的具体工厂 5 | */ 6 | public class ConcreteFactoryA extends Factory { 7 | @Override 8 | public Product factoryMethod() { 9 | return new ConcreteProductA(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/base/ConcreteProductA.java: -------------------------------------------------------------------------------- 1 | package factorymethod; 2 | 3 | /** 4 | * Created by Joki on 2017/6/30. 5 | */ 6 | public class ConcreteProductA extends Product{ 7 | @Override 8 | public void method() { 9 | //产品A的处理逻辑 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/base/ConcreteProductB.java: -------------------------------------------------------------------------------- 1 | package factorymethod; 2 | 3 | /** 4 | * Created by Joki on 2017/6/30. 5 | */ 6 | public class ConcreteProductB extends Product{ 7 | @Override 8 | public void method() { 9 | //产品B的处理逻辑 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/base/Factory.java: -------------------------------------------------------------------------------- 1 | package factorymethod; 2 | 3 | /** 4 | * 抽象工厂类 5 | */ 6 | public abstract class Factory { 7 | //抽象工厂方法 8 | public abstract Product factoryMethod(); 9 | } 10 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/base/Product.java: -------------------------------------------------------------------------------- 1 | package factorymethod; 2 | 3 | /** 4 | * 抽象产品类 5 | * 抽象工厂可以是一个接口,也可以是一个抽象类 6 | */ 7 | public abstract class Product { 8 | //产品类的抽象方法 9 | public abstract void method(); 10 | } 11 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/example/Client.java: -------------------------------------------------------------------------------- 1 | package factorymethod.example; 2 | 3 | /** 4 | * Created by Joki on 2017/7/5. 5 | */ 6 | public class Client { 7 | public static void main(String[] args){ 8 | //实例化一个读取图片的工厂对象 9 | ReaderFactory readerFactory = new PicReaderFactory(); 10 | 11 | //生产gif读取器并读取 12 | GifReader gifReader = readerFactory.createReader(GifReader.class); 13 | gifReader.reader(); 14 | //生产jpg读取器并读取 15 | JpgReader jpgReader = readerFactory.createReader(JpgReader.class); 16 | jpgReader.reader(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/example/GifReader.java: -------------------------------------------------------------------------------- 1 | package factorymethod.example; 2 | 3 | /** 4 | * Created by Joki on 2017/7/5. 5 | */ 6 | public class GifReader extends PicReader{ 7 | @Override 8 | public void reader() { 9 | System.out.println("This is a gif picture!"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/example/JpgReader.java: -------------------------------------------------------------------------------- 1 | package factorymethod.example; 2 | 3 | /** 4 | * Created by Joki on 2017/7/5. 5 | */ 6 | public class JpgReader extends PicReader { 7 | @Override 8 | public void reader() { 9 | System.out.println("This is a jpg picture"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/example/PicReader.java: -------------------------------------------------------------------------------- 1 | package factorymethod.example; 2 | 3 | /** 4 | * Created by Joki on 2017/7/5. 5 | */ 6 | public abstract class PicReader { 7 | /** 8 | * 图片读取器的抽象方法 9 | */ 10 | public abstract void reader(); 11 | } 12 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/example/PicReaderFactory.java: -------------------------------------------------------------------------------- 1 | package factorymethod.example; 2 | 3 | /** 4 | * Created by Joki on 2017/7/5. 5 | */ 6 | public class PicReaderFactory extends ReaderFactory { 7 | @Override 8 | public T createReader(Class clz) { 9 | PicReader reader = null; 10 | try { 11 | reader = (PicReader) Class.forName(clz.getName()).newInstance(); 12 | } catch (Exception e) { 13 | e.printStackTrace(); 14 | } 15 | return (T) reader; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/example/ReaderFactory.java: -------------------------------------------------------------------------------- 1 | package factorymethod.example; 2 | 3 | /** 4 | * Created by Joki on 2017/7/5. 5 | */ 6 | public abstract class ReaderFactory { 7 | /** 8 | * 图片读取器的工厂方法 9 | * @param clz 10 | * @param 11 | * @return 12 | */ 13 | public abstract T createReader(Class clz); 14 | } 15 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/reflect/Client.java: -------------------------------------------------------------------------------- 1 | package factorymethod.reflect; 2 | 3 | import factorymethod.base.ConcreteProductA; 4 | import factorymethod.base.Product; 5 | 6 | /** 7 | * Created by Joki on 2017/7/5. 8 | */ 9 | public class Client { 10 | public static void main(String[] args){ 11 | Factory factory = new ConcreteFactory(); 12 | Product product = factory.createProduct(ConcreteProductA.class); 13 | product.method(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/reflect/ConcreteFactory.java: -------------------------------------------------------------------------------- 1 | package factorymethod.reflect; 2 | 3 | import factorymethod.base.Product; 4 | 5 | /** 6 | * Created by Joki on 2017/7/5. 7 | */ 8 | public class ConcreteFactory extends Factory { 9 | 10 | @Override 11 | public T createProduct(Class clz) { 12 | Product product = null; 13 | try { 14 | product = (Product) Class.forName(clz.getName()).newInstance(); 15 | } catch (Exception e) { 16 | e.printStackTrace(); 17 | } 18 | return (T) product; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DesignPattern/Factory Method Pattern/reflect/Factory.java: -------------------------------------------------------------------------------- 1 | package factorymethod.reflect; 2 | 3 | import factorymethod.base.Product; 4 | 5 | /** 6 | * Created by Joki on 2017/7/5. 7 | */ 8 | public abstract class Factory { 9 | /** 10 | * 抽象工厂方法 11 | * @param clz 产品对象类类型 12 | * @param 13 | * @return 具体的产品对象 14 | */ 15 | public abstract T createProduct(Class clz); 16 | } 17 | -------------------------------------------------------------------------------- /DesignPattern/Simple Factory Pattern/Client.java: -------------------------------------------------------------------------------- 1 | package simplefactory; 2 | 3 | /** 4 | * Created by Joki on 2017/6/30. 5 | */ 6 | public class Client { 7 | public static void main(String[] args){ 8 | Product product; 9 | product = Factory.getProduct("A"); 10 | product.methodSame(); 11 | product.methodDiff(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DesignPattern/Simple Factory Pattern/ConcreteProductA.java: -------------------------------------------------------------------------------- 1 | package simplefactory; 2 | 3 | /** 4 | * Created by Joki on 2017/6/30. 5 | */ 6 | public class ConcreteProductA extends Product { 7 | //实现业务方法 8 | @Override 9 | public void methodDiff() { 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /DesignPattern/Simple Factory Pattern/ConcreteProductB.java: -------------------------------------------------------------------------------- 1 | package simplefactory; 2 | 3 | /** 4 | * Created by Joki on 2017/6/30. 5 | */ 6 | public class ConcreteProductB extends Product { 7 | @Override 8 | public void methodDiff() { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DesignPattern/Simple Factory Pattern/Factory.java: -------------------------------------------------------------------------------- 1 | package simplefactory; 2 | 3 | /** 4 | * Created by Joki on 2017/6/30. 5 | */ 6 | public class Factory { 7 | //静态工厂方法 8 | public static Product getProduct(String arg){ 9 | Product product = null; 10 | if (arg.equalsIgnoreCase("A")){ 11 | product = new ConcreteProductA(); 12 | //初始化设置product 13 | }else if (arg.equalsIgnoreCase("B")){ 14 | product = new ConcreteProductB(); 15 | //初始化设置product 16 | } 17 | return product; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /DesignPattern/Simple Factory Pattern/Product.java: -------------------------------------------------------------------------------- 1 | package simplefactory; 2 | 3 | /** 4 | * Created by Joki on 2017/6/30. 5 | */ 6 | public abstract class Product { 7 | //所有产品类的公共业务方法 8 | public void methodSame(){ 9 | //公共方法的实现 10 | } 11 | 12 | //声明抽象业务方法 13 | public abstract void methodDiff(); 14 | } 15 | -------------------------------------------------------------------------------- /DesignPattern/Simple Factory Pattern/README.md: -------------------------------------------------------------------------------- 1 | # 简单工厂模式(工厂方法模式的小弟) 2 | 3 | 简单工厂模式并不属于GoF23个经典设计模式,但通常作为23个设计模式的基础。因为在简单工厂模式中用于创建实例的方法是static方法,所以它也被称为Static Factory Method Pattern. 4 | 5 | ***定义*** 6 | 7 | 定义一个工厂类,它可以根据参数的不同返回不同类的实例,被创建的实例通常都具有共同的父类。 8 | 9 | ***UML类图*** 10 | 11 | ![SimpleFactoryPattern](http://img.blog.csdn.net/20130711143612921?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvTG92ZUxpb24=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 12 | 13 | * Factory:工厂角色即工厂类,负责实现创建所有产品实例的内部逻辑;工厂类可以被外界直接调用静态的工厂方法factoryMethod(),创建产品对象。 14 | 15 | * Product:抽象产品角色,是工厂类所创建所有产品的父类,封装了各种产品对象的公有方法。 16 | 17 | * ConcreteProduct:具体产品角色,所有被工厂创建的对象都充当这个角色的某个具体类的实例。 18 | 19 | 在简单工厂模式中,客户端不用通过new创建对象,只需要通过工厂类就可以创建一个产品类的实例。 20 | 21 | 使用简单工厂模式时,首先要对产品类进行重构,要根据实际情况设计一个产品层次结构,将所有产品类的公共代码移至抽象产品类,并声明一些抽象方法,以供不同的具体产品类来实现。 22 | ```java 23 | public abstract class Product { 24 | //所有产品类的公共业务方法 25 | public void methodSame(){ 26 | //公共方法的实现 27 | } 28 | 29 | //声明抽象业务方法 30 | public abstract void methodDiff(); 31 | } 32 | ``` 33 | 34 | 然后是具体产品的实现,继承抽象产品方法,实现自己内部业务逻辑 35 | ```java 36 | public class ConcreteProductA extends Product { 37 | //实现业务方法 38 | @Override 39 | public void methodDiff() { 40 | 41 | } 42 | } 43 | ``` 44 | 45 | 创建简单工厂模式的核心工厂类,工厂类提供一个静态工厂方法供客户端使用,根据传入参数的不同创建不同的产品对象,典型代码: 46 | ```java 47 | public class Factory { 48 | //静态工厂方法 49 | public static Product getProduct(String arg){ 50 | Product product = null; 51 | if (arg.equalsIgnoreCase("A")){ 52 | product = new ConcreteProductA(); 53 | //初始化设置product 54 | }else if (arg.equalsIgnoreCase("B")){ 55 | product = new ConcreteProductB(); 56 | //初始化设置product 57 | } 58 | return product; 59 | } 60 | } 61 | ``` 62 | 63 | 客户端调用代码如下 64 | ```java 65 | public class Client { 66 | public static void main(String[] args){ 67 | Product product; 68 | product = Factory.getProduct("A"); 69 | product.methodSame(); 70 | product.methodDiff(); 71 | } 72 | } 73 | ``` 74 | -------------------------------------------------------------------------------- /DesignPattern/单例模式.md: -------------------------------------------------------------------------------- 1 | 单例模式 2 | ======== 3 | ## 定义 4 | 确保某一个类只有一个实例,而且自行实例化并向整个系统这个实例。 5 | Singleton:负责创建Singleton类自己的唯一实例,并提供一个getInstance的方法,让外部来访问这个类的唯一实例。 6 | ## 使用场景 7 | 确保某个类有且只有一个对象的场景,避免产生多个对象消耗过多的资源,或者某种类型的对象应该有且只有一个。 8 | ## 特点 9 | 1.构造函数一般为private,客户端代码不能通过new的形式手动构造单例类对象。 10 | 2.通过一个静态方法或者枚举返回单例类对象 11 | 3.在多线程的环境下单例类对象依然是有且只有一个。 12 | 4.确保单例类对象在反序列化时不会重新构建对象。 13 | * 一个简单示例 14 | 15 | ```Java 16 | 17 | //一个公司可以有几个VP,无数个员工,但是只能有一个CEO。 18 | package Singleton; 19 | 20 | public class Staff { 21 | public void wrok(){ 22 | //干活 23 | } 24 | } 25 | 26 | //副总裁 27 | public class VP extends Staff{ 28 | public void work() { 29 | //管理下面的经理 30 | } 31 | } 32 | 33 | //CEO,饿汉单例模式 34 | public class CEO extends Staff{ 35 | private static final CEO mCeo = new CEO(); 36 | //构造函数私有 37 | private CEO(){ 38 | } 39 | 40 | //公有的静态函数,对外暴露获取单例对象的接口 41 | public static CEO getCeo(){ 42 | return mCeo; 43 | } 44 | 45 | public void work(){ 46 | //管理VP 47 | } 48 | } 49 | 50 | //公司类 51 | public class Company { 52 | private List allStaffs = new ArrayList(); 53 | public void addStaff(Staff per){ 54 | allStaffs.add(per); 55 | } 56 | 57 | public void showAllStaffs(){ 58 | for(Staff per : allStaffs){ 59 | System.out.println("Obj:" + per.toString()); 60 | } 61 | } 62 | } 63 | 64 | public class Test { 65 | public static void main(String[] args){ 66 | Company cp = new Company(); 67 | //CEO对象只能通过getCeo函数获取,ceo为静态对象,在声明的时候就已经初始化,保证了CEO的唯一性 68 | Staff ceo1 = CEO.getCeo(); 69 | Staff ceo2 = CEO.getCeo(); 70 | cp.addStaff(ceo1); 71 | cp.addStaff(ceo2); 72 | //通过new创建VP对象 73 | Staff v1 = new VP(); 74 | Staff v2 = new VP(); 75 | //通过new 创建Staff对象 76 | Staff staff1 = new Staff(); 77 | Staff staff2 = new Staff(); 78 | Staff staff3 = new Staff(); 79 | 80 | cp.addStaff(v1); 81 | cp.addStaff(v2); 82 | cp.addStaff(staff1); 83 | cp.addStaff(staff2); 84 | cp.addStaff(staff3); 85 | 86 | cp.showAllStaffs(); 87 | } 88 | } 89 | ``` 90 | ## 运行结果 ## 91 | >Obj:Singleton.CEO@15db9742//可以看到ceo1和ceo2是同一个对象 92 | 93 | >Obj:Singleton.CEO@15db9742 94 | 95 | ## 单例模式的几种实现方式 96 | * 饿汉式 97 | 在程序启动或单例模式类被加载的时候,这个单例对象就已经被创建了。 98 | 99 | `private static Singleton instance = new Singleton();` 100 | 101 | 102 | * 优点 获取单例对象快 103 | * 缺点 类加载慢 104 | 105 |     106 | * 懒汉式 107 | 单例只有在使用时才会被实例化。 108 | ```Java 109 | public class Singleton { 110 | private static Singleton instance = null; 111 | private Singleton(){} 112 | 113 | /** 114 | * synchronized保证线程安全 115 | */ 116 | public static synchronized Singleton getInstance(){ 117 | if (instance == null){ 118 | instance = new Singleton(); 119 | } 120 | return instance; 121 | } 122 | } 123 | ``` 124 | 125 | * 优点 节省空间 126 | 127 | * 缺点 第一次加载需要及时实例化,反应较慢。每次调用getInstance都进行同步,会造成不必要的同步开销。 128 | -------------------------------------------------------------------------------- /English/songs/Will You Be There - Micheal Jackson.md: -------------------------------------------------------------------------------- 1 | ##Will You Be There - Micheal Jackson 2 | 3 | Hold me 4 | 5 | 抱紧我 6 | 7 | Like the river Jordan 8 | 9 | 像约旦河那样 10 | 11 | And I will then say to thee 12 | 13 | 然后我会告诉你 14 | 15 | You are my friend 16 | 17 | 我是你的朋友 18 | 19 | Carry me like you are my brother 20 | 21 | 抓紧我就像兄弟一样 22 | 23 | Love me lick a mother 24 | 25 | 像妈妈一样爱我 26 | 27 | Will you be there? 28 | 29 | 你会在那里吗? 30 | 31 | Weary 32 | 33 | 我累了 34 | 35 | Tell me will you hold me 36 | 37 | 告诉我你还会支撑我吗? 38 | 39 | When wrong will you scold me? 40 | 41 | 犯错了你会责怪我吗?
42 | When lost would you find me?
43 | 迷路时你会寻找我吗?
44 | But they told me
45 | 但是他们告诉我
46 | A man should be faithful
47 | 男人就该顶天立地
48 | and walk when not able
49 | 走不动了也要继续前进
50 | and fight till the end
51 | 斗争到死
52 | but I'm only human
53 | 可我只是个普通人啊
54 | 55 | Everyone's taking control of me
56 | seems that the world's got a role for me
57 | I'm so confused will you show to me
58 | You'll be there for me
59 | > 所有人都想控制我
60 | > 好像我在这个世界上是个角色一样
61 | > 当你看到真实的我时
62 | > 你还会陪伴我吗
63 | 64 | (hold me)
65 | show me
66 | (lay your head lowly)
67 | lowly
68 | (softly then boldly)
69 | yeah
70 | (carry me there)
71 | I'm only human
72 | (need me)
73 | hold me
74 | (Love me and feed me)
75 | (Kiss me and free me)
76 | yeah
77 | (I will feel blessed)
78 | I'm only human
79 | (carry)
80 | carry
81 | (carry me boldly)
82 | carry
83 | (lift me up slowly)
84 | yeah
85 | (carry me there)
86 | I'm only human
87 | 88 | (save me)
89 | save me
90 | (heal me and bathe me)
91 | fill me up fill me up
92 | (softly and say to me )
93 | (I will be there)
94 | I will be there
95 | 96 | (lift me )
97 | (lift me up slowly)
98 | (carry me boldly)
99 | yeah
100 | (show me you care)
101 | (hold me )
102 | 103 | (lay your head lowly)
104 | I get lonely sometimes
105 | (softly then boldly)
106 | I get lonely yeah yeah
107 | (carry me there)
108 | carry me there
109 | 110 | (love me and feed me )
111 | fill me up hold me up fill me up sometimes
112 | (kiss me and free me )
113 | up sometimes
114 | (i will feel blessed)
115 | blessed
116 | 117 | ***以下为Michael 的独白 听的我心都扎烂了*** 118 | 119 | In our darkest hour
120 | In my deepest despair
121 | Will you still care
122 | Will you be there
123 | In my trials and my tribulations
124 | through our doubts and frustrations
125 | In my violence
126 | In my turbulence
127 | through my fear and my confessions
128 | In my anguish and my pain
129 | through my joy and my sorrow
130 | In the promise of another tomorrow
131 | I'll never let you part
132 | for you're always
133 | In my heart
134 | 135 | >在我最昏暗的时光里
136 | >最绝望的深渊里
137 | >你还会在乎我吗
138 | >你还会陪伴我吗
139 | >在我的考验和苦难中
140 | >会越过怀疑和废墟(寻找我)吗
141 | >在暴力和动荡中
142 | >会越过恐惧和忏悔(拥抱我)吗
143 | >在我虚弱、满身伤痛的时候
144 | >越过欢笑和悲伤(陪伴我)吗
145 | >我承诺每一个明天
146 | >永远不会让你孤单
147 | >因为你永远
148 | >在我心中
149 | -------------------------------------------------------------------------------- /English/songs/vocabulary.md: -------------------------------------------------------------------------------- 1 | 14个核心词根 2 | ``` 3 | Alter EinStein:"Miracles are what happen when you get out of the way of yourself." 4 | ``` 5 | 6 | require:ask for sth. firmly 7 | demand:the ruler sets a rule with the expectation that nobody would refute if. 8 | request:ask for sth. politely 9 | 10 | entail sb. doing everything 11 | -------------------------------------------------------------------------------- /English/speeches/The Art of Speaking.md: -------------------------------------------------------------------------------- 1 | [TED: The Art of Speaking](https://gslb.miaopai.com/stream/pYrOAr1Rul2jDr~yBdH9C71Ky7VdzHT8~Gskrw__.mp4?yx=&refer=weibo_app&Expires=1528645062&ssig=LsePbMRafT&KID=unistore,video) 2 | 3 | The human voice: It's the instrument we all play. It's the most powerful sound in the world. There are a number of habits that we need to move away from. 4 | 5 | There are ***Seven deadly sins of speaking:*** Gossip, judging, negativity, complaining, excuses, lying and dogmatism. They are not spreading sunshine and lightness in the world and confusion the facts and opinions. 6 | 7 | I'd like to suggest that four very powerful cornerstones and foundations that we can stand on if we want our speech to be powerful and to make change in the world. 8 | 9 | Fortunately, these things spell a word: HAIL -- It has a great definition to greet or acclaim enthusiastically, which is how our words will be received. 10 | 11 | - ***Honesty***: Be true in what you say, be clear and straight 12 | - ***Authenticity***: Be yourself 13 | - ***Integrity***: Be your word 14 | - ***Love***: wish them will 15 | 16 | Tempered with love, honesty is a great thing, and if you are really wishing somebody well, It's very hard to judge them at the same. 17 | 18 | What would the world be like if we were creating sound consciously, and consuming sound consciously, and designing all our environments conscious for sound? That would be a world that dose sound beautiful and one where understanding would be the norm. 19 | > 如果我们精心设计语言,用心感受语言,有意识地设计所有环境感知声音,这世界会变成什么样?那将是一个听起来很棒的世界,一个理解成为常态的世界。 -------------------------------------------------------------------------------- /English/speeches/The Mathematics of Love.md: -------------------------------------------------------------------------------- 1 | ## The Mathematics of Love 2 | 3 | Human emotion isn't neatly ordered, rational and easily predictable. But I also know that doesn't mean the mathematics hasn't got something that it can offer us. Because love is full of patterns and mathematics is, ultimately, all about the study of patterns. 4 | 5 | ***1. How to win at online dating*** 6 | 7 | * How attractive you are does not dictate how popular you are. Actually, having people think that you're ugly can work to your advantage. 8 | * You should play up to whatever it is that makes you different, even if you think that some people will find it unattractive. Because the people who fancy you are just going to fancy you anyway, and the unimportant losers only play up to your advantage. 9 | 10 | ***2.How to pick the perfect partner*** 11 | 12 | "An unmarried woman of seven and twenty can never hope to feel or inspire affection again." 13 | 1个27岁的大龄剩女再也不相信爱了。 14 | 15 | * In the first percent of your life, we give ourselves a little bit of time to play the field, get a feel for the marketplace or whatever. But actually we should reject everybody as serious marriage potential. 16 | * We only start looking seriously at potential marriage candidates once we hit our mid-to-late 20s. 17 | 18 | ***3.How to avoid divorce*** 19 | 20 | :) I don't want to give you anything, because I haven't pick my perfect partner. 21 | :)我什么也不想写,因为我还没有找到我的完美伴侣。 22 | 23 | It's quiet interesting to know that there is really mathematical evidence to say that you should never let the sun go down on your anger. 24 | 25 | ***Ending*** 26 | 27 | Equations and symbols are a voice that speaks out about the incredible richness of nature and the startling simplicity in the patterns that twist and turn and warp evolve all around us from how the world works to how we behave.
28 | I hope that perhaps, for just a couple of you, a little bit of insight into the mathematics of love can persuade you to have a little more love for mathematics. -------------------------------------------------------------------------------- /English/speeches/The power of vulnerability解决自卑烦恼型可用.md: -------------------------------------------------------------------------------- 1 | ## The Power of Vulnerabilities [建议信/解决自卑烦恼型可用] 2 | 3 | I want to share to you my views and tell some stories about a piece of research that fundamentally expanded my perception and actually changed the way that I live and love in my whole life. 4 | 5 | It's universal that shame as the fear of connection. The only people who don't experience shame have no capacity for human empathy or connection. The things that underpinned this fear was excruciating vulnerability. In order for connection to happen, you have to allow your self to be seen, this is your chance to beat it back with your measuring stick. 6 | 7 | When you divided people we can found that who really have a sense of worthiness -- they have strong belonging and love -- are folks who struggle for wondering whether they're good enough. 8 | 9 | Personally and professionally, the worthiness to connection are whole-hearted people living from the deep sense of worthiness and they had in common was a sense of courage and bravery to be imperfect. They had the compassion to be kind to themselves first and then to others. As a result of authenticity, they were willing to let go of who they thought they should be , in order to be who they were, which you have to absolutely do that for connection. 10 | 11 | The other thing that they had in common was embrace vulnerability. From the perspective of those brave people, vulnerability is the willingness to do something where there are no guarantees, the willingness to breathe through the tough time. 12 | 13 | We live in a vulnerable world and one of the way we deal with it is we numb vulnerability. It's not the only reason that the evidence existed such as obese, in-debt, procrastination... But you can't numb those hard feelings. You'll numb everything if you choose to be numb and then you'll miserable and looking for purpose and meaning to a dangerous circle. The more negative you are, the more vulnerable you are. 14 | 15 | To let yourself be deeply vulnerably seen, to love with your whole heart even though there's no guarantee, to practice gratitude and lean in joy, to be confident and satisfied, then you stop screaming and start listening, you are kinder and gentler to yourself and the people around you. That's the road to build a better place for live. 16 | -------------------------------------------------------------------------------- /English/speeches/The surprising habits of original ideas.md: -------------------------------------------------------------------------------- 1 | 2 | >[TED: The Surprising habits of original thinkers](https://www.ted.com/talks/adam_grant_the_surprising_habits_of_original_thinkers/feedback#t-895027) 3 | Here are some material I collected when watch TED or other experience for writing of English Examination. 4 | Note: It is recommended to watch video synchronously while reading. 5 | 6 | Originals are nonconformists, people why not only have new ideas but take action to champion them.They are people who stand out and speak up, They are the people you want to bet on, and they looking nothing like we excepted. 7 | 8 | Three characteristic about recognizing originals: 9 | 10 | The first reason that we passed on originals was they were really show **getting off the ground**. Now, We are all intimately familiar with the mind of a procrastinator. The data show that the moderate procrastinator are 16 percent more creative the other people. Procrastinating is a vice when it comes to productivity, but it can be a virtue for creativity. 11 | 12 | A classic study of over 50 product categories, comparing the first marker with the improvers. The first movers had a failure rate of 47 percent, compared with only a percent for the improvers. Facebook, waiting to build a social network until after Myspace and Friendster; Google, waiting for years after Altavista and Yahoo. It much easier to improve on somebody else idea than it is to create something new from scratch. To be original, you don't have to be first, **You just have to be different and better.** 13 | 14 | 15 | The originals were also **full of doubts**: 16 | * self-doubt is paralyzing. They had backup plans lined up made everyone doubt that they had courage to be original. 17 | * idea doubt is energizing. 18 | 19 | How the creative process works for most of us: 20 | 1. This is awesome. 21 | 2. This is tricky. 22 | 3. This is crap. 23 | 4. I am crap. 24 | 5. This might be ok. 25 | 6. This is awesome. 26 | 27 | To kept to being original is just a simple thing of avoiding the leap from step three to step four that instead of "The first few drafts are always crap, I'm just not there yet." 28 | 29 | Every originals seems **like a bad ideas** at the beginning.If we look cross fields, the greatest originals are the ones who fail the most because they're the ones who try the most. 30 | 31 | Sometimes It's not in spite of those qualities but because of them that they succeed. So When you see these things, please write them off, don't count yourself out either. Know that being quick to start but slow to finish can boost your creativity that you can motivate yourself by doubting your ideas and embracing the fear of falling to try, and that you need a lot of bad ideas in order to get a few good ones. 32 | -------------------------------------------------------------------------------- /English/speeches/There is more to life than being happy.md: -------------------------------------------------------------------------------- 1 | ## There is more to life than being happy. 2 | 3 | Even though life is getting objectively better by nearly every conceivable standard, more people feel hopeless, depressed and alone. There's an emptiness gnawing away at people, and you don't have to be clinically depressed to fell it.
4 | What predicts this despair is not a lack of happiness but a lack of meaning in life. 5 | 6 | ***Ⅰ. Belonging***
7 | 8 | The belonging spring from love.
It lives in moments among individuals, and it's a choice -- You can choose to cultivate belonging with others. 9 | 10 | ***Ⅱ. Purpose***
11 | 12 | Purpose is less about what you want than about what you give.
The key to purpose is using your strengths to serve others.
13 | 14 | ***Ⅲ. Transcendence***
15 | 16 | Transcendent starts are those rare moments when you lifted above the hustle and bustle of daily life, your sense of self fades away, and you fell connected to a higher reality.
17 | 18 | ***Ⅳ. Storytelling: The story to tell yourself about yourself***
19 | 20 | * Creating a narrative from the events of your life brings clearity and It helps you understand how you became you. 21 | * People leading meaningful lives tend to tell stories about their lives defined by **redemption**, **growth** and **love**. 22 | * You won't change your story overnight, it could take years and be painful. **After all, we're all suffered, and we all struggle. But embracing those painful memories can lead to new insights and wisdom, to finding that good that sustains you.** 23 | 24 | ***Ending***
25 | 26 | The four pillars were part of architecture of live meaning in life, and the presence of the pillars helped us all live more deeply.
27 | This exactly why we as a society must offer better alternatives. We need to build these pillars within our family and our institutions to help people become their best selves.
28 | 29 | As each day goes by, we're constantly creating our lives, adding to our story. Sometimes we can get off track. **Happiness come and goes, but having meaning in life** -- serving something beyond yourself and developing the best within you -- **gives you something to hold on**. 30 | -------------------------------------------------------------------------------- /English/speeches/We all special..md: -------------------------------------------------------------------------------- 1 | ## We all special. 2 | 3 | Everybody wants to feel value and accepted and we think it should happen spontaneously, but it didn't. When we label someone as different, it dehumanizes them in a way. When you're different, you have to work at belonging. 4 | 5 | The first step in being more inclusive is recognizing our blind spots. It begins by understanding what makes you different by embracing those traits. **Only then can you** begin to appreciate what makes others special. 6 | 7 | Being different is an adventure. When you take a piece of paper and wrote down what makes you special, you may fell guarded when you look at it, maybe even a little ashamed, maybe even proud. But you need to begin to embrace it. 8 | 9 | Being able to speak different languages to navigate all these different people and places, it give me a unique sensibility that the importance of putting myself in other people's shoes. Some see people coming to take their jobs as "the other", or potential terrorists who speak a different language. Meanwhile, minority groups oftentimes just see hatred, intolerance and narrow-mindedness on the other side. It's like we're stuck in these bubbles that nobody wants to burst. The only way to get out of it is to realize to being different also means thinking differently. 10 | 11 | In the words of Voltaire: "I may not agree with what you have to say, but I will fight to the death to defend your right to say it." Failing to see anything good on the other side makes a dialogue impossible. Without a dialogue, we will keep repeating the same mistakes because we will not learn anything new. 12 | 13 | People were unable to see a successful lawyer or a millennial with a sharp wit and a kind heart. Everywhere we went, I realized that people just say a poor girl in a wheelchair. They were unable to see anything beyond that. **During that traumatic ordeal**, **I learned** there are differences that simply suck, and it's hard to find positive in side, **You can't let those differences that really suck define you**. Being able to reimagine yourself beyond what other people see is the toughest task at all, and it's also the most beautiful. 14 | 15 | **We all come to this world in a body**, people with physical or neurological difficulties, enviromentally impacted communities, immigrants, boys, girls, boys who want to dress as girls, girls with veils, women have been sexually assaulted... we all want what everyone wants: **to dream an to achieve**. The single thing every one of us has in common is being human. So take a stand to defend your race, the human race. Let's appeal it; Let's be humanists before and after everything else; Let's celebrate those imperfections that make us special. 16 | 17 | Nobody has a claim on the word "normal". We are all different, we are all quirky and unique, and that is what makes us wonderfully human. -------------------------------------------------------------------------------- /English/speeches/Why are You going to Fail.md: -------------------------------------------------------------------------------- 1 | ## Why are You going to Fail ? 2 | 3 | ***1. You are not goint to do it.*** 4 | 5 | No matter how many times people tell you, "If you want a great career, you have to pursue your passion, you have to pursue the greatest fascination in your life", you still look at it and decide not to do it. You're afraid if you look for your passion and you will look ridiculous. 6 | 7 | ***2. You will have invented a new excuse.*** 8 | 9 | In spite of excuses, you will find your passion. But you are not going to do it, You will have invented any excuse to fail to take action, and this excuse you are saying many times. "Yes, I would pursue a great career, but I'm not a genius, I'm not wired." 10 | 11 | ***3. Value human relationships more than accomplishment*** 12 | 13 | Do you really want to use your family, your spouse and your fiends as your jailers? Great friends, great spouse, great parent, great career. Is that not a package? How can you be one without the other? But you are afraid. 14 | 15 | "Unless" -- the most evocative of all English words -- is also attached to that other most terrifying phrase that "if only I had ...". If you ever have that thought ricocheting in your brain, it will hurt a lot. -------------------------------------------------------------------------------- /JAVA Web/1528097973775.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/JAVA Web/1528097973775.png -------------------------------------------------------------------------------- /JAVA Web/1528100326401.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/JAVA Web/1528100326401.png -------------------------------------------------------------------------------- /JAVA Web/1528101406116.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/JAVA Web/1528101406116.png -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/src/com/bean/UserBean.java: -------------------------------------------------------------------------------- 1 | package com.bean; 2 | 3 | public class UserBean { 4 | private String name; 5 | private String sex; 6 | private String address; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | 16 | public String getSex() { 17 | return sex; 18 | } 19 | 20 | public void setSex(String sex) { 21 | this.sex = sex; 22 | } 23 | 24 | public String getAddress() { 25 | return address; 26 | } 27 | 28 | public void setAddress(String address) { 29 | this.address = address; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/src/com/bean/UserInfoList.java: -------------------------------------------------------------------------------- 1 | package com.bean; 2 | 3 | import java.util.Vector; 4 | 5 | public class UserInfoList { 6 | private static UserInfoList user = new UserInfoList(); 7 | private Vector vector = null; 8 | public UserInfoList(){ 9 | this.vector = new Vector(); 10 | } 11 | public static UserInfoList getInstance(){ 12 | return user; 13 | } 14 | public boolean addUserInfo(String user){ 15 | if (user!=null){ 16 | this.vector.add(user); 17 | return true; 18 | }else { 19 | return false; 20 | } 21 | } 22 | 23 | public static UserInfoList getUser() { 24 | return user; 25 | } 26 | 27 | public static void setUser(UserInfoList user) { 28 | UserInfoList.user = user; 29 | } 30 | 31 | public Vector getVector() { 32 | return vector; 33 | } 34 | 35 | public void removeUserInfo(String user){ 36 | if (user != null){ 37 | vector.removeElement(user); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/src/com/bean/Userinfo.java: -------------------------------------------------------------------------------- 1 | package com.bean; 2 | 3 | public class Userinfo { 4 | private String name; 5 | private String job; 6 | 7 | public Userinfo(){ 8 | name = ""; 9 | job = ""; 10 | } 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) throws Exception{ 17 | this.name = new String(name.getBytes("ISO-8859-1"),"gbk"); 18 | } 19 | 20 | public String getJob() { 21 | return job; 22 | } 23 | 24 | public void setJob(String job) throws Exception { 25 | this.job = new String(job.getBytes("ISO-8859-1"),"GBK"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/src/com/filter/CountFilter.java: -------------------------------------------------------------------------------- 1 | package com.filter; 2 | 3 | import javax.servlet.*; 4 | import javax.servlet.annotation.WebFilter; 5 | import javax.servlet.annotation.WebInitParam; 6 | import javax.servlet.http.HttpServletRequest; 7 | import java.io.IOException; 8 | 9 | @WebFilter( 10 | urlPatterns = {"/chapter10/page.jsp"}, 11 | initParams = { 12 | @WebInitParam(name = "count",value = "5000") 13 | } 14 | ) 15 | public class CountFilter implements Filter { 16 | 17 | private int count; 18 | 19 | @Override 20 | public void init(FilterConfig filterConfig) throws ServletException { 21 | String param = filterConfig.getInitParameter("count"); 22 | count = Integer.valueOf(param); 23 | } 24 | 25 | @Override 26 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { 27 | count++; 28 | HttpServletRequest req = (HttpServletRequest) servletRequest; 29 | ServletContext context = req.getServletContext(); 30 | context.setAttribute("count",count); 31 | filterChain.doFilter(servletRequest,servletResponse); 32 | } 33 | 34 | @Override 35 | public void destroy() { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/src/com/listener/UserInfoTrace.java: -------------------------------------------------------------------------------- 1 | package com.listener; 2 | 3 | import com.bean.UserInfoList; 4 | 5 | 6 | import javax.servlet.http.HttpSessionBindingEvent; 7 | import javax.servlet.http.HttpSessionBindingListener; 8 | 9 | public class UserInfoTrace implements HttpSessionBindingListener { 10 | 11 | private String user; 12 | private UserInfoList container = UserInfoList.getInstance(); 13 | public UserInfoTrace(){ 14 | user = ""; 15 | } 16 | 17 | public String getUser() { 18 | return user; 19 | } 20 | 21 | public void setUser(String user) { 22 | this.user = user; 23 | } 24 | 25 | @Override 26 | public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) { 27 | System.out.println(this.user + "上线"); 28 | } 29 | 30 | @Override 31 | public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) { 32 | System.out.println(this.user + "下线"); 33 | if (user != null){ 34 | container.removeUserInfo(user); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/src/com/servlet/AddressServlet.java: -------------------------------------------------------------------------------- 1 | package com.servlet; 2 | 3 | import com.bean.UserBean; 4 | 5 | import javax.servlet.RequestDispatcher; 6 | import javax.servlet.ServletContext; 7 | import javax.servlet.ServletException; 8 | import javax.servlet.annotation.WebServlet; 9 | import javax.servlet.http.HttpServlet; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import java.io.IOException; 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | //@WebServlet("AddressServlet") 17 | public class AddressServlet extends HttpServlet { 18 | 19 | @Override 20 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 21 | req.setCharacterEncoding("UTF-8"); 22 | String name = req.getParameter("name"); 23 | String sex = req.getParameter("sex"); 24 | String add = req.getParameter("add"); 25 | UserBean user = new UserBean(); 26 | user.setName(name); 27 | user.setSex(sex); 28 | user.setAddress(add); 29 | ServletContext application = getServletContext(); 30 | List userBeans = (List) application.getAttribute("users"); 31 | if (userBeans == null){ 32 | userBeans = new ArrayList(); 33 | } 34 | userBeans.add(user); 35 | application.setAttribute("users",userBeans); 36 | RequestDispatcher dispatcher = req.getRequestDispatcher("/chapter9/manager.jsp"); 37 | dispatcher.forward(req,resp); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/src/com/servlet/MyServlet.java: -------------------------------------------------------------------------------- 1 | package com.servlet; 2 | 3 | import javax.servlet.ServletException; 4 | import javax.servlet.annotation.WebServlet; 5 | import javax.servlet.http.HttpServlet; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import java.io.IOException; 9 | import java.io.PrintWriter; 10 | 11 | //采用注解方式配置MyServlet 12 | //@WebServlet("/MyServlet") 13 | 14 | public class MyServlet extends HttpServlet { 15 | /* @Override 16 | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 17 | super.doGet(req, resp); 18 | }*/ 19 | 20 | @Override 21 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 22 | req.setCharacterEncoding("UTF-8"); 23 | resp.setContentType("text/html;charset=UTF-8"); 24 | //get name 25 | String name = req.getParameter("name"); 26 | PrintWriter writer = resp.getWriter(); 27 | if (name != null){ 28 | writer.write("hello" + name + "!"); 29 | } 30 | writer.flush(); 31 | writer.close(); 32 | } 33 | 34 | /* @Override 35 | protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 36 | super.doPut(req, resp); 37 | } 38 | 39 | @Override 40 | public void destroy() { 41 | super.destroy(); 42 | } 43 | 44 | @Override 45 | public void init() throws ServletException { 46 | super.init(); 47 | }*/ 48 | } 49 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/test2_jsp.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | This is my first servlet 10 | MyServlet 11 | com.servlet.MyServlet 12 | 13 | 14 | MyServlet 15 | /MyServlet 16 | 17 | 18 | 19 | This is Addressservlet 20 | AddressServlet 21 | com.servlet.AddressServlet 22 | 23 | 24 | AddressServlet 25 | /AddressServlet 26 | 27 | 28 | 29 | com.listener.UserInfoTrace 30 | 31 | 32 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/beaninstance/doreg.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 20:24 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | <% 12 | String name = us.getName(); 13 | String job = us.getJob(); 14 | if (name.equals("")|| job.equals("")){ 15 | 16 | %> 17 | 18 | <%} else {%> 19 | 20 | <% } %> -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/beaninstance/false.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 20:40 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Title 12 | 13 | 14 | 15 | 16 | 17 |
注册失败!
请输入 用户名职务!
18 | back 19 | 20 | 21 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/beaninstance/login_form.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 20:32 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 用户注册 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 |
用户注册
用户名:
职  务:
29 | 30 | 31 |
35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/beaninstance/success.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 20:43 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%@ page import="com.bean.Userinfo" %> 10 | 11 | 12 | 登陆成功 13 | 14 | 15 | <% 16 | String username = ((Userinfo)request.getAttribute("us")).getName(); 17 | String userjob = ((Userinfo) request.getAttribute("us")).getJob(); 18 | %> 19 | 20 | 21 | 22 | 26 | 27 |
注册成功
23 | 用户名:<%=username%>   24 | 职  务:<%=userjob%> 25 |
28 | back 29 | 30 | 31 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter10/login.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/22 5 | Time: 21:09 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 登录 12 | 13 | 14 |
15 | 16 | 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter10/page.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/22 5 | Time: 20:51 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Title 12 | 13 | 14 | 你是第【<%=application.getAttribute("count")%>】位访客! 15 | 16 | 17 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter10/showUser.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="com.bean.UserInfoList" %> 2 | <%@ page import="com.listener.UserInfoTrace" %> 3 | <%@ page import="java.util.Vector" %><%-- 4 | Created by IntelliJ IDEA. 5 | User: Joki 6 | Date: 2018/5/22 7 | Time: 20:54 8 | To change this template use File | Settings | File Templates. 9 | --%> 10 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 11 | 12 | 13 | Title 14 | 15 | 16 | <% 17 | UserInfoList list = UserInfoList.getInstance(); 18 | UserInfoTrace trace = new UserInfoTrace(); 19 | request.setCharacterEncoding("UTF-8"); 20 | String name = request.getParameter("user"); 21 | trace.setUser(name); 22 | session.setAttribute("list",trace); 23 | list.addUserInfo(trace.getUser()); 24 | session.setMaxInactiveInterval(30); 25 | %> 26 | 36 | back 37 | 38 | 39 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/application_counter.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 20:45 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Visitor Counter 12 | 13 | 14 | <% 15 | Integer visitorCount = (Integer) application.getAttribute("visitorCount"); 16 | if (visitorCount == null){ 17 | visitorCount = 1; 18 | }else { 19 | visitorCount++; 20 | } 21 | application.setAttribute("visitorCount",visitorCount); 22 | %> 23 |

Hi,You are the <%=visitorCount%> visitor !

24 | 25 | 26 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/cookie/deal.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.net.URLEncoder" %> 2 | <%@ page import="java.util.Date" %> 3 | <%@ page import="java.text.DateFormat" %> 4 | <%@ page import="java.text.SimpleDateFormat" %><%-- 5 | Created by IntelliJ IDEA. 6 | User: Joki 7 | Date: 2018/5/15 8 | Time: 21:11 9 | To change this template use File | Settings | File Templates. 10 | --%> 11 | <%@ page contentType="text/html;charset=GB18030" language="java" %> 12 | 13 | 14 | Title 15 | 16 | 17 | <% 18 | request.setCharacterEncoding("GB18030"); 19 | String user = URLEncoder.encode(request.getParameter("user"),"GB18030"); 20 | Date date = new Date(); 21 | DateFormat df = new SimpleDateFormat("y.m.d-h:m:s"); 22 | Cookie cookie = new Cookie("mrCookie",user+"#"+df.format(date)); 23 | cookie.setMaxAge(60*60*24*30); //available days = 30 24 | response.addCookie(cookie); 25 | %> 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/cookie/index.jsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/JAVA Web/test2_jsp/web/chapter7/cookie/index.jsp -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/out.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 19:54 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | OUT输出对象 12 | 13 | 14 | <% 15 | out.print("我是小可爱"); 16 | %> 17 | <%="我是大可爱"%> 18 | <% 19 | out.println("Hey!Ak"); 20 | out.println("battle king"); 21 | %> 22 |
23 |     <%
24 |         out.println("Hey!BRO");
25 |         out.println("I will never let you part");
26 |     %>
27 | 
28 | <%--clear() clear buffer area --%> 29 | <%--chearBuffer () clear current buffer things--%> 30 | <%--flush() isAutoFlush() if buffer area is full throw exception or auto-clear--%> 31 | <%--getBufferSize()--%> 32 | 33 | 34 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/request/exception.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 19:34 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Exception 12 | 13 | 14 | <% 15 | try{ 16 | int money = 100; 17 | int number = 0; 18 | request.setAttribute("result",money/number); 19 | }catch (Exception e){ 20 | request.setAttribute("result","sorry,page error!"); 21 | } 22 | %> 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/request/get_client_information.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 19:21 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 获取客户端信息 12 | 13 | 14 |
Client post method : <%=request.getMethod()%> 15 |
protocol: <%=request.getProtocol()%> 16 |
Client URI: <%=request.getRequestURI()%> 17 |
Client URL: <%=request.getRequestURL()%> 18 |
Client IP address: <%=request.getRemoteAddr()%> 19 |
Server port : <%=request.getServerPort()%> 20 |
Server name : <%=request.getServerName()%> 21 |
Client Host : <%=request.getRemoteHost()%> 22 |
Servlet Path of Client requested: <%=request.getServletPath()%> 23 |
the host of the header of HTTP : <%=request.getHeader("host")%> 24 |
the User-Agent of the header of HTTP : <%=request.getHeader("User-Agent")%> 25 |
the accept-language of the header of HTTP : <%=request.getHeader("accept-language")%> 26 | 27 | 28 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/request/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 19:09 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Request请求对象——用户注册功能 12 | 13 | 14 |
15 |
16 |
    17 |
  • 用户登录

  • 18 |
19 |
    20 |
  • 用户名:
  • 21 |
22 |
    23 |
  • 密码:
  • 24 |
25 |
    26 |
  • 27 |
28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/request/login.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 19:11 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | title! 12 | 13 | 14 | <% 15 | request.setCharacterEncoding("UTF-8"); 16 | //Get username 17 | String username = request.getParameter("username"); 18 | //get password 19 | String password = request.getParameter("password"); 20 | //judge whether username&password are equal to 'admin' 21 | if ("admin".equals(username) && "admin".equals(password)){ 22 | out.print("Congratulation!"); 23 | }else { 24 | out.print("sorry,wrong username or password"); 25 | } 26 | %> 27 |
Client post method : <%=request.getMethod()%> 28 |
protocol: <%=request.getProtocol()%> 29 |
Client URI: <%=request.getRequestURI()%> 30 |
Client URL: <%=request.getRequestURL()%> 31 |
Client IP address: <%=request.getRemoteAddr()%> 32 |
Server port : <%=request.getServerPort()%> 33 |
Server name : <%=request.getServerName()%> 34 |
Client Host : <%=request.getRemoteHost()%> 35 |
Servlet Path of Client requested: <%=request.getServletPath()%> 36 |
the host of the header of HTTP : <%=request.getHeader("host")%> 37 |
the User-Agent of the header of HTTP : <%=request.getHeader("User-Agent")%> 38 |
the accept-language of the header of HTTP : <%=request.getHeader("accept-language")%> 39 | 40 | 41 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/request/show_exception.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 19:36 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Show Exception page 12 | 13 | 14 | <% 15 | String message = request.getAttribute("result").toString(); 16 | %> 17 | <%=message%> 18 | 19 | 20 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/response_redirect.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 19:49 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%response.sendRedirect("request/login.jsp");%> 10 | <%----%> 11 | <%----%> 12 | <%--Title--%> 13 | <%----%> 14 | <%----%> 15 | 16 | <%----%> 17 | <%----%> 18 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/session/deal.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 20:06 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=GB18030" language="java" %> 9 | <%@page import="java.util.*" %> 10 | <% 11 | String[][] userList={{"cat","cat123"},{"dog","dog123"},{"pig","pig123"}}; 12 | boolean flag = false; 13 | request.setCharacterEncoding("GB18030"); 14 | String username = request.getParameter("username"); 15 | String password = request.getParameter("password"); 16 | for (int i = 0; i -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/session/dealwith.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.net.URL" %><%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 20:54 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | <%--防止表单在网站外部提交--%> 10 | 11 | 12 | Title 13 | 14 | <% 15 | String address = request.getHeader("referer"); 16 | String pathAdd = ""; 17 | if (address != null){ 18 | URL urlOne = new URL(address); 19 | pathAdd = urlOne.getHost(); 20 | } 21 | String address1 = request.getRequestURL().toString(); 22 | String pathAdd1 = ""; 23 | if (address1 != null){ 24 | URL urlTwo = new URL(address1); 25 | pathAdd1 = urlTwo.getHost(); //get server host of current page 26 | } 27 | %> 28 | 29 | 30 | <% 31 | if (!pathAdd.equals(pathAdd1)){ 32 | response.sendRedirect("main.jsp"); 33 | }else { 34 | response.sendRedirect("exit.jsp"); 35 | } 36 | %> 37 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/session/exit.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 20:14 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=GB18030" language="java" %> 9 | <% 10 | session.invalidate(); //destroy session 11 | response.sendRedirect("index.jsp"); 12 | %> -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/session/index.jsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/JAVA Web/test2_jsp/web/chapter7/session/index.jsp -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter7/session/main.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/15 5 | Time: 20:12 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=GB18030" language="java" %> 9 | <% 10 | String username = (String) session.getAttribute("username"); 11 | %> 12 | 13 | 14 | Main page 15 | 16 | 17 | Hello![<%=username%>],Welcome to main page!
18 | exit 19 | 20 | 21 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter9/app1.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/22 5 | Time: 20:05 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | HomePage 12 | 13 | 14 |
15 |

添加人员信息

16 |
    17 |
  • name:
  • 18 |
  • sex:boy 20 | girl
  • 21 |
  • address:
  • 22 |
  • 23 |
24 |
25 | 26 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter9/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/22 5 | Time: 19:12 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Caculate days 12 | 13 | 14 |
15 | 请输入你的姓名: 16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/chapter9/manager.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="java.util.List" %> 2 | <%@ page import="com.bean.UserBean" %> 3 | <%-- 4 | Created by IntelliJ IDEA. 5 | User: Joki 6 | Date: 2018/5/22 7 | Time: 20:17 8 | To change this template use File | Settings | File Templates. 9 | --%> 10 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 11 | 12 | 13 | Title 14 | 15 | 16 |

用户信息列表

17 | 18 | 19 | 20 | 21 | 22 | 23 | <% 24 | List list = (List) application.getAttribute("users"); 25 | if (list !=null){ 26 | for (UserBean user :list){ 27 | %> 28 | 29 | 30 | 31 | 32 | 33 | <% 34 | } 35 | } 36 | %> 37 | 38 | 41 | 42 |
namesexaddress
<%=user.getName()%><%=user.getSex()%><%=user.getAddress()%>
39 | continue add 40 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/compositive6/book.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 21:10 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | bookstore 12 | 13 | 14 | <% 15 | String[] bookname = {"默小","朱雪婷","铜陵人"}; 16 | %> 17 | 18 | 19 | 20 | 21 | 22 | <% 23 | for(int i = 0; i < bookname.length;i++){ 24 | %> 25 | 26 | 27 | 28 | 29 | <% } %> 30 |
NumberZasui
<%=i%><%=bookname[i]%>
31 | 32 | 33 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 19:23 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%--指令标识--%> 9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 10 | <%@page import="java.util.Date" %> 11 | <%@page import="java.text.SimpleDateFormat" %> 12 | <%--HTML代码--%> 13 | 14 | 15 | $Title$ 16 | 17 | 18 | <%--嵌入的JAVA代码--%> 19 | <% 20 | Date date = new Date(); 21 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:hh:mm:ss"); 22 | String today = dateFormat.format(date); 23 | %> 24 | <%--输出当前时间--%> 25 | 当前时间:<%=today%> 26 | 27 | 28 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/jspinclude/copyright.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 19:43 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 13 |
-------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/jspinclude/image/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/JAVA Web/test2_jsp/web/jspinclude/image/0.jpg -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/jspinclude/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 19:45 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 使用文件包含include指令 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 |
 
22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/jspinclude/top.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 19:40 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/login/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 19:56 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 用户登陆 12 | 13 | 14 | 15 | 您现在位置为index.jsp! 16 | <%--请求转发是服务器端的操作,浏览器并不知道请求的二面,所以浏览的地址栏不会发生变化--%> 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/login/login.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 19:51 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Title 12 | 13 | 14 |
15 |
16 |
    17 |
  • 用户登录

  • 18 |
19 |
    20 |
  • 用户名:
  • 21 |
22 |
    23 |
  • 密码:
  • 24 |
25 |
    26 |
  • 27 |
28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /JAVA Web/test2_jsp/web/visitNo.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Joki 4 | Date: 2018/5/8 5 | Time: 19:33 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" isThreadSafe="false" %> 9 | 10 | 11 | 来访统计 12 | 13 | 14 | <%! 15 | int count = 0; 16 | public int getCount(){ 17 | count++; 18 | return count; 19 | } 20 | %> 21 | 您好,您是本站的第<%=getCount()%>位来访者! 22 | 23 | 24 | -------------------------------------------------------------------------------- /Java/JVM/Java内存区域.md: -------------------------------------------------------------------------------- 1 | ## 运行时数据区域 2 | 3 | Java虚拟机定义了若干种程序运行期间会使用到的运行时数据区,其中有一些会随着虚拟机启动创建,随着虚拟机退出而销毁。另外一些则是与线程一一对应的,这些与线程对应的数据区域会随着线程的开始和结束而创建和销毁。 4 | 5 | ![](https://sfault-image.b0.upaiyun.com/147/142/1471427608-558abc24ef69f_articlex) 6 | 7 | ### Program Counter Register 8 | Java虚拟机可以支持多条线程同时执行,每一条Java虚拟机线程都有自己的Program Counter Register,它可以看做是当前线程所执行的字节码的行号指示器。 9 | 10 | 由于Java虚拟机的多线程其实是通过线程轮流切换并分配处理器执行时间来实现的,在任何一个时刻,一个处理器都只会执行一条线程中的指令,每条线程独立,各条线程之间的计数器互不影响,这类内存区域就称为“线程私有”的内存。 11 | 12 | 如果该线程的当前方法不是Native的,那么计数器的值就保存为JVM正在执行的字节码指令的地址;如果是Native方法,那么计数器的值为空(Undefined)。 13 | 14 | ### Java Virtual Machine Stacks 15 | 16 | Java虚拟机栈和计数器一样都是线程私有的,生命周期与线程相同。每个方法在执行的同时都会创建一个栈帧(Stack Frame)用于存储局部变量和一些尚未算好的结果、方法的调用和返回。 17 | 每一个方法从调用到返回的过程,就对应着一个栈帧在虚拟机栈中入栈到出栈的过程。 18 | 19 | Java 虚拟机规范既允许Java 虚拟机栈被实现成固定大小,也允许根据计算动态来扩展 和收缩。 20 | 21 | Java虚拟机栈可能发生两种异常状况: 22 | 23 | * StackOverflowError异常:线程请求分配的栈容量超过Java虚拟机栈允许的最大容量 24 | 25 | * OutOfMemoryError异常:虚拟机可以动态扩展,扩展时无法申请到足够的内存;在创建新线程时没有足够的内存去创建对应的虚拟机栈 26 | 27 | ### Native Method Stack 28 | Java虚拟机栈是为虚拟机执行Java方法服务,本地方法栈就是虚拟机实现使用C Stack来支持使用Java语言以外其他语言编写的方法的执行。 29 | 30 | 本地方法栈可以实现成固定大小或者根据计算来动态扩展和收缩。 31 | 32 | 本地方法栈可能发生的异常和Java虚拟机栈一样。 33 | 34 | ### Java Heap 35 | 在Java虚拟机中,堆(heap)是可供各个线程共享的运行时内存区域,也是供所有类实例和数组对象分配内存的区域。 36 | 37 | Java堆在虚拟机启动时就被创建,它存储了自动内存管理系统,也就是垃圾收集器(Garbage Collected)所管理的各种对象。 38 | 39 | Java堆的容量可以是固定的,也可以随着程序执行的需求动态扩展,并在不需要过多空间时自动收缩。Java堆所使用的内存不需要保证是连续的。 40 | 41 | Java堆可能发生的异常状况: 42 | OutOfMemoryError异常:在堆中没有内存完成实力分配,并且堆也无法再扩展 43 | 44 | ### Method Area 45 | 方法区是线程共享的区域,用于存储已被虚拟机加载的类信息、常量、静态变量、即时编译器编译后的代码等数据。 46 | 47 | 方法区在虚拟机启动的时候创建,方法区是堆的逻辑组成部分。它有一个别名叫Non-Heap,简单的虚拟机实现可以选择在这个区域不实现垃圾收集与压缩。 48 | 49 | 方法区的容量的固定的,也可以随着程序执行的需求动态扩展,并在不需要过多空间的时候自动收缩。方法去所使用的内存可以是不连续的。 50 | 51 | ### Runtime Constant Pool 52 | 运行时常量池是方法区的一部分,是class文件中每一个类或接口的常量池表的运行时表示形式,包括各种各样的常量。 53 | 54 | 每一个运行时常量池都在Java虚拟机的方法区中分配,在加载类和接口到虚拟机后,就创建对应的运行时常量池。 55 | 56 | 运行时常量池具备动态性,并不一定要求常量只有编译期才能产生,运行期间也可能将新的常量放入池中。这种特性用的比较多的便是String类的intent()方法。 57 | 58 | * OutOfMemoryError异常:构造运行时常量池所需要的内存空间超过了方法区所能提供的最大值 59 | 60 | 61 | --------------------------------------------------------------------------------- 62 | 参考资料:《Java虚拟机规范(Java SE 8版)》、《深入理解Java虚拟机》 63 | -------------------------------------------------------------------------------- /Java/Java Reflection/reflection/Example.java: -------------------------------------------------------------------------------- 1 | package reflection; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by Joki on 2017/7/1. 7 | */ 8 | public class Example extends Father implements InterA{ 9 | 10 | public double d; 11 | 12 | private String str; 13 | private int x; 14 | 15 | private List stringList; 16 | 17 | public Example(){} 18 | public Example(String str){ 19 | this.str = str; 20 | } 21 | public Example(int x){ 22 | this.x = x; 23 | } 24 | public Example(String str , int x){ 25 | this.str = str; 26 | this.x = x; 27 | } 28 | 29 | public String getStr() { 30 | return str; 31 | } 32 | 33 | public void setStr(String str) { 34 | this.str = str; 35 | } 36 | 37 | public int getX() { 38 | return x; 39 | } 40 | 41 | public void setX(int x) { 42 | this.x = x; 43 | } 44 | 45 | public List getStringList() { 46 | return stringList; 47 | } 48 | 49 | public void setStringList(List stringList) { 50 | this.stringList = stringList; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Java/Java Reflection/reflection/Father.java: -------------------------------------------------------------------------------- 1 | package reflection; 2 | 3 | /** 4 | * Created by Joki on 2017/7/1. 5 | */ 6 | public class Father { 7 | } 8 | -------------------------------------------------------------------------------- /Java/Java Reflection/reflection/InterA.java: -------------------------------------------------------------------------------- 1 | package reflection; 2 | 3 | /** 4 | * Created by Joki on 2017/7/3. 5 | */ 6 | public interface InterA { 7 | } 8 | -------------------------------------------------------------------------------- /Java/异常类.md: -------------------------------------------------------------------------------- 1 | # 异常类 2 | 3 | ## Java中处理异常的两种方式 4 | * 捕获异常:就地解决,并使程序继续执行 `//积极的处理方式` 5 | >当Java运行时系统得到一个异常对象时,他将会沿着方法的`调用栈`逐层回溯,寻找处理这一异常的代码。找到能够处理这种类型的异常的方法后,运行时系统把当前的异常对象交给这个异常方法后,这一过程称为捕获(catch)异常。如果Java运行时系统找不到可以捕获异常的方法,则运行时系统中将终止,相应的Java程序也将退出。 6 | * 声明抛弃异常:将异常抛出方法之外,由调用该方法的环境去处理 `//消极的处理方式` 7 | >如果在一个方法中生成了一个异常,但是这一方法并不确切地知道该如何对这一异常事件进行处理,这时,一个方法就应该声明抛弃异常,使得异常对象可以从调用栈向后传播,直到有合适的方法捕获它为止。 8 | ## Java中预定义的异常类 9 | ![预定义的异常类](http://img.blog.csdn.net/20170323190427885?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 10 | ### Error 11 | Error标识不可能或难以恢复的严重问题,例如内存不足,程序一般不处理这类情况。 12 | ### RuntimeException 13 | RuntimeException指示设计或实现上的问题,如果程序正确运行,这样的情况是不应该出现的。 14 | #### 常见异常 15 | * NullPointException--空指针异常 16 | * ArrayIndexOutOfBoundsException--数据越界异常 17 | * NegativeArraySizeException--数组负下标异常 18 | * ArithmeticException--算数异常类 19 | * ClassCastException--算数运算异常 20 | * IllegalArgumentException--传递非法参数异常 21 | * ArrayStoreException--向数组中存放与数组类型不符元素异常 22 | * NumberFormatException--数字格式异常 23 | * SecurityException--安全异常 24 | * UnsupportedOperationException--不支持的操作异常 25 | ### try-catch语句 26 | ```Java 27 | try{ 28 | //打开文件 29 | //判断大小 30 | //分配内存 31 | //读入内存 32 | //关掉文件 33 | }catch(/*文件打开失败*/){ 34 | //处理代码 35 | }catch(/*大小取值失败*/){ 36 | //处理代码 37 | }catch(/*内存分配失败*/){ 38 | //处理代码 39 | }catch(/*读取失败*/){ 40 | //处理代码 41 | }catch(/*关闭文件失败*/){ 42 | //处理代码 43 |    }finally{ 44 |    //总是执行的代码,即使碰到return也执行finally后才return,除非遇到System.exit(),程序会立刻退出 45 | } 46 | ``` 47 | ### throw/throws抛出异常 48 | ```Java 49 | //抛出的对象必须是Throwable的子类 50 | public int read () throws IOException{ 51 | ...... 52 | } 53 | 54 | public static void main(String args[]) throws IOException, IndexOutOfBoundsException { 55 |                ······ 56 | } 57 | ``` 58 | ### 堆栈调用机制 59 | * 如果一个try-catch块中没有处理,那么将会抛向此方法的调用者 60 | * 如果一个异常回到main方法,而且也没有处理,那么程序终将终止 61 | ![堆栈处理机制](http://img.blog.csdn.net/20170323211705302?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 62 | ## 自定义异常类 63 | ```Java 64 | public class MydateException extends Exception{ 65 | private String reason; 66 | public MydateException(String r){ 67 | reason = r; 68 | } 69 | public String getReason(){ 70 | return reason; 71 | } 72 | } 73 | 74 | public class Mydate { 75 | int year,month,day; 76 | void setDate(int year,int month,int day) throws MydateException{ 77 | if(day>31) 78 | throw new MydateException("day too big"); 79 | this.year = year; 80 | this.month = month; 81 | this.day = day; 82 | } 83 | public static void main(String[] args){ 84 | Mydate t = new Mydate(); 85 | try { 86 | t.setDate(2001,1,100); 87 | }catch (MydateException e){ 88 | System.out.println(e.getReason()); 89 | } 90 | } 91 | } 92 | ``` 93 | -------------------------------------------------------------------------------- /Others/UML类图的阅读.md: -------------------------------------------------------------------------------- 1 | ## 类的表示方式 2 | 3 | 4 | * 类名 5 | * 属性(filed)`可见性 名称:类型 [ = 缺省值 ]` 6 | * 方法(method)`可见性 名称(参数列表) [ : 返回类型]` 7 | 8 | * +: public 9 | * -: private 10 | * #: protected(friendly) 11 | 12 | 例如下面这个Person类,有三个private属性和一个public方法,一目了然。 13 | 14 | ![example](http://img.blog.csdn.net/20170406151203247?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 15 | 16 | ## 类与类之间关系的表示方式 17 | ### 关联关系 18 | #### 单向关联 19 | ![单向关联](http://img.blog.csdn.net/20170406161909014?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 20 | 21 | UML类图中单向关联用一条单向箭头表示。上图表示Person类中有Address类的对象。 22 | 23 | #### 双向关联 24 | ![这里写图片描述](http://img.blog.csdn.net/20170406152558456?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 25 | 26 | UML类图中双向关联用不带箭头的一条直线表示。 27 | 28 | #### 自关联 29 | ![这里写图片描述](http://img.blog.csdn.net/20170406152858176?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 30 | 31 | 自关联在UML类图中用一个带有箭头且指向自身的直线表示。上图的意思就是Node类包含类型为Node的成员变量,也就是“自己包含自己”。 32 | 33 | ### 聚合关系 34 | 35 | ![聚合关系](http://img.blog.csdn.net/20170406160319521?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 36 | 37 | 聚合关系强调是“整体”包含“部分”,但是“部分”可以脱离“整体”而单独存在。UML中聚合关系用带空心菱形和箭头的直线表示。比如上图中汽车包含了发动机,而发动机脱离了汽车也能够单独存在。 38 | 39 | ### 组合关系 40 | 41 | ![组合关系](http://img.blog.csdn.net/20170406160518944?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 42 | 43 | 组合(Composition)是一种强的拥有关系,体现了严格的部分和整体的关系,部分和整体的生命周期一样。即“部分”不能脱离“整体”存在。在UML类图中,组合关系用一个带实心菱形和箭头的直线表示。 44 | 45 | ### 依赖关系 46 | 47 | ![依赖关系](http://img.blog.csdn.net/20170406161045822?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 48 | 49 | 司机开车必须要有车,所以Driver和Car之间是依赖关系。在UML类图中,依赖关系用一条带有箭头的虚线表示。 50 | 51 | ### 继承关系 52 | 53 | ![继承关系](http://img.blog.csdn.net/20170406162818769?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 54 | 55 | 在UML类图中用带空心三角形的直线表示。上图表示Student类和Teacher类继承了Person类。 56 | 57 | ### 接口实现关系 58 | 59 | ![接口实现关系](http://img.blog.csdn.net/20170406163110833?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 60 | 61 | 在UML类图中用空心三角形的虚线表示。上图表示Ship和Car实现了Vehicle接口。 62 | 63 | 64 | ------------------------------------------------------------------------------------- 65 | 66 | 67 | 参考资料:http://www.jianshu.com/p/1178ec9f2007 68 | -------------------------------------------------------------------------------- /Others/review/线性表/2010计算机联考真题之大题顺序表.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Others/review/线性表/2010计算机联考真题之大题顺序表.cpp -------------------------------------------------------------------------------- /Others/review/线性表/2010计算机联考真题之大题顺序表.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Others/review/线性表/2010计算机联考真题之大题顺序表.exe -------------------------------------------------------------------------------- /Others/review/线性表/2010计算机联考真题之大题顺序表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Others/review/线性表/2010计算机联考真题之大题顺序表.png -------------------------------------------------------------------------------- /Others/review/线性表/2010计算机联考真题之大题顺序表测试结果.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Others/review/线性表/2010计算机联考真题之大题顺序表测试结果.png -------------------------------------------------------------------------------- /Others/review/线性表/2010计算机联考真题之大题顺序表测试结果ByReverse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Others/review/线性表/2010计算机联考真题之大题顺序表测试结果ByReverse.png -------------------------------------------------------------------------------- /Others/review/线性表/2011计算机联考真题之大题顺序表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Others/review/线性表/2011计算机联考真题之大题顺序表.png -------------------------------------------------------------------------------- /Others/review/线性表/2011计算机联考真题之大题顺序表测试结果.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Others/review/线性表/2011计算机联考真题之大题顺序表测试结果.png -------------------------------------------------------------------------------- /Others/review/线性表/2013计算机联考真题之大题顺序表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Others/review/线性表/2013计算机联考真题之大题顺序表.png -------------------------------------------------------------------------------- /Others/电竞社社团秩序册.md: -------------------------------------------------------------------------------- 1 | ## 中北大学英力电竞社秩序册 2 | 3 | ### 总纲 4 | * *第一条*  中北英力电竞社是社团管理层领导的、为实现社团成员共同意愿的非盈利性学生自发组织。所有社员须是中北大学在校学生。

5 | * *第二条*  《中北英力电竞社秩序册》是中北英力电竞社的根本制度。禁止任何组织或者个人破坏管理条例。

6 | * *第三条*  社团的部门管理成员应尽自己所能以“越来越强大”为目标建设社团。愿社团每个成员能把电竞社当作自己的归属,都能玩的开心有所收获。

7 | * *第四条*  社团成员保有绝对的活动参与自由权。在自己空闲时间应积极参与社团活动。

8 | * *第五条*  中北英力电竞社所有成员有维护社团权益的义务。任何人不得损害社团的名誉和权益。 9 | 10 | ### 管理部门 11 | * *第六条*  所有部门成员挂科门数每学期不得超过两科。每学期末团支部收集部门成员成绩单统计挂科数量,超出两科者卸任其社团职务,补考通过后恢复其合法身份。

12 | * *第七条*  社团各部门部长为第一人。各部门应分工明确,严格执行好分内的任务。

13 | * *第八条*  各部门之间应保持沟通,在执行好分内任务的前提下,应在其他部门需要的时候给予援助。

14 | * *第九条*  所有社团管理人员应提高责任心,积极参与到活动的组织中。

15 | * *第十条*  各部门应有无课表、通讯录及对应的部门管理条例,并严格执行实施。 16 | #### 团支部 17 | 18 | ![团支部](https://github.com/Joki-memeda/NUC-YLESports/blob/master/1.png) 19 | * 维持好与社联、院校团委的关系 20 | * 财务负责 21 | * 活动表格 22 | * 统计、通知社员信息 23 | * 部门成员考勤表 24 | * 记录社团发展史(包括比赛、内战、活动等) 25 | [团支部管理条例]() 26 | #### 宣传部 27 | ![宣传部](https://github.com/Joki-memeda/NUC-YLESports/blob/master/2.png) 28 | 29 | * 维持好与校内各大媒体平台的关系 30 | * 社团公众号推送的管理 31 | * 海报、视频等宣传事宜 32 | * 其他文案编辑 33 | * 当校队外出比赛时,宣传部应派一人跟随拍照 34 | 35 | [宣传部管理条例](https://github.com/Joki-memeda/NUC-YLESports/blob/master/publicity.md) 36 | #### 组织部 37 | ![组织部](https://github.com/Joki-memeda/NUC-YLESports/blob/master/3.png) 38 | * 维持与赞助、校外组织的关系 39 | * 社团级活动的详细策划,包括分工、财务细节等 40 | * 活动当天的组织及维护 41 | * 活动场地的申请和维护 42 | * 校内场地 43 | * 新宇、系办等 44 | 45 | [组织部管理条例](https://github.com/Joki-memeda/NUC-YLESports/blob/master/originize.md) 46 | #### 赛事部 47 | ![赛事部](https://github.com/Joki-memeda/NUC-YLESports/blob/master/4.png) 48 | * 保证游戏分部与社团的关系。 49 | * 社团级活动的配合实施 50 | * 各游戏部门的总负责 51 | 52 | [赛事部管理条例](https://github.com/Joki-memeda/NUC-YLESports/blob/master/game.md) 53 | #### 游戏分部 54 | 55 | |游戏分部|群号| 56 | |:---|:--| 57 | |英雄联盟|672238508| 58 | |王者荣耀|541407508| 59 | |绝地求生|618427282| 60 | |穿越火线|535928733| 61 | |DOTA2|236656085| 62 | |守望先锋|489877248| 63 | |炉石传说|534748895| 64 | |地下城与勇士|518582179| 65 | |休闲益智|530016316| 66 | 67 | * 每个游戏部设立一位**负责人**,该负责人隶属于赛事部。

68 | * 一位**女经理**,隶属于团支部。经理应收集整理游戏部内的所有成员信息。

69 | * 游戏分部必须有**战队**代表社团和学校。经理应为战队联系训练队伍,战队外出比赛时的路费统计等,处理校队的相关事宜及需求。

70 | * 每月至少组织一次内战(可线上可线下,内战人数需超过群内人数的1/5),确定时间后上报给赛事部,由赛事部组织内战并分配工作人员,内战结束后上传相关照片或截图交给赛事部。

71 | * 若游戏分部连续三月组不成内战,游戏分部取消,游戏群保留。

72 | * 每年换届负责人将群主转让给新的负责人,群不变。 73 | 74 | ### 考勤制度 75 | * *第十一条*  社团级活动现场**签到**记0.5分,**签退**记0.5分,宣传部参与**活动推送**的部员记1分,赛事部参与**活动实施**的部员记1分,组织部参与**活动组织**的部员记1分,活动结束后由各部长上报给团支部,每次活动每人最多得两分。

76 | * *第十二条*   每次**内战**(线上线下均可)时游戏分部负责人必须在场组织,内战结束后记1分,现场工作人员记0.5分,负责人每月内战得分最多记2分。

77 | * *第十三条*  所有的**社团外出活动**记1分,包括团建会、比赛摄影、战队领队等。

78 | * *第十四条*  连续三次社团级活动未计分则视为自动退出部门

79 | 80 | ### 社团活动事项 81 | * *第十五条*  所有电竞社活动必须严格如实填写社团**活动审批表**,且详细撰写活动策划案,并按照社联活动流程进行审批。审批通过后在活动举行当周的社联值班时间交到社联方可举办活动。

82 | * *第十六条*  电竞社所有活动都将于活动举办时间一周前,提交校内**宣传审批表**,在校内主干道进行活动时间及具体内容的公示,保证电竞社各类活动的透明化、秩序化、合法化。

83 | * *第十七条*  活动举行时所有的工作人员应按照规定时间提前达到活动现场进行相关工作的准备,保证社团活动的完美实行。活动举行现场应准备好**活动反馈表**,在现场交给社联人员打分。若没有提交,在活动举行完的一周在社联值班时间交到社联督查审批部。

84 | 85 | ### 社团福利 86 | * *第十八条*  合作网咖充送福利。 社团成员支付宝或微信转账给社团财务负责人,备注自己学号姓名及身份证号,表明自己的合法成员身份,即可享受本福利。

87 | * *第十九条*  部门成员1分=合作网咖10元网费,月底团支部财务负责人统计信息并发放福利。

88 | * *第二十条*  在社团经费预算内,重大节日为社团成员发放小福利。

89 | * *第二十一条*  在任何情况下,英力电竞社将对社团成员的需求予以必要的协助。

90 | -------------------------------------------------------------------------------- /Others/记我的第一次批量抓取网页图片的经历.md: -------------------------------------------------------------------------------- 1 | # get贴吧图片 2 | 3 | 哇。。在同学的公众号下面看到他找壁纸不想批量保存的脚本,感觉好酷啊,还有这种操作?。。源码看起来也很简单,因为自己也经常在贴吧找头像什么的于是试了一下 4 | 5 | 我用的是python3.5 同学用的2.7。 6 | 刚开始一直出现`no hosts given`这个bug,真是气死我了,我的url明明是对的啊。查了一下发现3.0后的版本`urlib`包下面没有`urlretrieve()`这个方法了QAQ 7 | 8 | ```python 9 | urllib.request.urlretrieve(imgurl,'F:\img\%s.jpg' % x ) #2.7直接用urlib.urlretrieve()这个方法 10 | ``` 11 | 接下来的一个问题就是程序执行完了然而我的路径下并没有东西。。然后开始逐行测试,`getPage()`方法没毛病,就是匹配不到网页里的jpg,又研究了一会正则表达式。。最后倒是搞好了嘿嘿嘿 12 | 13 | 最后附一下源码 14 | 15 | ```python 16 | import re 17 | import requests 18 | import urllib.request 19 | print("[+]please enter a url of tieba:") 20 | url=input() 21 | status=requests.session() 22 | def getPage(status): 23 | text=status.get(url) 24 | html=text.text 25 | return html 26 | page=getPage(status) 27 | def getImage(html): 28 | reg = r'src=\\"(.*?\.jpg)' 29 | imgre = re.compile(reg) 30 | imglist = re.findall(imgre,html) 31 | finalist=[i.replace('\\','') for i in imglist] 32 | # print("finalist" + finalist) 33 | x=0 34 | for imgurl in finalist: 35 | urllib.request.urlretrieve(imgurl,'F:\img\%s.jpg' % x ) #2.7直接用urlib.urlretrieve()这个方法 36 | x+=1 37 | html = getPage(status) 38 | getImage(html) 39 | print("[+]downloads the pictures...") 40 | print("[+]finished!") 41 | ``` 42 | 43 | ![这里写图片描述](http://img.blog.csdn.net/20170920231159056?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 44 | 45 | ![这里写图片描述](http://img.blog.csdn.net/20170920231239063?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvSm9raTIzMw==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast) 46 | 47 | 完美 最后感谢一下我的同学 出于礼貌帮他宣传一波公众号:UniverseIDthree 48 | 49 | ---------------------------------------------------------- 50 | 附上他的文章[链接](http://mp.weixin.qq.com/s/KM44nypPm2kl6__sr4m6ZA) 51 | -------------------------------------------------------------------------------- /Web front/Html5 Label.md: -------------------------------------------------------------------------------- 1 | `

` `
` 定义段落。`

`单倍换行,`
`0倍换行//写一行换一行。`

` `
`可省略。 2 | 3 | ` ` 空白 4 | 5 | `
 
` 等宽字体标签 6 | 7 | `

` 与窗口左对齐 8 | 9 | `

` 与窗口右对齐 10 | 11 | `

` 与窗口居中对齐 12 | 13 | `` 局部右对齐 16 | 17 | `` 给文本添加标注 18 | 19 | `` 使字体相对于原本字体大一点 20 | 21 | `
` 无序列表。列表中`
  • `定义每一行。 22 | 23 | `
    `有序列表。同上 24 | 25 | `
    `创建定义列表,`
    `定义列表中的每一行,`
    `标签进行缩进。 26 | 27 | 28 | ---------------------------------------------------------------------------- 29 | 参考资料:[Web label大全](http://www.w3school.com.cn/tags/index.asp) 30 | -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511230918281.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511230918281.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511240305928.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511240305928.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511248366504.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511248366504.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511249345876.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511249345876.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511249387435.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511249387435.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511340922398.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511340922398.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511354979388.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511354979388.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511365622432.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511365622432.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511368296102.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511368296102.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511368693285.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511368693285.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511368732199.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511368732199.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511369302771.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511369302771.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/1511369398446.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/WEB前端复习笔记/1511369398446.png -------------------------------------------------------------------------------- /Web front/WEB前端复习笔记/HTML.md: -------------------------------------------------------------------------------- 1 | ## HTML 2 | #### 基本结构 3 | 由head和body两个部分组成。中可定义标题、元信息、样式等;中可定义段落、标题字、超链接、脚本、表格、表单等元素,主体内容是网页要显示的信息。 4 | ```html 5 | 6 | 7 | 8 | 9 | ``` 10 | 11 | *页面标题* `Hello` 12 | *元信息*:描述一个HTML网页文档的属性。例如作者、日期和时间、关键词、页面刷新等。 13 | ```html 14 | 15 | 16 | ``` 17 | **`name` 与`content`**属性用于描述网页,便于搜索引擎机器人查找分类。 18 | **`http-equiv`与`content`**用于提供HTTP协议的响应头报文,通常为页面加载前提供给浏览器等设备使用。 19 | 20 | | 属性 | 值 | 描述 | 21 | |:------|---:-|---:-| 22 | |http-equiv|content-type|提供编码信息| 23 | ||refresh|刷新与跳转页面| 24 | ||no-cache|页面缓存| 25 | ||expires|网页缓存过气时间 26 | |name|description|网页简短描述| 27 | ||keywords|网页关键词| 28 | ||generator|定义编辑器| 29 | |scheme||用于翻译content属性值的格式| 30 | 31 | *主体body* 32 | ```htmlbars 33 | 37 | ``` 38 | ![Alt text](./1511248366504.png) 39 | 40 | 41 | #### 语法 42 | * 单个标签`<标记名称>`或`<标记名称/>` 常用:`
    换行` `
    水平分割线` 43 | * 成对标记 `<标记名称>内容` 44 | * 注释 45 | ```html 46 | . ! 47 | 48 | ``` 49 | *标题字* `

    -

    ` 50 | *空格* :通过代码控制来添加` ` 51 | *特殊字符* 52 | ![Alt text](./1511249345876.png) 53 | *常见文本修饰* 54 | ![Alt text](./1511249387435.png) 55 | *字体* 56 | `` 57 | *段落*会自动在其前后创建一些空白 58 | `

    ` 59 | ~~*居中显示*`
    居中显示的内容
    `~~ 60 | *预格式化标记* `
    `浏览器完整保留设计者在源文件中所定义的格式。
     61 | 
     62 | ##### 列表
     63 | |列表类型|标记符号|
     64 | |:----------|---:----|
     65 | |无序列表|`
      `| 66 | |有序列表|`
        `| 67 | |定义列表|`
        `| 68 | |~~菜单列表~~|~~``~~| 69 | |~~目录列表~~|~~``~~| 70 | 71 | *无序列表(Unordered List)* 72 | 73 | ```html 74 |
          75 |
        • 项目名称
        • 76 |
        • 项目名称
        • 77 |
        • 项目名称
        • 78 |
        79 | 4 | 5 | 6 | 无标题文档 7 | 8 | 9 |
        10 | 个人信息: 11 |

        12 | 输入姓名:
        13 |

        14 | 15 | 输入爱好: 16 |
        17 | 18 | 19 | -------------------------------------------------------------------------------- /Web front/homework/TEST23.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 12 | 13 | 14 |

        CSS应用

        15 |
        16 |

        17 | 18 | HTML标记标签通常被称为HTML标签(HTML Tag).HTML标签是由尖括号包围的关键词,HTML标签通常是成对出现的,标签对中第一个标签是开始标签,第二个标签是结束标签,开始和结束标签也被称为开放标签和闭合标签HTML标记标签通常被称为HTML标签(HTML Tag).HTML标签是由尖括号包围的关键词,HTML标签通常是成对出现的,标签对中第一个标签是开始标签,第二个标签是结束标签,开始和结束标签也被称为开放标签和闭合标签。 19 | 20 |

        21 |
        22 | 23 | 24 | -------------------------------------------------------------------------------- /Web front/homework/TEST24.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 |
        9 | 课程成绩评定 10 |

        课程成绩为

        11 |

        成绩等级为

        12 |
        13 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Web front/homework/TEST25.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 厂字型页面布局 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
        14 | 15 |
        16 |
        17 | 18 |
        19 |
        20 |
        21 |
        22 | 23 | 24 | -------------------------------------------------------------------------------- /Web front/homework/TEST26.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 |

        计算1+1/2+1/3+1/4+1/5+...+1/n的和

        9 |

        连续  个倒数的和  

        10 |

        保留后两位数的结果为

        11 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Web front/homework/TEST27.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 教学信息反馈 6 | 7 | 8 |
        9 | 教学信息反馈 10 |

        11 | 学号: 

        12 |

        姓名: 

        13 |

        课程:  14 | 20 |

        21 |

        教学反馈意见:

        22 |
        23 |

        24 | 25 | 26 |

        27 |
        28 | 29 | 30 | -------------------------------------------------------------------------------- /Web front/homework/TEST28.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Random,Sum 6 | 7 | 8 |

        计算n个随机2位整数的和

        9 | 个随机2位数整数  
        11 | 个随机2位数整数的和为  
        14 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Web front/homework/TEST29.html: -------------------------------------------------------------------------------- 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 |
        会议日程
        上午8:00-9:50专家报告
        10:00-12:00学术交流
        12:30体会
        26 | 27 | 28 | -------------------------------------------------------------------------------- /Web front/homework/TEST2_TitleText.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 标题字应用 6 | 7 | 8 |

        Web前端开发技术

        9 |
        10 |
          11 |
        1. Html
        2. 12 |
        3. CSS
        4. 13 |
        5. JavaScript
        6. 14 |
        15 | 16 | 17 | -------------------------------------------------------------------------------- /Web front/homework/TEST30.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 |

        计算3+6+9+…+36的和

        9 |

        参与运算的数: 10 | = 11 | 12 |

        13 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Web front/homework/TEST31.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 46 | 47 | 48 |
        49 | 50 |
        51 |
        左边
        52 |
        中间
        53 |
        右边
        54 |
        55 | 56 |
        57 | 58 | 59 | -------------------------------------------------------------------------------- /Web front/homework/TEST32.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 计算圆的面积 6 | 7 | 8 | 9 |

        计算圆的面积

        10 |

        圆的半径:

        11 |

        圆的面积:

        12 |

        13 | 14 |

        15 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Web front/homework/TEST33.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 留言簿 6 | 7 | 8 |

        留言簿

        9 |

        姓名:

        10 |

        密码:

        11 | 12 |

        13 | 14 | 15 |

        16 | 17 | 18 | -------------------------------------------------------------------------------- /Web front/homework/TEST34.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 |

        计算N!

        9 |

        != 10 |

        11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Web front/homework/TEST35.html: -------------------------------------------------------------------------------- 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 |
        教材表
        序号教材名称数量(本)
        1软件工程64
        2数据结构54
        28 | 29 | 30 | -------------------------------------------------------------------------------- /Web front/homework/TEST36.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 |

        计算1+2+3+4+5+...+N的和

        9 |

        10 | 11 | = 12 | 13 |

        14 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Web front/homework/TEST3_list_css.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 自定义列表与CSS 24 | 25 | 26 |
        27 |

        软件工程

        28 |
          29 |
        • Web程序设计
        • 30 |
        • 数据库原理
        • 31 |
        • 计算机网络
        • 32 |
        33 |
        34 | 35 | 36 | -------------------------------------------------------------------------------- /Web front/homework/TEST4_caipiao.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 福利彩票投注助手 15 | 16 | 17 | 18 |
        19 |

        福利彩票投注助手

        20 |

        彩票号码: 21 | 22 | 23 | 24 | 25 |

        26 |
        27 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Web front/homework/TEST5_cssText.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 格式化文本 6 | 7 |

        HTML

        8 |

        早期的HTML语法被定义成比较松散的规则,以有助于不熟悉网络出版的人采用。网页浏览器接受了这个现实,并且可以现实语法不严格的网页。

        9 |
        10 |

        版权所有° 树人工作室

        11 |

        Email:Joki233@163.com

        12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Web front/homework/TEST6_CSS+DIV.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CSS+DIV 6 | 7 | 8 |
        头部
        9 |
        10 |
        左边
        11 |
        中间
        12 |
        13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Web front/homework/TEST7_gradeTable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 表格应用 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
        序号学号姓名第一学期成绩
        英语高数学科导论就业总分
        11507084209陈柳梅76618285305
        21507084210李丹妮66378585305
        31507084211谭诗雨66378585305
        41507084212赵琦66618585305
        63 | 64 | 65 | -------------------------------------------------------------------------------- /Web front/homework/TEST8_username.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 表单验证 6 | 7 | 8 |

        用户名: 9 |

        10 | 11 | 12 | 13 | 14 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Web front/homework/TEST9_newcourse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 新开课程 6 | 10 | 11 | 12 | 13 |
        14 |

        新开课程

        15 |
          16 |
        1. 大学英语
        2. 17 |
        3. 高等数学
        4. 18 |
        5. 19 |
        6. 20 |
        7. 计算机科学与技术
        8. 21 |
        9. Web前端开发技术
        10. 22 |
        11. 大学物理
        12. 23 |
        24 |
        25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Web front/homework/div.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DIV布局-1507084212赵琦 6 | 54 | 55 |
        56 | #Container 57 | 64 | 67 |
        68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Web front/homework/hover.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PIC DISPLAY 6 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Web front/homework/img/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/homework/img/0.jpg -------------------------------------------------------------------------------- /Web front/homework/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/homework/img/1.jpg -------------------------------------------------------------------------------- /Web front/homework/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/homework/img/2.jpg -------------------------------------------------------------------------------- /Web front/homework/img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/homework/img/3.jpg -------------------------------------------------------------------------------- /Web front/homework/img/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/homework/img/4.jpg -------------------------------------------------------------------------------- /Web front/homework/img/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/Web front/homework/img/5.jpg -------------------------------------------------------------------------------- /Web front/homework/img/bottom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Web front/homework/img/left.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Web front/homework/img/right.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Web front/homework/img/top.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Web front/homework/syllabus.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 课程表样式 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
        星期一星期二星期三星期四星期五
        上午  
         
         
         
        午休
        下午  
         
         
        89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /assembly/寄存器.md: -------------------------------------------------------------------------------- 1 | ## 寄存器 2 | 3 | **CPU中的器件** 4 | 5 | - *运算器*:信息处理 6 | - *寄存器*:信息存储 7 | - *控制器*:控制各种器件进行工作 8 | - *内部总线*:连接各种器件,进行数据的传送 9 | 10 | ### 通用寄存器:AX/BX/CX/DX 11 | 12 | 8086CPU的所有寄存器都是16位,可存放两个字节。XX可分为高八位为XH,低八位为XL。 13 | 14 | - *AX(Accumulator)* :累加器。I/O、乘除运算 15 | - *BX(Base)*:基址寄存器。提供存储器地址 16 | - CX(Counter)计数器 17 | - DX(Data)数据寄存器:暂存数据,输入输出时,提供I/O地址 18 | 19 | `在进行数据传送或运算时,指令的两个操作对象的位数应当是一致的` 20 | 21 | **物理地址**:内存单元在内存中的唯一的地址。 22 | 23 | ***16位CPU的含义*** 24 | 25 | - 运算器一次最多可以处理16位数据 26 | - 寄存器最大宽度为16位 27 | - 寄存器与运算器之间的通路为16位 28 | 29 | ***8086CPU给出20位物理地址的方法*** 30 | 31 | 1. CPU中的相关部件提供两个16位的地址,一个称为**段地址**,另一个称为**偏移地址** 32 | 2. 段地址和偏移地址通过内部总线送入地址加法器 33 | 3. 地址加法器中**物理地址=段地址×16+偏移地址** 34 | 4. 地址加法器把物理地址送到**I/O控制电路**,IO控制电路再送到**地址总线**,地址总线再送到**存储器** 35 | 36 | ***段的概念***:地址连续的内存单元。段地址×16为起始地址,偏移地址定义段中的内存单元。 37 | 38 | `段的起始地址一定是16的倍数` 偏移地址为16,16位寻址能力为64KB,所以`段的长度最大为64KB`。 39 | 40 | ### 指针寄存器:SP/BP/SI/DI 41 | 42 | - *SP*:堆栈指针寄存器。 43 | - 入栈:`数->(SP);SP<--SP-2` 44 | - 出栈:`(SP)-> ;SP<-SP+2` 45 | - *BP*:基址指针。 46 | - *SI/DI*:变址指针。 47 | 48 | ### 标志寄存器(PSW/FLAGS) 49 | 50 | - 记录运算结果 51 | - 无符号数运算 52 | - *ZF*:零标志。ZF=1,运算结果为0 53 | - *CF*:进/借位标志。 54 | - *AF*:辅助进位标志。低四位向第五位的进位(BCD调整时使用)。 55 | - *PF*:奇偶标志。低八位中1的个数为偶数 PF=1。`偶奇校验` 56 | - 带符号数运算 57 | - SF:符号。SF<-最高位,SF=1为负。 58 | - OF:溢出标志。OF=1,运算结果是否正确? 59 | - 控制 60 | - *DF*:方向标志。串操作时有用。 61 | - DF=0:地址指针递增 62 | - DF=1:地址指针递减 63 | - *IF*:可屏蔽终端允许标志。 64 | - TF:陷阱标志。TF=1,只执行一条,中断,执行陷阱程序。用于调试程序。 65 | 66 | ### 段寄存器:CS/DS/SS/ES 67 | 68 | - *CS*:代码段寄存器。正在运行的程序段首地址 69 | - *DS*:数据段寄存器。正在访问的数据段首地址 70 | - *SS*:堆栈段寄存器。`堆栈:SS:SP(BP)` 71 | - *ES*:附加段寄存器。`串目标:ES:DI` 72 | 73 | ### ***CS和IP***:指示CPU当前要读取指令的地址 74 | 75 | ***8086读取执行一条指令的过程*** 76 | 77 | 1. CS、IP中的内容送入**地址加法器**,地址加法器完成物理地址=CS×16+IP 78 | 2. 地址加法器把物理地址送入**输入输出控制电路** 79 | 3. 输入输出控制电路把物理地址送到**AB** 80 | 4. 从该物理地址单元开始存放的机器指令通过**DB**被送入**CPU** 81 | 5. 输入输出控制电路将机器指令送入**指令缓冲器** 82 | 6. IP的值**自动增加**读入指令的长度。转到步骤1 。 83 | 84 | *修改CS、IP的值*:强制跳转指令。`jmp 段地址:偏移地址` 85 | 86 | *代码段*:长度为N(N<=64KB)的一组代码,存放在一组地址连续、起始地址为16的倍数的内存单元中。执行代码段时,CS:IP指向代码段中的第一条指令的首地址。 87 | -------------------------------------------------------------------------------- /nodejs/basic/block.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | // 阻塞代码 3 | // var data = fs.readFileSync('input.txt') 4 | // console.log(data.toString()); 5 | 6 | fs.readFile('input.txt', function(err, data){ 7 | if(err){ 8 | console.error(err); 9 | return; 10 | } 11 | console.log(data.toString()); 12 | }); 13 | console.log("End"); 14 | 15 | -------------------------------------------------------------------------------- /nodejs/basic/buffer.js: -------------------------------------------------------------------------------- 1 | // Buffer 类:用于创建一个存放二进制数据的缓存区 2 | // 位于 Node 内核 3 | /* 4 | node 支持的字符编码:ascii, utf8, utf18le...8 种 5 | */ 6 | // allocate 7 | // const: read only variable, must be initialized 8 | // var: 全局变量 9 | // let: 局部变量,可以不初始化 10 | const buf1 = Buffer.alloc(10); 11 | const buf2 = Buffer.alloc(11, 1); 12 | // allocUnsafe faster than allocate, but the returned buffer may contain older data 13 | // that needs to overwrite by fill() or write(). 14 | const buf3 = Buffer.allocUnsafe(12); 15 | const totalLength = buf1.length + buf2.length + buf3.length; 16 | console.log(totalLength) 17 | const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); 18 | console.log(bufA); 19 | 20 | buf3.fill('h'); 21 | console.log(buf3.toString()); 22 | 23 | // Buffer.from(array): allocates a new buffer using an array of bytes in the range 0-255. 24 | const buf4 = Buffer.from([0x1, 0x75, 0x3]); 25 | console.log(buf4); 26 | const buf5 = Buffer.from("string"); 27 | console.log(buf5.toString()) 28 | buf5[0] = 0x61; 29 | console.log(buf5.toString()); 30 | 31 | const arr = new Uint16Array(2); 32 | arr[0] = 1; 33 | arr[1] = 2; 34 | // buf6 shares the memory with arr 35 | const buf6 = Buffer.from(arr.buffer); 36 | console.log(buf6); 37 | arr[1] = 3; 38 | console.log(buf6); 39 | 40 | const ab = new ArrayBuffer(10); 41 | const buf7 = Buffer.from(ab, 4, 4); 42 | console.log("the length of buffer: " + buf7.length + ", the length of ArrayBuffer: " + ab.byteLength); 43 | const buf8 = Buffer.from('7468697320697320612074c3a97374', 'hex'); 44 | console.log(buf8.toString('latin1')); 45 | console.log(buf8.indexOf('is')); 46 | 47 | const buf9 = Buffer.from('buffer'); 48 | 49 | console.log("=====entries()======") 50 | for(const pair of buf9.entries()){ 51 | console.log(pair); 52 | } 53 | 54 | console.log("=====keys()======") 55 | for(const key of buf9.keys()){ 56 | console.log(key); 57 | } 58 | 59 | const json = JSON.stringify(buf4); 60 | console.log(json); 61 | const copy = JSON.parse(json, (key, value) => { 62 | return value && value.type == 'Buffer'? 63 | Buffer.from(value.data) : 64 | value; 65 | }); 66 | 67 | console.log(copy); -------------------------------------------------------------------------------- /nodejs/basic/event.js: -------------------------------------------------------------------------------- 1 | var events = require('events'); 2 | // EventEmitter 核心是事件出发与事件监听器功能的封装 3 | var eventEmitter = new events.EventEmitter(); 4 | 5 | eventEmitter.on('delay_event', function(){ 6 | console.log("delay event was invoked."); 7 | }); 8 | 9 | setTimeout(function () { 10 | eventEmitter.emit('delay_event'); 11 | }, 3000); 12 | 13 | var emitter = new events.EventEmitter(); 14 | var callback1 = function(arg1, arg2){ 15 | console.log('listener1', arg1, arg2); 16 | }; 17 | var callback2 = function (arg1, arg2){ 18 | console.log('listener2', arg1, arg2); 19 | }; 20 | var callback3 = function(arg1){ 21 | console.log('listener3', arg1); 22 | } 23 | emitter.once('someEvent', callback1); 24 | emitter.on('someEvent', callback2); 25 | console.log(emitter.listenerCount('someEvent') + " 个监听器监听连接事件。"); 26 | emitter.emit('someEvent', 'Inger', 'Emitter1'); 27 | console.log(emitter.listenerCount('someEvent') + " 个监听器监听连接事件。"); 28 | // emitter.setMaxListeners(2); 29 | emitter.removeListener('someEvent', callback2); 30 | emitter.on('someEvent', callback3); 31 | console.log(emitter.listenerCount('someEvent') + " 个监听器监听连接事件。"); 32 | emitter.emit('someEvent', 'Inger2', 'Emitter2') 33 | emitter.emit('error', function(){ 34 | console.log('error'); 35 | }); 36 | console.log("End"); 37 | -------------------------------------------------------------------------------- /nodejs/basic/event_loop.js: -------------------------------------------------------------------------------- 1 | var events = require('events'); 2 | var eventEmitter = new events.EventEmitter(); 3 | 4 | var connectHandler = function connected() { 5 | console.log('connect success'); 6 | eventEmitter.emit('data_received'); 7 | } 8 | // connection event -> connectHandler 9 | eventEmitter.on('connection', connectHandler); 10 | // eventEmitter.on('connection', function(){ 11 | // console.log('connect success'); 12 | // eventEmitter.emit('data_received'); 13 | // }) 14 | 15 | // data_received -> listener 16 | eventEmitter.on('data_received', function(){ 17 | console.log('receive data successfully'); 18 | }) 19 | 20 | eventEmitter.emit('connection'); 21 | 22 | console.log('end'); -------------------------------------------------------------------------------- /nodejs/basic/express.js: -------------------------------------------------------------------------------- 1 | // require() 引入本地安装的包 2 | var express = require('express'); 3 | 4 | -------------------------------------------------------------------------------- /nodejs/basic/hello.js: -------------------------------------------------------------------------------- 1 | console.log("Hello Node"); 2 | -------------------------------------------------------------------------------- /nodejs/basic/input.txt: -------------------------------------------------------------------------------- 1 | 菜鸟教程官网地址:www.runoob.com -------------------------------------------------------------------------------- /nodejs/basic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "basic", 3 | "version": "1.0.0", 4 | "description": "Practice to learn basic node syntax.", 5 | "main": "express.js", 6 | "dependencies": { 7 | "express": "^4.17.1" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1", 12 | "start": "node server.js" 13 | }, 14 | "author": "", 15 | "license": "ISC" 16 | } 17 | -------------------------------------------------------------------------------- /nodejs/basic/server.js: -------------------------------------------------------------------------------- 1 | var http = require("http"); 2 | // listen 绑定端口 3 | http.createServer(function (request, response) { 4 | 5 | response.writeHead(200, {'Content-Type': 'text/plain'}); 6 | response.end("Hello World"); 7 | }).listen(4396); 8 | // 控制台 log 9 | console.log('Server running at http://127.0.0.1:4396/'); 10 | -------------------------------------------------------------------------------- /opencv/README.md: -------------------------------------------------------------------------------- 1 | * 邂逅OPENCV 2 | -------------------------------------------------------------------------------- /opencv/part1/图片操作.md: -------------------------------------------------------------------------------- 1 | 显示图片 2 | ```c++ 3 | Mat img = imread("1.jpg"); 4 | imshow("Before", img); 5 | ``` 6 | 腐蚀操作 7 | ```c++ 8 | Mat element = getStructuringElement(MORPH_RECT, Size(15, 15)); 9 | Mat dstImage; 10 | erode(img, dstImage, element); 11 | ``` 12 | 图像模糊 13 | ``` 14 | blur(img, dstImage, Size(7, 7)); 15 | ``` 16 | 边缘检测 17 | ```c++ 18 | /*检测边缘*/ 19 | Mat edge, grayImage; 20 | cvtColor(img, grayImage, CV_BGR2GRAY);//将原图转换为灰度图 21 | blur(grayImage, edge, Size(3, 3));//使用3x3内核降噪 22 | Canny(edge, edge, 3,9,3);//运行Canny算子 23 | ``` 24 | ![边缘检测](https://github.com/Joki-memeda/MyLearning/blob/master/opencv/part1/%E8%BE%B9%E7%BC%98%E6%A3%80%E6%B5%8B.png) 25 | -------------------------------------------------------------------------------- /opencv/part1/读取视频.md: -------------------------------------------------------------------------------- 1 | ```c++ 2 | #include 3 | using namespace cv; 4 | int main() { 5 | //读入视频 6 | //VideoCapture capture("pink.avi"); 7 | VideoCapture capture(0);//读取摄像头 8 | 9 | //循环显示每一帧 10 | while (1) 11 | { 12 | Mat frame;//定义一个Mat变量用于村塾每一帧的图像 13 | capture >> frame;//读取当前帧 14 | imshow("Video", frame);//显示当前帧 15 | waitKey(30); 16 | } 17 | return 0; 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /opencv/part1/边缘检测.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/opencv/part1/边缘检测.png -------------------------------------------------------------------------------- /软件工程复习笔记/PAD图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/PAD图.png -------------------------------------------------------------------------------- /软件工程复习笔记/PAD图的基本符号.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/PAD图的基本符号.png -------------------------------------------------------------------------------- /软件工程复习笔记/UML图形分类.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/UML图形分类.png -------------------------------------------------------------------------------- /软件工程复习笔记/各种逻辑覆盖间的关系.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/各种逻辑覆盖间的关系.png -------------------------------------------------------------------------------- /软件工程复习笔记/基本路径测试法控制流图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/基本路径测试法控制流图.png -------------------------------------------------------------------------------- /软件工程复习笔记/数据流图基本符号.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/数据流图基本符号.png -------------------------------------------------------------------------------- /软件工程复习笔记/条件组合测试.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/条件组合测试.png -------------------------------------------------------------------------------- /软件工程复习笔记/测试程序.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/测试程序.png -------------------------------------------------------------------------------- /软件工程复习笔记/状态图画法.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/状态图画法.png -------------------------------------------------------------------------------- /软件工程复习笔记/电话系统状态转换图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/电话系统状态转换图.png -------------------------------------------------------------------------------- /软件工程复习笔记/程序流程图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/程序流程图.png -------------------------------------------------------------------------------- /软件工程复习笔记/系统结构图中模块类型.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/系统结构图中模块类型.png -------------------------------------------------------------------------------- /软件工程复习笔记/设计过程.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/设计过程.png -------------------------------------------------------------------------------- /软件工程复习笔记/软件开发生命周期.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Inger-Chao/Mylearning/948b9d0a697a2fa3d34396004c4b1cb86c3dd07e/软件工程复习笔记/软件开发生命周期.png --------------------------------------------------------------------------------