SimpleDao
Python#!/usr/bin/python3print("Hello World!") Golangpackage mainimport "fmt"func main() { fmt.Println("Hello World!")} Javapackage com.testmy.demo;public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); }} Kotlinfun main(args: Array&l...
strconv.Atoi: Atoi returns the result of ParseInt(s, 10, 0) converted to type int.strconv.ParseInt: ParseInt interprets a string s in the given base (2 to 36) and returns the corresponding value i. package mainimport ( "fmt" "strconv")func main() { str1 := "123" /** converting the st...
Qt设置渐变背景
2019-05-06, 访问数: 1123
qssbackground-color: qlineargradient(spread:repeat, x1: 0, y1: 0, x2: 0, y2: 1, stop: 0#2ba0d6, stop: 1 #138abd); widgetQLinearGradient linearGradient(0, 0, 0, 300);linearGradient.setColorAt(0.0, Qt::green);linearGradient.setColorAt(1.0, Qt::blue);QPalette pal;pal.setBrush(QPalette::Window, QBrus...
rabbitmq 安装 install
2019-05-06, 访问数: 1516
安装yum install erlangrpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.ascyum install rabbitmq-server 添加hostnamevim /etc/hosts# 添加一行:127.0.0.1 rabbitmq-server 常用命令# 启动:service rabbitmq-server start# 停止:service rabbitmq-server stop# 重启:service rabbitmq-server restart# 设置开机启动:chkconf...
redis 常用命令
2019-05-06, 访问数: 1176
安装yum install redis 客户端连接redis-cli -h 127.0.0.1 -p 6379
robots.txt放在网站根路径 /robots.txt 禁止拉取某些目录User-agent: *Disallow: /static/Disallow: /css/Disallow: /admin/Disallow: /images/ 允许网络爬虫访问我们网站的某个目录中的某些特定网址User-agent: *Allow: /css/myAllow: /admin/htmlAllow: /images/indexDisallow: /css/Disallow: /admin/Disallow: /images/ 禁止所有搜索引擎访问网站的所有部分User-agent: *Disal...
Linux scp常用命令
2019-05-06, 访问数: 1164
简介scp是 secure copy的缩写, 是linux系统下基于ssh登陆进行安全的远程文件拷贝命令,用于Linux之间复制文件和目录,而且由于是基于ssh,所以传输过程是加密的。类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器。 语法scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file][-l limit] [-o ssh_option] [-P port] [-S program][[user@]host1:]file1 [...] [[user@]host2:]file2 简易写法scp [可选参...
shadowsocks配置
2019-05-06, 访问数: 1470
服务端ssserver -p 6001 -k 123456abc -m aes-256-cfb -s 0.0.0.0 -v 客户端sudo sslocal -s 127.0.0.1 -p 6001 -k 123456abc -m aes-256-cfb -v
spark 提交任务 python pyspark
2019-05-06, 访问数: 1111
spark-submitspark-submit --master yarn --deploy-mode cluster --queue q1 --num-executors 1 scripy.py pysparkdef process(rows): content = "" for row in rows: content += b64encode(row.url) return [content]conf = SparkConf().setAppName('PoliceHive2Xml')spark_context = SparkContext(con...
Linux ssh免密码登录
2019-05-06, 访问数: 1044
生成公私密钥ssh-keygen -t rsa# 提示输入的话直接回车即可# 生成的密钥在~/.ssh/,公钥:id_rsa.pub,私钥:id_rsa 将公钥设置到目标机器# 添加公钥到authorized_keyscat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys# 修改authorized_keys权限chmod 600 ~/.ssh/authorized_keys