码迷,mamicode.com
首页 >  
搜索关键字:lambda python map    ( 163612个结果
[笔记]--在Ubuntu系统用Python连接Mysql数据库
环境:Ubuntu11.10,Python2.7,Mysql5.0.95在Ubuntu终端输入命令安装Python的Mysql模块sudo apt-get install python-mysqldb就这么简单;运行一下脚本:#!/usr/bin/python#-*-coding=utf-8##im...
分类:数据库   时间:2014-05-01 10:54:23    阅读次数:474
[leetcode]LRU Cache @ Python
原题地址:http://oj.leetcode.com/problems/lru-cache/题意:设计LRU Cache参考文献:http://blog.csdn.net/hexinuaa/article/details/6630384 这篇博文总结的很到位。 https://github...
分类:编程语言   时间:2014-05-01 10:47:16    阅读次数:501
[leetcode]Linked List Cycle @ Python
原题地址:http://oj.leetcode.com/problems/linked-list-cycle/题意:判断链表中是否存在环路。解题思路:快慢指针技巧,slow指针和fast指针开始同时指向头结点head,fast每次走两步,slow每次走一步。如果链表不存在环,那么fast或者fast...
分类:编程语言   时间:2014-05-01 10:33:38    阅读次数:426
[leetcode]Linked List Cycle II @ Python
原题地址:http://oj.leetcode.com/problems/linked-list-cycle-ii/题意:如果链表中存在环路,找到环路的起点节点。解题思路:这道题有点意思。首先使用快慢指针技巧,如果fast指针和slow指针相遇,则说明链表存在环路。具体技巧参见上一篇http://w...
分类:编程语言   时间:2014-05-01 08:19:31    阅读次数:340
VC/MFC 在ListCtl 控件中随鼠标移动提示单元格信息
[cpp]view plaincopyBEGIN_MESSAGE_MAP(CTipListCtrl,CListCtrl)//{{AFX_MSG_MAP(CTipListCtrl)ON_WM_MOUSEMOVE()ON_WM_DESTROY()//}}AFX_MSG_MAPEND_MESSAGE_MA...
分类:移动开发   时间:2014-05-01 07:34:41    阅读次数:588
回文验证
A_byte_of_Python-v192-for_Python_3.0-中文版.pdf 中的一道题:练习题: 检测一个文本是否为回文应该忽略标点,空格和大小写。 例如”Rise to vote, sir.”同样是一个回文,但是我们当前的例子无法识别它。你能改善这个例子让它做都这点吗?代码有点挫,莫...
分类:其他好文   时间:2014-05-01 06:52:33    阅读次数:359
[leetcode]Swap Nodes in Pairs @ Python
原题地址:http://oj.leetcode.com/problems/swap-nodes-in-pairs/题意:将链表中的节点两两交换。Given1->2->3->4, you should return the list as2->1->4->3.解题思路:这题主要涉及到链表的操作,没什么...
分类:编程语言   时间:2014-05-01 06:44:21    阅读次数:339
[leetcode]Remove Nth Node From End of List @ Python
原题地址:http://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/题意:Given a linked list, remove thenthnode from the end of list and return its he...
分类:编程语言   时间:2014-05-01 06:42:15    阅读次数:332
梯度下降法
梯度下降法是求解无约束最优化问题的一种常用方法。实现简单,代码如下。 1 # -*- coding: utf8 -*- 2 3 delta = 0.00001 4 5 # f = x^2 + y^2 6 my_function = lambda point : point[0] ** 2 + p.....
分类:其他好文   时间:2014-05-01 03:14:54    阅读次数:267
λ演算概述
λ演算(Lambda-calculus)是一套用于研究函数定义、应用和递归的形式系统。它由阿兰佐·丘奇(Alonzo Church)和史蒂芬·科尔·克林(Stephen Cole Kleene)在20世纪三十年代引入。丘奇运用λ演算在1936年给出“判定性问题”(Entscheidungs prob...
分类:其他好文   时间:2014-05-01 03:07:43    阅读次数:343
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!