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 Aynsc 和 Await 关键字的研究在 .NET 4.0 以后,基于 Task
的异步编程模式大行其道,因其大大简化了异步编程所带来的大量代码工作而深受编程人员的欢迎,如果你曾经使用过 APM(基于 IAsyncResult) 和 EAP(
基于 event/delegate),那么你一定感...
分类:
其他好文 时间:
2014-05-01 02:42:05
阅读次数:
564
有时候我们会需要在界面上拖动view;uiview是继承于uiresponder的,所以可以响应触摸相关的事件。
重点是以下一组方法:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent...
分类:
移动开发 时间:
2014-04-29 13:41:20
阅读次数:
485
At the start of each school year, a very important event happens at Hogwarts. Each of the first-year wizards and witches is assigned to one of the four Hogwarts houses. The bravest children are put
...
分类:
其他好文 时间:
2014-04-29 13:38:20
阅读次数:
459
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
//扫雷游戏
package Bible001;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class Mine extends MouseAdapter {
private JFrame mainFrame;
private int[][] data;
private JButton[...
分类:
编程语言 时间:
2014-04-27 21:32:59
阅读次数:
363