Given a linked list, determine if it has a
cycle in it.Follow up:Can you solve it without using extra
space?求链表是否有环的问题,要考虑链表为空的情况,定义一个快指针和一个慢指针,如果快指针和...
分类:
其他好文 时间:
2014-06-02 08:05:16
阅读次数:
255
4.2 THE COMPLETENESS THEOREM(2) If A theory
$\mathbf{T}$ has a model, then it is consistent.ProofSuppose that $\mathbf{T}$
has a mode $\mathbf{\alpha}...
分类:
其他好文 时间:
2014-06-02 06:23:48
阅读次数:
189
问题:
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that there will be only one unique solution.
...
分类:
其他好文 时间:
2014-06-02 05:25:23
阅读次数:
295
连接数据库报错
[oracle@tips~]$sqlplus/assysdba
SQL*Plus:Release11.2.0.3.0ProductiononFriJun2918:44:032012
Copyright(c)1982,2011,Oracle.Allrightsreserved.
ERROR:
ORA-09817:Writetoauditfilefailed.
Linux-x86_64Error:28:Nospaceleftondevice
Additionalinforma..
分类:
系统相关 时间:
2014-06-02 04:12:14
阅读次数:
915
#过滤oracle警告日志文件ORA-错误
$c=Get-ContentC:\script.txt|select-string-pattern"ora-"
#判断ORA-错误存在条件
#若$c返回值为null,则输出1返回值结束循环
if($c-eq$null)
{
write-host"STATE_OK"
$STATE_OK={return1;}
$b=&$STATE_OK
$b
}
#若$c返回值不为空,..
分类:
其他好文 时间:
2014-06-02 03:26:07
阅读次数:
197
写了一个powershell脚本测试脚本,结果执行的时候报错
$a=Get-ContentC:\script.txt|select-string-pattern"ora"
if($a-eq$null)
{
write-host"error"
}
else
{
write-host"OK"
}
PSD:\>.\pshell.ps1
无法加载文件D:\pshell.ps1,因为在此系统中禁止执行脚本。有关详..
分类:
其他好文 时间:
2014-06-02 03:17:04
阅读次数:
244
1.批量建立redolog裸设备脚本(非条带)
#!/usr/bin/ksh
i=1
while(($i<=9));
do
mklv-ylv_redo"00$i"_1g-traw-wn-rn-u1oltpvg1
i=$(expr$i+1);
done
2.建立stripesize为1M,stripewidth为14,lv大小为8G的裸设备,
hdiskpower1=92160M
#!/usr/bin/ksh
i=1
while[$i-lt..
分类:
其他好文 时间:
2014-06-02 03:05:19
阅读次数:
281
题意:对数列有三种操作:
Print operation l,?r. Picks should write down the value of .
Modulo operation l,?r,?x. Picks should perform assignment a[i]?=?a[i] mod x for
each i (l?≤?i?≤?r).
Set operation k...
分类:
其他好文 时间:
2014-06-02 02:56:56
阅读次数:
465
问题:
在Sudoku
Solver 中说道,会有一些提示解,这里就是验证下给定的提示解是否合法,即已经填加的数是否满足要求的三个条件。
bool isValidSudoku(vector > &board) {
const int M = 9;//9 * 9
const int hash_len = 60;//'0' = 48 + 10
const char do...
分类:
其他好文 时间:
2014-06-02 02:31:45
阅读次数:
279
C# Console 输出
C#控制台输出有两种方法:Write()和WriteLine(),它们都是命名空间System中Console类的方法,能够直接输出C#提供的所有基本数据类型。区别是后者输出后换行。
1.基本输出
基本数据类型的简单输出形式为:
Console.Write("格式串{参数序号}",参数表);
{0}和{1}分别代表后面的参数,0为第一个参数,1为第二个,以此类...
分类:
其他好文 时间:
2014-06-02 02:29:17
阅读次数:
268