专业点滴

原创
2012/12/17 00:23
阅读数 289
ArrayList<String> list=new ArrayList<String>();
String[] strings = new String[list.size()];
list.toArray(strings);

判断是否基础类型的包专类

return ((Class) clz.getField("TYPE").get(null)).isPrimitive();

myeclipse自动热部署:在配置tomcat时设置启动参数 -Dcom.sun.management.jmxremote=true


sql 查询7天内 每天新增的数据
select a.x ,b.y from 
				    (select date_format((curdate() - interval m.s day),'%m-%d') as x 
				    	from ( 
				    		select 0 as s union all
				    		select 1 union all
				    		select 2 union all
				    		select 3 union all
				    		select 4 union all
				    		select 5 union all
				    		select 6
				    	) m where s <= day(LAST_DAY(CURDATE()))
				    ) a
				    left join 
				    (select count(uid) as y, date_format(from_unixtime(create_time),'%m-%d') as x 
				    	from sjf_user 
				    		where create_time >=  unix_timestamp(now() - interval 7 day) 
				    		and shopid =xxx group by x
				    )  b 
				    on a.x = b.x order by a.x asc
js根据文件名后缀判断上传的文件是否正确
var str = "2323.jpg";
alert(str.match(/\.(png|jpg)$/i)!=null);
 photo: (/\.jpg$|\.jpeg$|\.gif$/i),//图片格式
左右两列,做边固定宽度 ,右边自适应高度的HTML  
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>宽度自适应布局</title>
		<style>
			div {
				height: 200px;
			}
			.left {
				float: left;
				width: 100px;
				background: #00f;
			}
			.center {
				background: #333;
				margin-left:100px;
			}
		</style>
	</head>
	<body>
		<div class="left">
			我是left
		</div>
		
		<div class="center">
			我是center
		</div>
	</body>
</html>

判断某个容器内是否有内容被选中

sel.containsNode(aNode,aPartlyContained)

展开阅读全文
打赏
0
2 收藏
分享
加载中
更多评论
打赏
0 评论
2 收藏
0
分享
返回顶部
顶部