Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Fo...
分类:
移动开发 时间:
2014-10-11 05:30:54
阅读次数:
228
3.进度条1.横向进度条带固定百分比functionSetProgress(progress){if(progress){$(".inner").css("width",String(progress)+"%");//控制#loadingdiv宽度$(".inner").html(String(progress)+"%");//显示百分比}}vari=0;functiondoProgress(){if(i>80){return;}if(i<=80){s..
分类:
Web程序 时间:
2014-10-11 02:14:25
阅读次数:
351
这是一个之前没发现的现象。
同样一段代码:
b=10000;
c=randn(1, b); %产生10000个正态分布的随机数
d=100;
[a,b]=hist(c,d); %平均分成100份
a=a/length(c); %把个数转换成频度
bar(a); ...
分类:
其他好文 时间:
2014-10-10 21:17:44
阅读次数:
230
状态栏的字体为黑色:UIStatusBarStyleDefault状态栏的字体为白色:UIStatusBarStyleLightContent一、在info.plist中,将View controller-based status bar appearance设为NO状态栏字体的颜色仅仅由以下的属性...
分类:
移动开发 时间:
2014-10-10 21:12:54
阅读次数:
187
方法1:1.关闭updating indexWindow => Preferences => Myeclipse Enterprise Workbench => Maven4Myeclipse => Maven=>禁用Download repository index updates on star...
分类:
系统相关 时间:
2014-10-10 16:37:14
阅读次数:
647
先来看一个最简单的函数: void foo(int a)
{ cout *pFunc2)(7865); 此时的使用方式是正确的。 那么bar函数是static函数,它具有什么特点呢? void (*pFunc)(int) = &Foo::bar; pFunc(123); 我们发现,static函数和...
分类:
其他好文 时间:
2014-10-09 22:08:47
阅读次数:
204
1.insertInsert时,from子句既能够放在select子句后,也能够放在insert子句前,以下两句是等价的hive> FROM invites a INSERT OVERWRITE TABLE eventsSELECT a.bar, count(*) WHERE a.foo > 0 G...
分类:
其他好文 时间:
2014-10-09 21:51:37
阅读次数:
270
自定义progressdialog,改善用户体验
效果图:
具体实现方式:
1.定义Dialog的Layout布局
2.设置动画anim
3.创建自定义dialog的样式
4.创建共有方法来控制Dialog
1.定义Dialog的Layout布局 : layout目录下 layout_loading_dialog.xml
<LinearLayo...
分类:
其他好文 时间:
2014-10-09 18:01:37
阅读次数:
212
在eclipse中点击window→Customize Perspective→Command Groups availability→Available command groups下勾选Android SDK and AVD Manager选项,然后在Tool Bar Visibility 下勾...
分类:
移动开发 时间:
2014-10-08 00:43:54
阅读次数:
224
用过jquery的一般都知道在jquery中可以链式调用,代码简洁优雅。比如$(“a”).addClass(“test”).show().html(“foo”);。
在redis-py中的pipeline中也可以链式调用,比如pipe.set('foo', 'bar').sadd('faz', 'baz').incr('auto_number').execute() 。
那么究竟怎么实现的呢?...
分类:
编程语言 时间:
2014-10-07 00:27:11
阅读次数:
278