摘要: 在res/drawable文件夹新增一个文件,此文件设置了图片的触发状态,你可以设置 state_pressed,state_checked,state_pressed,state_selected,state_focused,state_enabled 等几个状态:1、android:state_pressed:如果是true,当被点击时显示该图片,如果是false没被按下时显示默认。2、android:state_focused:如果是true,获得焦点时显示;false,没获得焦点显示默认。3、android:state_selected:如果是true,当被选择时显示该图片;false 阅读全文
posted @ 2013-01-07 14:46 Caliven 阅读(350) 评论(0) 推荐(0) 编辑
摘要: /** * 移除字符串中包含HTML的标签 * * @param content * @return */ public static String removeHTML(String content) { int before = content.indexOf('<'); int behind = content.indexOf('>'); if (before != -1 || behind != -1) { behind += 1; content ... 阅读全文
posted @ 2012-12-13 11:17 Caliven 阅读(262) 评论(0) 推荐(0) 编辑
摘要: public static String oracleClob2Str(Clob clob) throws Exception { return (clob != null ? clob.getSubString(1, (int) clob.length()) : null);} 阅读全文
posted @ 2012-12-12 11:34 Caliven 阅读(245) 评论(0) 推荐(0) 编辑
摘要: select substr('测试',0, (length('测试')-1)) from dual; --结果 '测'select instr('测试100','100') from dual; --结果'3'(返回100在测试100中出现在那个位置)TO_DATE格式(以时间:2007-11-02 13:45:25为例) Year: yy two digits 两位年 显示值:07 yyy three digits 三位年 显示值:007 yyyy four digits 四位年 显示值:2007 阅读全文
posted @ 2012-12-03 09:50 Caliven 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Ubuntu12.10 64位系统安装以及配置java jdk环境变量wuyexiong@wuyexiong-Ubuntu:~$ uname -aLinux wuyexiong-Ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux用此命令查看系统的信息,如果是32位的则不会显示后面的_64 只会显示x860.1--下载 JAVA JDK下载地址: http://www.oracle.com/technetwork/java/javase/downloa 阅读全文
posted @ 2012-12-02 00:36 Caliven 阅读(570) 评论(0) 推荐(0) 编辑
摘要: //重新将relList里的数据按照sequenceNo和subName进行排序Collections.sort(relList, new Comparator<Object>() { @Override public int compare(Object obj1, Object obj2) { CpPlanSubRel rel1 = (CpPlanSubRel) obj1; CpPlanSubRel rel2 = (CpPlanSubRel) obj2; // 首先比较序号,如果序号(sequenceNo)相同,则比较科目名字(subName) ... 阅读全文
posted @ 2012-11-29 18:05 Caliven 阅读(270) 评论(0) 推荐(0) 编辑
摘要: ALTER SESSION SET NLS_SORT=''; 排序影响整个会话Oracle9i之前,中文是按照二进制编码进行排序的。 在oracle9i中新增了按照拼音、部首、笔画排序功能。设置NLS_SORT值 SCHINESE_RADICAL_M 按照部首(第一顺序)、笔划(第二顺序)排序 SCHINESE_STROKE_M 按照笔划(第一顺序)、部首(第二顺序)排序 SCHINESE_PINYIN_M 按照拼音排序NLSSORT(),用来进行语言排序: oracle9i中新增了按照拼音、部首、笔画排序功能 拼音 SELECT * FROM TEAM ORDER BY .. 阅读全文
posted @ 2012-11-29 17:57 Caliven 阅读(894) 评论(0) 推荐(0) 编辑
摘要: 如下,表a是数据库中已经存在的表,b是准备根据表a进行复制创建的表:1、只复制表结构的sqlcreatetablebasselect*fromawhere1<>12、即复制表结构又复制表中数据的sqlcreatetablebasselect*froma3、Oracle复制表的制定字段的sqlcreatetablebasselectrow_id,name,agefromawhere1<>1前提是row_id,name,age都是a表的列4、复制表的指定字段及这些指定字段的数据的sqlcreatetablebasselectrow_id,name,agefroma以上语句虽 阅读全文
posted @ 2012-11-26 11:07 Caliven 阅读(182) 评论(0) 推荐(0) 编辑
摘要: /** * IE10以下用js实现HTML5属性placeholder效果的几种方式; * 由于IE10以下的IE不支持HTML5标签placeholder属性,此插件是让IE支持placeholder属性。支持textarea, input标签! *///------------------------------------第一种方法---------------------------------------------------///** * 用法: * 1、页面引入此js,需jquery.js支持; * 2、在input、textarea标签中加入属性 placeholde... 阅读全文
posted @ 2012-11-16 17:39 Caliven 阅读(1109) 评论(0) 推荐(0) 编辑
摘要: $(":input") 包含表单中的input,select,textarea,button等元素;$("input") 只包含input元素。总结::input范围大于input!测试程序:<!DOCTYPE html><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>RunJS</title> <script 阅读全文
posted @ 2012-11-14 11:01 Caliven 阅读(264) 评论(0) 推荐(0) 编辑