cube目录下有n个cube,可不可以一下子遍历出所有的对象,而不用一个一个的find?find(“Cube1”)
1、foreach(Transform ts in cube) 2、cube.getCompontsInChildren 返回transform的数组
3、GameObject[] g...
分类:
其他好文 时间:
2014-05-26 08:37:05
阅读次数:
276
Word SearchGiven 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, wh...
分类:
其他好文 时间:
2014-05-26 08:21:06
阅读次数:
310
my @a=("a","b","c","d","e");my
@b=("b","g","f","e");my %a=map{$_=>1} @a;my %b=map{$_=>1} @b;# 交集@A =
grep( $a{$_}, @b ) ;# 补集@B1=grep(!defined $a{$_},...
分类:
其他好文 时间:
2014-05-26 08:02:22
阅读次数:
269
CREATE TABLE #MoneyTable ( Id INT IDENTITY(1,
1) PRIMARY KEY , MoneyName VARCHAR(50) ...
分类:
移动开发 时间:
2014-05-26 06:25:35
阅读次数:
325
一,Linux篇
1,停掉mysql服务:service mysql stop;
2,修改my.cnf文件,可以通过find / -name my.cnf来找到文件,里面内容包含[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql即是我们要找的文件,在user-mysql下加入:skip-grant-...
分类:
数据库 时间:
2014-05-26 04:06:14
阅读次数:
346
Summation of primes
Problem 10
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
还是使用Sieve of Eratosthenes 算法
我的python代码如下:
...
分类:
其他好文 时间:
2014-05-26 03:40:15
阅读次数:
243
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have
exact...
分类:
其他好文 时间:
2014-05-25 00:46:51
阅读次数:
229
【题目】
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,?1,2,1] has the largest sum = 6.
【题意】
给定一个数组,找出和最大的子数组,返回...
分类:
其他好文 时间:
2014-05-24 22:19:17
阅读次数:
260
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume
that each input would have exact...
分类:
其他好文 时间:
2014-05-24 20:43:37
阅读次数:
341
Given a string S and a string T, find the
minimum window in S which will contain all the characters in T in complexity
O(n).For example, S = "ADOBECOD...