#include #include #include #include #include
#define BUFF_LEN 1024using namespace std;long file_len(string file_name);void
init(string file_name){}voi...
分类:
其他好文 时间:
2014-07-22 23:00:54
阅读次数:
190
1 #include 2 3 int main(void) 4 { 5 int a,b,c; 6
int temp; 7 printf("please input a b c\n"); 8 scanf("%d %d
%d",&a,&b,&c); 9 10 if(a>b)11 {12 te...
分类:
其他好文 时间:
2014-07-22 23:00:52
阅读次数:
353
计算闰年的方法:如果某年能被4整除但不能被100整除,或者该年能被400整除则为闰年。(year%4==0&&year%100!=0)||year%400==0
1 #include 2 3 int main(void) 4 { 5 int year; 6 printf("please in...
分类:
其他好文 时间:
2014-07-22 23:00:32
阅读次数:
247
问题描述:有一条长长的阶梯,如果每跨2阶,那么最后剩1阶;如果每跨3阶,那么最后剩2阶;如果每跨5阶,那么最后剩4阶;如果每跨6阶,那么最后剩5阶;如果每跨7阶,刚好走完。请问这条阶梯至少多少阶。(求所有三位阶梯数)#include
//阶梯问题 采用穷举int main(void){int i;f...
分类:
其他好文 时间:
2014-07-22 23:00:12
阅读次数:
228
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ //1.取消选中这一行 [tableView
deselectRowAtIndexPath:indexPath.....
分类:
其他好文 时间:
2014-07-22 22:59:54
阅读次数:
216
Hibernate 加载数据 有get,跟Load 1、懒加载:
使用session.load(type,id)获取对象,并不读取数据库,只有在使用返回对象值才正真去查询数据库。@Test public void
test1() { Session session = null;...
分类:
系统相关 时间:
2014-05-01 22:40:35
阅读次数:
614
本实例:输入一个32位二进制的数,每隔八位分开将其转换为十进制以IP格式输出。 1
#include 2 /* 3 以IP地址形式输出 4 */ 5 int main(void) 6 { 7 int i; 8 int ip[4]={0}; 9
char a[33];...
分类:
其他好文 时间:
2014-05-01 22:19:07
阅读次数:
754
代理模式与装饰器模式的区别,主要大于,从使用者(客户端)的角度来看的://装饰器的客户public class Client{ public static
void main(String[] args){ //客户指定了装饰者需要装饰的是哪一个类 ...
分类:
其他好文 时间:
2014-05-01 18:47:25
阅读次数:
354
1、权限2、代码播放:new Thread(){ public void run(){
mediaPlayer=MediaPlayer.create(MainActivity.this, Uri.parse(wangZhi)); try{ URL
myURL...
分类:
其他好文 时间:
2014-05-01 18:45:24
阅读次数:
288
最近做了关于二维码解析的模块
选用的是google的开源工程Zxing
在Zxing 添加闪光灯功能 如下:
在 com.xxx.xxx.Zxing.camera 包下的CameraManager类中
添加代码:
//openLight 是开启闪光灯
//offLight 是关闭闪光灯
public void openLight(){
if (camer...
分类:
移动开发 时间:
2014-04-30 22:15:38
阅读次数:
414