码迷,mamicode.com
首页 >  
搜索关键字:list dict    ( 58606个结果
Linux 禁用触摸板
1,首先需要查看触摸板: 命令:xinput list 结果: ? Virtual core pointer id=2 [master pointer (3)] ? ? Virtual core XTEST pointer id=4 [slave poin...
分类:系统相关   时间:2014-06-02 10:07:16    阅读次数:362
leetcode Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?求链表是否有环的问题,要考虑链表为空的情况,定义一个快指针和一个慢指针,如果快指针和...
分类:其他好文   时间:2014-06-02 08:05:16    阅读次数:255
Leetcode Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?借用博...
分类:其他好文   时间:2014-06-02 07:32:33    阅读次数:291
【LeetCode】Sort List
Sort ListSort a linked list inO(nlogn) time using constant space complexity.要求时间复杂度为O(nlogn),那么不能用quickSort了(最坏O(n^2)),所以使用mergeSort.通常写排序算法都是基于数组的,这题...
分类:其他好文   时间:2014-06-02 06:29:51    阅读次数:192
线程池的简单实现
packagecom.mzsx.concurrent.threadpool; importjava.util.List; importjava.util.Vector; publicclassThreadPool{ privatestaticThreadPoolinstance=null; //空闲的线程队列 privateList<PThread>idleThreads; //已有的线程总数 privateintthreadCounter; privateboolea..
分类:编程语言   时间:2014-06-02 04:10:21    阅读次数:332
Flask实例教程三
一:Flask中url的工作方式#encoding=utf-8 fromflaskimportFlask app=Flask(__name__) @app.route("/task/") deftask_list(): return"Listofalltask" @app.route("/task/<int:task_id>/") deftask_detail(task_id): return"Detailoftask#{}.".format(task_id) @app.ro..
分类:其他好文   时间:2014-06-02 03:53:19    阅读次数:662
js 解析json字符串
服务器端返回的数据如下{"list":[{"id":1,"name":"汉族"},{"id":2,"name":"蒙古族"},{"id":3,"name":"满族"},{"id":4,"name":"朝鲜族"},{"id":5,"name":"赫哲族"},{"id":6,"name":"达斡尔族"},{"id":7,"name":"鄂温克族"},{"id":8,"name":"鄂伦春族"},{"i...
分类:Web程序   时间:2014-06-02 02:19:31    阅读次数:336
MVC4 下DropDownList使用方法
与MVC3相比,差别很大: public ActionResult Main() { List items = new List(); items.Add(new SelectListItem { Text = "Action", Value...
分类:Web程序   时间:2014-06-02 01:34:06    阅读次数:338
Haskell函数的语法
本章讲的就是 Haskell 那套独特的语法结构,先从模式匹配开始。模式匹配通过检查数据的特定结构来检查其是否匹配,并按模式从中取得数据。在定义函数时,你可以为不同的模式分别定义函数本身,这就让代码更加简洁易读。你可以匹配一切数据类型 --- 数字,字符,List,元组,等等。我们弄个简单函数,让它...
分类:其他好文   时间:2014-06-01 23:58:42    阅读次数:497
leetcode Reverse Nodes in k-Group
递归一下 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: Li...
分类:其他好文   时间:2014-06-01 17:35:40    阅读次数:406
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!