2018年6月4日

摘要: 提示无法导入module 问题原因:将文件命名为sklearn.py。 解决方式:将文件命名为其他。 引用: [1] https://stackoverflow.com/questions/49635859/sklearn-is-installed-but-sklearn-is-not-a-pack 阅读全文
posted @ 2018-06-04 22:11 蜗牛快爬 阅读(6616) 评论(0) 推荐(0) 编辑

2017年9月24日

摘要: 一. 环境变量: /etc/profile JAVA_HOME=/usr/lib/jdk1.8.0_91JRE_HOME=/usr/lib/jdk1.8.0_91/jreCLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_ 阅读全文
posted @ 2017-09-24 08:46 蜗牛快爬 阅读(2124) 评论(0) 推荐(0) 编辑

2016年12月6日

摘要: http://blog.sina.com.cn/s/blog_47094def0101fvge.html 阅读全文
posted @ 2016-12-06 15:49 蜗牛快爬 阅读(111) 评论(0) 推荐(0) 编辑
 
摘要: Reference: [1] http://www.centoscn.com/CentOS/help/2013/0928/1743.html [2] http://www.cnblogs.com/hitwtx/archive/2012/02/13/2349742.html 阅读全文
posted @ 2016-12-06 14:33 蜗牛快爬 阅读(118) 评论(0) 推荐(0) 编辑

2016年12月5日

摘要: Ubuntu 12.10 安装vim出错[日期:2013-01-18] 来源:Linux社区 作者:Cubernet [字体:大 中 小] 在Ubuntu 12.10中安装vim时出现了如下提示:正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 有一些软件包无法 阅读全文
posted @ 2016-12-05 22:03 蜗牛快爬 阅读(761) 评论(0) 推荐(1) 编辑

2016年8月1日

摘要: 这个小视频太赞了,秒懂DNS有木有。结合《计算机网络自顶向下方法》看一下,简直就是教科书的小动漫,胜过千言万语啊。 [1] www.youtube.com/watch?v=72snZctFFtA 阅读全文
posted @ 2016-08-01 22:55 蜗牛快爬 阅读(148) 评论(0) 推荐(0) 编辑

2016年7月14日

摘要: 1. 种类: 威佐夫游戏, Bash游戏, Nim游戏, 等. 2. 理论: 胜态一定可以通过某种策略走向必败态; 而必败态采取任何策略都将走向胜态. 用图论的话来说, 因为必败态只能走向胜态, 所以任何两个必败态结点之间不可能存在边; 因为胜态总能走到必败态, 所以对任何一个非必败态的结点, 一定 阅读全文
posted @ 2016-07-14 21:40 蜗牛快爬 阅读(124) 评论(0) 推荐(0) 编辑
 
摘要: 假设有n个权值,则构造出的哈夫曼树有n个叶子结点。 n个权值分别设为 w1、w2、…、wn,则哈夫曼树的构造规则为[1]: (1) 将w1、w2、…,wn看成是有n 棵树的森林(每棵树仅有一个结点); (2) 在森林中选出两个根结点的权值最小的树合并,作为一棵新树的左、右子树,且新树的根结点权值为其 阅读全文
posted @ 2016-07-14 21:25 蜗牛快爬 阅读(458) 评论(0) 推荐(0) 编辑
 
摘要: 1. 已知一个一维数组nums,求nums的一个连续区间,使其和最大。返回最大和。(O(n)) hdu1005 2. 已知一个一维数组nums,求nums的一个最长连续区间,使其和为k。返回最大区间长度。(O(n)) 3. 已知一个一维数组nums,求nums的一个连续区间,使其和是不超过k的最大值 阅读全文
posted @ 2016-07-14 18:14 蜗牛快爬 阅读(232) 评论(0) 推荐(0) 编辑

2016年6月26日

摘要: xk+1 = yk , yk+1 = xk - a/b*yk ,(其中,x0 = 1, y0 = 0)。 阅读全文
posted @ 2016-06-26 12:56 蜗牛快爬 阅读(107) 评论(0) 推荐(0) 编辑
 
摘要: Recursive: int gcd(int a, int b) { return b ? gcd(b, a%b) : a; } Iterative: int gcd(int a, int b) { while (b) { int tmp = b; b = a%b; a = tmp; } retur 阅读全文
posted @ 2016-06-26 08:53 蜗牛快爬 阅读(94) 评论(0) 推荐(0) 编辑

2016年6月24日

摘要: string int2str(int x) { return x ? num2str(x/10)+string(1,x%10+'0') : "";} int str2int(string s) { int x = 0; for (char it : s) x = x*10+it-'0'; retur 阅读全文
posted @ 2016-06-24 21:07 蜗牛快爬 阅读(123) 评论(0) 推荐(0) 编辑
 
摘要: 51nod 阅读全文
posted @ 2016-06-24 21:04 蜗牛快爬 阅读(169) 评论(0) 推荐(0) 编辑

2016年6月12日

摘要: 链表反转是链表相关问题最基础的知识,做完LeetCode中LinkedList后才会有这种体会,因为ACM算法中不会涉及这一部分。解决这一问题有多种方法,在面试中面试官通常也会要求写出多种。包括stack,iterative,以及recursive。 (1) stack: a. 按顺序将节点push 阅读全文
posted @ 2016-06-12 18:12 蜗牛快爬 阅读(291) 评论(0) 推荐(0) 编辑
 
摘要: (注: 原创博客,转载请引用 http://www.cnblogs.com/wubdut/p/5578147.html) 代码举例: Array递增,找第一个不小于target的下标。 int theIndex(vector<int> Array) { int lo = 0, hi = Array. 阅读全文
posted @ 2016-06-12 17:01 蜗牛快爬 阅读(973) 评论(0) 推荐(0) 编辑

2016年6月1日

摘要: 1. You don't kown if you can until a try. 2. Rule youself. 3. It's what you do in the dark that puts you in the light. 阅读全文
posted @ 2016-06-01 17:17 蜗牛快爬 阅读(194) 评论(0) 推荐(0) 编辑

2016年5月25日

摘要: http://baike.baidu.com/link?url=-ylkWzd18Nh92Da9bYwHHFyrhKm2TjUOJ7lrHDDGpPbtnPaz2wMo7-hH6kQoI61obTKnfOQlHT8r2FPd5LRSw_ 阅读全文
posted @ 2016-05-25 09:16 蜗牛快爬 阅读(191) 评论(0) 推荐(0) 编辑

2016年5月20日

摘要: Reference: [1] http://www.cnblogs.com/lonelycatcher/archive/2011/07/29/2120654.html [2] http://www.cnblogs.com/celia01/archive/2012/07/30/2615842.html 阅读全文
posted @ 2016-05-20 08:13 蜗牛快爬 阅读(229) 评论(0) 推荐(0) 编辑

2016年3月10日

摘要: 未进行系统整理:   关于str: http://blog.sina.com.cn/s/blog_5dd2af0901012r96.html   获取主机ip: http://www.jb51.net/article/68524.htm 异常处理: http://blog.chinaunix.net 阅读全文
posted @ 2016-03-10 11:17 蜗牛快爬 阅读(146) 评论(0) 推荐(0) 编辑

2016年2月26日

摘要: 改进的代码 (输入字符串为s): int getLongestPalindrome(string s) { string str; str.push_back('&'); for (char item : s) { str.push_back('#'); str.push_back(item); } 阅读全文
posted @ 2016-02-26 18:10 蜗牛快爬 阅读(212) 评论(0) 推荐(0) 编辑