- 浏览: 86128 次
- 性别:
- 来自: 上海
最新评论
-
wqmain:
feihua317 写道不完全对。建置全UTF-8的環境:1. ...
Eclipse console 中文乱码解决 -
feihua317:
不完全对。建置全UTF-8的環境:1.在eclipse.ini ...
Eclipse console 中文乱码解决 -
lgs0404152453:
用户选定的省份和城市,取不出值来
Struts2使用DoubleSelect实现二级级联下拉框省份城市区域控制 -
hbcui1984:
楼主在干吗?开发MM7?
java根据smil文件路径获得smil文件中src=的值
文章列表
// 创建一个本地Cookie存储的实例
BasicCookieStore cookieStore = new BasicCookieStore();
CloseableHttpClient httpClient = HttpClients.custom() .setDefaultCookieStore(cookieStore).build();
// HttpResponse response = null;
CloseableHttpResponse chResponse = null;
chResponse = httpClient.execute(httpGet);
cookies ...
/**
* doPost方式发送数据<br>
*
* @param url
* @param header
* @param param
* @return
*/
private static HttpPost doPost(String url, Map<String, String> header,
Map<String, String> param) {
HttpPost post = new HttpPost(url);
if (header != null) {
for (Map.Entry< ...
/**
* 获取请求页面里的&g_tk参数<br>
*
* @param cookies
* @return
*/
public Integer getGTK(List<Cookie> cookies) {
int gtk = 0;
if (!cookies.isEmpty()) {
for (int i = 0; i < cookies.size(); i++) {
if (cookies.get(i).getName().equalsIgnoreCase("skey")) {
S ...
//判断页面内容是否压缩文件格式gzip,如果是,则需要gzip解压
// String contentEncoding=entity.getContentEncoding().getValue();
// if(contentEncoding.endsWith("gzip")){
// GZIPInputStream gzin =null;
// try {
// gzin = new GZIPInputStream(in);
// } catch (IOException e) {
// e.printStackTrace();
// }
...
/**
* 获取smil文件中指定标签所对应的节点集合<br>
*
* @param key
* String 标签名字
* @return ArrayList 指定标签对应的节点集
*/
public ArrayList<Node> findNodes(String key) {
NodeList nodes = root.getElementsByTagName(key);
ArrayList<Node> nodeList = new ArrayList<Node>();
for ( ...
- 2009-11-18 15:37
- 浏览 1599
- 评论(0)
/**
* 获取smil文件中某级节点下一级元素的值<br>
*
* @param node
* 节点对象
* @param subTagName
* subTagName元素的标签名
* @return String 该标记元素的的内容
*/
public static String getSubTagValue(Node node, String subTagName) {
String returnString = "";
if ((node != null) & ...
- 2009-11-18 15:37
- 浏览 2281
- 评论(0)
/**
* 获得smil文件节点的属性值<br>
*
* @param name
* @param attrName
* @return
*/
public String getAttr(String name, String attrName) {
System.out.println("###======= getAttr() start ===========");
String result = "";
List valuesList = new ArrayList();
ArrayList& ...
- 2009-11-18 15:36
- 浏览 2147
- 评论(0)
/**
* 根据smil文件路径获得smil文件中src=""的值<br>
* >>>>>已通过测试<br>
* @param smilFilePath
* @return
*/
protected List<String[]> getSrcValues(String smilFilePath) {
List<String[]> srcValues = new ArrayList<String[]>();;
String content = "&q ...
/**
* 根据smil文件路径,获得src在smil文件中出现的次数<br>
* >>>>>已通过测试<br>
*
* @param file
* @return
* @throws IOException
*/
public int getSrcCount(String smilFilePath) {
int count = 0;
String find = "src=";
String str;
try {
Reader in = new FileReader( ...
private String readWellKnownMedia() {
String value="";
switch (decodeByte(m_In[m_i])) {
case 0x00: value= "*/*"; break;
case 0x01: value= "text/*"; break;
case 0x02: value= "text/html"; break;
case 0x03: value= "text/plain& ...
- 2009-11-18 15:28
- 浏览 1444
- 评论(0)
<!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; charse ...
- 2009-08-15 12:38
- 浏览 2634
- 评论(0)
<s:set name="area"
value="#{'':{''},
'北京':{'北京'},
'天津':{'天津'},
'河北':{'石家庄','唐山','秦皇岛','邯郸','邢台','保定','张家口','承德','沧州','廊坊','衡水'},
'山西':{'太原','大同','阳泉','长治','晋城','朔州','晋中','运城','忻州','临汾' ...
##以下是错误信息:
2009-4-29 13:52:20 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2009-4-29 13:52:20 org.apache.catalina.core.StandardContext start
严重: Context startup failed due to previous errors
2009-4-29 13:52:21 org.apache.catalina.logger.LoggerBase stop
##以上错误的解决方法:
##在工程.clas ...
- 2009-04-29 14:19
- 浏览 1843
- 评论(0)
##下面为MyEclipse7.1.1最新版下载地址,请用迅雷等下载工具直接下载。:
1. MyEclipse Enterprise Workbench 7.1.1 for Windows 98/2000/NT/XP/Vista (04/06/2009) Popular
Description:
Enter the URL Address:
[url]http://downloads.myeclipseide.com/downloads/products/eworkbench/7.0/myeclipse-7.1.1-win32.exe
[/url]
2. MyEclipse Enterpri ...
- 2009-04-28 14:07
- 浏览 4426
- 评论(0)
linux系统下mysql中文乱码解决
改默认编码:
/etc/init.d/mysql start (stop) 为启动和停止服务器
/etc/mysql/ 主要配置文件所在位置 my.cnf
/var/lib/mysql/ 放置的是数据库表文件夹,这里的mysql相当于windows下mysql的date文件夹
启动mysql后,以root登录mysql
isher@isher-ubuntu:~$ mysql -u root
>show variables like 'character%'; #执行编码显示
+--------------------------+-------- ...
- 2008-07-17 14:21
- 浏览 7158
- 评论(0)