11 2020 档案

摘要:https://github.com/datacharmer/test_db 阅读全文
posted @ 2020-11-30 18:07 ascertain 阅读(653) 评论(0) 推荐(0) 编辑
摘要:httpd 2.4.9 + mysql-5.5.33 + php-5.4.26编译安装过程: 一、编译安装apache 1、解决依赖关系 httpd-2.4.9需要较新版本的apr和apr-util,因此需要事先对其进行升级。升级方式有两种,一种是通过源代码编译安装,一种是直接升级rpm包。这里选择 阅读全文
posted @ 2020-11-29 12:57 ascertain 阅读(295) 评论(0) 推荐(0) 编辑
摘要:class Genre: def __init__(self,title,mold): self.title=title self.mold=mold def __get__(self,instance,owner): print('__get__',self,instance,owner) ret 阅读全文
posted @ 2020-11-28 19:55 ascertain 阅读(98) 评论(0) 推荐(0) 编辑
摘要:#/bin/env sh #set -e # errexit #cwRsyncServer <=> case sensitive(module) #cwRsyncClinet <=> case insensitive export LANG=zh_CN.utf8 ml_slb=lb-uf611bih 阅读全文
posted @ 2020-11-27 17:09 ascertain 阅读(108) 评论(0) 推荐(0) 编辑
摘要:echo "which package to retroversio?:disabled" #ssh administrator@172.16.20.106 "ssh administrator@172.16.20.106 C:\\Progra~1\\git\\bin\\bash -c /c/scr 阅读全文
posted @ 2020-11-27 17:00 ascertain 阅读(111) 评论(0) 推荐(0) 编辑
摘要:Active Choice plug-in会生成三种参数类型: 1,Active Choices Parameter(主动选择参数) Active Choices参数使用Groovy脚本或Scriptler目录中的脚本动态生成构建参数的值选项列表。 2,Active Choices Reactive 阅读全文
posted @ 2020-11-27 16:53 ascertain 阅读(6464) 评论(0) 推荐(1) 编辑
摘要:只列出目录: ll -F | grep '/$' ls -F 选项append indicator ( one of */=>@| ) to entries,目录会被追加 "/" 后缀* 是可执行文件suffix= socket文件| FIFO管道文件> 进程间通信设备 ll | grep '^d' 阅读全文
posted @ 2020-11-27 16:01 ascertain 阅读(102) 评论(0) 推荐(0) 编辑
摘要:安装32位rar: 下载至/usr/src目录 wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz -directory-prefix=/usr/src 解压 tar xzvf rarlinux-3.8.0.tar.gz 其已经是编译完成的包,M 阅读全文
posted @ 2020-11-27 14:18 ascertain 阅读(467) 评论(0) 推荐(0) 编辑
摘要:7z的选项设计实在让人无语,只能说太难用 Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...] Command: a 压缩 7z a bb.7z /etc/security # 带security目录 7z a bb 阅读全文
posted @ 2020-11-25 19:59 ascertain 阅读(689) 评论(0) 推荐(0) 编辑
摘要:shell没有专门的时间转换函数,更没有oop之类的类方法,不过操作时间还是很简单的 date:date 直接后跟格式化字符串默认显示当前时区的当前时间 %a abbreviated weekday 简写的weekday %A full weekday name 全写weekday %b abbre 阅读全文
posted @ 2020-11-25 14:40 ascertain 阅读(474) 评论(0) 推荐(0) 编辑
摘要:Cannot assign requested addressclient频繁连接server,每次都在很短时间内结束,产生大量TIME_WAIT,导致端口耗尽,新的连接无法绑定端口,出现 "Cannot assign requested address"解决方案 sysctl --write ne 阅读全文
posted @ 2020-11-25 11:25 ascertain 阅读(199) 评论(0) 推荐(0) 编辑
摘要:首先,Linux比其它操作系统更稳定更安全。理论上Linux是有可能被病毒侵害的。但实际上 Linux机器几乎不可能遭受病毒的攻击。所以我这里的问题是为什么要为Linux准备防病毒软件,为了更好理解,我准备了以下理由: Linux平台安装杀毒软件的原因: 从Linux平台扫描Windows驱动 通过 阅读全文
posted @ 2020-11-25 09:53 ascertain 阅读(4679) 评论(0) 推荐(0) 编辑
摘要:echo "background-image: url(/media/images/index/im2.jpg);"|grep -oP '(?<=url\()[^)]+' 采用负向断言 echo "background-image: url(/media/images/index/im2.jpg); 阅读全文
posted @ 2020-11-24 15:32 ascertain 阅读(74) 评论(0) 推荐(0) 编辑
摘要:开发的时候碰到如下的错误(PHP-FPM+apache),所以想好好理解下Segmentation fault. 参考了文章 Segmentation fault到底是何方妖孽 维基百科的解释如下: 存储器区块错误(英语:Segmentation fault,经常被缩写为segfault),又译为存 阅读全文
posted @ 2020-11-23 19:20 ascertain 阅读(3614) 评论(0) 推荐(0) 编辑
摘要:报错: 置foreign_key_checks变量为0 set @@session.foreign_key_checks=0 select @@session.foreign_key_checks; 比对两张表 show full columns from dept_emp; show full c 阅读全文
posted @ 2020-11-21 14:14 ascertain 阅读(385) 评论(0) 推荐(0) 编辑
摘要:准备 首先在GitHub上下载DokanSetup-1.0.5.1000和WinSSHFS-1.6.1.13-devel注意:Dokan不能使用最新的版本,得使用1.0.5版本。要不win-sshfs会报Dokan版本错误的问题。(win10版本) 安装 按照提示,安装Dokan和win-sshfs 阅读全文
posted @ 2020-11-19 18:05 ascertain 阅读(970) 评论(0) 推荐(0) 编辑
摘要:开始会有三个选项 选择Basic Parameter TypesExtended choice parameters,扩展选项插件 勾选Quote Values后,变量是有双引号的Multi Select: Radio Buttons:相当于单选,但是比Single Select直观 Check B 阅读全文
posted @ 2020-11-16 16:02 ascertain 阅读(367) 评论(0) 推荐(0) 编辑
摘要:试了Windows & Linux 全部失败,按照网上的教程:1.更改Jenkins根目录的hudson.model.UpdateCenter.xml <?xml version='1.1' encoding='UTF-8'?> <sites> <site> <id>default</id> <!- 阅读全文
posted @ 2020-11-16 15:26 ascertain 阅读(91) 评论(0) 推荐(0) 编辑
摘要:class B: def __setattr__(self,key,value): pass raise NotImplementedError 类方法__setattr__覆盖父类方法后,如果为pass, raise NotImplementedError之类的,则实例不能设置任何属性 pass不 阅读全文
posted @ 2020-11-14 13:55 ascertain 阅读(175) 评论(0) 推荐(0) 编辑
摘要:Linux: 文件分割 split: Usage: split [options] [Input] [Prefix] 默认prefix为x,需要指定Prefix来改写前缀 --suffix-length=N 后缀长度,默认为2 --additional-suffix=SUFFIX 每个子文件最后附加 阅读全文
posted @ 2020-11-12 19:11 ascertain 阅读(322) 评论(0) 推荐(0) 编辑
摘要:import logging,traceback,sys logging.basicConfig(level=logging.WARNING,filename='c:/uiop.txt',filemode='a', format='%(lineno)s %(pathname)s %(asctime) 阅读全文
posted @ 2020-11-12 17:04 ascertain 阅读(101) 评论(0) 推荐(0) 编辑
摘要:判断list包含关系 a = [1, 2, 3, 4, 5] b = [3, 4, 5, 3] if [v for v in b if v not in a]: print('a doesn\'t comprise b') else: print('a comprise b') 采用列表解析式 a 阅读全文
posted @ 2020-11-11 14:54 ascertain 阅读(75) 评论(0) 推荐(0) 编辑
摘要:内层函数没有引用外层函数局部变量,dir()是不会显示的 def b(a): def p(): print('function p dir ->',dir()) p() print('function b dir ->',dir()) b(2) def b(a): def p(): nonlocal 阅读全文
posted @ 2020-11-11 14:50 ascertain 阅读(152) 评论(0) 推荐(0) 编辑
摘要:只加强一次功能的装饰器: print('/\\') print('/\ta') def b(fn): def wrapper(): print('bbbbb') return fn return wrapper() @b def p(): print(111111111) print(p) p() 阅读全文
posted @ 2020-11-11 14:38 ascertain 阅读(74) 评论(0) 推荐(0) 编辑
摘要:首选要查找占用大量磁盘空间的文件,基本是长久不清理的日志文件 du --exclude=/proc --total -sh /* | sort -hr find / ! -path '/proc*' -size +200M -print 通过上面两台命令可以快速找出大文件,但是不能贸然删除日志文件, 阅读全文
posted @ 2020-11-10 11:34 ascertain 阅读(227) 评论(0) 推荐(0) 编辑
摘要:当前用户拿到所有权 takeown /f 'c:\nm' /r /d y 修改当前用户对文件夹的访问权限,确保有权删除 cacls 'c:\nm' /t /e /g yangche\zhanggw:f 删除目录 rd /s /q 'c:\nm' 阅读全文
posted @ 2020-11-09 21:12 ascertain 阅读(156) 评论(0) 推荐(0) 编辑
摘要:Cygwin是Windows下模拟Linux环境的软件,最初由Cygnus Solutions研发,通过重新编译将Linux上的软件移植到Windows 官网: http://www.cygwin.com/ 1.安装Cygwin需要到官网下载安装包。在该网站首页的Current Cygwin DLL 阅读全文
posted @ 2020-11-09 20:21 ascertain 阅读(731) 评论(0) 推荐(0) 编辑
摘要:mysql中utf8和utf8mb4区别 MySQL在5.5.3之后增加了这个utf8mb4的编码,mb4就是most bytes 4的意思,专门用来兼容四字节的unicode。好在utf8mb4是utf8的超集,除了将编码改为utf8mb4外不需要做其他转换。当然,为了节省空间,一般情况下使用ut 阅读全文
posted @ 2020-11-09 19:10 ascertain 阅读(110) 评论(0) 推荐(0) 编辑
摘要:选用场景: 字段平均长度与极值相差小,选用char,反之,选用varchar 字段需要频繁更新,考虑char,char为定长,不容易产生碎片 字段存储信息很短,考虑char,varchar会占用额外空间保存长度信息 定长字段优选char 阅读全文
posted @ 2020-11-09 16:47 ascertain 阅读(84) 评论(0) 推荐(0) 编辑
摘要:comment查看comment show create table 'table_name'; show full columns from 'table_name'; 修改comment alter table 'table_name' modify column 'column_name' ' 阅读全文
posted @ 2020-11-09 09:34 ascertain 阅读(54) 评论(0) 推荐(0) 编辑
摘要:应用程序端: 应用程序应该是一个可调用对象 Python中应该是函数,类,实现了call方法的类的实例 可调用对象应该接收两个参数 函数实现: def application(environ,start_response): pass 类实现 class Application: def __ini 阅读全文
posted @ 2020-11-09 00:42 ascertain 阅读(151) 评论(0) 推荐(0) 编辑
摘要:def b(fn): print(111111111) def wrapper(*args,**kwargs): print(22222222222222) ret=fn(*args,**kwargs) return ret return wrapper def p(fn): print('x'*6 阅读全文
posted @ 2020-11-08 17:13 ascertain 阅读(88) 评论(0) 推荐(0) 编辑
摘要:事件循环是asyncio提供的核心运行机制 column column asyncio.get_event_loop() 返回一个事件循环对象,时asyncio.BaseEventLoop的实例 AbstractEventLoop.stop() 停止运行事件循环 AbstractEventLoop. 阅读全文
posted @ 2020-11-07 13:52 ascertain 阅读(142) 评论(0) 推荐(0) 编辑
摘要:import datetime,threading def aa(v, a, b): print(v,a,b) timer=threading.Timer(interval=2,function=aa,args=(2,),kwargs={'a':'22222','b':'3333333333'}) 阅读全文
posted @ 2020-11-06 16:39 ascertain 阅读(385) 评论(0) 推荐(0) 编辑
摘要:import selectors,socket,threading selector=selectors.DefaultSelector() def accept(socket:socket.socket): conn,client=socket.accept() print('accept new 阅读全文
posted @ 2020-11-06 00:45 ascertain 阅读(160) 评论(0) 推荐(0) 编辑
摘要:datetime.datetime & datetime.time 两个类构造时可传tzinfo参数, 都会把tzinfo绑定到self._tzinfo属性上, 可通过tzinfo属性访问 __str__依次调用一下方法 class tzinfo: """Abstract base class fo 阅读全文
posted @ 2020-11-05 16:45 ascertain 阅读(766) 评论(0) 推荐(0) 编辑
摘要:简单说明HTML <table> 标签 定义和用法 <table> 标签定义 HTML 表格。 简单的 HTML 表格由 table 元素以及一个或多个 tr、th 或 td 元素组成。 border 定义表格 <tr> 元素定义表格行,<th>元素定义表头,<td> 元素定义表格单元。 <capt 阅读全文
posted @ 2020-11-04 22:50 ascertain 阅读(1228) 评论(0) 推荐(0) 编辑
摘要:当前数据库: 内置函数database() select database(); show tables; status \s 当前用户: select user(); select current_user; 阅读全文
posted @ 2020-11-02 19:26 ascertain 阅读(1523) 评论(0) 推荐(0) 编辑
摘要:/y overwrite existing destination files without prompting 目标存在此文件时,取消默认提示是否覆盖 /s 递归copy,默认只copy src下的文件 /i dst目录不存在时,创建dst目录,否则会提示如下 /e 默认不会copy空目录,/e 阅读全文
posted @ 2020-11-02 15:18 ascertain 阅读(425) 评论(0) 推荐(0) 编辑
摘要:#!/bin/sh echo "Num of arguments: $#" echo "Current PID: $$" echo "BASHPID: $BASHPID" sleep 10 & echo "The last deforegroud PID: $!" echo "The current 阅读全文
posted @ 2020-11-02 11:38 ascertain 阅读(73) 评论(0) 推荐(0) 编辑
摘要:+ +| BaseServer |+ + | v+ + + +| TCPServer | >| UnixStreamServer |+ + + + | v+ + + +| UDPServer | >| UnixDatagramServer |+ + + +socketserver有四个同步类: TC 阅读全文
posted @ 2020-11-01 17:54 ascertain 阅读(153) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示