摘要: //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) 编辑