摘要: #include #include using namespace std; typedef struct node { int element; struct node *next; struct node(int data):element(data),next(NULL){}; }Node; Node* reverse_t(Node *head) { Node *cur ... 阅读全文
posted @ 2016-04-14 16:23 Esapinit 阅读(225) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; void swap(vector &arr, int a, int b) { int temp = arr[a]; arr[a] = arr[b]; arr[b] = temp; } void ajust_heap(vector&arr, int hole, int len) { ... 阅读全文
posted @ 2016-03-31 11:03 Esapinit 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.cnblogs.com/dolphin0520/archive/2011/08/25/2153720.html 阅读全文
posted @ 2016-03-24 20:18 Esapinit 阅读(243) 评论(0) 推荐(0) 编辑
摘要: #!coding:utf8 def quicksort(list_num, left, right): if left > right: return low = left high = right privot= list_num[left] while low<high: while low < 阅读全文
posted @ 2016-02-21 16:26 Esapinit 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 第一次心血来潮地花了大半个小时来帮助一个网友回答问题,虽然答案并不一定能让他满意,但是感觉还是不错的,特此纪念下。 体会:不要着急写代码,先想好思路(思路很重要!),可以现在纸上写好伪代码,再动手! 链接:http://www.douban.com/group/topic/81377516/ 阅读全文
posted @ 2015-11-21 10:29 Esapinit 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 记:最近在使用python进行学生成绩管理系统设计时,遇到了一个中文显示的问题,这个问题困扰了一个上午,查阅了有关资料,锁定了原因——编码问题。最终更改编码设置,问题得到了解决。具体做法: 1 Python文件设置编码 utf-8 (文件前面加上 #encoding=utf-8) 2 MySQL... 阅读全文
posted @ 2015-04-28 12:34 Esapinit 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 引:最近在研究使用python实现模拟登陆各大网站,在使用IE11进行抓包分析网站登陆的逻辑结构的时候,发现每次在抓包的时候,当网页跳转的时候,抓包数据会被清除,让我很是郁闷,最终在查阅相关资料以及自己的摸索,发现了解决问题的方法。 方法:在使用IE11进行抓包工作的时候,不要勾选“导航时清除项”, 阅读全文
posted @ 2014-12-25 21:19 Esapinit 阅读(1712) 评论(0) 推荐(0) 编辑