Cordova:连续按两次返回键退出程序
/* Created by Wizzer on 14-8-28. */ var num = 0; var login = { initialize: function () { this.bindEvents(); }, bindEvents: function () { document.addEventListener(‘backbutton’, this.eventBackButton Continue Reading
/* Created by Wizzer on 14-8-28. */ var num = 0; var login = { initialize: function () { this.bindEvents(); }, bindEvents: function () { document.addEventListener(‘backbutton’, this.eventBackButton Continue Reading
.replaceAll(“[^a-zA-Z_\u4e00-\u9fa5]”, “”) 只剩下中文和英文字母了,悲催。 Caused by: java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x98\xB7& Continue Reading
项目地址: https://github.com/Wizzercn/NutzCodematic Nutz 代码生成器: 可以生成Pojo类、Action类; 支持MySQL、Oracle、MS SQL2000、ODBC等; classes是在jdk1.7下编译,可以直接双击 run.bat 运行。 迟迟没放出来的原因是代码写的太烂……
使用帝国CMS,花了近一个月时间开发了一个网站,开发完成后客户对后台非常不满意,决定换成PHPCMS找人重做。- – 怎么说呢,帝国CMS开发起来比较灵活,可是弊端也很多,比如模板、标签、自定义SQL、自定义列表、模型等等, 做起来是相当的麻烦,从这里转到那里,又要自定义函数又要这个那的,,否则怎么会要花近一个月时间做个网站呢? 做网站真的应该是分分钟的事情,而帝国CMS让我花费了超过 Continue Reading
网易微博登陆验证,第一次请求使用BASE64加密、第二次请求使用MD5+RSA加密,比较变态,于是使用JAVA+JS相结合的方式,调用其JS方法得到加密字符串。 /core1.7.0.js 是经过处理的,删掉几行在JAVA引用中会报错的浏览器对象。 import org.apache.http.HttpResponse; import org.apache.http.client.C Continue Reading
版本特点: 1、使用系统自带的水印系统,勾选即可使用; 2、可勾选生成缩略图。 使用方法: 1、将 uploadify 文件夹解压至 ../e/extend/ 2、系统–>数据表与系统模型–>管理数据表–>图片系统数据表–>管理字段–> morepic 修改: 将“输入表单替换html代码.html”文件内容 Continue Reading
img { max-width : 800px ; width : expression ( this .width > 800 ? 800 : true ) ; height : auto ; }
HSSFWorkbook wb = new HSSFWorkbook(); OutputStream out = new FileOutputStream(“x.xls”); wb.write(out); out.close(); return new File(“x.xls”); ByteArrayOutputStream out = Continue Reading
/e/class/userfun.php function currentPage($classid,$thisid){ global $class_r; $fr=explode(‘|’,$class_r[$classid][featherclass]); $topbclassid=$fr[1]?$fr[1]:$classid;//取得第一级栏目id if ($topbclassid==$this Continue Reading
首先配置好运行环境: windows下配置nginx+php环境 其次修改nginx配置文件: server { listen 80; server_name localhost; location ~ ^/bbs/.+.php$ { alias E:/xuetang/cn/bbs; rewrite /bbs/(.*.php?) /$1 break; fastcgi_index index.p Continue Reading
/* 发送post请求 @param string $url 请求地址 @param array $post_data post数据 @return string / function send_post($url, $post_data) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “POS Continue Reading
1、上传文件的文件池路径问题 upload.js filePool : { type : “cn.xuetang.common.file.FilePool”, args : [“/temp/”, 2000] } 将路径改到项目的路径下 public class FilePool extends NutFilePool { public FilePoo Continue Reading
编写执行文件 job.sh #!/bin/sh CLASSPATH=classes:lib/druid-1.0.1.jar:lib/htmlparser-1.6.jar:lib/log4j-1.2.17.jar:lib/mysql-connector-java-5.1.26-bin.jar:lib/nutz-1.b.50.jar:lib/ojdbc14.jar:lib/quartz-2.2.1.j Continue Reading
常用命令 复制文件夹 cp -ri apache-tomcat-7.0.53 /usr/local/tomcat1 删除文件夹 rm -rf 解压文件 tar -xzvf apache-tomcat-7.0.53.tar.gz 安装C++编码环境 yum install -y gcc-c++ 安装HTTP GZIP yum install -y zlib-devel 后台运行 java -jar Continue Reading
两个女的在电梯里聊天,“我和我老公昨天晚上没事,就看看首饰,本来想买个手镯,后来没有相中的,就买了一副耳环,还好,价格也不算贵,30万不到,我老公说,你要是喜欢就买了吧,我说行,还挺不错的,就是有点遗憾,现在带不了。” 另一个女人问:“为什么?” “80级才能带,现在等级不够!”
入口函数: @At public void downImage(@Param(“tvid”) int tvid, HttpServletResponse resp, HttpServletRequest req) { } 使用Nutz文件池: Globals.FILE_POOL= new NutFilePool(“~/tmp/myfiles”, 10 Continue Reading
仅作参考。 编辑配置Nutz redis配置文件: var ioc = { jedisConfig : { type : ‘cn.xuetang.common.redis.JedisConfig’, fields : { maxTotal : 200, maxIdle : 10, maxWaitMillis:10001, testOnBorrow:true, redisUrl:’127.0.0.1 Continue Reading
Request req = Request.create(“http://127.0.0.1/api/user/sendtext?mykey=” + mykey, Request.METHOD.POST); JsonFormat jsonFormat=new JsonFormat(); jsonFormat.setAutoUnicode(true);//防止中文乱码,以unicode编码,根据需要 Continue Reading
昨天在公交车站等车,看见一小孩子拿了一大包巧克力在吃,一会儿吃了半袋子。我出于好心说了句:小孩子巧克力不能多吃,吃多了会得病。小孩子对我说:我爷爷今年103岁了。我说:因为吃巧克力?小孩说:不是,因为他从来不管闲事。