码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
Distinct Subsequences
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:其他好文   时间:2014-08-22 21:06:19    阅读次数:203
关于Javascript你可能不知道的事
NaN表示一个不能产生正常结果的运算结果。它不等于任何值,包括它自己。可以用isNaN(number)来检测。同Java中的字符串一样,JS中的字符串是不可变的。也就是说一旦字符串被创建,就无法改变。下标表达式(如s[3],代替s.charAt(3))可以读取字符,但是不能用于改变字符。null,u...
分类:编程语言   时间:2014-08-22 19:28:19    阅读次数:280
将数值四舍五入后格式化,带有千分位
//保留几位小数 function fmoney(obj, num) { return obj.value = formatNumber(obj.value, 2, 1); } /* 将数值四舍五入后格式化. @param num 数值(Number或者string) @param cent 要保留的小数位(Number) @param isThousand 是否需要千分...
分类:其他好文   时间:2014-08-22 17:59:19    阅读次数:225
projecteuler---->problem=35----Circular primes
Problem 35 The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13,...
分类:其他好文   时间:2014-08-22 17:52:39    阅读次数:185
leetcode之Combination Sum
Combination Sum Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen ...
分类:其他好文   时间:2014-08-22 16:24:19    阅读次数:202
projecteuler---->problem=32----Pandigital products
Problem 32 We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital. The produ...
分类:其他好文   时间:2014-08-22 16:23:19    阅读次数:178
iOS 获取 当前设备 可用内存 及当前 应用 所占内存
// 获取当前设备可用内存及所占内存的头文件#import #import // 获取当前设备可用内存(单位:MB)- (double)availableMemory{ vm_statistics_data_t vmStats; mach_msg_type_number_t infoCoun...
分类:移动开发   时间:2014-08-22 16:08:58    阅读次数:208
【leetcode】Single Number II
int singleNumber(int A[], int n) { int once = 0; int twice = 0; int three = 0; for (int i = 0; i < n; ++i) { //在计算新的once 前,计算twice twice |...
分类:其他好文   时间:2014-08-22 16:00:48    阅读次数:146
HDU 1394 Minimum Inversion Number (线段树)
HDU 1394 Minimum Inversion Number (线段树)...
分类:其他好文   时间:2014-08-22 14:28:28    阅读次数:200
sqlserver巧用row_number和partition by分组取top数据
sqlserver巧用row_number和partition by分组取top数据
分类:数据库   时间:2014-08-22 01:30:35    阅读次数:320
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!