摘要: 在python中安装第三方库时,当安装完成使用 ’ import 包名 ‘命令,有可能会提示以下错误: ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。 出现以上原因有两种:(1)python安装的是64位的,而引入的包是32位的。(2)pytho 阅读全文
posted @ 2016-10-14 09:44 wkx。 阅读(3598) 评论(0) 推荐(1) 编辑
摘要: Question:Write a function to find the longest common prefix string amongst an array of strings. 问题描述:从一个字符串数组中找出所有字符串的最长前缀。 note:当字符串数组为空时,返回"" LeetCo 阅读全文
posted @ 2016-05-06 21:35 wkx。 阅读(104) 评论(0) 推荐(0) 编辑
摘要: question:Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not s 阅读全文
posted @ 2016-05-06 11:11 wkx。 阅读(146) 评论(0) 推荐(0) 编辑
摘要: question:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain 阅读全文
posted @ 2016-05-04 07:46 wkx。 阅读(134) 评论(0) 推荐(0) 编辑
摘要: question: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input wou 阅读全文
posted @ 2016-05-03 16:39 wkx。 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Pytho代码: # -*- coding: UTF-8 -*- import codecs #f1 = codecs.open("D:\\python_code\\bayes\\data\\label.txt", 'r', 'utf-8') f1 = open("D:\\python_code\\bayes\\data\\label.txt") list1 = ['味道', '物流', '外... 阅读全文
posted @ 2016-04-14 08:38 wkx。 阅读(1556) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/computer055maxi/article/details/6055427 阅读全文
posted @ 2016-04-07 10:32 wkx。 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 链接地址:http://blog.csdn.net/kingstar158/article/details/6859379 阅读全文
posted @ 2016-04-07 09:38 wkx。 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 在写一个抓取网页的小脚本,运行起来总是出现这个错误SyntaxError: Non-ASCII character '\xe5' in file D 查了下Python的默认编码文件是用的ASCII码,你将文件存成了UTF-8也没用,解决办法很简单 只要在文件开头加入 # -*- coding: U 阅读全文
posted @ 2016-03-24 15:18 wkx。 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 快速排序算法是一种非常高效的内部排序算法,其平均时间复杂度为O(nlogn),且其性能在相同时间复杂度中最好,不过 在最坏的情况下会退化成冒泡排序,此时时间复杂度为O(n^2)。就平均性能来讲,快速排序是一种非常高效的算法,现在 介绍一种比较简单的快速排序的实现算法。 代码如下: #include 阅读全文
posted @ 2016-02-01 14:58 wkx。 阅读(170) 评论(0) 推荐(0) 编辑