class Person def initialize(name,age=18) @name=name
@age=age @motherland="China" end def talk puts "my name is " ...
分类:
其他好文 时间:
2014-05-01 12:08:53
阅读次数:
297
看到今天,终于自己动手写了一个自己的vector,我这个版本的vector只有vector主要的一些操作,包括原版vector的所有构造函数,begin(),end(),size(),capacity(),empty(),erase(),clear(),pop_back,push_back(),重载...
分类:
其他好文 时间:
2014-05-01 10:51:13
阅读次数:
402
原题地址:http://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/题意:Given
a linked list, remove thenthnode from the end of list and return its he...
分类:
编程语言 时间:
2014-05-01 06:42:15
阅读次数:
332
1 保留小数点后两位#include cout const char * spilt="/";char
*p;p=strtok(str,spilt);while(p!=NULL){ //cout
#includesort(Rs.begin(),Rs.end());sort(Rs.begin(),Rs...
分类:
编程语言 时间:
2014-05-01 05:05:45
阅读次数:
409
1 HDFS服务中,默认端口集合:
1. HDFS 端口
Service
Servers
Default Ports Used
Protocol
Description
Need End User Access?
Configuration Parameters
NameNode WebUI
Master Nodes (NameNo...
分类:
其他好文 时间:
2014-04-29 13:24:21
阅读次数:
492
sqlsever 备份和上传的一个国外软件不错,蛮方便的,小巧使用,还可以FTP上传备份数据。...
分类:
数据库 时间:
2014-04-29 13:12:20
阅读次数:
311
Vector 计算 均值(mean) 和 方差(variance)
本文地址: http://blog.csdn.net/caroline_wendy
vector的数组, 计算均值和方差的最简方法.
代码:
double sum = std::accumulate(std::begin(resultSet), std::end(resultSet), 0.0);...
分类:
编程语言 时间:
2014-04-28 10:44:42
阅读次数:
587
Problem Description
Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!
Input
One N in one line, process to the end of file.
Output
For each N, output N! i...
分类:
其他好文 时间:
2014-04-28 10:36:41
阅读次数:
341
直接上存储过程、函数
--执行不带参数但带返回值的存储过程
CREATE OR REPLACE PROCEDURE proc_getUserCount(v_totalCount OUT NUMBER) AS
BEGIN
SELECT COUNT(*) INTO v_totalCount FROM vote_user;
END;
--测试不带参数但带返回值的存储过程
DECLARE
v_t...
分类:
其他好文 时间:
2014-04-28 10:25:43
阅读次数:
461
http://poj.org/problem?id=2947
大致题意:
有n种装饰物,m个已知条件,每个已知条件的描述如下:
p start end
a1,a2......ap (1
第一行表示从星期start到星期end一共生产了p件装饰物(工作的天数为end-start+1+7*x,加7*x是因为它可能生产很多周),第二行表示这p件装饰物的种类(可能出现相同的种类,即ai=aj)。...
分类:
其他好文 时间:
2014-04-27 21:12:04
阅读次数:
339