代码创建图片播放
#import "ViewController.h"
#define kLength 15
@interface ViewController ()
@property(nonatomic, weak)UIImageView *myImage;
@property(nonatomic, weak)UILabel *myLabel;
@property(nonat...
分类:
其他好文 时间:
2015-05-09 10:21:36
阅读次数:
131
Oil Deposits
Time Limit: 3000MS
Memory Limit: Unknown
64bit IO Format: %lld & %llu
Submit
Status
Description
The GeoSurvComp geologic survey company is responsibl...
分类:
其他好文 时间:
2015-05-09 10:21:15
阅读次数:
94
一、导入Library
下载源码后(https://github.com/chrisbanes/Android-PullToRefresh),里面有个Library工程,添加工程到Eclipse中;二、导入项目
1.新建工程后,右键->Properties->Android->Add 选择上面的Library
2.main_activity.xml<?xml version="1.0" en...
分类:
其他好文 时间:
2015-05-09 10:22:11
阅读次数:
151
/* tcp_server.c */
#include
#include
#include
#include
#define portnum 3333
int main()
{
int sockfd,newfd;
struct sockaddr_in server_addr;
struct sockaddr_in client_addr;
char buffer[128];
...
分类:
其他好文 时间:
2015-05-09 10:19:15
阅读次数:
122
Andy's First Dictionary
Time Limit: 3000MS
Memory Limit: Unknown
64bit IO Format: %lld & %llu
Submit
Status
Description
Problem B: Andy's First Dictio...
分类:
其他好文 时间:
2015-05-09 10:21:11
阅读次数:
116
The Suspects
Time Limit: 1000MS
Memory Limit: 20000K
Total Submissions: 24970
Accepted: 12250
Description
Severe acute respiratory syndrome (SARS), an atypical pneumoni...
分类:
其他好文 时间:
2015-05-09 10:19:28
阅读次数:
120
我们不妨设a[i]表示正确做完第i道题的收益的期望,显然我们最后要求的就是a[0]咯,但这个先放一放,我们先讨论一下在做第i+1个题目前我们是选择答题呢还是选择放弃呢。
首先,我们可以直观的想到,如果做完i题就退出的话,就可以得到2^i这么多钱。不妨假设答对第i+1个题的概率为p,那么我们自然会想到用p乘以“某个值”表示答题所获得的收益的期望,如果p乘以这个值大于2^i的话,我们肯定...
分类:
其他好文 时间:
2015-05-09 10:20:39
阅读次数:
101
题目链接:POJ 2151 Check the difficulty of problems
题面:
Check the difficulty of problems
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 5519
Accepted: 2431
...
分类:
其他好文 时间:
2015-05-09 10:19:17
阅读次数:
134
Step1:
任选一个正整数A作为这个数列的第一项。
Step2:
如果A=1则停止。
Step3:
如果A为偶数,则A=A/2然后重新回到Step2。
Step4:
如果A为奇数,则A=3*A+1然后重新回到Step2。
这个演算法已经被证明当首项小于等于109时这个数列最终都会在Step2停止,但是有些A值在这个数列中会超出许多电脑的整数上限。在这个问题中我们想??要计算这个数...
分类:
其他好文 时间:
2015-05-09 10:19:35
阅读次数:
118
NS2网络仿真的过程可以总结为:
1、初始化
创建ns simulator
创建.tr文件(记录仿真结果)
创建.nam文件(记录仿真过程)
设置结束函数
设置仿真中所需的参数
2、创建仿真拓扑
创建节点
创建并设置链路
设置链路各链路在nam中的排列方式
3、创建流量
探测流量:向网络中添加的额外流量...
分类:
其他好文 时间:
2015-05-09 10:19:49
阅读次数:
166
既然下定决心,就要持之以恒!C Primer Plus 这仅仅只是开始……2015.5.9...
分类:
其他好文 时间:
2015-05-09 10:19:25
阅读次数:
121
SOJ1678, Mountains,数论,递推,二分
A mountain consists of one or more hills, each of which consists of upwards, which we denote with `/', and downwards, which we denote with '\'. We call upwards and downwards together as wards. Let /n be an upward of length n, an...
分类:
其他好文 时间:
2015-05-09 10:18:56
阅读次数:
189
SOJ1678, Mountains,数论,递推,二分
A mountain consists of one or more hills, each of which consists of upwards, which we denote with `/', and downwards, which we denote with '\'. We call upwards and downwards together as wards. Let /n be an upward of length n, an...
分类:
其他好文 时间:
2015-05-09 10:19:14
阅读次数:
194
SOJ2668 ,C(n,k),素数的性质,数论 组合数奇偶性
求组合数 C ( n , k) 的奇偶性...
分类:
其他好文 时间:
2015-05-09 10:17:35
阅读次数:
152
SOJ2666 分解 n!,数论,素数,ACM
给你一个数 n (1 < n <= 1000000) ,求 n! (n的阶乘)的质因数分解形式,质因数分解形式为
n=p1^m1*p2^m2*p3^m3……
* 这里 p1 < p2 < p3 < …… 为质数
* 如果 mi = 1, 则 ^ mi 就不需要输出...
分类:
其他好文 时间:
2015-05-09 10:17:31
阅读次数:
117
背景 当下很多公司都依赖于数据分析来提升产品质量。各种各样的数据库构架(比如并行数据库)正应对了这样的需求,但其缺点是技术人员必须依赖SQL这样远不如其他编程语言方便的语言来处理数据。所以很多人都选择了MapReduce,因为这种模式下只需要设计Map和Reduce两个方程就够了,但是难以重复使用,维护,和优化也是这种模式的缺陷。
在这样的情况下,兼顾两者优点的Pig Latin应运而生。P...
分类:
其他好文 时间:
2015-05-09 10:17:52
阅读次数:
5156
前三节,我详细的介绍了ASI的概念及基本使用。如果想了解的,请点击这里。由于AFN与ASI有很多相似的地方,所以我打算用一节的篇幅来介绍AFN。下载地址: https://github.com/AFNetworking/AFNetworking
AFN即AFNetworiking,AFN的主要结构如下:
1 : AFHTTPClient
提供了一个方便的网络交互接口,包括默认头,身份验证,...
分类:
其他好文 时间:
2015-05-09 10:18:03
阅读次数:
155