摘要: //Street.hbm.xml //当column不指定的时候默认是和name相同 //这里简单介绍,简单类型的配置标签,多对一的配置标签,以此xml为例,需要注意的是该xml是一个街道的实体映射,也就是说一个区可以包... 阅读全文
posted @ 2013-09-13 17:58 暖流 阅读(3084) 评论(0) 推荐(0) 编辑
摘要: //String转换Date DateFormat datef = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = datef.parse(cd); public Map getSmsContentByCateoryIdOrDate(Long id, Date date) { Map map = new HashMap(); final String hq1 = "from SmsContent s where s.category.id="+id+" and s.deleteT 阅读全文
posted @ 2013-09-13 17:56 暖流 阅读(344) 评论(0) 推荐(0) 编辑
摘要: //hibernate获取个数 public Long getStarLevel(Long id) { final String hql = "select count(*) from Activity act where act.orginator.id="+id; Long count = (Long)getHibernateTemplate().find(hql).listIterator().next(); return count; } //根据id修改一个对象属性 public String updateAttrNameByAttrValu... 阅读全文
posted @ 2013-09-13 17:53 暖流 阅读(304) 评论(0) 推荐(0) 编辑
摘要: public List getAllContentClickCount() { final String query = "select b.smsContentId as ContentId,count(*) as ClickCount from SmsContentClickLog b left join SmsContent a on b.smsContentId=a.id where a.deleted=1 group by b.smsContentId"; List list = (List)this.getHibernateTemplate().exec... 阅读全文
posted @ 2013-09-13 17:50 暖流 阅读(576) 评论(0) 推荐(0) 编辑
摘要: 执行SQL插入this.getHibernateTemplate().executeUpdate(new HibernateCallback(){ public Object doInHibernate(Session s) throws HibernateException,SQLException{String sql = "insert into xxx(xxx,xxx)";session.createQuery(sql).executeUpdate();});} 更新表this.getHibernateTemplate.merge("TableName&q 阅读全文
posted @ 2013-09-13 17:49 暖流 阅读(805) 评论(0) 推荐(0) 编辑
摘要: import com.mobileares.dolphin.dao.ActivityDao;import com.mobileares.dolphin.dao.CommodityDao;import com.mobileares.dolphin.dao.UserDao;import com.mobileares.dolphin.model.*;import com.mobileares.dolphin.service.*;import org.hibernate.Hibernate;import org.junit.Test;import org.springframework.beans.f 阅读全文
posted @ 2013-09-13 17:47 暖流 阅读(203) 评论(0) 推荐(0) 编辑
摘要: dev为第一版,详细代码就不多说了!(缺少树)往后会增加树和ajax读取数据的代码flexigrid为demoZtree文档http://www.ztree.me/v3/demo.php#_307源码下载,dev.rarflexigrid.rar 阅读全文
posted @ 2013-09-13 17:27 暖流 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-09-13 17:20 暖流 阅读(747) 评论(0) 推荐(0) 编辑
摘要: 插件主要的方法: ajaxForm ajaxSubmit formToArray formSerialize fieldSerialize fieldValue clearForm clearFields resetForm 示例代码: Js代码 // wait for the DOM to be loaded $(document).ready(function() { // bind 'myForm' and provide a simple callback function $('#myForm').ajaxForm(function() { ... 阅读全文
posted @ 2013-09-13 17:19 暖流 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 无标题文档 阅读全文
posted @ 2013-09-13 17:18 暖流 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1. children()方法该方法用于取得匹配元素的子元素集合。使用children()方法来获取匹配元素的所有子元素的个数。var $body=$("body").children();var $p=$("p").children();var $ul=$("ul").children();alert("$body.length"); //元素下有2个子元素alert($p.length); //元素下有0个子元素alert("$ul.length"); //元素下有3个子元素f... 阅读全文
posted @ 2013-09-13 17:16 暖流 阅读(1192) 评论(0) 推荐(0) 编辑
摘要: 有点抽象!!自做备份 queue("Fx"); 默认为Fx:标准一个队列长度! Html代码 Show Length of Queue 下面3中解析 Html代码 Start 测试一下这个demo,大家会发现执行顺序是1,2,3,4完全符合逻辑! 但是为什么加了一个queue和dequeue,如果不加会出现什么情况,于是3这个函数删掉,3.1放到3的位置上, Js代码 $(function(){ // $("button").click(fun... 阅读全文
posted @ 2013-09-13 17:13 暖流 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 使用$.get()方法来创建GET请求 jQuery的$.get()方法提供了你简单的方式来处理HTTP GET方法,通常用来获取web页面或者图片。对应的是POST方法。使用$.get()方法非常简单,如下: $.get( url );url是服务器端的一个地址,可以是服务器端脚本或者是一个静态页面,如下: $.get( "http://gbin1.com/index.html" ); 或者一个动态的document $.get( "http://gbin1.com/index.jsp" ); 当然,同时也支持参数,如下: $.get( "h 阅读全文
posted @ 2013-09-13 17:12 暖流 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 1 - append() 向每个匹配的元素内部追加内容: 我想说: $("p").append("你好"); 结果: 我想说:你好 2 - appendTo() 将所有匹配的元素追加到指定的元素中。实际上,使用该方法是颠倒了常规的$(A).append(B)的操作,即不是将B追加到A中,而是将A追加到B中: 我想说: $("你好").appendTo("p"); 结果: 我想说:你好 3 - prepend() 向每个匹配的元素内部前置内容: 我想说: $("p").prepend你好" 阅读全文
posted @ 2013-09-13 17:03 暖流 阅读(136) 评论(0) 推荐(0) 编辑
摘要: $(function(){ (function($) { $.disBtn = function(action) { if(action=="0"){ $("input[name=\'sort1\']").attr("disabled","true"); }else{ $("input[name=\'sort1\']").removeAttr("disabled"); } } })(jQuery); $.disBtn("0" 阅读全文
posted @ 2013-09-13 16:54 暖流 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 一、居中 居中显示 二、禁用右键 $(document).bind("contextmenu",function(e){ return false; }); 三、ajax //1 $.ajax({ url: 'stat.php', type: 'POST', data:{Name:"keyun"}, dataType: 'html', timeout: 1000, error: function(){alert('Error loading PHP document');}, success 阅读全文
posted @ 2013-09-13 16:53 暖流 阅读(656) 评论(0) 推荐(0) 编辑
摘要: 首页 上一页 下一页 末页 很多时候,在后台页面要求页面布局-----------------分页按钮 [下拉列表] +++++++++ +++++++++ <-- 内容列表 +++++++++-----------------分页按钮 [下拉列表]//上页 $("a[name=\'upPage\']").click(function(){ //当前页 var pageN= parseInt($("select[name=\'pageNo\']").val()); var pageNumber=0... 阅读全文
posted @ 2013-09-13 16:48 暖流 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 商家名称 联系人名称 联系人电话 联系人邮箱 商家地址 状态 COCO奶茶 王先生 13566451239 cocoTea@126.com 待审核 ... 阅读全文
posted @ 2013-09-13 16:45 暖流 阅读(916) 评论(0) 推荐(0) 编辑
摘要: org.mortbay.jetty maven-jetty-plugin 6.1.2 8080 10 打开IntelliJ IDEA ,创建Run/Debug的配置,下拉菜单中选择"Edit configurations",点击 '+' (plus) 按钮 ,创建一个新的 "Maven" configuration.在 goals section 后面的文本框输入 "jetty:run"。设置断点后,使用debug 按钮 可以进行程序调试。jetty对于开发者来说真是测试神奇 阅读全文
posted @ 2013-09-13 16:40 暖流 阅读(471) 评论(0) 推荐(0) 编辑
摘要: 简单介绍一下maven的pom构建文件.如果对你有帮助请进行补充,Thanks 一,这个是xml的头,跟spring,hibernate的xml作用一样,指定xml的文档版本以及编码 二,这个就是第二个标签,是xml中的根节点,用来声明命名空间,xsd元素等,据说如果配置加快POM的编译速度,没有测试!但想想spring和hibernate等的配置,这就不是空穴来风了. 三,该元素指定了pom模型的版本,对于maven2和3!他只能是4.0.0 4.0.0 四,一个坐标组,跟咱们所说完全限定名是一个道理 1.com.mobileares 2.dolphinPlat... 阅读全文
posted @ 2013-09-13 16:35 暖流 阅读(426) 评论(0) 推荐(0) 编辑
摘要: 选择:select * from table1 where 范围插入:insert into table1(field1,field2) values(value1,value2)删除:delete from table1 where 范围更新:update table1 set field1=value1 where 范围查找:select * from table1 where field1 like ’%value1%’ ---like的语法很精妙,查资料!排序:select * from table1 order by field1,field2 [desc]总数:select cou 阅读全文
posted @ 2013-09-13 16:21 暖流 阅读(284) 评论(0) 推荐(0) 编辑
摘要: --给某一张表添加一个列ALTER TABLE `users` ADD `username` TEXT NOT NULL; --例如alter table app_user add starLevel INT(11) NULL default 6;--建表时 给某列添加默认值create table tablename (columnname datatype default defaultvalue);--已建表修改alter table tablename alter column columnname set default defaultvalue;--给user表的username添 阅读全文
posted @ 2013-09-13 16:19 暖流 阅读(11993) 评论(0) 推荐(0) 编辑
摘要: //建库:create database db_name character set =utf8;/*建立库db_name,默认字符集为utf8*///建表:create table tb_1 (id int auto_increment primary key, remark varchar(20)) engine=innodb default character set=utf8 auto_increment =100;/*建立表tb_1,存储引擎为innodb,默认字符集为utf8,自增列开始值为100*/create table tb_2 (id2 int auto_increment 阅读全文
posted @ 2013-09-13 16:17 暖流 阅读(1762) 评论(0) 推荐(0) 编辑
摘要: 1.在my.ini里面改default-character-set=gbkdefault-character-set=utf8重启服务,然后在mysql client执行下列命令查看,如果有这样的结果就OKmysql> show variables like 'chara%';+--------------------------+---------------------------------------------------------+| Variable_name | Value |+--------------------------+----------- 阅读全文
posted @ 2013-09-13 16:15 暖流 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 1.查看数据库支持的所有字符集 show character set;或show char set; 2.查看当前状态 里面包括当然的字符集设置 status或者\s 3.查看系统字符集设置,包括所有的字符集设置 show variables like 'char%'; 4.查看数据表中字符集设置 show full columns from tablename; 或者 show create table tablename\G; 5.查看数据库编码 show create database dnname;修改字符集命令级别 命令 时效 备注服务器 SET GLOBAL cha 阅读全文
posted @ 2013-09-13 16:10 暖流 阅读(1712) 评论(0) 推荐(0) 编辑
摘要: 在命令行下mysql的数据导出有个很好用命令mysqldump,它的参数有一大把,可以这样查看:mysqldump最常用的:mysqldump -uroot -pmysql databasefoo table1 table2 > foo.sql这样就可以将数据库databasefoo的表table1,table2以sql形式导入foo.sql中,其中-uroot参数表示访问数据库的用户名是root,如果有密码还需要加上-p参数C:\Users\jack> mysqldump -uroot -pmysql sva_rec date_drv > e:\date_drv.sqlmy 阅读全文
posted @ 2013-09-13 16:07 暖流 阅读(128247) 评论(0) 推荐(3) 编辑
摘要: 1,你所不知道的Mac截图的强大2,抓包工具WireShark开发必备,需要装X11插件3,Mac远程控制Windows桌面-CoRD。或者TeamViewer4,Mac下解压缩BetterZip,个人认为好用方便!5,Mac文件比较工具p4Merge 阅读全文
posted @ 2013-09-11 10:41 暖流 阅读(907) 评论(0) 推荐(0) 编辑
摘要: ios5之前键盘的高度是无法改变的,在更新ios5之后中文输入法的高度可以变化有一些notification事件可以帮助大家处理相关的键盘操作UIKeyboardDidShowNotificationUIKeyboardWillHideNotificationUIKeyboardWillChangeFrameNotification这几个notification会在键盘隐藏显示时触发,并通过其中的userInfo属性提供键盘高度等相关信息获取UIDI的变化UIDI在ios5中被标记为deprecated,今后也可能不在提供设备UDID,对于这个变化官方文档中也提供了替代方法,即为应用中使用CF 阅读全文
posted @ 2012-08-08 15:45 暖流 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 1.objective-c中的数字对象都有哪些,简述它们与基本数据类型的区别是什么2.用NSLog函数输出一个浮点类型,结果四舍五入,并保留一位小数3.截取字符串”20|http://www.621life.com“ 中 ‘|’字符前面及后面的数据,分别输出它们4.objective-c中的词典对象、可变词典对象是哪个,初始化一个含有两个键值对的可变词典对象,并动态的添加和删除一条记录,输出第一条记录5.获取项目根路径,并在其下创建一个名称为userData的目录。6.在一个对象的方法里面:self.name = “object”;和name =”object”有什么不同吗?7.定义属性时,什 阅读全文
posted @ 2012-07-26 14:00 暖流 阅读(1032) 评论(0) 推荐(0) 编辑
摘要: 添加到通讯录 1 //添加到通讯录 2 -(IBAction)addToContact 3 { 4 ABAddressBookRef iPhoneAddressBook = ABAddressBookCreate(); 5 ABRecordRef newPerson = ABPersonCreate(); 6 CFErrorRef error = NULL; 7 ABRecordSetValue(newPerson, kABPersonFirstNameProperty, @"John", &error); 8 ABRecordSetV... 阅读全文
posted @ 2012-07-26 11:55 暖流 阅读(407) 评论(0) 推荐(0) 编辑