Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation.
The teacher has written down the sum of multiple numbers. Pupils should ca...
分类:
其他好文 时间:
2014-07-22 23:05:53
阅读次数:
382
本实例演示了Sencha Touch读取服务器端发来的Json数据。
文档结构如下:
app.js代码如下:
Ext.require(['Ext.form.Panel',
'Ext.data.Store',
'Ext.dataview.DataView']);
Ext.application({
name:'MyApp',
ic...
分类:
其他好文 时间:
2014-07-22 23:05:12
阅读次数:
382
heap不属于STL容器,它扮演者priority queue的助手。heap是一种完全二叉树,可由数组来实现,但heap需要动态改变大小,所以最终选择了vector作为底层容器。STL默认提供最大堆。
题外话:分析heap的源码就能清楚的理解堆这种数据结构的例程,而STL库代码的质量又很高,所以看堆的代码,STL源码是一个很好的选择。
为了满足完全二叉树的性质,新插入的元素一...
分类:
其他好文 时间:
2014-07-22 23:04:53
阅读次数:
363
下载了PushMeBaby在xcode5里中不能使用,类库变了。需要添加Carbon.framework库,在引用的地方改成:
#include ,程序就可以 运行了。测试时要变成自己的证书。
下载地址:...
分类:
移动开发 时间:
2014-07-22 23:04:52
阅读次数:
466
这样的题目一般都可以找公式的,但是本题却是找不到什么好的公式了。
只有暴力去模拟玩这个游戏了。还好因为其数据不大,故此也许出题者也是没有公式的。...
分类:
其他好文 时间:
2014-07-22 23:04:13
阅读次数:
318
//-----------------------------------1.getsockopt和setsockopt--------------------------------------
#include
int getsockopt(int sockfd, int level, int optname, void* optval, socklen_t* optlen);
int...
分类:
其他好文 时间:
2014-07-22 23:03:55
阅读次数:
329
题目大意:
怎么分配n个任务到m个服务器上使得负载尽量平衡。
思路:
将任务从大到小排序,依次放入负载最小的那个服务器中。
因为是spj 的缘故,所以可以使用这个贪心。
比如数据
6 2
7 5 3 3 3 3
就会得到错误答案。
#include
#include
#include
#include
#include
using nam...
分类:
其他好文 时间:
2014-07-22 23:03:34
阅读次数:
300
相当于一个简单的冒泡排序了,不过不用直接排序,只是计算一下而已。
注意
1 最大值和最小值交换的时候可以减少一次交换的。
2 元素是会重复的。...
分类:
其他好文 时间:
2014-07-22 23:03:32
阅读次数:
343
if (ios_Vewsion_5_Or_Above) {//iOS 5系统之后的版本
self.tableView.bounces =
NO;
} else {
for (id subview
in self.tableView.subviews)
if ([[subview
class] isSubclassOfCl...
分类:
其他好文 时间:
2014-07-22 23:03:13
阅读次数:
281
去网站下载mysql的yum源,地址如下:
http://repo.mysql.com/
在linux上先查看系统的版本号,根据版本号对应下载
more /etc/redhat-release
rpm -Uvh
http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
yum -y upgrade mysql
m...
分类:
数据库 时间:
2014-07-22 23:03:13
阅读次数:
472