码迷,mamicode.com
首页 >  
搜索关键字:python re 正则表达式    ( 159708个结果
回文验证
A_byte_of_Python-v192-for_Python_3.0-中文版.pdf 中的一道题:练习题: 检测一个文本是否为回文应该忽略标点,空格和大小写。 例如”Rise to vote, sir.”同样是一个回文,但是我们当前的例子无法识别它。你能改善这个例子让它做都这点吗?代码有点挫,莫...
分类:其他好文   时间:2014-05-01 06:52:33    阅读次数:359
“Cache-control”常见的取值有private、no-cache、max-age、must-revalidate等
网页的缓存由HTTP消息头中的"Cache-Control" 来控制的,常见的取值有private、no-cache、max-age、must-revalidate等,默认为private。其作用根据不同的重新浏览方式分为以下几种情况:(1) 打开新窗口如果指定cache-control的值为pri...
分类:其他好文   时间:2014-05-01 06:51:33    阅读次数:273
[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
人造奇迹——二进制位运算的运用
最后更新:2014年4月30日1、位运算包括:这个我觉得大家都会我就随便说下:位与&,如 101 & 110 = 100位或|,如 100 | 110 = 110位非~,如 ~101 = 010位异或^,如 101 ^ 110 = 011左移>,如 110 >> 1 = 011其中,负数位运算的时候...
分类:其他好文   时间:2014-05-01 06:23:40    阅读次数:336
全排列
#include#include#includeusing namespace std;int main(){ int n,i; char a[100000]; cin>>a; sort(a,a+strlen(a)); do{ cout<<a<<endl; }while(next_permut...
分类:其他好文   时间:2014-05-01 06:20:37    阅读次数:368
C++ 的template
vector的标准模板是:template > class T>而普通模板则是template class T>,如何创建一个模板能包容以上两个形式通用?http://zhidao.baidu.com/question/412950067.html
分类:编程语言   时间:2014-05-01 06:06:16    阅读次数:331
Z-Stack内部API 小结
Z-Stack是TI推出的全功能ZigBee协议栈,通过了ZigBee联盟的兼容性平台测试,包含如下几个组件。 1. HAL,硬件抽象层 2. OSAL,操作系统抽象层 3. ZigBee Stack和IEEE 802.15.4 4. User App 5. MT,通过串口与PC进行通讯的demo ...
分类:Windows程序   时间:2014-05-01 06:04:13    阅读次数:618
git如何处理别人的pull request及解决冲突 (转)
原贴地址 出过两次了,每次都查很多资料,太蛋疼,记录在此。当你的项目比较牛逼的时候,有人给你贡献代码,但他修改的地方恰恰你前阵子也修改了,这样在github中就不能够自动merge了。因此你需要手动去解决冲突。首先要在本机安装好命令行工具gitbash,之后用clone拉下你的项目,之后按照以下.....
分类:其他好文   时间:2014-05-01 05:40:32    阅读次数:725
PlayerPrefs游戏存档
本地存储。相当于Flash里面的SharedObject。Android位置:机器自身存储的(非扩展卡)/data/data/appname/shared_prefs/{AppName}.xml,如果想查看需要Root。IOS位置:暂时还没找到。其他位置:参考https://docs.unity3d...
分类:其他好文   时间:2014-05-01 05:38:35    阅读次数:281
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!