关于写脚本,1 2 3 5 8 13
.............用脚本写出,第一百个数是什么shell:##########下面是脚本内容###########!/bin/bashfor((i=1;i////////////////////脚本到此结束///////////////////值得注意,...
分类:
Web程序 时间:
2014-05-14 01:50:36
阅读次数:
296
Bob enjoys playing computer games, especially
strategic games, but sometimes he cannot find the solution fast enough and then
he is very sad. Now he h...
分类:
其他好文 时间:
2014-05-14 00:29:42
阅读次数:
251
希尔排序是由D.L.Shell于1959年提出的,所以称为希尔排序。希尔排序又称缩小增量排序,是插入排序的一种改进。
基本思想:希尔排序是基于插入排序的以下特点:待排序的序列元素数量越少排序速度越快;待排序序列的元素基本有序时排序速度越快;基于以上思想将待排序序列分为多个子序列分别进行插入排序,然后...
分类:
其他好文 时间:
2014-05-13 22:11:01
阅读次数:
272
TriangleGiven a triangle, find the minimum path
sum from top to bottom. Each step you may move to adjacent numbers on the row
below.For example, given...
分类:
其他好文 时间:
2014-05-13 18:51:44
阅读次数:
297
Given s1, s2, s3, find whether s3 is formed by
the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When
s3 = "aadbbcbcac", retur...
分类:
其他好文 时间:
2014-05-13 18:11:42
阅读次数:
249
今天在用ssh Secure shell
连接虚拟机中的Ubuntu编写程序时,想比对一下两个源代码有什么差别,但是在一个ssh
客户端下不断的切换很是费劲。于是想着在主机中再添加一个用户。我原本用ssh Secure shell
登陆用的是root用户。于是想着添加一个sshConnect用户.....
分类:
其他好文 时间:
2014-05-13 17:12:08
阅读次数:
234
此脚本可以做一个定时的检测,超出设定的值,即往邮箱发送警告脚本用到bc,sendmail,163邮箱,yuminstallbc#!/bin/bash
#SystemMonitoringScript
while[1]
do
#本机需开启postfix或sendmail服务。
#报警邮件地址设置
MAILFROM=root@localhost
MAILTO=your_mail@163.com
#设置..
分类:
系统相关 时间:
2014-05-13 05:05:29
阅读次数:
649
一、什么是I/OI/O设备是计算机核心部件和外围设备进行交互的通道,因此I/O是一个统称。但这里所说的I/O与计算机的硬件设备没有太大关系,它是用来实现应用程序的I/O重定向。通常应用程序需要从外部用户获取数据,也需要将运行结果反馈给外部用户,因此程序本身要有输入输出功能..
分类:
其他好文 时间:
2014-05-13 04:16:13
阅读次数:
361
whileCONDITION;dostatementdone进入循环:条件满足退出循环:条件不满足untilCONDITION;dostatment...done#!/bin/bash#read-p"Inputsomething:"STRINGwhile[$STRING!=‘quit‘];doecho$STRING|tr‘a-z‘‘A-Z‘read-p"Inputsomething:"STRINGdone#!/bin/bash#read-p"Inputsomething:..
分类:
系统相关 时间:
2014-05-13 03:58:53
阅读次数:
343
1. mongodb创建数据库和集合
mongodb数据库和集合的创建是隐式的。
意思是说不用单独写create database 语句。
直接使用use关键词即可。
在bin/mongo shell下运行:...
分类:
数据库 时间:
2014-05-13 00:28:12
阅读次数:
445