- 浏览: 26176 次
- 性别:
- 来自: 苏州
最新评论
文章列表
输出xml
httpServletResponse.setContentType("text/xml;charset=UTF8"); PrintWriter pw = httpServletResponse.getWriter();
String xml = "<?xml version='1.0' encoding='UTF8'?>"+ "<message>"+ "<retcode>1</retcode>"+ "<retcontext>描述& ...
想要利用ExtJS的库函数对DOM进行各类操作,就要得到Element类型的对象,但是Ext.get()取到的虽然是Element,但是参数只能是id,如果大家对jQuery的selector方式很喜欢和崇拜,那么就一定要学习Ext.get()和Ext.query()的组合(个人推荐)方式。
前面写的get()和query()我都省略参数了,先看看文档中的函数原型:
Ext.get( Mixed el ) : Element
Parameters:
el : Mixed
The id of the node, a DOM Node or an existing Element.
Returns: ...
mvn install:install-file -DgroupId=com.googlecode.javapns -DartifactId=javaPNS -Dversion=2.2 -Dfile=/home/saint/mycode/javapns2-2/JavaPNS_2.2.jar -Dpackaging=jar -DgeneratePom=true
/**
* allows for downloading of grid data (store) directly into excel
* Method: extracts data of gridPanel store, uses columnModel to construct XML excel document,
* converts to Base64, then loads everything into a data URL link.
*
* @author Animal <extjs support team>
*
*/ ...
String fileName = URLEncoder.encode(atta.getFileName(), "UTF-8");
if (fileName.length() > 150) {
String guessCharset = xxxx /*根据request的locale 得出可能的编码,中文操作系统通常是gb2312*/
fileName = new String(atta.getFileName().getBytes(guessCharset), "ISO8 ...
<html>
<body>
<script type="text/javascript">
function browserRedirect() {
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone ...
在Windows下实现文件合并,用“copy”命令就能实现:
格式:copy /b <filename1>+<filename2>+…+<filenameN> <filename>
其中/b是二进制合并
在Linux下实现文件合并,用“cat”命令就能实现:
格式:cat filename.log.001 filename.log.002 > filename.log
DB2:
DBDRIVER = "com.ibm.db2.jcc.DB2Driver";
URL="jdbc:db2://192.168.1.16:50000/DatabaseName";
mssqlserver
DBDRIVER = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
URL="jdbc:sqlserver://192.168.1.18:1433;DatabaseName=DatabaseName"
m ...
<bean id="autoOrderFoodTask"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref local="autoOrderFoodJob" />
</property>
<property name="targetMeth ...
package com.widemex.reportViewWord;
import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.runqian.report4.model.ReportDefine;
import com.runqian.report4.model.engin ...
String hql = " select DISTINCT new cn.com.widemex.wides1.cooperation.domain.OlcoCnoteTd(A.id, A.sysUserTb, A.cnoteNo,"+
"A.title,A.originateTime,A.status,A.rcvUserDesc,"+
"A.createTime,A.lastModiTime) from OlcoCnoteTd A " +
" left join A.sysUserTb B " ...
获得客户端真实IP地址的方法
- 博客分类:
- 获得客户端真实IP地址的方法
public String getIpAddr(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if(ip == nul ...
//获取该name所对应的参数
function getUrlParam(name){
nk="";
var reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)");
var r=window.location.search.substr(1).match(reg);
if (r!=null)
return unescape(r[2]);
return nk;
...
package com.jfreechart.business;
import java.awt.Color;
import java.awt.Font;
import java.io.File;
import java.io.FileOutputStream;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.c ...