摘要: packagecom.liren.javadb2;importstaticorg.junit.Assert.assertNotNull;importstaticorg.junit.Assert.fail;importjava.sql.Connection;importjavax.sql.DataSource;importorg.junit.Test;importorg.junit.runner.RunWith;importorg.slf4j.Logger;importorg.slf4j.LoggerFactory;importorg.springframework.beans.factory.阅读全文
posted @ 2011-12-06 09:45 Liren 阅读(113) 评论(0) 编辑
摘要: SpringMVC3中关于url-pattern设成"/"后,CSS等资源的访问会报错:No mapping found for HTTP request with URI。解决办法是将资源类文件夹放到resources目录中,然后在 servlet-context.xml中 添加 xmlns:mvc="http://www.springframework.org/schema/mvc"<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static 阅读全文
posted @ 2011-11-28 09:52 Liren 阅读(20) 评论(0) 编辑
    该文被密码保护。
posted @ 2011-11-09 15:20 Liren 阅读(2) 评论(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->NotificationManagernotificationManager=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);Notificationnotification=newNotification(R.drawable.icon,"您有新消息了",System.currentTimeMillis());Pending阅读全文
posted @ 2011-01-25 15:38 Liren 阅读(68) 评论(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->privatevoidsendMessage(Stringcontact,Stringmessage){SmsManagersmsManager=SmsManager.getDefault();PendingIntentsentIntent=PendingIntent.getBroadcast(this,0,newIntent(),0);if(message.length()>70){List<S阅读全文
posted @ 2011-01-25 15:30 Liren 阅读(40) 评论(0) 编辑
摘要: 调用系统联系人列表[代码]获取返回代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1@Override2protectedvoidonActivityResult(intrequestCode,intresultCode,Intentintent){3if(ACTION_PICK==requestCode){4if(resultCode==Activity.RESULT_OK){5UricontactData=intent.getData();阅读全文
posted @ 2011-01-25 15:29 Liren 阅读(233) 评论(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/**Copyright(C)2008TheAndroidOpenSourceProject**LicensedundertheApacheLicense,Version2.0(the"License");*youmaynotusethisfileexceptincompliancewiththeLicense.*YoumayobtainacopyoftheLicenseat**http://ww阅读全文
posted @ 2011-01-23 16:54 Liren 阅读(65) 评论(0) 编辑
摘要: Android 给自己的类加个事件1、定义一个接口[代码]2、给你的类定义事件privateISpriteAction.OnClickListeneronClickListener=null;[代码] 触发事件 if(onClickListener!=null)onClickListener.onClick(this);3、设置事件处理代码代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->title.setOnClickListener(new阅读全文
posted @ 2011-01-04 15:48 Liren 阅读(43) 评论(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1btnRotate.setOnClickListener(newOnClickListener(){2@Override3publicvoidonClick(Viewv){4intr=Math.abs(getRequestedOrientation());5Log.d("DEBUG",Integer.toString(r));6Log.d("DEBUG","LANDSCAPE="+Integer阅读全文
posted @ 2010-12-19 22:08 Liren 阅读(44) 评论(0) 编辑
摘要: [代码]阅读全文
posted @ 2010-12-11 21:16 Liren 阅读(188) 评论(0) 编辑