码迷,mamicode.com
首页 >  
搜索关键字:square    ( 2122个结果
Sqrt(x)
Implementint sqrt(int x).Compute and return the square root ofx.思路:binary search ,柯西不等式√abx/mid) b=mid-1; else a=mid+1; } ...
分类:其他好文   时间:2015-03-13 00:06:21    阅读次数:117
Swift 学习难点笔记
定义一个字典let interestingNumber =[ "Prime":[2,3,5,7,11,13], "Fibonacci":[1,1,2,3,5,8], "Square":[1,4,9,16,25]]var array = interestingNumber["Pri...
分类:编程语言   时间:2015-03-12 22:28:09    阅读次数:147
KL-Divergence简介
我们可以计算两个数值点之间的距离,也可以计算两个概率分布之间的距离。常见方法有卡方检验(Chi-Square)和KL散度(KL-Divergence)。本文主要介绍KL散度。 先从信息熵说起,假设一篇文章的标题叫做“黑洞到底吃什么”,包含词语分别是{黑洞,到底,吃什么},我们现在要根据一个词语...
分类:其他好文   时间:2015-03-12 20:41:22    阅读次数:322
css之-各种基本图形画法总结(css3.0)
基本设置:width 和 height1.正方形,矩形用border话三角形边角用transform:skew(x angle,y angle):想x和y轴倾斜来画平行四边形.square{width:100px;height:100px;background:red;}/*正方形也可以*//*{w...
分类:Web程序   时间:2015-03-12 14:45:12    阅读次数:328
inline与宏
在需要编写一段短小的类似函数的功能性代码时,inline函数作为C++中附加的特性,比传统C中的宏(#define)更可靠(至少容易避免错误)。 #define SQUARE(X) X*X宏的工作机制是“字符替换”。 a = SQUARE(5.0); // a = 5.0*5.0 b = SQUARE(4.5 + 7.5); // b = 4.5 + 7.5 * 4.5...
分类:其他好文   时间:2015-03-12 11:29:23    阅读次数:96
我为什么主张反对使用Android Fragment
最近我在Droidcon Paris举办了一场技术讲座,我讲述了Square公司在使用Android fragments时遇到的问题,以及其他人如何避免使用fragments。...
分类:移动开发   时间:2015-03-11 23:32:01    阅读次数:362
(平方幂母函数)hdu 1398 Square Coins
Square Coins Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8891    Accepted Submission(s): 6067 Problem Description People in Sil...
分类:其他好文   时间:2015-03-11 14:54:01    阅读次数:140
hdu 1065 I Think I Need a Houseboat 水题,不过看discuss,应该有很多人在PI上栽跟头了
Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square miles each year, due to erosion caused by the Mississipp...
分类:其他好文   时间:2015-03-11 14:49:28    阅读次数:144
[LeetCode] Sqrt(x)
Implementint sqrt(int x).Compute and return the square root ofx.Hide TagsMathBinary Search思路:整体上用2分比逐个比较强。首先,给出一个错误的版本:错误之处在于红色部分,当mid较大时,mid*mid会超过IN...
分类:其他好文   时间:2015-03-10 13:35:22    阅读次数:147
Spiral Matrix II
Spiral Matrix II问题:Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.思路: 矩阵的旋转常用模板我的代码:public class Solutio....
分类:其他好文   时间:2015-03-07 21:11:38    阅读次数:136
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!