www.bersaty.com
摘要: 1、下载linux的 jdk-6u45-linux-x64.bin2、首先sudo su ,修改jdk-6u45-linux-x64.bin的权限,chmod u+x jdk-6u45-linux-x64.bin 运行sudo -s ./jdk-6u45-linux-x64.bin 安装,解压把。... 阅读全文
posted @ 2014-12-02 14:18 bersaty 阅读(821) 评论(0) 推荐(0) 编辑
摘要: 使用数据处理函数:/*Upper返回大写*/select vend_name,Upper(vend_name) as vend_name_upcasefrom vendorsorder by vend_name;常用文本处理函数:Left() 返回左边的字符;Length() 返回串的长度;Loca... 阅读全文
posted @ 2014-12-02 14:17 bersaty 阅读(157) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){ int n,a[100]; cin>>n; for(int i=0;i>a[i]; } int sum=0,ans=a[0]; for(int i=0;ians) ans=sum; if(sum<0) sum=0; } cout<<ans; return 0;} 阅读全文
posted @ 2013-10-19 14:32 bersaty 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 求100以内的质数#includeint main(){ int is_p[100]; int p[100]; int total=0; memset(is_p,1,sizeof(is_p)); for(int i=2;i<100;i++) { if(is_p[i]) p[total++]=i; for(int j=0;j<total&&i*p[j]<100;j++) { is_p[i*p[j]]=0; if(i%p[j]==0) break; ... 阅读全文
posted @ 2013-10-13 20:34 bersaty 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 直插入代码~~懒了import java.util.Random;class Card{ public String num; public String suit; Card(String n,String s) { this.num=n; this.suit=s; } public String toString() { String ss=suit+":"+num+" "; return ss; }}class DeskOfCard{ Card card[]; publi... 阅读全文
posted @ 2013-09-11 19:49 bersaty 阅读(17269) 评论(4) 推荐(0) 编辑
摘要: 通配符选择器:{margin:10px 0px 0px 10px;/*四个值分别表示上,右,下,左*/margin:10px 0px 0px;/*如果margin给出3个值,表示上,左--右,下*/padding:0px;/*和margin一样*/}父子选择器:#style span{font-style:italic;color:red;}#style span{font-size:50px}注意:子选择器标签是html可以识别的标记html文件中如何适用多个选择器,不能有2个以上ID选择器:新思维1.引用多个class选择器时,用空格隔开。2.class选择器发生冲突时,以在css文件中, 阅读全文
posted @ 2013-08-23 14:20 bersaty 阅读(171) 评论(0) 推荐(0) 编辑
摘要: List结构的集合类:ArrayList,LinkedList,Vector,StackMap结构的集合类:HashMap,HashTableSet结构的集合类:HashSet,TreeSet;Queue结构集合:Queue接口ArrayList,LinkedList,Vector,Stack:ArryList和Vector都是java的集合类,都可以用来存放对象,这是相同点。1.Vector是同步的,ArryList是异步的。因此ArryList中的对象并不是线程安全的。2。数据增长:ArryList和Vector都是使用数组(Array)来控制集合中的对象。当你向这两种类型中增加元素的时候 阅读全文
posted @ 2013-08-23 14:20 bersaty 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 拼接:/*连接和使用别名*/select concat(vend_name,'(',vend_country,')') as vend_titlefrom vendersorder by vend_name;执行算术计算:/*quantity*item_price形成一个新列expanded_price*/select prod_id, quantity, item_price, quantity*item_price as expanded_pricefrom orderitemswhere order_num = 20005; 阅读全文
posted @ 2013-08-23 14:20 bersaty 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 检索不同的行:select vend_idfrom products;/*返回不同的值*/select distinct vend_idfrom products;限制结果:limit/*limit 5 指示sql返回不多于5行*/select vend_id from products limit 5;/*指定要检索的开始行和行数*/select prod_name from products limit 5,5;检索排序:order by/*从小到大*/select prod_name from products order by prod_name;/*按多个列排序*/select p. 阅读全文
posted @ 2013-08-22 10:03 bersaty 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 1.二进制最高位是符号位:0表示正数,1表示负数。2.负数的反码=它的源码符号位不变,其他取反。3.负数的补码=它的反码+1。4.0的反码补码都是0.5.java没有无符号数,换言之,java中的数都是有符号的。6.在计算机运算的时候,都是以补码的方式来运算的。位运算和移位运算:>>算数右移:低位溢出,符号位不变,并用符号位补溢出来的最高位。>>逻辑右移:低位溢出,高位补0.class Binary { public static void main(String[] args) { int a=1>>2; int b=-1>>2; in... 阅读全文
posted @ 2013-08-20 16:00 bersaty 阅读(1694) 评论(0) 推荐(0) 编辑