控制大小写任务: 将一个字符串由大写转成小写,或者泛起到而行之。解决方案:>>> a = 'a'.upper()>>> a'A'>>> b = 'b'.lower()>>> b'b'>>> print "I loVe pythOn".capitalize()I love python>>> pri....
分类:
编程语言 时间:
2014-08-27 14:37:57
阅读次数:
229
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word ...
分类:
其他好文 时间:
2014-08-26 21:14:16
阅读次数:
220
常量(UPPERCASE|UPPER_CASE):不会发生改变的全局变量(注意Python本身并不支持C++中的const常量,这里仅仅是约定),由大写字母、[下划线]组成。通常用来保存默认配置的值。模块、类、方法的私有变量|函数|方法(_lower_case):经常改变的模块级变量(模块内私有),...
分类:
编程语言 时间:
2014-08-25 19:10:24
阅读次数:
214
UVA 11020 - Efficient Solutions
题目链接
题意:每个人有两个属性值(x, y),对于每一个人(x,y)而言,当有另一个人(x', y'),如果他们的属性值满足x'
思路:由于每个人失去优势后,不可能再得到优势,所以失去优势就可以当成删去这些点,这样的话,就可以用一个multiset来维护点集,每次加入一个点,利用lowerbound,upper_...
分类:
其他好文 时间:
2014-08-24 01:53:11
阅读次数:
198
select * from user_source t where upper(t.TEXT) like upper('%table1%')第二种方法类似于eclipse中的file searchselect * from user_dependencies g where g.referenced...
分类:
数据库 时间:
2014-08-22 12:25:36
阅读次数:
207
BOOL BitBlt(
HDC hdcDest, // handle to destination device context
int nXDest, // x-coordinate of destination rectangle's upper-left
// corner
int nYDest, // y-coordinate of des...
分类:
其他好文 时间:
2014-08-21 22:52:35
阅读次数:
316
在mysql中查询不区分大小写重复的数据,往往会用到子查询,并在子查询中使用upper函数来将条件转化为大写。如:select * from staticcatalogue WHERE UPPER(Source) IN (SELECT UPPER(Source) FROM staticcatalog...
分类:
数据库 时间:
2014-08-21 14:59:34
阅读次数:
277
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-08-16 13:42:40
阅读次数:
200
lovep2c项目pay模块注释:views.py:def create_user_no(email): return md5(email).hexdigest().upper() + "".join([choice(string.letters) for i in range(8)])/** m....
分类:
其他好文 时间:
2014-08-16 00:55:19
阅读次数:
297
正则表达式\<the\>:精确匹配the,不包括包含the的单词[^b-d]:不包含b~da\{2\}:a出现2次a\{2,3\}:a出现2~3次a\{2,\}:a至少出现2次[:upper:]:大写字母(用的时候外面加一层[]表示匹配字符集合)[:lower:]:小写字母[:digit:]:数字[:alnum:]:大小写字母和数字[:space..
分类:
其他好文 时间:
2014-08-15 02:52:37
阅读次数:
199