blog

Intellij 配置live template的坑

╄→гoц情女王★ 提交于 2019-11-29 22:19:37
idea 在配置live template时,遇到一个小问题,记录如下: live template 的enum类型开始一直不起作用,后面发现每个元素都需要用双引号引起来, 比如 enum("String", "Long") 转载于:https://my.oschina.net/u/2366460/blog/1839483 来源: https://blog.csdn.net/chongqunmo9462/article/details/100941322

需要看的

[亡魂溺海] 提交于 2019-11-29 20:07:03
浅析VO、DTO、DO、PO的概念、区别和用处 http://blog.csdn.net/zjrbiancheng/article/details/6253232 Webhook 实践 —— 自动部署 https://my.oschina.net/u/1585200/blog/edit Example of @EnableAsync and @Async in Spring http://www.concretepage.com/spring/example_enableasync_spring http://www.cnblogs.com/JAYIT/p/5071734.html 【Spring.Framework】依赖管理, Logging http://blog.csdn.net/robinjwong/article/details/40268197 解决jar包依赖:Spring IO platform推出bom http://blog.csdn.net/duqi_2009/article/details/47811847 http://blog.dreamlu.net/ http://blog.dreamlu.net/blog/77 https://my.oschina.net/zhaky/blog/760469 来源: oschina 链接: https://my

超链接删除

纵饮孤独 提交于 2019-11-29 20:06:55
<SCRIPT LANGUAGE=javascript> function p_del() { var msg = "您真的确定要删除吗?\n\n请确认!" ; if (confirm(msg)== true ){ return true ; } else { return false; } } </SCRIPT> 调用方法: <a href="del.jsp?id=<%=id%>" οnclick="javascript:return p_del()">删 除</a> 转载于:https://my.oschina.net/u/2296689/blog/545764 来源: https://blog.csdn.net/chuoxieai9700/article/details/100904812

解决 [warn]_default_ VirtualHost overlap on port 80, the first has precedence 问题

旧巷老猫 提交于 2019-11-29 20:06:13
服务器总共2个VirtualHost ,apachectl restart的时候却出现了下面的警告提示: [warn] _default_ VirtualHost overlap on port 80, the first has precedence 这个,大概意思就是后面新增加的这个个VirtualHost 由于端口被占用,不能生效,沿用第一个虚拟主机的配置。 检查了一下,发现,原来在httpd.conf里,我没有把#NameVirtualHost *:80前的注释去掉,导致这个没有生效。 去掉#之后restart,问题解决,网站可以正常访问。 转载于:https://my.oschina.net/u/2296689/blog/545735 来源: https://blog.csdn.net/chuoxieai9700/article/details/100904854

js 删除确认

荒凉一梦 提交于 2019-11-29 20:06:12
<SCRIPT LANGUAGE=javascript> function p_del() { var msg = "您真的确定要删除吗?\n\n请确认!" ; if (confirm(msg)== true ){ return true ; } else { return false; } } </SCRIPT> 调用方法: <a href="del.jsp?id=<%=id%>" οnclick="javascript:return p_del()">删 除</a> 转载于:https://my.oschina.net/u/2296689/blog/545744 来源: https://blog.csdn.net/chuoxieai9700/article/details/100904859

新旧交替之际

吃可爱长大的小学妹 提交于 2019-11-29 19:33:00
新旧交替之际 我的四年 现在总算有些时间与心情写一写东西,也好修修补补年久失修的Blog。 这几个月里的时间里,发生了许多糟心的事情,归根结底就只是成王败寇而已,不管怎么说,任何事情都要看两面性,坏事就是受尽了挫折还损失了几十万的金钱,好的是,好在我还年轻,受些挫折不管怎么说都是一笔阅历的积累,人生总有低谷和高峰,只不过我先走过的是低谷而已。 肝帝争夺之路 我是一个普通的人,上了一个普通的小学、初中、和高中,其中也认识了许多有趣的人儿,后因为不成熟的我跟人打架,从学校中辍学,还连累了许多兄弟朋友,经过这一次打架的事件之后,我的性格也变得有一些阴郁,好在社会大学里学(da)习(gong)的一些事情,让我认识到学习是真的可以改变命运的,站的高度越高,选择就越多。 经历了这些事情,我也渐渐地明白了许多,后来来到一所技师学院,学习怎么倒腾电脑,恰逢学院,招收“码农兴趣班”,来参加一个“码农的大赛”,后来呢,我抓住了这个机会,也跟全国许多码农较量过看谁能够加班,最终,我成功夺得中国第一”肝帝“之称(PS:在一定的圈子内),挣得去和外国的码农竞争一番争夺”金“、“银”、“铜”三个肝帝宝座,奈何计差一筹,我荣获“第四"肝帝“宝座”。后面就是一连串的不愉快的经历就开始了。 现在的我,也看到了许多,也想到了许多,感觉有些遗憾、也有些手足无措,不管怎么说我还是平稳了许多,有人嫌弃我,也有人重用我

mybatis 中 foreach collection的三种用法

一个人想着一个人 提交于 2019-11-29 19:18:44
如果传入的是单参数且参数类型是一个List的时候,collection属性值为list 如果传入的是单参数且参数类型是一个array数组的时候,collection的属性值为array 如果传入的参数是多个的时候,我们就需要把它们封装成一个Map了,当然单参数也可以 代码: 1.单参数List的类型: < select id = "dynamicForeachTest" parameterType = "java.util.List" resultType = "Blog" > select * from t_blog where id in < foreach collection = "list" index = "index" item = "item" open = "(" separator = "," close = ")" > # { item } < / foreach > < / select > 上述collection的值为list,对应的Mapper是这样的 public List dynamicForeachTest(List ids); 测试代码: @Test public void dynamicForeachTest ( ) { SqlSession session = Util . getSqlSessionFactory ( ) .

搭建自己的博客(二):创建表,创建超级用户

て烟熏妆下的殇ゞ 提交于 2019-11-29 17:48:09
接上一篇搭建完成之后,开始构建一些表了。 一篇博客首先需要一个表来存放博客,然后一篇博客应该需要不同的标签来分类,还应该有作者。下面动手创建表。作者表暂时准备使用django自带的user表 1、创建博客标签表和博客表。 打开blog app下的models模型文件,创建表如下: from django.db import models from django.contrib.auth.models import User # 导入User表 # Create your models here. # 博客分类表 class BlogType(models.Model): type_name = models.CharField(max_length=15) # 博客分类名称 # 博客表 class Blog(models.Model): title = models.CharField(max_length=50) # 博客标题 blog_type = models.ForeignKey(BlogType, on_delete=models.DO_NOTHING) # 博客分类 content = models.TextField() # 博客内容 author = models.ForeignKey(User, on_delete=models.DO_NOTHING) #

RabbitMQ » Blog Archive » SockJS – WebSocket emulation - Messaging that just works

落花浮王杯 提交于 2019-11-29 17:05:55
RabbitMQ » Blog Archive » SockJS – WebSocket emulation - Messaging that just works SockJS – WebSocket emulation WebSocket technology is catching up, but it will take a while before all browsers support it. In the meantime there are loads of projects that aim to substitute for WebSockets and enable 'realtime' capabilities for web apps. But all attempts solve only a part of the general problem, and there isn't any single solution that works, is scalable and doesn't require special deployment tricks. That's why a new project was born : SockJS - yet another WebSocket emulation library, but this

19_权限和分组

本秂侑毒 提交于 2019-11-29 16:52:07
目录 权限 登录、注销和登录限制: 权限 分组: 分组操作: 在模板中使用权限: 权限 登录、注销和登录限制: 登录 在使用 authenticate 进行验证后,如果验证通过了。那么会返回一个 user 对象,拿到 user 对象后,可以使用 django.contrib.auth.login 进行登录。示例代码如下: # 1. 登录 from django.contrib.auth import login from django.contrib.auth import authenticate # 切记: 这里一定不要定义视图函数名字为 login def my_login(request): if request.method == 'POST': username = request.POST.get('username') password = request.POST.get('password') user = authenticate(username=username, password=password) if user: if user.is_active: login(request, user) return HttpResponse('登录成功') else: return HttpResponse('用户名或密码错误') return render