RPC(remote procedure call)不同java进程间的对象方法调用,一方称作服务端,一方称作客户端;被调用的对象的方法执行发生在server端
首先应该编写服务端MyServer,客户端MyClient,操作对象类MyBiz(根据服务端方法参数推测的),操作对象接口MyBizable(根据客户端方法参数推测的)
通过查看源码,一步步向里查看,直到没有return该方法出现...
分类:
编程语言 时间:
2014-05-26 05:34:16
阅读次数:
471
求最大公约数。 1 //Accepted 228 KB 0 ms 2 #include 3
#include 4 int gcd(int a,int b) 5 { 6 if (b==0) return a; 7 return gcd(b,a%b); 8
} 9 int...
分类:
其他好文 时间:
2014-05-26 02:54:42
阅读次数:
199
1、C++编成求二叉树的深度;int binTreeDepth(link *head){ int
depthl=0,depthr=0; if(head==null) return 0; else{ if ((head->left)!=null)
depthl = 1 + binTreeDepth(h...
分类:
其他好文 时间:
2014-05-26 02:48:07
阅读次数:
266
二分查找也是分治策略和递归一个重要的实例。对于一个有序的数组,二分查找的时间复杂度是O(logn)int binarysearch(int a[],int
s,int e,int k){ int mid =(s+e)/2; if(k==a[mid]) return mid;...
分类:
其他好文 时间:
2014-05-26 02:23:44
阅读次数:
170
1 function $(){ return
document.getElementById(arguments[0])}; 2 3 /** 4 * 得到上一个元素 5 * @param {Object}
elem 6 */ 7 function prev(elem){ 8...
分类:
Web程序 时间:
2014-05-26 01:49:11
阅读次数:
388
问题描述 这题想得分吗?想,请输出“yes”;不想,请输出“no”。输出格式
输出包括一行,为“yes”或“no”。#include"stdio.h"int main(){ printf("yes"); return 0;}View
Code
分类:
其他好文 时间:
2014-05-26 00:26:54
阅读次数:
175
double qiuzhi(int id)
{
double t1=cc[id].rid*cc[id].rid;
double t2=w*w/4;
double t3=t1-t2;
double t4=sqrt(t3);
return t4;
}
void to_qujian()
{
for(int i=0; i<t; i++)
{
...
分类:
其他好文 时间:
2014-05-24 23:23:20
阅读次数:
363
只是实现了链表ADT的部分功能。
/*---编写打印出一个单链表的所有元素的程序---*/
#include
#include
struct Node{
int val;
struct Node *next;
};
Node *findEnd(Node *list){
while(list->next) list = list->next;
return list;
}
v...
分类:
其他好文 时间:
2014-05-24 22:30:37
阅读次数:
232
之所以说leetcode的测试用例有问题,是因为我刚开始理解错了题意,写下了如下的错误的代码。但是却AC了。
错误代码为:
bool canJump(int A[], int n) {
if(n == 0) return true;
int sum = 0; //记录当前的最远距离
int i = 0;
...
分类:
其他好文 时间:
2014-05-24 19:45:57
阅读次数:
1081
Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "...
分类:
其他好文 时间:
2014-05-24 14:29:45
阅读次数:
222