/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/3/11 8:20 # @Author : cunyu # @Site /usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/3/11 8:50 # @Author : cunyu # @Site /usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/3/11 9:19 # @Author : cunyu # @Site : cunyu1943.github.io # @File : 6-3.py # @Software: PyCharm # 简单求和 # https://pintia.cn/problem-sets /usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/3/11 19:58 # @Author : cunyu # @Site
* var a=true;var b=false; alert('a+b='+(a+b)); =1 3.
存取测试 [root@docker etcd-v2.2.4-linux-amd64]# ./etcdctl set keytest "hello world for etcd test" hello world for etcd test [root@docker etcd-v2.2.4-linux-amd64]# ./etcdctl get keytest hello world for etcd test [root@docker etcd-v2.2.4-linux-amd64]# ---- 单点运行
为了和宿主机有平等的网络层级 (能使用到上面的dhcp),可以通过构建网桥的办法来实现
使用 bin/zkCli.sh -server 127.0.0.1:2181 进行连接
数据结构 3 数据框、矩阵和列表 之前学过的,Vector向量是 一维的 数据框、矩阵和列表如下: 1)现在学“表格” 二维:二维有两个:(1)matix 矩阵 —— 二维,只允许一种数据类型。 3.1 数据框来源 (1)用代码新建 (2)由已有数据转换或处理得到 (3)读取表格文件 (4)R语言内置数据 3.2 新建数据框(数据框是以列为单位组织的) 3.2.1 用代码新建 data.frame > df1[c(1,3),1:2] 中括号里的逗号,表示维度的分割。 #按照名字,按照这种方式可以一次提取两列。 > df1[,-ncol(df1)] # - 有反选的意思 3.5 数据框修改 #改一个格 > df1[3,3]<-5 > df1 #改一整列 > df1$score<- c(12,23,50,2 > merge(test1,test3,by.x="name",by.y="NAME") #但是要注意,一定要对应,test1是x,test3是y。
php基础3 1、post和get可用于发送和接受表单的信息 2、post和get在处理表单时候都创建数组array,数组以键值对形式,表单元素名做键,文本框内容做值 3、GET和POST被视作$_GET
启动Docker [root@h103 ~]# service docker start Redirecting to /bin/systemctl start docker.service [root@h103 ~]# ps faux | grep docker root 3315 0.0 0.0 112644 960 pts/1 S+ 17:20 0:00 | \_ grep --color=auto docker root 3200 1.5
使用mongo客户端来连接服务,mongo 客户端由 mongodb-org-shell 包提供
MyCAT 是使用JAVA开发的,必须运行于JRE的环境中,MyCAT的运行依赖不低于JDK7版本的环境
版本确认 [root@h102 ~]# /usr/local/sqlite3.11/bin/sqlite3 -version 3.11.1 2016-03-03 16:17:53 f047920ce16971e573bc6ec9a48b118c9de2b3a7 [root@h102 ~]# 帮助信息 [root@h102 ~]# /usr/local/sqlite3.11/bin/sqlite3 --help Usage: /usr/local/sqlite3.11 /bin/sqlite3 [OPTIONS] FILENAME [SQL] FILENAME is the name of an SQLite database.
======================================================================================Install 3 Package(s)Total download size: 297 kInstalled size: 1.4 MDownloading Packages:(1/3): libevent-devel-1.4.13 x86_64.rpm | 74 kB 00:00 (2/3) noarch.rpm | 194 kB 00:00 (3/ 3/3 Installed: libevent-devel.x86_64 0:1.4.13-4.el6
python基础3 交换: a,b=b,a 相当于定义了一个元组t=(b,a) 然后将t[0]的值给了a,t[1]的值给了b ####字典#### 定义用花括号 集合定义若为空的话,会默认为字典 子典只能通过关键字来查找值,因为字典是key-value(关键字-值),因此不能通过值来查找关键字 In [1]: dic = {"user1":"123","user2":"234","user3" :"789"} In [3]: dic["234"] -------------------------------------------------------------------------- ]) Out[90]: {1: None, 2: None, 3: None, 4: None} In [91]: dic.fromkeys([1,2,3,4],'hello') Out[91]: { 1: 'hello', 2: 'hello', 3: 'hello', 4: 'hello'} In [38]: d = {} In [32]: li = [1,2,3,1,2,3]
a working epoll (> 0.21) - linux26 for Linux 2.6 and above - linux2628 for Linux 2.6.28, 3. i686 for intel PentiumPro, Pentium 2 and above, AMD Athlon - i586 for intel Pentium, AMD K6, VIA C3
十六进制更简短,因为换算的时候一位16进制数可以顶4位2进制数,也就是一个字节(8位进制可以用两个16进制表示) 2、最早规定ASCII字符集采用的就是8bit(后期扩展了,但是基础单位还是8bit) ,8bit用2个16进制直接就能表达出来,不管阅读还是存储都比其他进制要方便 3、计算机中CPU运算也是遵照ASCII字符集,以16、32、64的这样的方式在发展,因此数据交换的时候16进制也显得更好 2、数据存储,存储到硬件中是0101的方式,存储到系统中的表达方式都是byte方式 3、一些常用值的定义,比如:我们经常用到的html中color表达,就是用的16进制方式,4个16进制位可以表达好几百万的颜色信息
导入索引模板到ES [root@h102 filebeat]# ls filebeat.template.json filebeat.yml [root@h102 filebeat]# curl -
last |head -1 3、列出当前系统上被用户当作默认shell的最多的那个shell cut -d -f7 /etc/passwd | uniq -c | sort -n | tail -1 4、将/etc/passwd中的第三个字段数值最大的后10个用户的信息全部改为大写后保存至/tmp/maxuser.txt文件 sort -t: -k3 -n /etc/passwd tr 'a-z' 'A-Z' > /tmp/maxuser.txt 5、取出当前主机的IP地址,提示:对ifconfig命令的结果进行切分 ifconfig | grep '[0-9]\{1,3\ }\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' hostname -i 6、列出/etc目录下所有以.conf结尾的文件名,并将其名字转换为大写后保存至 ,最长为180天,警告为3天; passwd slackware -n 3 -x 180 -w 3 (10)添加用户openstack,其ID号为3003,基本组为clouds,附加组为peguin
配置 修改 config/kibana.yml 中的 elasticsearch 配置 [root@h101 kibana]# cd kibana-4.3.1-linux-x64/config/ [root@h101 config]# ls kibana.yml [root@h101 config]# grep -v "^#" kibana.yml | grep -v "^$" [root@h101 config]# vim kibana.yml [root@h101 config]# grep -v "
启停 启动 [root@h101 ~]# /etc/init.d/jenkins start Starting Jenkins [ OK ] [root@h101 ~]# ps faux | grep jenkins root 4064 0.0 0.0 103256 828 pts/0 S+ 20:32 0:00 | \_ grep jenkins jenkins 39
运行Consul代理 Consul 是典型的C/S架构,可以运行在 服务模式 或 客户模式 每一个数据中心必须有至少一个服务节点,3到5个服务节点最好,非常不建议只运行一个服务节点,因为在节点失效的情况下数据有极大的丢失风险