1、File1.1、增删判获 1 package learn2; 2 /*File类的常见方法: 3 * 1、创建 4 * boolean createNewFile();//在指定位置创建如果,如果该文件已存在,则不创建,返回false; 5 * ...
分类:
编程语言 时间:
2015-08-10 01:39:46
阅读次数:
214
3.4添加文本、自定义坐标轴和图例 很多作图函数可以设置坐标轴和文本标注。比如标题、副标题、坐标轴标签、坐标轴范围等。需要注意的是并不是所有的绘图函数都有上述的参数,需要进行验证。可以将一些默认的参数进行移除,用ann = FALSE来操作。 3.4.1标题 title函数。 title(main ...
分类:
编程语言 时间:
2015-08-09 20:32:12
阅读次数:
152
事件细节———————————————————————ev直接使用,不需要兼容操作ev.pageX(Y) 鼠标的坐标(相对于文档) : ev.clientX(相对于窗口)ev.which(能监控鼠标键值) : ev.keyCodeev.preventDefault(); //阻止默认事件ev.stopPropagation(); //阻止冒泡事件函数结尾return false;既能阻止冒泡又能阻止...
分类:
Web程序 时间:
2015-08-09 18:55:25
阅读次数:
159
一.数值类型整形布尔类型 True 和 False 即1和0浮点型e记法 e ,例如 1.5e11 = 150000000000 , 1e2 就是1*10的平方。 ps: 在Python中的布尔类型可以直接相加 例如:>>>true + true >>>2二.类型转换对于数字的字符串可...
分类:
编程语言 时间:
2015-08-09 18:46:51
阅读次数:
129
#拖拽学习要点-draggable-ondragstart="drag(event)"-ondrop="drop(event)"-ondragover="fun2(event)"-dataTransfer-preventDefault###draggable主要用false或者true来设置文本或者...
分类:
Web程序 时间:
2015-08-09 18:40:05
阅读次数:
173
lock详细解说请参考:Java多线程系列–“JUC锁”01之 框架lock接口
是同步代码块的另一种机制,比synchronized关键字更强大也更灵活
提供了许多新功能,例如:tryLock()方法,这个方法试图获取锁,如果锁已被其他线程获取,它将返回false并往下继续执行代码。而使用synchronized,如果线程A试图执行一个同步代码块,如果B线程已经在执行这个代码块了,线程A将被挂起。...
分类:
编程语言 时间:
2015-08-09 17:10:22
阅读次数:
185
any()
doc: Return True if any element of the iterable is true. If the iterable is empty, return False.
只要迭代器中有一个元素为真就为真。
In [4]: a = [True, False]
In [5]: any(a)
Out[5]: True
也就是说,整个迭代中返回所...
分类:
编程语言 时间:
2015-08-09 12:37:18
阅读次数:
172
#include<iostream>usingnamespacestd;intgetmaxormin(int*arr,intcount,boolisMax)
{
inttemp=arr[0];for(inti=1;i<count;i++)
{if(isMax)
{
if(temp<arr[i])temp=arr[i];
}else
{if(temp>arr[i])temp=arr[i];
}
}returntemp;
}intmain()
{
boolisMax=false;in..
分类:
其他好文 时间:
2015-08-09 11:02:23
阅读次数:
137
#include<iostream>usingnamespacestd;intgetmaxormin(int*arr,intcount,boolisMax)
{
inttemp=arr[0];for(inti=1;i<count;i++)
{if(isMax)
{
if(temp<arr[i])temp=arr[i];
}else
{if(temp>arr[i])temp=arr[i];
}
}returntemp;
}intmain()
{
boolisMax=false;in..
分类:
其他好文 时间:
2015-08-09 10:56:37
阅读次数:
114
Contain Duplicate 题目要求:给定一个数组如果有重复就返回true,如果没有就返回false个人分析:这个题比剔除重复的要简单许多,只需要判断就好代码如下: public static boolean containsDuplicate(int[] nums){ if (num...
分类:
其他好文 时间:
2015-08-09 07:10:34
阅读次数:
109