备份自用
lhq1013
这个作者很懒,什么都没留下…
展开
-
json数据转换后通过http向服务器发送数据
package com.yunosauto.utils;import java.io.IOException;import java.net.InetAddress;import java.util.Iterator;import org.apache.commons.httpclient.HttpClient;import org.apache.commons...原创 2014-12-07 15:00:30 · 257 阅读 · 0 评论 -
本地文件/文件夹的各种操作
/** * 新建目录 * @param dirPath */ public static void mkdir(String dirPath) { File fd = null; try { fd = new File(dirPath + File.separator); if (!fd.exists()) { fd.mkdirs()...原创 2014-12-07 15:38:57 · 85 阅读 · 0 评论 -
如何实现菜单被选中的功能
以下为webx中用vm实现左侧菜单选中功能的示例。 步骤: 用$control.setTemplate()方式引用菜单模板 用setParameter()方法将参数传递给被引用的菜单模板 在被引用的菜单模板中,用#if判断传递过来的参数值进行active的设置 (以下为vm示例代码,css部分请自行捣鼓,附件的css示例仅供参考) ...2017-09-29 16:41:15 · 284 阅读 · 0 评论 -
python2.X利用线程实现超时结束执行的功能
语言:python 2.X def command_timeout(command, timeout = 120): # print "command: ", command logging.info(command)# if timeout<30:# timeout=30 result = '' ...原创 2017-11-24 16:33:13 · 577 阅读 · 0 评论 -
python2.X参数处理和初始化日志
语言:python 2.X BaseConfig.py处理传参示例代码:#-*- coding: UTF-8 -*- import getoptimport sys,osimport tracebackimport utilsclass BaseConfig(object): _instance = None def __...原创 2017-11-24 17:06:59 · 135 阅读 · 0 评论