摘要: 本插件可以在输入框的右侧(内部)添加一个可点击的图片按钮,方便进行清空文本框内容以及其它操作。 阅读全文
posted @ 2012-07-30 17:26 轻松 阅读(695) 评论(0) 推荐(0) 编辑
摘要: 参考:http://css-tricks.com/centering-in-the-unknown/ 我在中间 我在底部 阅读全文
posted @ 2014-09-18 17:54 轻松 阅读(173) 评论(0) 推荐(0) 编辑
摘要: From:http://stackoverflow.com/questions/6632982/how-to-create-custom-methods-for-use-in-spring-security-expression-language-annoNone of the mentioned techniques will work anymore. It seems as though Spring has gone through great lengths to prevent users from overriding the SecurityExpressionRoot. In 阅读全文
posted @ 2014-03-08 11:17 轻松 阅读(520) 评论(0) 推荐(0) 编辑
摘要: From:http://stackoverflow.com/questions/3021200/how-to-check-hasrole-in-java-code-with-spring-security1public String createForm(HttpSession session, HttpServletRequest request, ModelMap modelMap) { if (request.isUserInRole("ROLE_ADMIN")) { // code here }}2HttpServletRequest req = (Ht... 阅读全文
posted @ 2014-03-08 11:12 轻松 阅读(1744) 评论(0) 推荐(0) 编辑
摘要: PackageManager packageManager = getPackageManager(); ComponentName componentName = new ComponentName(this, StartActivity.class); int res = packageManager.getComponentEnabledSetting(componentName); if (res == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT |... 阅读全文
posted @ 2013-10-09 20:07 轻松 阅读(23911) 评论(0) 推荐(0) 编辑
摘要: 在媒体文件改变后 发出Intent.ACTION_MEDIA_SCANNER_SCAN_FILE广播,告知其他应用,媒体文件发生改变。具体代码片段: 1 File oldFile = new File(oldPath); 2 File newFile = new File(newPath); 3 if (oldFile.exists() && !newFile.exists()) { 4 if (oldFile.renameTo(newFile)) { 5 6 Uri fileUri = Uri.fromFile(newFile); 7 ... 阅读全文
posted @ 2013-09-25 12:25 轻松 阅读(1850) 评论(0) 推荐(0) 编辑