码迷,mamicode.com
首页 >  
搜索关键字:sub    ( 10221个结果
【python】正则表达式
在python中,所有和正则表达式相关的功能都包含在re模块中。$表示字符串的末尾,^表示字符串的开始,原始字符串:字符串添加前缀r,表示字符串中的所有字符都不转义。\b表示单词的边界必须在这里。s="100 BROAD"re.sub('ROAD$','RD',s)结果:'100 BRD're.su...
分类:编程语言   时间:2014-07-19 20:38:28    阅读次数:233
LeetCode "Unique Binary Search Trees"
Another recursion-style problem.1. Each count of sub-solution with a certain root should contribute to final count2. With a certain root, the num of l...
分类:其他好文   时间:2014-07-18 18:18:01    阅读次数:187
VBA读取可选择文件夹下可选择txt文件内容
Sub OneTxt() '打开一个txt文件 Dim Filename As Variant, extLine&, mArr() As String Dim i%, j% ChDir ThisWorkbook.Path Filename = Application.GetO...
分类:其他好文   时间:2014-07-18 14:29:21    阅读次数:149
VBA读取固定文件夹中txt内容
Sub OneTxt() '打开一个txt文件 Dim Filename As Variant, extLine&, mArr() As String Dim i%, j%, txtpath As String Dim txtname As Variant C...
分类:其他好文   时间:2014-07-18 14:15:36    阅读次数:205
python中将字典转换成定义它的json字符串
Python的字典和JSON在表现形式上非常相似#这是Python中的一个字典 dic = { 'str': 'this is a string', 'list': [1, 2, 'a', 'b'], 'sub_dic': { 'sub_str': 'this is sub str', 'sub_l...
分类:编程语言   时间:2014-07-16 18:09:52    阅读次数:301
C++中的纯虚函数和虚函数的作用
1. 虚函数和纯虚函数可以定义在同一个类(class)中,含有纯虚函数的类被称为抽象类(abstract class),而只含有虚函数的类(class)不能被称为抽象类(abstract class)。 2.虚函数可以被直接使用,也可以被子类(sub class)重载以后以多态的形式调用,而纯虚函数...
分类:编程语言   时间:2014-07-16 17:05:43    阅读次数:244
UVA-1400 Ray, Pass me the Dishes, LA 3938 , 线段树,区间查询
题意:给出一列数(n个),m次查询区间[l,r]的最大连续区间[x,y](l 思路:动态查询区间最大连续区间; 如果是求最大连续区间和: 用线段树维护最大连续和sum_sub、最大前缀和sum_prefix、最大后缀和sum_suffix。 root.sum_sub = max{l.sum_sub, r.sum_sub, (l.sum_suffix + r.sum_prefix)...
分类:其他好文   时间:2014-07-16 11:42:15    阅读次数:222
Partition an array around an interger
Partition an array of integers around a value such taht all elements less than x come before elements greater than or equal to x.Idea: Just use of sub...
分类:其他好文   时间:2014-07-15 22:52:15    阅读次数:239
img标签下多余空白BUG解决方法
在进行页面的DIV CSS排版时,遇到IE6(当然有时Firefox下也会偶遇)浏览器中的图片元素img下出现多余空白的问题绝对是常见的对于该问题的解决方法也是“见机行事”。1、将图片转换为块级对象即,设置img为“display:block;”。在本例中添加一组CSS代码:“#sub img {d...
分类:其他好文   时间:2014-07-15 09:05:52    阅读次数:237
c语言学习之结构篇代码演示样例-输入n个同学的姓名,数学英语成绩,依照平均分从低到高排序并输出
#includevoid main(){const int count = 5;//定义数量struct student{char name[80];float math,eng;float aver;}stu[count],temp;//输入for (int i = 0; i stu[sub].a...
分类:编程语言   时间:2014-07-14 21:23:30    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!