摘要: (Android 二维码,扫描下载C语言学习资源) 阅读全文
posted @ 2014-02-15 12:15 丸子No1 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 集群(Cluster)内部的机子是并列的,每台机子内容都是一样的,相当于很多复制品,增加系统的稳定性。 这里集群包括web服务器集群和数据库集群。 尝试搭建web服务器集群可以从Nginx入手,比较容易搭建,帮助理解集群的概念。Nginx的学习资源见http://wiki.nginx.org/Resources下的chinese guide。 关于数据库集群,http://zhengdl126.iteye.com/blog/419850这篇文章说的很清晰易懂。http://www.cnblogs.com/hb_cattle/archive/2011/10/12/2208910.html给出一. 阅读全文
posted @ 2014-02-13 15:40 丸子No1 阅读(151) 评论(0) 推荐(0) 编辑
摘要: public class swap{ public void sswap(int x,int y){ int s; s=x; x=y; y=s; System.out.println("Within sswap: x="+x+" y="+y); } public static void main(String args[]){ int x=10,y=7; System.out.println("x="+x+" y="+y); swap s=new swap(); s.sswap(x,y); System.out.p 阅读全文
posted @ 2014-02-04 19:32 丸子No1 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 把大象装冰箱分三部:1.把冰箱门打开;2.把大象装进去;3.把冰箱门关上。在此,创建一个最简单的Nginx负载均衡环境,也分三步走。第一步:两台笔记本,IP分别为192.168.1.103, 192.168.1.102; 两台都下载了wamp,测试好环境,保证通过103机子能成功访问 http:192.168.1.102:808和http://192.168.1.103:808(说明一下:使用808端口是因为Nginx默认使用的是80端口,进入httpd.conf 把端口修改成808即可)打开C:\Windows\System32\drivers\etc\hosts文件,最后添加一行 192. 阅读全文
posted @ 2014-02-02 15:10 丸子No1 阅读(1486) 评论(0) 推荐(0) 编辑
摘要: Hadoop 2.x release involves many changes to Hadoop and MapReduce. The centralized JobTracker service is replaced with a ResourceManager that manages the resources in the cluster and an ApplicationManager that manages the application lifecycle. These architectural changes enable hadoop to scale to mu 阅读全文
posted @ 2014-01-31 12:07 丸子No1 阅读(413) 评论(0) 推荐(0) 编辑
摘要: No word can elucidate her behavior. Being a member of orthodox church, her belief is akin to others. According to their thought, there shouldn't exists disparity in rank.HoldingThe SlovakSpectator in hand, she would rather believe this is vague news. She pertains her horrible idiosyncrasy, like 阅读全文
posted @ 2014-01-20 23:11 丸子No1 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Solution with loop:#include using namespace std;int main(){ int m,n,k,r; while(std::cin>>m>>n>>k){ r=n-m; coutusing namespace std;void operation(int m,int n,int mnow,int nnow,int k){ if(nnow==k) return; if(nnow>(m-mnow)){ nnow=nnow-(m-mnow); cout>m>>n>>k){ mnow=0; 阅读全文
posted @ 2014-01-06 16:54 丸子No1 阅读(274) 评论(0) 推荐(0) 编辑
摘要: //设计包含Min函数的栈//定义栈的数据结构,要求添加一个函数,能够得到栈的最小元素。要求函数Min, push,pop的时间复杂度都是O(1).#include #include struct minStackElement{ int data; int min;};struct minStack{ minStackElement *data; int size; int top;};minStack *minStackInit(int maxSize){ minStack *stack; stack->size=maxSize; stack... 阅读全文
posted @ 2014-01-05 00:40 丸子No1 阅读(176) 评论(0) 推荐(0) 编辑
摘要: #include #include struct BSTNode{ int v; struct BSTNode *left,*right;};struct BSTNode *root=NULL,*head=NULL,*tail=NULL;struct BSTNode* createNode(int data){ struct BSTNode *newNode; newNode=(struct BSTNode*)malloc(sizeof(struct BSTNode)); newNode->v=data; newNode->left=NULL; newNode... 阅读全文
posted @ 2014-01-04 17:42 丸子No1 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 struct BSTNode{ 4 int v; 5 struct BSTNode *left,*right; 6 }; 7 8 struct BSTNode *root=NULL; 9 10 struct BSTNode* createNode(int data){11 struct BSTNode *newNode;12 newNode=(struct BSTNode*)malloc(sizeof(struct BSTNode));13 newNode->v=data;14 newNode->left=NULL;15 newNod 阅读全文
posted @ 2014-01-04 15:26 丸子No1 阅读(205) 评论(0) 推荐(0) 编辑