- 浏览: 67178 次
- 性别:
- 来自: 北京
文章列表
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class Myeclipse5_5_0_KeyMaker
{
privat ...
1:设置jsp页面默认编码:在Myeclipse中:window--Myeclipse--Files and Editors--jsp中设置
设置Myeclipse默认打开jsp页面的方式:window--General--Editors--File Associations
2: 设置相同变量高亮显示:windows-> preferences-> java-> Editor-> Mark Occurences
3: myeclipse打包:右击--选择Export,然后选择要打包的文件格式,按下一步操作就行。
1:编号为003的员工信息优先显示:
select * from table_a where 员工编号='003'
union
select * from table_b where 员工标号!='003'
select A.jh from zscsg_jdbc A where A.jh='翻131-49'
union
select B.jh from zscsg_jd B where B.jh != '翻131-49'
2:求交集
intersect函数:Intersect(Set1 , Set2 [ , ALL ] )
select A.jh from zscsg_jdbc A
...
/*
package mytestfile;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
/**
* @author
*/
public class Files {
public static void main(String[] args) throws IOException ...
1: ClassCastException class类型转化时的异常
2: 在eclipse>>widow>>java>>compiler 中选择5.0,否则即使jdk是5.0,选择的是1.4,编译器还按照1.4版本进行编译,就会出错.
d1:泛型(Generics)
可以接受不同的类型。
按照不同类型生成相应的对象
package com.hyh.jdk;
public class Generic<T> {
private T foo;
public T getFoo() {
return foo;
}
public void setFoo(T foo) {
this.foo = foo;
}
public static void main(String[] args){
Generic<Boolean> foo1= new Generic<Boolean ...
1:单元测试放置的位置:
单元测试不要放在代码里。提供给客户的代码不要带测试用例。新建一个Source Folder,讲测试目录和代码目录区分开,然后在测试目录下建立和代码目录下相同的包。
(好处:编译好的class文件都在同一个目录下。)最后对应包下的类建立测试类,名字在类名后加test(StudentTest。java)
2:junit3.8中测试类必须继承TestCase父类。单元测试不是证明您是对的,而是证明您没有错误。
3:测试方法满足条件:
1》public 2》voiid 3》无方法参数 4》方法名称必须以test开头
throws and throw 区别
4: Asser ...
读txt文件,然后按顺序写txt文件:
package com.file.test;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.Arrays;
public class Task {
public static void main(Strin ...
CSS选择器
1:标记选择器:
<style>
h1{color:red;font-size:25px;} //h1:选择器 color:属性 red:值
</style>
2:类别选择器:
<html>
<head>
<title>class选择器</title>
<style type="text/css">
<!--
.one{
color:red; /* 红色 */
font-size:18px; /* 文字大小 */
}
-->
</style> ...
1:单元测试放置的位置:
单元测试不要放在代码里。提供给客户的代码不要带测试用例。新建一个Source Folder,讲测试目录和代码目录区分开,然后在测试目录下建立和代码目录下相同的包。
(好处:编译好的class文件都在同一个目录下。)最后对应包下的类建立测试类,名字在类名后加test(StudentTest。java)
2:junit3.8中测试类必须继承TestCase父类。单元测试不是证明您是对的,而是证明您没有错误。
3:测试方法满足条件:
1》public 2》voiid 3》无方法参数 4》方法名称必须以test开头
throws and throw 区别
4: Asser ...
减法:minus
乘法:multiply
除法:divide
计算:Calculator
启动oracle:
进入C盘: cd\; 用sqlplus登陆数据库:sqlplus "zjgc/zjgc as sysdba";用nolog身份登陆:sqlplus/nolog,然后 connect zjgc/zjgc as sysdba;接着:startup
更新满足条件的最后一条记录
- 博客分类:
- sql
更新满足条件的最后一条记录:
update zsc_v_sgrbbc set bnkz='1' where id = (select max(id) from zsc_v_sgrbbc where bnkz='1'and bykz='1')