Knowing Home Assistant–A shallow dive into smart home system
In the near future my department will move to a new office area. I’m thinking of designing a smart office. After searching for a while on Internet and I come…
In the near future my department will move to a new office area. I’m thinking of designing a smart office. After searching for a while on Internet and I come…
install pyenvbrew install pyenv 2. Configure shell echo ‘export PATH=~/.pyenv/bin:$PATH’ >> ~/.bashrc echo ‘export PYENV_ROOT=~/.pyenv’ >> ~/.bashrc echo ‘eval “$(pyenv init -)”‘ >> ~/.bashrc 3. activate pyenv source ~/.bashrc(或zsh的~/.zshrc) Commonly…
When setting up a laravel project I came across this problem: Google search for this problem and I solved it by generating APP_key parameter. This problem happens when the APP_KEY…
origin: https://blog.csdn.net/m_nanle_xiaobudiu/article/details/80466702 一 Beanstalkd 是什么 Beanstalkd,一个高性能、轻量级的分布式内存队列系统 二 Beanstalkd 特性 优先级(priority) 注:优先级就意味 支持任务插队(数字越小,优先级越高,0的优先级最高) 延迟(delay) 注:延迟意味着可以定义任务什么时间才开始被消费,也就实现了定时任务(比如为了增加网站活跃性,增加定时评论,定时点赞功能) 持久化(persistent data) 注:Beanstalkd 支持定时将文件刷到日志文件里,即使beanstalkd宕机,重启之后仍然可以找回文件 预留(buried) 注:Beanstalkd支持把一个任务设置为预留,这样,消费者就无法取出这个任务了,等合适的时机再把这个任务拿出来消费 任务超时重发(time-to-run) 注:消费者必须在指定的时间内处理完这个任务,否则就认为消费者处理失败,任务会被重新放到队列,等待消费 三 管道(tube)与任务(job) 注:生产者生产任务,并根据业务需求将任务放到不同管道中,比如和注册有关的任务放到注册管道中,和订单有关的放到订单管道中 注:任务从进入管道到离开管道一共有5个状态(ready,delayed,reserved,buried,delete) 生产者将任务放到管道中,任务的状态可以是ready(表示任务已经准备好,随时可以被消费者读取),也可以是delayed(任务在被生产者放入管道时,设置了延迟,比如设置了5s延迟,意味着5s之后,这个任务才会变成ready状态,才可以被消费者读取) 消费者消费任务(消费者将处于ready状态的任务读出来后,被读取处理的任务状态变为reserved) 消费者处理完任务后,任务的状态可能是delete(删除,处理成功),可能是buried(预留,意味着先把任务放一边,等待条件成熟还要用),可能是ready,也可能是delayed,需要根据具体业务场景自己进行判断定义 具体示意图:…
JITAMIN is a project management system written in PHP With Kanban as its main project tool. It has laravel-like directory structure, but in fact uses different packages like Pimple for…
魔术方法:两个下划线开头的格式。 PHP中的魔术方法总结 :__construct, __destruct , __call, __callStatic,__get, __set, __isset, __unset , __sleep, __wakeup, __toString, __set_state, __clone and __autoload ①__get、__set这两个方法是为在类和他们的父类中没有声明的属性而设计的__get( $property ) 当调用一个未定义的属性时访问此方法(获取)__set( $property, $value ) 给一个未定义的属性赋值时调用(设置)这里的没有声明包括当使用对象调用时,访问控制为proteced,private的属性(即没有权限访问的属性) ②__isset、__unset__isset( $property ) 当在一个不可访问的属性上调用isset()或empty()函数时被调用。__unset(…
When I was trying to share a folder on the host to the container using relative path, it was always unsuccessful. My docker-compose.yml is as below: Notice that I have…
I feel bored about repeating the development environment setting up process very much these days. I’ve been managing linux, windows and mac machines and I have tasted LNMP, ONEINSTACK, MAMP,…
Docker basics-image, container, repository 1. Docker repository docker search ubuntu docker pull ubuntu:16.04 2. Docker image commands docker images -a docker images -a -q docker rmi $image-id docker tag $image-id…
I’m using nginx+php-fpm for my wordpress blog site. After I modified my permalinks setting under Settings, I suddenly found that all my posts’ links are broken! All I got was…
STEPS TO ADD WORDPRESS SOCIAL-SHARE WIDGET