`
文章列表
java action: PaginationSupport pagination = this.getBill2Service().getBillPayList(detachedCriteria, form.getStartIndex()); List list = pagination.getItems(); request.setAttribute("billList", list); request.setAttribute("pagination", pagination); java form: private int startIndex; ...
java: Vector v= new Vector(); v.add(new LabelValueBean("value0", "key0")); v.add(new LabelValueBean("value1", "key1")); v.add(new LabelValueBean("value2", "key2")); request.getSession().setAttribute("list",v); html: <jsp ...
java: Vector v= new Vector(); v.add(new LabelValueBean("value0", "key0")); v.add(new LabelValueBean("value1", "key1")); v.add(new LabelValueBean("value2", "key2")); request.getSession().setAttribute("list",v); html: &l ...
1、单个关键字加亮 代码: <div id="txt"> 用JS让文章内容指定的关键字加亮 是这样的.. 现在有这些关键字:美容,生活,购物 当在文章里头出现这些关键字,就把它加亮显示.. 文章是生成静态页面的,而这些关键字是能随时更新的,所以我想用JS来实现... </div> <script language="JavaScript"> document.getElementById("txt").innerHTML = document.getElementById(" ...
cd C:\SonyEricsson\J2ME_SDK\PC_Emulation\WTK2\appdb\SonyEricsson_K700_Emu del /Q *.* rd /Q /S filesystem
public void readDataFromFileAndWriteToAotherFile(String oldUrl,String newUrl){ // File file = new File("D:\\abc.txt");   File file = new File(newUrl);   try {         if (!file.exists() != false) {               file.createNewFile();           }   } catch (IOException e) ...

读取文件

    博客分类:
  • java
public String readData(String url) { //     String url = "C:/data.txt";     StringBuffer sb = new StringBuffer();     try {          FileReader read = new FileReader(new File(url));          BufferedReader br=new BufferedReader(read);          String line;          while((line=br.read ...
服务器端: public class ServerSocketConnection extends  Thread{ private Socket client; ServerSocketConnection(Socket client){ this.client=client; } public void run(){ try { BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream())); PrintWriter out = new PrintWr ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb ...
<html> <head> <title>展的折叠、展开</title> <style> #content { font-size: 14px; width: 1000px; height: 500px; background: #eee; padding: 10px; border: 4px #ccc double; overflow: hidden; } #key { color: red; float: right; margin-top: 0px; } </styl ...
<html> <head> <title>网页上适时显示的时间</title> <meta http-equiv="content-Type" content="text/html;charset=gb2312"> <script language="JavaScript"> var timerID = null; var timerRunning = false; function stopclock (){ if(timerRunning) ...
FCKeditor点击无反应问题的解决 FCKeditor图片不能上传问题 FCKeditor XML request error:not found 404问题 或许可以参考这个: http://www.iteye.com/topic/749437 FCKeditor点击无反应问题,很久的一个问题了,在本地测试没问题,一旦上传到linux服务器就不行, 开始怀疑是大小写问题【受昨天问题的警示】,但是不像自己写的代码那样方便检查, 一时也查不出来。今天看到一篇文章说是apache+tomcat时候分流处理造成路径问题。 于是在【/usr/local/apache/conf/extra/htt ...
JS自带函数 1.Asc(x),Chr(x):转换字符,字符码 2。Filter:搜寻字符串数组中的特定字符串 格式:v=filter(x,s[,include[,compare]]) 实例: Dim x()={"kjwang","wangkj","peter"} Dim v v=filter(x,"kj") '结果v(0)="kjwang",v(1)="wangkj" v=filter(x,"kj",false) '结果v(0)=" ...
最近实践了一下apache 和tomcat 的整合,原来这么简单. 1: 安装tomcat,jdk, 这些就不说了,这个大家应该都会 2: 下载apache_2.2.11-win32-x86-no_ssl.msi, 这在apache网站上就有, 3: 下载mod_jk-1.2.28-httpd-2.2.3.so, 这个是apache和tomcat整合必须的,在apache网站上也有, 4: 安装好apache http server后,进入到apache的安装目录下, Apache2.2\conf , 在此新建一个workers.properties 文件,将以下内容copy到workers. ...
Global site tag (gtag.js) - Google Analytics