Python的WEB框架有Django、Tornado、Flask 等多种,Django相较与其他WEB框架其优势为:大而全,框架本身集成了ORM、模型绑定、模板引擎、缓存、Session等诸多功能。 安装 在windows终端下输入 pip3 install Django=1.10 基本配置 1、 ...
分类:
其他好文 时间:
2016-09-03 08:35:58
阅读次数:
138
EX1: 乔伊80%肯定他把失踪的钥匙放在了他外套两个口袋中的一个。他40%确定放在左口袋,40%确定放在右口袋。如果检查了左口袋发现没有找到钥匙,那么钥匙在右口袋的条件概率是多少? 分析:很基本的条件概率的题目,解决的关键就是找到哪个事件是我们要求解的事件的条件事件。 解决条件概率问题不一定必须套 ...
分类:
其他好文 时间:
2016-09-03 08:34:08
阅读次数:
196
Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati ...
分类:
其他好文 时间:
2016-09-03 08:35:21
阅读次数:
140
第五周作业1、显示当前系统上root、fedora或user1用户的默认shell;[root@STCO6~]#grep-E‘^(root|fedora|user1)\>‘/etc/passwd|cut-d:-f1,7
root:/bin/bash
fedora:/bin/bash
user1:/bin/bash2、找出/etc/rc.d/init.d/functions文件中某单词后面跟一组小括号的行,形如:hel..
分类:
其他好文 时间:
2016-09-03 07:31:17
阅读次数:
158
一、bond的工作原理所谓的bond就是将两块或两块以上网卡绑定同一个IP地址对外提供服务,从而实现负载均衡高可用。当然,直接给两块网卡设置同一IP地址是不可能的。通过bonding,虚拟一块网卡对外提供连接,物理网卡的被修改为相同的MAC地址。二、bond工作模式分类1)Mode0(bala..
分类:
其他好文 时间:
2016-09-03 07:30:58
阅读次数:
242
crontab-e编辑添加任务格式:12345echoaaaaaaa第1列分钟1~59第2列小时1~23(0表示子夜)第3列日1~31第4列月1~12第5列星期0~6(0表示星期天)第6列要运行的命令crontab-l列出当前用户的任务ll/var/spool/cron/列出所有有任务的用户,列出的便是有任务的用户crontab-uroot列..
分类:
其他好文 时间:
2016-09-03 07:31:49
阅读次数:
225
【一个“无能”的IT人的内心忧虑】最近因为技术人领导人要不要代码的问题,在圈子里面炒得很热,相应的帖子也是一波接一波,也就被强制的接受了很多关于,领导人要不要代码的理念。其中有个大家都会提到的论调是:技术就是为业务服务的。还有很多其他的理论,但对于我而言,似..
分类:
其他好文 时间:
2016-09-03 07:32:48
阅读次数:
181
题目描述:对于一个字符串,请设计一个高效算法,找到字符串的最长无重复字符的子串长度。给定一个字符串A及它的长度n,请返回它的最长无重复字符子串长度。保证A中字符全部为小写英文字符,且长度小于等于500。测试样例:"abcdbefgdchi",12返回:8这个题我研究了好半天,确实不..
分类:
其他好文 时间:
2016-09-03 07:32:48
阅读次数:
198
publicfunctiongt($a,$b){$a=explode(‘.‘,$a);$b=explode(‘.‘,$b);$len=(count($a)>count($b))?count($a):count($b);for($i=0;$i<$len;$i++){if($a[$i]>$b[$i]){return1;break;}elseif($a[$i]<$b[$i]){return-1;break;}else{if($i==($len-1)){return0;}}}}$a="8.9...
分类:
其他好文 时间:
2016-09-03 07:32:21
阅读次数:
116
通过单例模式可以保证系统中一个类只有一个实例 饿汉式 1 package 单例设计模式; 2 3 public class 饿汉式 { 4 5 /** 6 * @param args 7 */ 8 public static void main(String[] args) { 9 Singleto ...
分类:
其他好文 时间:
2016-09-03 07:28:35
阅读次数:
127
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette ...
分类:
其他好文 时间:
2016-09-03 07:30:16
阅读次数:
135
Ignore Peer SSL certificate verification libcurl performs peer SSL certificate verification by default. This is done by using a CA certificate store t ...
分类:
其他好文 时间:
2016-09-03 06:25:53
阅读次数:
214
问题描述:给出一个升序排列好的整数数组,找出2个数,它们的和等于目标数。返回这两个数的下标(从1开始),其中第1个下标比第2个下标小。 Input: numbers={2, 7, 11, 15}, target=9Output: index1=1, index2=2 分析:在排序好的数组中进行查找, ...
分类:
其他好文 时间:
2016-09-03 06:25:41
阅读次数:
171
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette ...
分类:
其他好文 时间:
2016-09-03 06:24:45
阅读次数:
163
今年八月中旬入手荣耀8(金色)手机一部,用了大半个月,本来用的好好的,结果有一天晚上浴室洗澡的时候手机放旁边,不小心把水滴在了手机上,手机莫名其妙的进入了“耳机模式”(手机没声音了,状态栏现实耳机图标),本来没有插入耳机却进入了,插上耳机后可以听声音,拔掉后再也听不到,状态栏的耳机图标也消失不了。这 ...
分类:
其他好文 时间:
2016-09-03 06:24:07
阅读次数:
322