打开文件vim /path/to/somefilevim +# :打开文件,并定位于第#行(如下的 vi +33 profile) vim +:打开文件,定位至最后一行vim +/PATTERN : 打开文件,定位至第一次被PATTERN匹配到的行的行首(如下的vi +/after profile) ...
分类:
其他好文 时间:
2020-07-06 01:03:39
阅读次数:
73
1、Centos7添加nginx为系统服务、 vi /usr/lib/systemd/system/nginx.service [Unit] Description=nginx - web server After=network.target remote-fs.target nss-lookup ...
分类:
其他好文 时间:
2020-07-05 13:54:18
阅读次数:
169
创建剪切动画 对于剪切动画,使用clip-path代替width/height,避免DOM重排导致性能过低。 .animate { width: 200px; height: 200px; background: #000; animation: 1s clip; } @keyframes clip ...
分类:
Web程序 时间:
2020-07-05 00:17:01
阅读次数:
77
步骤 既然是快速开发,那废话不多说,直接说步骤: 安装Djagno 安装Django Rest Framework 定义models 定义Rest framework的serializers 定义Rest framework的viewsets 配置Rest framework的router 配置管理 ...
分类:
其他好文 时间:
2020-07-04 22:32:20
阅读次数:
77
ReentrantReadWriteLock详解 简介 特点: ReentrantReadWriteLock允许多个读线程同时访问,不允许写线程和读线程,写线程和写线程同时访问. 一般情况下,共享数据的读操作远多于写操作,比ReentrantLock提供更好的并发性和吞吐量. 读写锁内部维护两个锁: ...
分类:
其他好文 时间:
2020-07-04 19:08:27
阅读次数:
41
一.css 1.伪元素选择器 html代码: <div> 吟诗作对! </div> css写法 div{ background-color: pink; height: 100px; width: 200px; } div:after{ content: '?'; color:white; } di ...
分类:
编程语言 时间:
2020-07-03 23:20:03
阅读次数:
77
可以通过ReentrantLock.newCondition()来获得Condition对象 public Condition newCondition() { return sync.newCondition(); //实际上是调用AQS的方法 } final ConditionObject ne ...
分类:
其他好文 时间:
2020-07-03 15:18:01
阅读次数:
51
真实对象和代理对象都要实现同一个接口 代理对象代理真实角色 public class staticProxy { interface Marry{ void happyMarry(); } static class You implements Marry{ @Override public voi ...
分类:
其他好文 时间:
2020-07-03 09:16:05
阅读次数:
79
Commands start:立刻启动后面接的 unit。 stop:立刻关闭后面接的 unit。 restart:立刻关闭后启动后面接的 unit,亦即执行 stop 再 start 的意思。 reload:不关闭 unit 的情况下,重新载入配置文件,让设置生效。 enable:设置下次开机时, ...
分类:
其他好文 时间:
2020-07-02 21:52:31
阅读次数:
75