NSMutableAttributedString*str=[[NSMutableAttributedStringalloc]initWithString:@"UsingNSAttributedString"];[straddAttribute:NSForegroundColorAttributeNamevalue:[UIColorblueColor]range:NSMakeRange(0,5)];[straddAttribute:NSForegroundColorAttributeNamevalue:[UI..
分类:
其他好文 时间:
2014-06-10 22:32:09
阅读次数:
291
原题地址:https://oj.leetcode.com/problems/roman-to-integer/题意:Given
a roman numeral, convert it to an integer.Input is guaranteed to be within the
range f...
分类:
编程语言 时间:
2014-06-10 19:34:10
阅读次数:
255
百度了一下vlookup的语法规则:
该函数的语法规则如下:
VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
参数
简单说明
输入数据类型
lookup_value
要查找的值
数值、引用或文本字符串
...
分类:
其他好文 时间:
2014-06-10 18:13:53
阅读次数:
253
原题地址:https://oj.leetcode.com/problems/integer-to-roman/题意:Given
an integer, convert it to a roman numeral.Input is guaranteed to be within the
range f...
分类:
编程语言 时间:
2014-06-10 17:06:11
阅读次数:
261
比较DOM范围在有多个范围的情况下,可以使用compareBoundaryPoints()方法来确认这些范围是否有公共的边界,接收两个参数:表示比较方式的常量值和要比较的范围常量如下Range.START_TO_START(0):比较第一个范围和第二个范围的起点;Range.START_TO_END...
分类:
编程语言 时间:
2014-06-09 23:45:22
阅读次数:
276
一次总结两道题,两道题目都比较基础Description:Write a function to
find the longest common prefix string amongst an array of strings.分析:
这道题目最重要的知道什么叫prefix前缀, 否则一不小心就做...
分类:
其他好文 时间:
2014-06-09 21:08:16
阅读次数:
224
合并单元格虽然美观,但是无法进行排序、筛选等操作。只有合并单元格拆分后才可以按常规进行统计。但是普通拆分后,excel仅保留合并单元格数据到区域左上角的单元格。解决方案:选定多个合并单元格,应用本宏即可每个单元格均保留数据:Sub
拆分() Dim c As Range For Each c In ...
分类:
其他好文 时间:
2014-06-09 20:04:16
阅读次数:
268
原题地址:https://oj.leetcode.com/problems/search-for-a-range/题意:Given
a sorted array of integers, find the starting and ending position of a given
target ...
分类:
编程语言 时间:
2014-06-08 21:03:21
阅读次数:
297
用Python求均值与方差,可以自己写,也可以借助于numpy,不过到底哪个快一点呢?我做了个实验,首先生成9百万个样本:```pythonnlist=range(0,9000000)nlist=[float(i)/1000000
for i in nlist]N=len(nlist)```第二行是...
分类:
编程语言 时间:
2014-06-07 22:48:05
阅读次数:
1623
range用法
使用python的人都知道range()函数很方便,今天再用到他的时候发现了很多以前看到过但是忘记的细节。
这里记录一下:
>>>
range(1,5)
#代表从1到5(不包含5)
[1,
2,
3,
4]
>>>
range(1,5,2)
#代表从1到5,间隔2(不包含5)
[1,
3]
>...
分类:
编程语言 时间:
2014-06-07 12:09:21
阅读次数:
276