摘要: public int get_middle(int[] list, int low, int high){ int tmp = list[low]; while(low tmp){ high --; } list[low] = list[high]; while... 阅读全文
posted @ 2017-10-17 17:31 燃灯胡同 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 一、官方安装手册http://httpd.apache.org/docs/2.4/install.html#customize 下载最新版http://httpd.apache.org/download.cgi#apache24 httpd-2.4.27.tar.bz2 解压 tar xvf htt 阅读全文
posted @ 2017-10-14 20:06 燃灯胡同 阅读(200) 评论(0) 推荐(0) 编辑
摘要: # -*- coding=utf-8 -*- ''' @Desc: 八皇后算法,python实现 @Date: 2017-10-13 @Author: HenryWang ''' import random # 八皇后问题的前情不在此重复说明 # 验证新的皇后是否和之前的皇后所在位置有冲突:在同一列或者在对角线上 # state 为已经确定的皇后的位置元组 # nextX 为新的一个皇后的所在... 阅读全文
posted @ 2017-10-13 18:40 燃灯胡同 阅读(273) 评论(0) 推荐(0) 编辑
摘要: #! /usr/bin/env python3 # -*- coding=utf-8 -*- ''' @Date: 2017-10-10 @Author: Henry Python各种排序算法 ''' def bubble_sort(ls): ''' 冒泡排序 ''' if ls == None: return [] else: ... 阅读全文
posted @ 2017-10-13 10:27 燃灯胡同 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 1. 字符转换格式 >>> print('x = %.2f' % x) x = 0.01 2. 格式字符串 format 3. 文件夹处理 4. 文件读写 打开文件 --> 处理文件 --> 关闭文件 阅读全文
posted @ 2017-09-12 20:49 燃灯胡同 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1. type,查看对象或变量的数据类型 2. 序列的拼接, + * 3. 元组函数 4. 列表函数 删除并返回 s 中索引为 i 的元素 5. 列表解析 6. 字典函数 阅读全文
posted @ 2017-09-12 19:10 燃灯胡同 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1. 全局变量 global 2. 字符函数 ord chr:ascii 3. 字符串长度计算 len 4. 字符串切片str[start:end:step] 5. 字符串测试函数 s 是合法的标识符 6. 字符串搜索函数 7. 改变大小写的函数 8. 设置字符串格式的函数 9. 字符串剥离函数 1 阅读全文
posted @ 2017-09-12 16:19 燃灯胡同 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 1. 获得输入内容 input 2. print方法的使用,增加间隔,使用sep,换行方式为end 3. 对结果求值 eval 4. break 和 countinue的使用 break: 结束循环 continue:跳过当前循环进入下一次迭代 如果是嵌套循环,则break和continue分别只针 阅读全文
posted @ 2017-09-11 18:12 燃灯胡同 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1. math相关函数 x的余弦 2. 字符串拼接相关方法 + * 3. 列出模块中的函数 dir(module) 4. 查看函数的帮助字符串 help(func) 5. 查看文档字符串 func.__doc__ 6. 将整数和字符串转换为浮点数 float(x), x 为str 或 int类型 7 阅读全文
posted @ 2017-09-11 17:36 燃灯胡同 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Explanation for issues of type "MissingTranslation": Explanation for issues of type "MissingTranslation": If an application has more than one locale, 阅读全文
posted @ 2017-09-11 17:05 燃灯胡同 阅读(984) 评论(0) 推荐(0) 编辑