现在位置: 首页 > Authegosesjes发表的所有文章
  • 04月
  • 30日
综合 ⁄ 共 5406字 评论关闭
Extending the Data Center Into the Cloud By: Bill Kleyman January 11th, 2013       inShare At the heart of the cloud computing movement sits the data center infrastructure. The data center has long been the workhorse of the cloud world, providing bandwidth, connectivity, and of course resources to help the environment run continuously (or as continuously as possible). During the early days of cloud computing, there was a disconnect between cloud resources and the intern......
阅读全文
  • 02月
  • 16日
综合 ⁄ 共 1002字 评论关闭
问题描述 Hungar has bought some farms.There is a river near the farm. It was found that linking these farms is more conducive for hungar. Therefore, he need to calculate that the minimum number of waterway he should build to connect all the farms, either connecting directly or not directly.There is not existing a waterway between river and farm,so you should also connecting them. 输入 Input until EOF.For each case:First line: two non-negative integ......
阅读全文
  • 12月
  • 21日
综合 ⁄ 共 1795字 评论关闭
三种解法:多重背包转化为完全背包和01背包;多重背包通过二进制化化为01背包;通过计数法优化为2重循环。 code1:         47MS  #include <cstdio> #include <cstring> #define Max(a,b) (a) >(b)?(a):(b) int dp[100005], Cost[11], Count[11], cash; void ZeroOnePack(int cost) { int i; for(i=cash; i>=cost; --i) dp[i] = Max(dp[i], dp[i-cost]+cost); } void CompletePack(int cost) { int i; for(i=cost; i<=cash; ++i) dp[i] = Max(dp[i], dp[i-cost]+cost)......
阅读全文
  • 09月
  • 15日
综合 ⁄ 共 3725字 评论关闭
1 xml    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:orientation="vertical" >     <SurfaceView         android:id="@+id/videoView"         android:layout_width="300dip"         android:layout_height="200dip"         android:visibility="visible" >     </SurfaceView>     <RelativeLayout         android:layo......
阅读全文
  • 07月
  • 15日
综合 ⁄ 共 2790字 评论关闭
QQ,一个通信工具,号称6亿的用户量,现在每天的活跃账户在1亿以上。在中国,只要是一个经常上网的网民,手中必须得有一个,当然也可以没有,但是朋友、同学、同事都有,就你没有,人家说什么事都是用这个在联系,你不用,都不好进行沟通和做事情了。 既然是通信工具,肯定就涉及的网络通讯,自然就引申到协议了。其实QQ协议,在国内已经分析的比较完善了,由于TX在基于QQ这个产品上承载的很多很多的业务(当然收入也是很多很多很多…..),因此要将其全部分析完全,那工作量非常大,而且没有必要,只需要分析它的密钥交互过程,......
阅读全文
  • 05月
  • 22日
综合 ⁄ 共 8173字 评论关闭
 定时任务之-Quartz使用篇           Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,它可以与J2EE与J2SE应用程序相结合也可以单独使用。Quartz可以用来创建简单或为运行十个,百个,甚至是好几万个Jobs这样复杂的日程序表。Jobs可以做成标准的Java组件或 EJBs。官方网站:http://www.opensymphony.com/quartz   相关Jar:    quartz-all-1.6.0.jar    jta.jar    commons-logging-1.1.jar    commons-collections3.2.jar   经过封装的管理类: /** * 版权所有:华信软件 * 项目名称:公用模块 * 创建者......
阅读全文
用jdbc连接mysql数据库进行插入操作时,总是出现上面的错误,原本以为是sql语句出错了,可是检查了很多遍明明没有错,郁闷了好长时间,后来终于找到了错误的地方,原来我是用mysql的关键字(call)做表名了。将表名更改为_call,就没有什么问题了。
阅读全文
  • 04月
  • 29日
综合 ⁄ 共 486字 评论关闭
   其实这是一道很简单的进制转化后求各个数字的位数之和的例子,在我们看来就是用一个while( n > 0 )的式子就好,不管是多少进制,只要这样依次模拟短线除法 的运算,然后一步一步的切就OK了。但是有一点十分重要的东西要记住,那就是不管怎么样,一定要不断的重新赋值n,否则的话,会产生链带效应,造成没必要的WA、、、 # include<cstdio> # include<iostream> using namespace std; int main(void) { int n; while ( (cin>>n)&&n ) { int sum1 = 0; int s......
阅读全文
  • 04月
  • 25日
综合 ⁄ 共 1430字 评论关闭
题意:在坐标范围在[1,100000000]内有10个mine,有一个人从1出发,有p的概率向前走一步,1-p的概率向前走两步,问该人能顺利通过不踩到一个mine的概率是多少。题解:因为人只能向前走一步或者两步,所以最后人到达pos[n]+1位置的概率即为答案(如果可以到达,否则为0),想到dp[i]表示该人到达坐标为 i 的位置的概率,          即dp[i] = dp[i-1] * p + dp[i-2] * (1 - p);但是坐标范围很大,考虑矩阵快速幂加速,因为如果该地方有mine则概率为0,所以需要在每两个mine之间进行一次矩阵快速          幂即可。每次都是[ans , 0] ......
阅读全文
  • 04月
  • 09日
综合 ⁄ 共 2034字 评论关闭
文中尽量用上所有的操作和属性,以做示范 <script language="JavaScript"><!--var doc = new ActiveXObject("Msxml2.DOMDocument"); //ie5.5+,CreateObject("Microsoft.XMLDOM") //加载文档//doc.load("b.xml");//创建文件头var p = doc.createProcessingInstruction("xml","version='1.0'  encoding='gb2312'");    //添加文件头    doc.appendChild(p);//用于直接加载时获得根接点//var root = doc.documentElement;//两种方式创建根接点//    var root = doc.createElement("students");    var root = doc.createNod......
阅读全文
  • 02月
  • 17日
综合 ⁄ 共 172字 评论关闭
File file = new File(filepath);     InputStream inputStream = new BufferedInputStream(                             new FileInputStream(file));   FileInputStream fis = new FileInputStream(filepath);
阅读全文
  • 01月
  • 14日
综合 ⁄ 共 2052字 评论关闭
题意:有n(1<=n<=20)个人,每一个人在发电报的时候是以固定的绰号发送的,现在给定一串序列表示某个人进入房间,某个人从房间出去,或者截获了以          什么绰号发送的电报,问能否推出每个人对应的绰号是什么,如果推理不出来输出"???"。 题解:很容易想到二分匹配,但是正常思维构图之后会发现很难搞,因为一些明明矛盾的边的关系也搞进去了,类似于建反图的方法,每次把一定不会满足条件          的边去掉,最后剩下的边是可能满足的关系对,之后枚举每一个二分图中的必须边,如果删除后匹配数减少那么当前的匹配是......
阅读全文