问题:寻找最长公共前缀思路:就是逐一检查每个string中的每一位,碰到不相等的时候,结束;每个string中这一位都相等,加入到common
prefix中~public String longestCommonPrefix(String[] strs) { int ...
分类:
其他好文 时间:
2014-05-19 21:12:05
阅读次数:
292
Given a binary tree, determine if it is a valid
binary search tree (BST).Assume a BST is defined as follows:The left subtree of
a node contains only n...
分类:
其他好文 时间:
2014-05-19 07:23:48
阅读次数:
357
jsfunction:selectBox:function(){ var
li=$(this); var selectbox=li.parent().parent();
selectbox.attr("data-checked",li.attr("data-value"));...
分类:
其他好文 时间:
2014-05-15 21:07:32
阅读次数:
287
父子化(摘自官文原文说明)父子化(Parenting)是使用Unity时需要理解的最重要的概念之一。当某个游戏对象(GameObject)是另一个游戏对象(GameObject)的父级(Parent)时,子级(Child)游戏对象(GameObject)会像其父级(Parent)一样移动、旋转和缩放。正如您的手臂与躯干相连,转动躯..
分类:
其他好文 时间:
2014-05-15 18:43:49
阅读次数:
808
1、gem安装出现下面错误
root@ubuntu:/home/git/gitlab# sudo gem install bundler --no-ri --no-rdoc
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https...
分类:
其他好文 时间:
2014-05-15 18:19:48
阅读次数:
304
Given a string, find the length of the longest
substring without repeating characters. For example, the longest substring
without repeating letters fo...
分类:
其他好文 时间:
2014-05-15 17:50:38
阅读次数:
298
Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings....
分类:
其他好文 时间:
2014-05-15 13:27:07
阅读次数:
233
其实关键就是window.opener,这个东西就是如何在子窗口页面中,访问父窗口页面的文档的方法,在frame中,是parent、top这类的东西,知道了这个东西,剩下想做点什么就好说了。
父窗口操作子窗口的话,就利用open的返回值就可以了。 father.htm: 我是父页面。child.ht...
分类:
其他好文 时间:
2014-05-15 07:43:22
阅读次数:
232
核心点:
super关键字,表示调用的是父类对象。
this关键字,表示调用的是当前运行类对象。
那么如果在父类中,使用了关键字,this,此时的this指的是什么呢?
看下面的例子,再加深理解核心店的第二句话就ok了。
parent类:
package com.ghsy.thissuper;
public class Parent {
public void init(){
...
分类:
其他好文 时间:
2014-05-14 20:04:29
阅读次数:
217
Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match....
分类:
其他好文 时间:
2014-05-14 19:30:36
阅读次数:
292