#include#include#include#define random(x)
(rand()%x)void main(){ srand((int)time(0)); for(int x=0;x<10;x++)
printf("%d/n",random(100...
分类:
编程语言 时间:
2014-06-29 15:34:25
阅读次数:
302
首先要说明的是,不要使用which来进行判断,理由如下:1、which非SHELL的内置命令,用起来比内置命令的开销大,并且非内置命令会依赖平台的实现,不同平台的实现可能不同。#
type typetype is a shell builtin# type commandcommand is a s...
分类:
其他好文 时间:
2014-06-29 15:27:20
阅读次数:
1334
最近写了一个shell脚本,用到了cp、time、cut、awk命令,把他们的使用方法给写下来:1.cp和mvcp命令:用来完成文件的复制,从源文件夹复制到目标文件夹。执行后源文件夹和目标文件夹均有源文件。mv
命令:用来移动文件。执行后,源文件夹中没有源文件。我经常用mv命令来重命名文件注意:cp...
分类:
系统相关 时间:
2014-06-29 14:03:19
阅读次数:
5085
time_t time(time_t
*t);如果t是空指针,直接返回当前时间。如果t不是空指针,返回当前时间的同时,将返回值赋予t指向的内存空间。函数: ctime功 能:
把日期和时间转换为字符串用 法: char *ctime(const time_t *time);#include#incl...
分类:
其他好文 时间:
2014-06-07 06:01:02
阅读次数:
169
题目: Say you have an array for which the ith element
is the price of a given stock on day i. Design an algorithm to find the maximum
profit. You may co...
分类:
其他好文 时间:
2014-05-28 22:37:18
阅读次数:
327
只需以下两行命令:$ cd
android-sdk/platform-tools/systrace$ python systrace.py --time=10 -o
mynewtrace.html sched gfx view wm--time=10 -----------------trace运行...
分类:
其他好文 时间:
2014-05-28 22:26:08
阅读次数:
1421
echo
192.168.10.69>>ip.list-------------------------------------------#!/bin/bash#注意if和[]之间的空格rm
-f ~/fanr/shell/DiskUsageAlert/out.printout=$(cat ~/f...
分类:
系统相关 时间:
2014-05-28 14:54:26
阅读次数:
391
–-表现最差的前10名使用查询SELECT TOP 10 ProcedureName =
t.text, ExecutionCount = s.execution_count, AvgExecutionTime = isnull (
s.total_elapsed_time / s.executio...
分类:
数据库 时间:
2014-05-28 11:25:22
阅读次数:
449
吃糖果Time Limit: 6000/3000 MS (Java/Others)Memory
Limit: 65535/32768 K (Java/Others)Total Submission(s): 22376Accepted
Submission(s): 6396Problem Descri...
分类:
其他好文 时间:
2014-05-28 11:11:43
阅读次数:
194
一、if判断数字: $A=12 $B=15 if(("$A"<"$B"))
if(("$A"=="$B"))字符串: $A="HELLO" $B="WORLD" if [ "$A" = "FACT_LOGIN_USER" ] if [
"$A" = "$B" ]PS:字符串比较的时候...
分类:
其他好文 时间:
2014-05-28 09:32:44
阅读次数:
347