/****************************************************************** find the biggest x number in a sequence* the basic method is the same as the Quic....
分类:
其他好文 时间:
2014-07-06 13:12:01
阅读次数:
176
因为写ruby的时候感觉混身上下都拽起来了,所以比较喜欢用ruby写代码。今天遇到了一个webdriver timeout的问题,问题本身还是因为我对webdriver不了解以及破文档导致的。首先我们把问题简化一下:
driver = Selenium::WebDriver.for :safari
driver.navigate.to "http://www.faraway.com"
wait = Selenium::WebDriver::Wait.new(:timeout => 1000) # seco...
分类:
Web程序 时间:
2014-07-06 12:38:09
阅读次数:
266
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
给定一个字符串S,找出其中的最长回文...
分类:
其他好文 时间:
2014-07-06 00:15:15
阅读次数:
240
今天在写slidingmenu和fragment示例demo的时候,发现应用程序部署到手机会直接崩掉,logcat里面提示的消息如下:
出现了didn't find class on path dexpathlist错误,于是上google搜答案,发现stackoverflow上面有很多人遇到这个问题,于是找了个赞比较多的答案,看了看,确实是那么回事,之前从actionbarsherlo...
分类:
其他好文 时间:
2014-07-06 00:09:59
阅读次数:
443
UVa的题目好多,本题是数据结构的运用,就是Union Find并查集的运用。主要使用路径压缩。甚至不需要合并树了,因为没有重复的连线和修改单亲节点的操作。
郁闷的就是不太熟悉这个Oj系统,居然使用库中的abs就会WA,自己写了个abs小函数就过了。
题目:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&...
分类:
Web程序 时间:
2014-07-05 23:39:10
阅读次数:
339
There are two sorted arrays A and B of size m and n respectively.
Find the median of the two sorted arrays.
The overall run time complexity should be O(log (m+n)).
有两个已排序的数组A和B,大小为m 和 n。
找出两数组的中...
分类:
其他好文 时间:
2014-07-05 22:54:17
阅读次数:
244
vector是我使用比较多的一个容器,它相当于一个动态的数组,在STL中给他提供了很多接口,简单易懂,接下来简单的演示一下它是如何使用的。 我一般使用的一些函数接口有size(),reserve(),empty(),begin(),end(),push_back(),find(),erase(...
分类:
其他好文 时间:
2014-07-05 22:27:43
阅读次数:
276
Description: Given two strings, write a method to decide if one is a permutation of the other.We could use the same idea from CTCI 1.1. The only diffe...
分类:
其他好文 时间:
2014-07-05 21:43:01
阅读次数:
231
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace...
分类:
其他好文 时间:
2014-07-05 21:30:45
阅读次数:
175
private RichTextBox FindControl() { RichTextBox ret = null; try { Control[] controls = Application.OpenForms["MainForm"].Controls.Find("txtContent", ....