- 浏览: 559264 次
- 性别:
- 来自: 济南
最新评论
-
msdghs:
LZ你好,看了你的文章略有所获,但是里面的一些机制不是很明白, ...
spring quartz集群配置 -
linksky1018:
是我弄错啦,我忘了进行url解码了
java 汉字转Unicode -
linksky1018:
纯汉字转换还行
java 汉字转Unicode -
linksky1018:
貌似有问题吧
java 汉字转Unicode -
kizz:
谢谢您,帮了大忙
struts2 上传 验证图片大小 长宽
文章列表
在android 2.3上设计的下载程序,在android 4.0上运行时报android.os.NetworkOnMainThreadException异常,原来在4.0中,访问网络不能在主程序中进行,有两个方法可以解决,一个是在主程序中增加
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
StrictMode.setThreadPolicy ...
declare @Tab table
(Num int, Name varchar(2), Time DATETIME)
insert into @tab select 1 ,'a', '2009/05/01'
insert into @tab select 1 ,'a', '2009/05/02'
insert into @tab select 1 ,'a', '2009/05/03'
insert into @tab select 2 ,'b', '2009/05/04'
insert int ...
sql 某列当中相同的类型累加
- 博客分类:
- mysql
select Sum(case when buy_status =1 then 1 else 0 end) '订购',
Sum(case when buy_status =2 then 1 else 0 end) '退订',Sum(case when buy_status =6 then 1 else 0 end) '续订'
from business_record
GROUP BY DATE(create_time)
Failed to fectch URl https://dl-ssl.google.com/android/repository/addons_list.xml, reason: Connection to https://dl-ssl.google.com refused
解决办法来源于:code.google.com
用notepad打开C:\WINDOWS\system32\drivers\etc中的hosts文件
在最后一行添加74.125.237.1 dl-ssl.google.com
成功解决问题。
原文地址:http://www.cnblogs.com/xiyo/arc ...
android开发 adt无法启动
- 博客分类:
- android
安装了完整版的adt、创建了helloworld程序,启动的时候就报错
“Please ensure that adb is correctly located at 'D:\adt-bundle-windows-x86_64\sdk\platform-tools\adb.exe' and can be executed.”
关闭任务管理器中的adt.exe 或者adb.exe 一般是由于豌豆荚或者其它安卓手机助手造成的
js计算两个日期之间的差
- 博客分类:
- js
var begin=beginTime;
var end=endTime;
if(begin!="" && end!=""){
var aDate, oDate1, oDate2, iDays ;
aDate = begin.split("-")
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) //转换为12-18-2006格式
aDate ...
java根据开始时间结束时间计算中间间隔日期
- 博客分类:
- java
DateFormat FORMATTER = new SimpleDateFormat("yyyy-MM-dd");
List<SatisticsByCustomer> list=null;
try{
String beginTime="2013-01-01";
String endTime="2013-01-21";
Calendar startDay = Calendar.getInstance();
...
试了很多次 每次都出现
The operation cannot be completed. See the details.
后来才发现Native Development Tools是其中的一个组件,Google了下这个Android Native Development Tools原来是用来运行C/C++的代码的,反正也没打算用C环境开发,既然找不到此组件,就不必安装;于是在安装前去掉此组件前的勾选,再试一次问题解决,很顺畅的安装完成。
在提交form表单的时候发现后台经常出现类似异常,很奇怪,因为我的前台提交的参数和设置的ognl根本没有x之类的参数
后经研究发现原来是使用图片提交按钮惹得祸
input type="image" name="Submit" value="提交" onclick="return checkpwd();" src="images/submit.gif"/>
查询资料后发现
这个错误信息主要因为webwork.devMode = true引起,因为使用struts在默认配置下对任何提交到ac ...
SQL语句 按年龄段分组统计人数
- 博客分类:
- mysql
create table #t(Uname varchar(10),age int)
insert #t
select '啊啊',19 union all
select '信息',23 union all
select '宝宝',31 union all
select '喔喔',21 union all
select '米米',6
select nnd as '年龄段',count(*) as '人数' from(
select
case
when age>=1 and age<=10 then '1-10'
when age& ...
根据输入的日期 获得当前日期为周几
- 博客分类:
- java
public static String getWeekOfDate(Date dt) {
String[] weekDays = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
Calendar cal = Calendar.getInstance();
cal.setTime(dt);
int w = cal.get(Calendar.DA ...
xml文件
<?xml version="1.0" encoding="UTF-8"?>
<root>
<person id="1">
<username>张三</username>
<password>123123</password>
</person>
<person id="2">
<username>1111111112</username> ...
打成jar包后无法读取到jar包内的properties文件
发现在eclipse里一切正常,但打成jar包后就无法读取到properties文件了。
之前的程序是这样获取配置文件的:
Thread.currentThread().getContextClassLoader().getResource("").getPath() +filename+".properties")
来获取properties文件,但发现一运行就报错.后来将代码改成:
this.getClass().getClassLoader().getResourceAsS ...
<p>
<input type="text" name="author" id="author" style="vertical-align:middle" />
<label for="author"><small>呢称</small></label>
</p>
就是给Input加上vertical-align:middle属性。
将支持valign 特性的对象的内容与对象中部对齐
或
css添 ...
关于textarea标签在谷歌和火狐可以拖动大小
- 博客分类:
- 浏览器
就是这个画红框的
而在IE是不会出现这种情况的
解决的方法:我们给这个标签加个 resize: none; 就可以解决了