- 博客(12)
- 资源 (12)
- 收藏
- 关注
原创 简单的FTP共享文件pyftpdlib
共享文件夹或者文件除了上一篇文章中所说的Http方式,还有FTP方式,即搭建一个FTP服务器,共享文件夹,让别人访问。安装pyftpdlib:Python并没有内置一个FTP服务器,所以需要第三方模块的支持。可以使用pyftpdlib,其官网上有详细的介绍。在命令行输入下面的语句进行安装:pip install pyftpdlib一句话共享:在选定目录的命令行下
2015-11-29 11:01:08 8858 1
原创 简单的Http共享文件SimpleHTTPServer
刚刚学会了如何使用Python下的SimpleHTTPServer共享文件。一句话共享:命令行下输入下面的语句,即可将当前目录下的文件共享出去。python -m SimpleHTTPServer 80Python下内置了一个Http服务器,只需要上面的一句话即可以启动该服务器,默认的端口是8000。启动后,可以在浏览器中输入“localhost:8000”即可查看当前文件
2015-11-29 09:27:34 6131
原创 LeetCode----Insertion Sort List
Insertion Sort ListSort a linked list using insertion sort.原题链接为:https://leetcode.com/problems/insertion-sort-list分析:使用插入排序对链表进行排序。可以新建一个带头节点的有序链表,每次从原链表中选择一个节点,插入到带头节点的链表中。C++代码:...
2015-11-14 17:16:52 598
原创 LeetCode----Sort List
Sort ListSort a linked list in O(n log n) time using constant space complexity.分析:给链表排序,要求O(nlogn)的时间,O(1)的空间。链表不是数组,给它排序不能像数组一样可以通过各种下标操作。能够想到的方法也就是(1)通过新建一个有序链表,每次从原来链表中选择一个元素到新的有序
2015-11-14 15:42:18 542
原创 LeetCode----Happy Number
Happy NumberWrite an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by th
2015-11-11 10:21:52 631
原创 LeetCode----Remove Duplicates from Sorted Array
Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for an
2015-11-10 18:46:35 553
原创 LeetCode----Generate Parentheses
Generate ParenthesesGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((()))", "(()())
2015-11-10 15:59:44 1274
原创 LeetCode----Find the Duplicate Number
Find the Duplicate NumberGiven an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there
2015-11-02 11:11:01 810
原创 LeetCode----Move Zeroes
Move ZeroesGiven an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12]
2015-11-01 23:21:05 726
原创 LeetCode----Word Pattern
Word PatternGiven 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 letter in pattern and a non-
2015-11-01 20:01:57 749
原创 LeetCode----Partition List
Partition ListGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order o
2015-11-01 16:29:56 685
原创 LeetCode----Remove Duplicates from Sorted List II
Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2
2015-11-01 10:55:44 805
python cookielib模块的翻译文档
2015-04-07
百度地图应用样例
2014-07-02
Python SAX处理XML文件
2014-05-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人