在javascript里,函数是可以嵌套的。 如: function(){ funcrion square(x){ return x*x; } return square(10); }在javascript里,将函数绑定给一个对象,用对象调用的函数称为方法,容易跟...
分类:
编程语言 时间:
2015-05-30 19:42:46
阅读次数:
136
1 枚举 1 enum ShapeType 2 { 3 circle, 4 square, 5 rectangle 6 }; 7 8 int main() { 9 10 ShapeType shape = circle;11 12 switch(shape)...
分类:
编程语言 时间:
2015-05-30 15:16:36
阅读次数:
125
Implement int sqrt(int x).Compute and return the square root of x. 1 class Solution { 2 public: 3 int mySqrt(int x) { 4 unsigned long long...
分类:
其他好文 时间:
2015-05-29 20:05:20
阅读次数:
114
题目:Implementint sqrt(int x).Compute and return the square root ofx.代码:class Solution {public: int mySqrt(int x) { if (x mid )...
分类:
其他好文 时间:
2015-05-29 17:15:45
阅读次数:
113
examination questionsImplement int sqrt(int x).Compute and return the square root of x.Examplesqrt(3) = 1sqrt(4) = 2sqrt(5) = 2sqrt(10) = 3ChallengeO(...
分类:
其他好文 时间:
2015-05-28 19:57:51
阅读次数:
96
https://github.com/thinkpixellab/flatland{"color_scheme":"Packages/Theme-Flatland/FlatlandDark.tmTheme","flatland_square_tabs":true,"font_face":"Sour....
分类:
Web程序 时间:
2015-05-28 19:46:02
阅读次数:
204
Saving James Bond - Easy VersionAssume that the lake is a 100 by 100 square one. Assume that the center of the lake is at (0,0) and the northeast corn...
分类:
其他好文 时间:
2015-05-28 15:48:22
阅读次数:
167
思路比较明确,就是一个数,如果和另外一个数乘起来是个平方数的话,那么满足一个条件
数A可以分解成为n1 个 a1,n2 个 a2 ……
数B可以分解成为m1个 a1,m2 个 a2……
这满足的条件是(ni + mi) % 2 == 0
一个数的分解出来奇个数的因子乘起来得到的值为v,找之前有几个数他的奇个数因子成积为v
代码如下:
#include
#include
#include...
分类:
其他好文 时间:
2015-05-27 22:49:55
阅读次数:
152
#include#include#include#include#define max(a, b)(a > b ? a : b)#define N 30int a[N], vis[N], n, k, f;void DFS(int s, int m, int d)//s为搜索起点 m为已组成的正方体的...
分类:
其他好文 时间:
2015-05-27 19:05:05
阅读次数:
130
Retrofit
A type-safe REST client for Android and Java
Android中非常有名的网络框架
官网 :http://square.github.io/retrofit/
参考项目: http://square.github.io/okhttp/
Android 示例项目: https://github.com/goodev/Retrofi...
分类:
其他好文 时间:
2015-05-27 01:00:21
阅读次数:
441