鲁春利的工作笔记,好记性不如烂笔头apply需要构造有参数需求的伴生对象时,可定义并使用apply方法。classHelloWorld(varm:String,varn:Char){
println("I‘mclassHelloWorld!");
defspeak(){
println("ClassHelloWorldSpeak.");
}
}
objectHelloWorld{
defapply(n:Char)=newHe..
分类:
其他好文 时间:
2015-12-29 06:26:09
阅读次数:
196
平时我们使用操作系统,只会简单的安装和按下电源开机,然后登陆用户的“傻瓜式”操作,很少去了解系统启动到底是怎样一个流程。既然最近学到这里,就画了个图来理解一下,希望大家挑挑毛病,不吝赐教^_^。启动流程图:如图所示:由内核空间启动和用户空间启动两部分组成
分类:
其他好文 时间:
2015-12-29 06:24:15
阅读次数:
299
安装openstackk版本OS:CentOSLinuxrelease7.0.1406(Core)host:node1(管理):10.10.0.1010.20.0.1010.30.0.10node2(网络):10.10.0.2010.20.0.2010.30.0.20192.168.74.211node2(计算):10.10.0.3010.20.0.3010.30.0.301:环境准备1):关闭防火墙systemctlstopfirewalld2):关..
分类:
其他好文 时间:
2015-12-29 06:25:26
阅读次数:
603
Given an unsorted array of integers, find the length of longest increasing subsequence.For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest incr...
分类:
其他好文 时间:
2015-12-29 06:20:54
阅读次数:
260
1 #include"stdio.h" 2 #include"stdlib.h" 3 #include"malloc.h" 4 5 6 const int maxlen=1000;//线性表的最大长度 7 typedef char type; 8 //------------线...
分类:
其他好文 时间:
2015-12-29 06:22:11
阅读次数:
264
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time...
分类:
其他好文 时间:
2015-12-29 06:20:46
阅读次数:
223
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or ...
分类:
其他好文 时间:
2015-12-29 06:21:29
阅读次数:
240
根据上述要求来用建造者模式设计程序。我将程序放在了https://github.com/RoyalBob/Decorator-Mode-Practice.git 欢迎访问。以下是本程序的UML图以及代码:1、创建抽象组件类MobilePhone。1 public abstract class Mo....
分类:
其他好文 时间:
2015-12-29 06:20:57
阅读次数:
282
Tool-->Option--> Environment--> Tab and Windows--> Preview Tab--> 去掉Allow new files to be opened in the Preview Tab前的勾勾
分类:
其他好文 时间:
2015-12-29 06:20:42
阅读次数:
226
UI自动化核心部分应该就是元素定位,很多时候会因为元素ID动态变化、不可编辑不可见的状态以及复杂的控件元素等使得元素定位总是失败。1、元素ID动态变化正常思路就是层层向上找到不变的元素然后通过相对路径加绝对路径的方式定位元素举例:今晚帮网络上的同学解决的网易邮箱写信按钮无法定位的问题html代码如下...
分类:
其他好文 时间:
2015-12-29 06:18:42
阅读次数:
328
1、克隆Git项目到本地(1)设置Git工具路径:file>settings>Version Control>Git(2)设置GitHub账户:file>settings>Version Control>GitHub(3)克隆git项目VCS>Checkout from Version Contro...
分类:
其他好文 时间:
2015-12-29 06:18:39
阅读次数:
6472
Given a binary tree, find the length of the longest consecutive sequence path.The path refers to any sequence of nodes from some starting node to any ...
分类:
其他好文 时间:
2015-12-29 06:19:28
阅读次数:
271
Sphinx是一个基于SQL的全文检索引擎,可以结合MySQL,PostgreSQL做全文搜索,它可以提供比数据库本身更专业的搜索功能,使得应用程序更容易实现专业化的全文检索。Sphinx特别为一些脚本语言设计搜索API接口,如PHP,Python,Perl,Ruby等,同时为MySQL也设计了一个...
分类:
其他好文 时间:
2015-12-29 06:17:18
阅读次数:
163
li元素右浮动会出现换行:一般情况下想让块级元素在一行显示,可以为元素施加浮动,但是有时候表现却并非如人愿,会出现换行的情况。看如下代码:蚂蚁部落 以上代码中,尽管右边的li采用了右浮动,但是还是出现了换行现象,下面就介绍一下解决方案:解决方案:在左边的li元素也采用浮动,代码修改如下: ...
分类:
其他好文 时间:
2015-12-29 06:14:52
阅读次数:
197
判断一个元素是否是另一个元素的子元素或者父元素:在实际应用中有时候会判断某个元素是另一个元素的子元素或者父元素,下面就通过代码实例介绍一下。//判断:当前元素是否是被筛选元素的子元素 jQuery.fn.isChildOf=function(b){ return (this.parents(b).....
分类:
其他好文 时间:
2015-12-29 06:15:03
阅读次数:
406
如何解决因为缓存无法及时更新图片问题:在加载远程图片的时候,往往会由于缓存的原因,即使是在服务器更新了图片有时候也得不到及时的更新。可以使用如下方法解决此问题,代码如下:$(".myImg").src("yourUrl.action?randUrl"+Math.ceil(new Date()/360...
分类:
其他好文 时间:
2015-12-29 06:15:31
阅读次数:
277
document.createDocumentFragment()的作用是什么:createDocumentFragment()函数可能用的并不是太多,之所以这样是因为不使用此方法完全可以实现所有的功能,但是如果能够妥当的使用此函数可以有效的提高执行效果,下面就通过实例简单介绍一下次函数用法。先看一...
分类:
其他好文 时间:
2015-12-29 06:13:17
阅读次数:
185