为期两年多的辅修学习,伴随着一场意外频发的答辩似乎走到了尽头。回顾一下吧当初选择的时候多少是有点纠结的,要不要选择第二个专业,选择一个什么样的专业。它对将来有没有帮助,有多大帮助?思前想后,累!最终选了英语,最主要的原因就是本能的想,或者没有原因。现在看来,凭借自己的直觉去做选择往往是正确的,对,F...
分类:
其他好文 时间:
2014-05-19 19:44:33
阅读次数:
186
【题目】
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
For example,
Given input array A ...
分类:
其他好文 时间:
2014-05-18 18:25:19
阅读次数:
272
??
JDBC中的ResultSet API没有直接获取记录条数的方法,现介绍几个:
方法一:利用ResultSet的getRow方法来获得ResultSet的总行数
ResultSet rs = ps.executeQuery(sql);
rs.last(); //移到最后一行
int rowCount = rs.getRow();//得到当前行号,也就是记录数
...
分类:
其他好文 时间:
2014-05-18 15:25:34
阅读次数:
208
【题目】
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
【题意】
删除数组中指定的值。不关心在新数组的后面即数组尾部留下了什么值。
【思路】
思路同Remo...
分类:
其他好文 时间:
2014-05-18 14:53:56
阅读次数:
208
#pragma hdrstop
#pragma argsused
#include
#include
#include
#include "hdd.h"
const WORD IDE_ATAPI_IDENTIFY = 0xA1; // 读取ATAPI设备的命令
const WORD IDE_ATA_IDENTIFY = 0xEC; // 读取ATA设备的命令
const in...
分类:
其他好文 时间:
2014-05-18 14:36:24
阅读次数:
430
下面我们来了解如何实现一个自定义的迭代器,然后再开始慢慢理解迭代器的内部工作原理。先来看一个官方的例子:
<?php
class myIterator implements Iterator {
private $position = 0;
private $array = array(
"first_element",
"second_element",
"last_element",
);...
分类:
Web程序 时间:
2014-05-18 13:58:23
阅读次数:
404
【题目】
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters.
For example, given:
S:...
分类:
其他好文 时间:
2014-05-18 08:31:48
阅读次数:
228
题目:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Clarification:
What constitutes a word?
A sequence of non-spa...
分类:
其他好文 时间:
2014-05-18 04:12:07
阅读次数:
198
最近在做人事项目中的,数据导出word,具体的说就是从web客户端页面获取信息,添加到信函模板中,再导出为word文档。总结一下,学会了两种方法,1.通过将word模板转换为html文件,输出word。2.利用第三方组件Aspose.Words操作word模板,输出word。...
分类:
其他好文 时间:
2014-05-18 03:44:24
阅读次数:
257
除了邻接矩阵外储存图的另一种方法,适用于稀疏图。用一个有n结点,p条边的有向图,用a[i],b[i],l[i]分别表示第i条边的起点,终点,权值。first[x]表示x号结点连出的第一条边,next[i]表示与第i条边是同一个结点连出的下一条边,如果为0则表示已经没有下一条了。初始化:用last[x...
分类:
其他好文 时间:
2014-05-17 22:29:48
阅读次数:
468