- 浏览: 10724 次
- 性别:
- 来自: 深圳
最新评论
文章列表
一个ClientDataset的Delta与XML相互转换的文章:大家都知道TClientDataSet的Delta属性保存数据集的变化,但是Delta是OleVariant类型的属性,这样如果用Delphi写Webservice,就有需要把它转成XML,特别是其他语言也要用这个Webservice的时候,因为如果Delta能和XML相互转换,Delta包的结构就是透明的了。而TClientDataSet却没有提供DeltaXML这样的属性,之前在网上找了一下,发现网上的都是把Delta赋给另一个TClientDataSet的Data,然后再通过XMLData返回XML,但这样为了一个简单的功 ...
<!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=utf ...
代码一:
public class User{ private String username; private String passowrd;
public String getUsername() { return username; }
public void setUsername(String username) { this.username = username; }
public String getPassowrd() { return passowrd; }
public void s ...
public class DTOPopulator {
public static List populate(ResultSet rs,Class clazz) throws Exception{
ResultSetMetaData metaData = rs.getMetaData(); //取得结果集的元元素
int colCount = metaData.getColumnCount(); //取得所有列的个数
List ret = new ArrayList(); ...
<!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=ut ...
5.UserAction文件
----------------------------------
package com.hrh.web;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import com.hrh.entity.User;
import com.opensymphony.xwork2.Acti ...
3.struts.xml文件配置
------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
...
1.取得相关包
commons-logging-1.0.4.jar
freemarker-2.3.8.jar
ognl-2.6.11.jar
struts2-core-2.0.11.jar
xwork-2.0.4.jar
2.配置文件web.xml
-------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xm ...
.table_list03 {
margin-top:2px;
margin-right:0px;
margin-bottom:1px;
margin-left:1px;
white-space: nowrap;
border-collapse:collapse;
border-top: 1px solid #96ADBC;
border-left: 1px solid #96ADBC;
border-bottom: 1px solid #96ADBC;
table-layout: fixed; // 新增行
}
. ...
function getCookie(key) {
cookies = document.cookie;
if (cookies) {
var start = cookies.indexOf(key + '=');
if (start == -1) { return ''; }
var end = cookies.indexOf(";", start);
if (end == -1) { end = cookies.length; }
end -= start;
var cookie = cookies.substr(start,end);
return u ...
--delphi
procedure Encrypt(Value: PAnsiChar; Size: Integer; const PSW: AnsiString); overload;
var
i,l: Integer; w: PAnsiChar;
procedure E(ic: PAnsiChar; pc: AnsiChar); begin ic^ := AnsiChar(Byte((ic^)) xor Byte(pc)); end;
begin
w := PAnsiChar(PSW); l := Length(PSW);
for i := 0 to Size - 1 do ...