上一页 1 2 3 4 5 6 ··· 27 下一页
摘要: import java.util.*; import java.io.*; //简单的日志功能 public class Test { public static void main(String[] args) { String s = null; BufferedReader br = new BufferedReader ( new InputStreamReader(System.in));//标准输入 try { FileWriter fw = new FileWriter("C:/java/logfile.txt",true)... 阅读全文
posted @ 2012-05-03 22:17 spring3 阅读(417) 评论(0) 推荐(0) 编辑
摘要: import java.io.*; public class Test { public static void main(String[] args) { // 字节数组(内存)----<---baos-<---====<==dos==<===程序 ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos); try { dos.writeDouble(Math.random()); ... 阅读全文
posted @ 2012-05-03 21:01 spring3 阅读(137) 评论(0) 推荐(0) 编辑
摘要: import java.io.*; public class Test { public static void main(String[] args) { try { OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("C:/java/char.txt")); osw.write("microsoftibssunapplehp"); System.out.println(osw.getEncoding());//文本编码 osw.close(); //加了tr... 阅读全文
posted @ 2012-05-03 20:24 spring3 阅读(130) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; public class MoFang { public static void main(String[] args) { System.out.println("输入行(列)数:"); Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[][] a = new int[n][n]; int i = 0; int j = n / 2; //算法精要 for (int k = 1; k <= n * n; k++) { ... 阅读全文
posted @ 2012-05-03 19:52 spring3 阅读(208) 评论(0) 推荐(0) 编辑
摘要: ### 指定加载struts2配置文件管理器,默认为org.apache.struts2.config.DefaultConfiguration### 开发者可以自定义配置文件管理器,该类要实现Configuration接口,可以自动加载struts2配置文件。# struts.configuration=org.apache.struts2.config.DefaultConfiguration### 设置默认的locale和字符编码# struts.locale=en_USstruts.i18n.encoding=UTF-8### 指定struts的工厂类# struts.objectFa 阅读全文
posted @ 2012-05-03 19:42 spring3 阅读(226) 评论(0) 推荐(0) 编辑
摘要: package com.svse.upload;import java.io.FileOutputStream;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.ServletInputStream;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;@SuppressW 阅读全文
posted @ 2012-05-03 13:17 spring3 阅读(772) 评论(0) 推荐(0) 编辑
摘要: 现在使用的版本extjs3.3.1在extjs中window加载的是一个jframe,而iframe中引入了js,在这个时候js不能运行,但是在火狐中是OK的,在IE6.0(开发中一般会使用IE6.0)不可以加载js,这个问题需要你加载完成之后重新reload()一下即可 var myHtml='<iframe id="ifrm008" name="ifrm008" scrolling="auto" frameborder="0" width="100%"height=" 阅读全文
posted @ 2012-05-03 13:06 spring3 阅读(381) 评论(0) 推荐(0) 编辑
摘要: import java.io.*; public class Test { public static void main(String[] args) { try { FileInputStream fis = new FileInputStream("C:/java/Test.java"); BufferedInputStream bis = new BufferedInputStream(fis); int c = 0; System.out.println(bis.read()); System.out.println(bis.rea... 阅读全文
posted @ 2012-05-02 16:59 spring3 阅读(354) 评论(0) 推荐(0) 编辑
摘要: import java.io.*; public class TestFileReader { public static void main(String[] args) { FileReader fr = null; int c = 0; try { fr = new FileReader("C:/java/Test.java"); while((c = fr.read()) != -1) { System.out.print((char)c); } fr.close(); } catch (FileNotFoundExcepti... 阅读全文
posted @ 2012-05-01 22:18 spring3 阅读(155) 评论(0) 推荐(0) 编辑
摘要: import java.io.*; public class Test { public static void main(String[] args) { int b = 0; FileInputStream in = null; try { in = new FileInputStream("C:/java/Test.java"); } catch (FileNotFoundException e) { System.out.println("找不到指定文件"); System.exit(-1); } try { ... 阅读全文
posted @ 2012-05-01 21:37 spring3 阅读(221) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 27 下一页