摘要: 一、执行命令及一些小技巧 命令行格式:命令 -选项 参数 例:以长模式显示:ls -l /home/ 以长模式显示所有信息:ls -al /home/ 显示别名:alias 计算器:bc 默认保留整数,如果想保留小数位数,输入bc回车后 再输入scale=4保留小数点后4位有效数字 显示哪个用户登录 阅读全文
posted @ 2018-01-26 13:19 hhjwqh 阅读(366) 评论(0) 推荐(0)
摘要: vim /etc/hosts; //修改hosts文件 添加如下两行内容 115.28.17.191 baijunyao.com 115.28.17.191 anlianma.com 修改httpd.conf文件 [root@iZ28qa8jt4uZ /]# vim /etc/httpd/conf/ 阅读全文
posted @ 2018-01-25 20:13 hhjwqh 阅读(135) 评论(0) 推荐(0)
摘要: Apache的主配置文件:/etc/httpd/conf/httpd.conf默认站点主目录:/var/www/html/Apache服务器的配置信息全部存储在主配置文件/etc/httpd/conf/httpd.conf中,这个文件中的内容非常多,用wc命令统计一共有1009行,其中大部分是以#开 阅读全文
posted @ 2018-01-25 19:51 hhjwqh 阅读(274) 评论(0) 推荐(0)
摘要: 防火墙开启 [root@hhj ~]# service iptables start 添加规则20主动端口,21被动端口 [root@hhj ~]# iptables -I INPUT 1 -p tcp --dport 20:21 -j ACCEPT 保存配置 [root@hhj ~]# servi 阅读全文
posted @ 2018-01-25 19:14 hhjwqh 阅读(310) 评论(0) 推荐(0)
摘要: # 匿名用户配置 anonymous_enable=YES # 是否允许匿名ftp,如否则选择NO anon_upload_enable=YES # 匿名用户是否能上传 anon_mkdir_write_enable=YES # 匿名用户是否能创建目录 anon_other_write_enable 阅读全文
posted @ 2018-01-24 14:06 hhjwqh 阅读(187) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018-01-22 22:09 # @Author : hhj# @Site : # @File : def cash_money(amount): while amount>0 amo 阅读全文
posted @ 2018-01-22 22:37 hhjwqh 阅读(113) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018-01-22 22:09 # @Author : hhj# @Site : # @File : yield单线程异步.pyimport timedef consumer(name) 阅读全文
posted @ 2018-01-22 22:29 hhjwqh 阅读(143) 评论(0) 推荐(0)
摘要: 内置函数 一 详细见python文档,猛击这里 文件操作 操作文件时,一般需要经历如下步骤: 打开文件操作文件 一、打开文件 1 文件句柄 = file('文件路径', '模式') 1 文件句柄 = file('文件路径', '模式') 1 文件句柄 = file('文件路径', '模式') 1 文 阅读全文
posted @ 2018-01-21 16:02 hhjwqh 阅读(165) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python# -*- coding: utf-8 -*-# @Time : 2018-01-15 20:40# @Author : hhj# @Site :# import collections#import smtplibfrom email.mime.text 阅读全文
posted @ 2018-01-21 09:35 hhjwqh 阅读(132) 评论(0) 推荐(0)
摘要: python 发送邮件实例 文件形式的邮件 [python] view plaincopy #!/usr/bin/env python3 #coding: utf-8 import smtplib from email.mime.text import MIMEText from email.hea 阅读全文
posted @ 2018-01-21 00:46 hhjwqh 阅读(227) 评论(0) 推荐(0)
摘要: 深浅拷贝 对于 数字 和 字符串 而言,赋值、浅拷贝和深拷贝无意义,因为其永远指向同一个内存地址。 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 import copy # ######### 数字、字符串 ######### n1 = 123 # n1 = "i am 阅读全文
posted @ 2018-01-19 21:04 hhjwqh 阅读(195) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018-01-15 21:52 # @Author : hhj# @Site : # @File : set集合.pyt1=set()sl=['a','b','c','d','e','a 阅读全文
posted @ 2018-01-15 23:18 hhjwqh 阅读(187) 评论(0) 推荐(0)
摘要: str.capitalize() --> String 返回字符串,其首字母大写,其余部分小写 str.casefold() --> String 字符串转换成小写,用于不区分大小写的字符串比较 str.center(width[, fillchar]) -->String 指定长度(此处是长度并不 阅读全文
posted @ 2018-01-15 22:26 hhjwqh 阅读(450) 评论(0) 推荐(0)
摘要: 我们这里介绍两个特殊的表,Inserted表和Deleted表。此二表仅仅在触发器运行时存在。你可以使用该两个表来精确地确定触发触发器的动作对数据表所做的修改。比如,通过检查Deleted表,你可以确定那些记录由某一动作删除。考虑下面的例子: CREATE TRIGGER tr_webusers_d 阅读全文
posted @ 2018-01-15 00:18 hhjwqh 阅读(3283) 评论(0) 推荐(0)
摘要: CREATE procedure ermbackas Declare @strPsw varchar(50) Declare @strUsr varchar(50) Declare @strCmdShell varchar(300) Declare @strDataBaseName varchar( 阅读全文
posted @ 2018-01-15 00:15 hhjwqh 阅读(227) 评论(0) 推荐(0)
摘要: 以下是Mysql数据库服务器配置文件my.ini的详细配置。应用场合是InnoDB引擎,2核CPU, 32位SUSE。 [client] #password = your_password port = 3306 socket = /tmp/mysql.sock # Here follows ent 阅读全文
posted @ 2018-01-15 00:12 hhjwqh 阅读(1949) 评论(0) 推荐(0)
摘要: sybase 系统表集合 systypes 一行纪录了每一个由系统提供的和用户定义的数据类型 sysusers 一行记录了一行记录了一个数据库的合法用户 sysconfigures 一行纪录了用户可以设置的配置参数 syscurconfigs 有关SQL Server当前正使用的配置参数情况 sys 阅读全文
posted @ 2018-01-15 00:10 hhjwqh 阅读(502) 评论(0) 推荐(0)