`
文章列表
//操作Oracle数据库的时候,必须要用oracle自带的数据类型,Druid提供了通用方法,效率不错。 if (obj instanceof byte[]){ com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl cpi = new com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl(dds, cpc,null,(Long)object[0]); Blob blob = cpi.createBlob(); byte[] bin = (byte[])obj; blob.setBytes ...
//判断是否为空 function isNull(value){ if(value){ if(value == null || value == '' || typeof(value) == 'undefined' || value == 'undefined'){ return true; } } else { return true; } return false; }  
insert into tableName (select * from tableName AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '100' MINUTE))      这句户的意思是恢复到某个时间点。
今早公司内部群发的阿里巴巴公司Java开发手册,不知道是不是真的,不过写的还算中肯,分享给大家吧。
String ProjectPath = new DefaultResourceLoader() .getResource("/").getFile().getAbsolutePath(); ProjectPath = ProjectPath.substring(0,ProjectPath.length()-15);      这个方法是在没有request的情况下获取工程路径,这里需要截取字符串获取根目录“webapp”。
/** * 求日期月份跨度 * @param date1 * @param date2 * @return * @throws Exception * @作者 80303857 */ public static List<String> getMs (String date1, String date2) throws Exception{ List<String> result = new ArrayList<String>(); SimpleDateFormat sdf = new Simpl ...
    实现原理,首先选中需要打印的数据,记录下ID存入session中。     参数传递并不是难点,难点在于连续打印而不弹出打印设置窗口,这里经同事介绍使用了杰表打印空间,原理是利用IE的本地调用,参考网址:http://printfree.jatools.com/     JavaScript打印完毕一个页面之后还要打印下一个页面。但是为了防止页面跳转过快而没有打印内容的情况,这里使用了setTimeout函数。 function thirdStep(){ window.location = "<%=basePath%>workFlow/form/ ...

Unicode与中文互转

    博客分类:
  • C#
直接上代码吧,没什么好说的,资料来自互联网。 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; ...
    就在今天早上,接收到关于任正非说:“上过战场开过枪的人无法当主官”。忽然之间意识到程序员为什么没办法做到高层,在公司的地位当中产品经理要高于项目经理,创意要比技术有用,现在IT行业技术不再是什么瓶颈,瓶颈集中在了创意、新概念上,我是一名资深程序员,有很多次被提拔的机会,而在竞争中败下阵来,老板的话来说就是:“不是你不好,而是与我想不到一起去,解决问题的思路太单一,不要老想着用技术解决问题,也别提出技术实现的困难,因为能想到的都能实现,无非钱多钱少的关系”。他说的没错,程序员最大的误区就在于任何问题都想用技术解决,看问题的角度也从技术入手,如果觉得项目简单,就看不到其他的问题,如果项目困 ...
import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; /** * * * ScheduledExecutorService是从Java SE5的java.util.concurrent里,做为并发工具类被引进的,这是最理想的定时任务实现方式。 * 相比于上两个方法,它有以下好处: * 1>相比于Timer的单线程,它是通过 ...
    最近使用jeesite框架,需要上传功能,机缘巧合使用了Jquery File Upload插件(以下简称JFU)。     首先下载JFU解压缩后里面自带demo,以jquery-ui.html这个demo为例,我经过测试上传发现上传时的进度条有明显缺陷这里我将他隐藏。将无用处的内容删除,注意demo里有部分CSS/JS链接指向外部网站这里我将它们统统下载至本地,令修改了“template-download”模板增加一个隐藏的input用于记录文件id。代码如下所示:   <!DOCTYPE HTML> <html lang="zh"& ...
使用sitemesh的步骤 1. 添加jar文件到classpath 2. 在web.xml中增加过滤器 <!-- Sitemesh --> <filter> <filter-name>sitemesh</filter-name> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class> </filte ...

C# WPF 小工具HTML转JS

 
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; usin ...

小工具URL编码

    博客分类:
  • C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using ...
前提: 以MySql 5.6测试。 该表主键ID使用自增长策略。 (SELECT * FROM survey.t_zwgk_lmnr where id > 5 limit 1) union  (SELECT * FROM survey.t_zwgk_lmnr where id < 5 order by id desc limit 1);   注意括号一定要添加,不然查找结果不对。
Global site tag (gtag.js) - Google Analytics