QQ可以使用xml的方式发送消息,以下为了方便描述统称为卡片。
通过机器人的API进行发送xml即可,但是如果选择发送xml,那么其他如[image=xxx]、[@xxx]这些命令就不可使用了。整个消息只有XML。
xml主要由msg,item,source这3部分组成
<?xml version='1.0' encoding='utf-8' standalone='yes'?>| SQLite写是锁整个数据库的,在写着数据库的时候,不能进行其它操作,同时读没有问题。 | |
| Sqlite 插入速度慢,平均插入一条速度在110ms左右,所以需要优化: | |
| 法1) | |
| //提升读写速度 | |
| m_database.exec("PRAGMA synchronous = OFF"); | |
| m_database.exec("PRAGMA journal_mode = MEMORY"); | |
| 1 | |
| 2 |
| PPA 镜像加速 | |
| 2018年7月26日 BY : TATERLI | |
| 这里有USTC的反向代理. | |
| https://lug.ustc.edu.cn/wiki/mirrors/help/revproxy | |
| 只要一句话,全替换成USTC加速的PPA.再也不担心了. | |
| 1 | |
| sudo find /etc/apt/sources.list.d/ -type f -name "*.list" -exec sed -i.bak -r 's#deb(-src)?\s*http(s)?://ppa.launchpad.net#deb\1 http\2://launchpad.proxy.ustclug.org#ig' {} \; |
| sudo add-apt-repository ppa:git-core/ppa | |
| sudo apt-get update | |
| sudo apt-get install git |
| d={[]:”str”,{}:”11”} | |
| TypeError: unhashable type: ‘dict’ | |
| python不支持dict的key为list或dict类型,因为list和dict类型是unhashable(不可哈希)的 |
| 可以使用内置的JavaScript parseInt()函数 - 例如 | |
| @ | |
| text:parseInt(textInput1.text)+ 1 | |
| @ |
| 对于常规启动,GPIO0和GPIO2都需要悬空,或者通过电阻上拉到Vcc。如果在常规启动时GPIO0或GPIO2为低电平,则无法启动。 |
| # | |
| # deb cdrom:[Ubuntu-Server 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted | |
| # deb cdrom:[Ubuntu-Server 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted | |
| # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
| # newer versions of the distribution. | |
| deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted | |
| # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted |
| #!/bin/bash | |
| ################################################################################################ | |
| # Fully automated script to install Odoo and Odoo SaaS Tool (tested on a fresh Ubuntu 14.04 LTS) | |
| # * Install & configure last stable version of nginx | |
| # * Install & configure last stable version of postgresql | |
| # * Install & configure Odoo | |
| # * Configure automated backup of Odoo databases | |
| # * Optional: Install & configure Odoo SaaS Tool | |
| # * Optional: Background installation: $ nohup ./odoo_install.sh > nohup.log 2>&1 </dev/null & | |
| ################################################################################################ |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |