码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
hadoop;RPC;调用接口;cmd的jps查看java进程;有main方法的类才能产生进程
RPC(remote procedure call)不同java进程间的对象方法调用,一方称作服务端,一方称作客户端;被调用的对象的方法执行发生在server端 首先应该编写服务端MyServer,客户端MyClient,操作对象类MyBiz(根据服务端方法参数推测的),操作对象接口MyBizable(根据客户端方法参数推测的) 通过查看源码,一步步向里查看,直到没有return该方法出现...
分类:编程语言   时间:2014-05-26 05:34:16    阅读次数:471
hdu2504又见GCD
求最大公约数。 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
常用的js函数
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
10382 - Watering Grass(贪心 区间覆盖问题)洒水面覆盖
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的bug测试用例 ?? jump game
之所以说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
LeetCode——Palindrome Partition
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!