floor(1.9); --mod select mod(3,4); --rand select rand(); --round select round(2.345,2); 案例练习 通过数据库的函数
MySQL数据库基础练习系列目标 很多学生或者说是初学者在学习完成数据库的基础增删改查后就自认为在数据库这里就很熟悉了,但是不接触项目根本部知道需求,我这里准备了50个项目的基本需求来让大家来熟练各类项目的列信息 数据库环境 MySQL版本:5.7.31-log 数据库字符集,所有数据库通用字符集与排序规则,支持中文数据。 这三个范式是逐步细化的,每一个范式都是在前一个范式的基础上建立的。 解释: 第二范式建立在第一范式的基础上,主要关注于主键与非主键列之间的依赖关系。 在第二范式中,一个表只能保存一种数据,不可以把多种数据保存在同一张数据库表中。 解释: 第三范式是在第二范式的基础上进一步细化的。它主要关注于消除传递依赖,即非主键列不应该依赖于主键的某一部分,而应该直接依赖于整个主键。
这是由于没指定数据源产生的报错 虽然没有连接任何数据库,但从操作体验上来看,与直接操作一个mysql没有什么区别 Tip: 为什么用户名和密码是 test 呢,因为 conf/server.xml 有定义
安装 [root@h102 nginx-1.9.5]# make install make -f objs/Makefile install make[1]: Entering directory `/usr/local/src/nginx-1.9.5' test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx' test -d '/usr/local/nginx/sbin' || mkdir -p '/usr/local/nginx/sbin'
root@h101 memcached-1.4.24# ps fuax | grep mem
drwx------ 2 root root 61 Mar 21 22:57 doc drwx------ 2 root root 6 Mar 21 22:57 logs drwx------ 7
# systemctl get-default graphical.target [root@docker ~]# runlevel N 5 [root@docker ~]# Tip: Centos7
为了避免只能使用sudo来调用Docker,在软件安装过程中自动创建了docker组,并且在docker进程启动时赋权给了这个组的用户以docker socket的读写权限,所以只用将管理用户加入到docker组,就可以对docker进行使用了
完全删除某空间下的文件 [root@h101 copy]# ../qshell_linux_amd64 listbucket qiniucloud-goods list.video [root@h101 copy]# ../qshell_linux_amd64 batchdelete qiniucloud-goods list.video <DANGER> Input hdbiha to confirm operation: hdbiha All deleted! [root@h101
导入导出数据库 导出数据库 可以使用这种方式来将sqlite数据转化为SQL [root@h102 bin]# . hello'); INSERT INTO "test" VALUES(12,'12'); INSERT INTO "test" VALUES(13,'www'); COMMIT; sqlite> 导入数据库
logstash的配置中加入了 stdout {codec=>rubydebug} 是为了方便在终端监视信息(在实际应用中完全没有必要),经过一番刷屏,最终停了下来
安装snort-2.9.7.6 [root@h101 snort]# tar -zxvf snort-2.9.7.6.tar.gz snort-2.9.7.6/ snort-2.9.7.6/depcomp snort-2.9.7.6/tools/ snort-2.9.7.6/tools/u2streamer/ snort-2.9.7.6/tools/u2streamer/sf_error.h snort-2.9.7.6/tools/u2streamer/sf_error.c snort-2.9.7.6/t
注意到 {listeners,[{clustering,25672,”::”},{amqp,5672,”::”}]} 变成了 {listeners,[]} , 内存磁盘还有文件句柄部分也消失了
初始化 slots [root@h102 codis]# bin/codis-config slot help usage: codis-config slot init [-f] codis-config slot info <slot_id> codis-config slot set <slot_id> <group_id> <status> codis-config slot range-set <slot_from> <slot_to> <group_id> <status> codi
127.0.0.1:2379 > Accept: */* > < HTTP/1.1 200 OK < Content-Type: application/json < X-Etcd-Cluster-Id: 7e27652122e8b2ae
; -- end job file -- Here we have no global section, as we only have one job defined anyway. We want to use async io here, with a depth of4foreach file. We also increased the buffer size used to32KB and define numjobs to4to fork 4 identical jobs. The result is4 processes each randomly writing to their own 64MB file. Instead ofusing the above job file, you could have given the parameters on the command line. For this case, you would specify: $ fio --name=random-writers --ioengine=libaio --iodepth=4 --rw=randwrite --bs=32k --direct=0 --size=64m --numjobs=4When fio is utilized as a basis ofany reasonably large test suite, it might be desirable toshare a setof standardized settings across multiple job files. Instead of copy/pasting such settings, anysection may pull in an external .fio file with'includefilename' directive, asin the following example: ;-- start job file including.fio -- [global] filename=/tmp/test filesize=1m include glob-include.fio [test] rw=randread bs=4k time_based=1 runtime=10 include test-include.fio ; -- end job file including.fio -- ; -- start job file glob-include.fio -- thread=1 group_reporting=1 ; -- end job file glob-include.fio -- ; -- start job file test-include.fio -- ioengine=libaio iodepth=4 ; -- end job file test-include.fio -- Settings pulled into a section apply to that section only (except global section). Include directives may be nested in that any included file may contain further include directive(s). Include files may not contain [] sections. 4.1 Environment variables ------------------------- fio also supports environment variable expansion in job files. Any sub-string of the form "${VARNAME}" as part of an option value (in other words, on the right of the `='),willbeexpandedtothevalueoftheenvironmentvariablecalledVARNAME.Ifnosuchenvironmentvariableisdefined,orVARNAMEistheemptystring,theemptystringwillbesubstituted.Asanexample,let's look at a sample fio invocation and job file: $ SIZE=64m NUMJOBS=4 fio jobfile.fio ; -- start job file -- [random-writers] rw=randwr
运行 准备配置文件 源码包中有一些示例,可以作为配置模板 [root@h102 ~]# ll /usr/local/src/haproxy/haproxy-1.6.3/examples/*.cfg -rw-rw-r-- 1 root root 3740 Dec 27 22:04 /usr/local/src/haproxy/haproxy-1.6.3/examples/acl-content-sw.cfg -rw-rw-r-- 1 root root 3042 Dec 27 22:04 /usr/local
ls2 ls2 就是携带了stat信息的ls [zk: localhost:2181(CONNECTED) 60] ls /def [] [zk: localhost:2181(CONNECTED) 61] ls2 /def [] cZxid = 0xe ctime = Thu Dec 03 14:57:27 CST 2015 mZxid = 0xf mtime = Thu Dec 03 15:42:21 CST 2015 pZxid = 0xe cversion = 0 dataVersion = 1 a
基本的检索方法,时间范围的设定,自动刷新周期的设定,展示结果的分享,结果的保存,过滤条件的设定,jason定义条件,文档的内容查看,字段的统计设定,
这些模块都很实用, ngx_http_upstream_check_module 可以检查后端服务器的状态