码迷,mamicode.com
首页 >  
搜索关键字:while read line for ifs    ( 74720个结果
继承ViewGroup类
Android中,布局都是直接或间接的继承自ViewGroup类,其中,ViewGroup的直接子类目前有:AbsoluteLayout, AdapterView, DrawerLayout, FragmentBreadCrumbs, FrameLayout, GridLayout, LinearL...
分类:其他好文   时间:2014-07-22 22:49:52    阅读次数:184
hdu 1556 Color the ball
基础  树状数组 每输入一组数,就对染色次数进行修改; #include #include #include using namespace std; int s[100005],a; int low(int i) { return i&(-i); } void show(int q,int w) { while(q>0) { s[q]+=w;...
分类:其他好文   时间:2014-07-22 22:49:35    阅读次数:188
poj 2482 Stars in Your Window (线段树扫描线)
题目大意: 求一个窗口覆盖最多的星星的权值。 思路分析: 每一个星星看成 左下点为x y 右上点为x+w-1 y+h-1 的矩形。 然后求出最大覆盖的和。 #include #include #include #include #define lson num<<1,s,mid #define rson num<<1|1,mid+1,e #define max...
分类:Windows程序   时间:2014-07-22 22:48:54    阅读次数:299
ML | k-means
what's xxxk-means clustering tends to find clusters of comparable spatial extent, while the expectation-maximization mechanism allows clusters to have...
分类:其他好文   时间:2014-07-20 09:17:04    阅读次数:227
Some in urllib2 - python2.7
1. urlopen可以给一个Request Object返回一个response object,read()读取相应对象的内容,这时候的print(the_page)可以输出网页的html内容1 import urllib22 3 req = urllib2.Request('http://www...
分类:编程语言   时间:2014-07-20 09:03:38    阅读次数:301
[php错误]PHP中Notice: unserialize(): Error at offset of bytes in on line 的解决方法
使用unserialize函数将数据储存到数据库的时候遇到了这个报错,后来发现是将gb2312转换成utf-8格式之后,每个中文的字节数从2个增加到3个之后导致了反序列化的时候判断字符长度出现了问题,所以需要使用正则表达式将序列化的数组中的表示字符长度的值重新计算一遍,代码如下:function m...
分类:Web程序   时间:2014-07-20 00:27:07    阅读次数:227
SpringBoard 无法启动应用程序(错误:-3)
暂时不知道错误的细节原因,重启模拟器就好了。 先记录下。...
分类:编程语言   时间:2014-07-20 00:24:02    阅读次数:200
uva 232 - Crossword Answers
代码又是挺乱的,时间太紧没空整理,思路也不好~但能AC…… 看不清楚可以留言,或者加qq一起探讨 #include #include #include using namespace std; char s[11][11]; int num[11][11]; int vis[11][11]; int main() { int r,c; int t=0; while(sc...
分类:其他好文   时间:2014-07-19 23:38:39    阅读次数:313
0 1背包模板
# include # include # include # define max(x,y) x>y?x:y; int v[1001];//价值 int w[1001];//重量 int dp[1001][1001]; int main() { int n,m; while(scanf("%d%d",&m,&n)!=EOF) { memset(dp,...
分类:其他好文   时间:2014-07-19 23:38:19    阅读次数:309
欧几里得(模板)
int gcd(int n,int m)//n>m { //最大公约数 int r; while(m) { r = n%m; n = m; m = r; } return n; } int kgcd(int a,int b) { if(!a) return b; if(!b) retu...
分类:其他好文   时间:2014-07-19 23:37:19    阅读次数:309
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!