info

mysql笔记

百般思念 提交于 2020-02-19 05:05:04
目录 1.开始创建数据库、创建数据库中的表 2.关于表的一些操作 3.主键/外键/唯一约束/检查约束/默认值约束/非空约束 4.select 1).select中的 DISTINCT去重 以及选取指定行数 LIMIT 2).select中 ORDER BY 3).WHERE 子句来指定查询条件 4).INNER JOIN 子句来指定查询条件 5).OUTER JOIN 6).子查询 7).GROUP BY 8).HAVING 9).正则表达式REGEXP 5.INSERT 1.向表中全部字段插入值 2.向指定字段插入值 3.使用 INSERT INTO…FROM 语句复制表数据 6.UPDATE语句来修改、DELETE语句删除 1.修改/删除表中的数据 2.根据条件/删除修改 7.视图 1).视图的创建与查询 2).修改视图 3).删除视图 8.创建函数 1).创建并使用自定义函数 2).修改自定义函数 3).删除自定义函数 9.常用运算符 1.开始创建数据库、创建数据库中的表 #连接数据库 mysql -u root -p #创建数据库并设置指定字符集和校对规则 create database < database_name > if not exist < database_name > DEFAULT CHARACTER SET utf8 DEFAULT COLLATE

RobotFramework自动化测试框架-移动手机自动化测试AppiumLibrary介绍

别等时光非礼了梦想. 提交于 2020-02-18 21:00:04
在使用AppiumLibrary库时,需要预先安装好Appium自动化工具,Appium官网地址为:http://appium.io/ Appium的GitHub地址为: https://github.com/appium Appium的下载地址: http://appium.io/downloads.html ,可以下载最新的安装版本和响应的Library库 Appium的相关介绍文档:http://appium.io/slate/cn/master/ Appium的RobotFramework-appiumlibrary地址:https://github.com/serhatbolsu/robotframework-appiumlibrary,library的安装方式,可以通过pip在线安装,也可以使用下载好library库后,采用python setup.py install的方式来进行安装, 1) 使用pip安装 pip install robotframework-appiumlibrary 2) 使用setup.py安装 git clone https://github.com/jollychang/robotframework-appiumlibrary.git cd robotframework-appiumlibrary python setup.py

python日志输出的内容修改为json格式

心已入冬 提交于 2020-02-18 19:21:46
业务中要求,python项目的日志输出为json串,同时包括异常;经过查看python logging相关的源码,发现还不能完全的兼容;比如异常的源码那里: class Formatter(object): """省略""" def format(self, record): record.message = record.getMessage() if self.usesTime(): record.asctime = self.formatTime(record, self.datefmt) s = self.formatMessage(record) if record.exc_info: # Cache the traceback text to avoid converting it multiple times # (it's constant anyway) if not record.exc_text: record.exc_text = self.formatException(record.exc_info) if record.exc_text: if s[-1:] != "\n": s = s + "\n" s = s + record.exc_text if record.stack_info: if s[-1:] != "\n": s = s + "\n

10.17(2)

不问归期 提交于 2020-02-18 08:29:27
import reimport urllibdef get_content(url): '''doc.''' html = urllib.urlopen(url) content = html.read() html.close() return contentdef get_image(info): '''doc.''' regex = r'class="BDE_Image" src="(.+?\.jpg)"' pat = re.compile(regex) image_code = re.findall(pat,info) i = 0 for image_url in image_code: print image_url urllib.urlretrieve(image_url,'%s.jpg'%i) i += 1 return image_codeurl = 'https://tieba.baidu.com/p/27726566630'info = get_content(url)# print infoprint get_image(info) 来源: https://www.cnblogs.com/NightShade-Cwh/p/7681292.html

Object.wait() Object.notify() Object.notifyAll()使用总结

左心房为你撑大大i 提交于 2020-02-18 06:08:08
1. 文档解释 /** * Wakes up a single thread that is waiting on this object's * monitor. If any threads are waiting on this object, one of them * is chosen to be awakened. The choice is arbitrary and occurs at * the discretion of the implementation. A thread waits on an object's * monitor by calling one of the wait methods */ public final native void notify ( ) ; /** * Wakes up all threads that are waiting on this object's monitor. A * thread waits on an object's monitor by calling one of the * wait methods. */ public final native void notifyAll ( ) ; /** * Causes the current thread to wait until

readbooks网页

元气小坏坏 提交于 2020-02-18 00:43:20
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Document</title> 6 <style type="text/css" media="screen"> 7 body,p,h1,h2,h3,dl,dd{ 8 margin: 0; 9 font-size: 100%; 10 font-weight: normal; 11 color: #3a4752; 12 13 } 14 body{ 15 background-color: #f2f5f7; 16 } 17 ul{ 18 margin: 0; 19 padding: 0; 20 } 21 li{ 22 list-style:none; 23 } 24 a{ 25 26 text-decoration: none; 27 color: #3a4752; 28 } 29 i{ 30 font-style: normal; 31 } 32 header{ 33 width: 100%; 34 background: #fff; 35 } 36 #header{ 37 display: -webkit-flex; 38 display: flex; 39 width: 1350px; 40 height: 78px;

Appium+Python3+iOS真机环境搭建

两盒软妹~` 提交于 2020-02-17 20:44:55
Appium 是一个自动化测试开源工具,支持 iOS 平台和 Android 平台上的原生应用,web 应用和混合应用。 本次环境配置相关: macOS:10.13.4 Appium-desktop:1.6.1 Xcode:9.3.1 一、环境配置 1、 安装homebrew: $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2、 安装libimobiledevice: $ brew install libimobiledevice --HEAD 3、 安装carthage: $ brew install carthage 4、安装node: $ brew install node 5、安装npm: $ brew install npm 6、安装ios-deploy: $ npm install -g ios-deploy 8、安装xcpretty: $ gem install xcpretty 9、安装appium,appium-doctor 进入官网,下载 Appium-1.6.1.dmg ,安装即可。 当然你可以使用命令:npm install -g appium来安装appium,但是后面就会各种报错!! $ npm

Ceph 集群操作和管理(五)

本小妞迷上赌 提交于 2020-02-17 16:51:27
一、Ceph 服务管理 1.1 启用和停止守护进程 # 启动当前节点的所有Ceph服务 [root@ceph01 ~]# systemctl start ceph.target # 停止当前节点的所有Ceph服务 [root@ceph01 ~]# systemctl stop ceph\*.service ceph\*.target # 对远端节点进行操作 -H 192.168.5.93 [root@ceph01 ~]# systemctl -H ceph02 start ceph.target 1.2 查看相关服务 systemctl status ceph-osd.target systemctl status ceph-osd@1.service systemctl status ceph-mds.target systemctl status ceph-mon.target systemctl status ceph-radosgw.target 二、集群扩展 从根本上说,Ceph一直致力于成长从几个节点到几百个,它应该在没有停机的情况下即时扩展。 2.1 节点信息及系统初始化(请按第一节进行初始化配置) # ceph-deploy节点设置免密登录[cephadmin@ceph01 ~]$ ssh-copy-id cephadmin@ceph04# 以前为新加节点配置

JDK引发的bug(sun.awt.FontConfiguration.getVersion NullPointerException)

Deadly 提交于 2020-02-17 14:39:03
1.背景阐述 项目开发中有个数据导出的功能,采用的是异步队列来处理的。 开发使用的jdk为 本地测试完全没有问题,部署到线上,一直会报下面日志的错误信息。 [nio-8080-exec-6] c.c.t.service.impl.TemplateServiceImpl : >>>开始向【导出数据队列】投递消息<<< 2020-02-11 07:29:40.592 - INFO 1 --- [nio-8080-exec-6] c.c.t.service.impl.TemplateServiceImpl : >>>向【导出数据队列】投递消息完成<<< 2020-02-11 07:29:40.619 - INFO 1 --- [cTaskExecutor-1] c.c.t.rabbitmq.ExportDataReceiver : >>>>>成功接收导出数据的消息,消息参数为:{"formId":1219112740443000874,"process":{"creator":1189805389533810109,"deleted":false,"description":"开始处理","editor":1189805389533810109,"id":1227132577916260352,"state":"处理中","tenantId":1197018942024060928},

11 个 Linux 命令

走远了吗. 提交于 2020-02-17 09:00:13
本文主要挑选出读者有必要首先学习的 11 个 Linux 命令,如果不熟悉的读者可以在虚拟机或云服务器上实操下,对于开发人员来说,能熟练掌握 Linux 做一些基本的操作是必要的! 事不宜迟,这里有 11 个 Linux 命令行技巧,可以使你的生活工作更轻松。 1 | 0 1. grep $ grep "some string" file grep 命令在每个文件中搜索,它还会寻找由换行符分隔的模式,并且 grep 会打印与模式匹配的每一行。 使用 grep 命令查找文件中的所有 React 关键字: 该 -i 选项使我们能够在给定文件中不区分大小写地搜索字符串。它匹配 "REACT"、"REact" 和 "react" 之类的词。 $ grep -i "REact" file 我们可以使用 -c (count)标志找到与给定字符串/模式匹配的行数。 $ grep -c "react" index.js 这是在网上找到的关于 grep 命令有趣且有教育意义的漫画。 2 | 0 2. ls $ ls ls 列出当前活动路径中的文件和目录。如果路径名是文件,ls 则根据请求的选项在文件上显示信息。如果路径名是目录,则 ls 显示有关文件和其中的子目录的信息。 使用 ls 命令显示当前目录中的所有文件: 你可能已经注意到文件显示为灰色,而文件夹为蓝色。这是为了帮助我们区分文件夹和文件。