上一页 1 ··· 177 178 179 180 181 182 183 184 185 ··· 300 下一页
2013年8月24日

POJ 3040 Allowance 贪心

摘要: 这题目的贪心思路还是有一点细节问题的。还没有证明,据说是因为题目给的条件是每个价格是比它小的价格的倍数才能这么贪心的。思路如下:假设要给奶牛的钱为C1)从大面值到小面值一次拿钱,能拿多少拿多少。但是注意不能拿到的钱的总和大于C2)如果第一步拿到的钱不够C,那么就从小面值到大面值拿钱,能拿多少拿多少。直到拿到的钱总和大于等于C我刚开始第一步实现的比较好,但是第二步想错了。后来才意识到大拿到的钱尽量不要超过C很多才是最优的,所以第二步要从小到大拿#include #include #include #include #include #include #define MAXN 11111#defi 阅读全文
posted @ 2013-08-24 20:24 you Richer 阅读(333) 评论(0) 推荐(0)

linux内核函数之 blk_plug

摘要: 分析: /** blk_plug permits building a queue of related requests by holding the I/O* fragments for a short period. This allows merging of sequential requests* into single larger request. As the requests are moved from a per-task list to* the device's request_queue in a batch, this results in improv 阅读全文
posted @ 2013-08-24 20:22 you Richer 阅读(1420) 评论(0) 推荐(0)

Fragment总结

摘要: 一、总体工程图: 二、main.xml 三、fragment1.xml 四、fragment2.xml 五、MainActivity.javapackage com.jltxgcy.fragmentdemo;import android.os.Bundle;import android.app.Activity;import android.support.v4.app.FragmentActivity;import android.view.Menu;public class MainActivity extends FragmentActivity... 阅读全文
posted @ 2013-08-24 20:19 you Richer 阅读(247) 评论(0) 推荐(0)

字符串生成器

摘要: 今天把CDKEY生成器给完善了一下,增加了大写字母,小写字母,数字多选择性生成。 package randomString;import java.awt.Toolkit;import java.awt.datatransfer.Clipboard;import java.awt.datatransfer.StringSelection;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.util.Random;import javax.swing.JButton;import . 阅读全文
posted @ 2013-08-24 20:17 you Richer 阅读(325) 评论(0) 推荐(0)

[置顶] 页面缓存,cache,设置缓存过期时间,OutputCache

摘要: 页面缓存方法一:protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //缓存有数据 if (Cache["List"] == null) { string sql = "select * from [dbo].[sys_user]"; ////没有过期时间 ////Cache["List"] = AutoCode... 阅读全文
posted @ 2013-08-24 20:15 you Richer 阅读(342) 评论(0) 推荐(0)

物联网操作系统在运营商领域推广的理论分析

摘要: 这是我的MBA毕业论文,里面建立的一些理论模型,为物联网操作系统在运营商领域进行推广奠定了理论基础。因为根据文章中的“完美物联网产业链模型”和关联函数分析法,物联网操作系统是与运营商的核心产品-通信管道,有强相关关系的。因此物联网操作系统在运营商内推广,符合理论分析。当然,模型是构造的,至于准不准,现在还真不好说。但从理论上,确是能够说的通的。欢迎业界朋友批评指点。论文下载地址:http://download.csdn.net/detail/hellochina15/6005277 文章摘要:物联网的发展和应用被誉为信息产业内继移动互联网后的又一次革命,是通信和计算机技术更加深入的应用到工业生 阅读全文
posted @ 2013-08-24 20:13 you Richer 阅读(172) 评论(0) 推荐(0)

使用Seam Framework + JBoss 5.0 开发第一个Web应用 - 简单投票程序

摘要: Seam这个单词的本意是缝合、连接,因而,Seam的作用即是把Java EE 规范里的JSF 和 EJB技术完美融合在一起,免去了很多胶合代码,并增强了JSF 和 EJB的很多功能。Seam的设计目标之一是,写最少的代码,做最多的事,并且极力减少 “对XML的编程”。现在我们就用Seam_2.2.2_Final 来开发一个简单的投票程序。截图如下: 使用 seam-gen 生成应用程序骨架 在终端运行 seam setup启动seam-gen。按照提示回答所有问题。这里使用postgreSQL数据库,以EAR的格式部署应用程序,工程名为: icon_vote。 关于... 阅读全文
posted @ 2013-08-24 20:10 you Richer 阅读(264) 评论(0) 推荐(0)

内存的动态分配

摘要: void *malloc(unsigned int)函数包含在头文件中,void * //泛型指针,其返回值为指针可以付给任何类型 malloc(1000); malloc ( n ); (float *)malloc(n*sizeof(float)); (int *)malloc(n*sizeof( int ));等等都代表开辟了一个内存空间将该空间的首地址赋予指针,注意其类型一致例如:char *p; p= (char *)malloc(n*sizeof(char)); /*void *malloc(unsigned int) void * //泛型指针,其返回值为指针可以付给... 阅读全文
posted @ 2013-08-24 20:08 you Richer 阅读(161) 评论(0) 推荐(0)

阿尔和

摘要: http://travel.ctrip.com/ask-4466424.htmlhttp://travel.ctrip.com/ask-4466373.htmlhttp://travel.ctrip.com/ask-4466323.htmlhttp://travel.ctrip.com/ask-4466281.htmlhttp://travel.ctrip.com/ask-4466225.htmlhttp://travel.ctrip.com/ask-4466176.htmlhttp://travel.ctrip.com/ask-4466125.htmlhttp://travel... 阅读全文
posted @ 2013-08-24 20:06 you Richer 阅读(357) 评论(0) 推荐(0)

谁知道呢就

摘要: http://travel.ctrip.com/ask-4466424.htmlhttp://travel.ctrip.com/ask-4466373.htmlhttp://travel.ctrip.com/ask-4466323.htmlhttp://travel.ctrip.com/ask-4466281.htmlhttp://travel.ctrip.com/ask-4466225.htmlhttp://travel.ctrip.com/ask-4466176.htmlhttp://travel.ctrip.com/ask-4466125.htmlhttp://travel... 阅读全文
posted @ 2013-08-24 20:01 you Richer 阅读(171) 评论(0) 推荐(0)
上一页 1 ··· 177 178 179 180 181 182 183 184 185 ··· 300 下一页