??
#号提示是root用户的标志,而ubuntu默认的是普通用户,此时提示是$,并且并不能通过su切换用户命令进行切换,通常来说使用sudo即可完成对应的工作,但是如果在某些情况下希望使用带#的提示符,可以打开一个带超级用户权限的shell
alloy@ubuntu:~$ sudo -s
[sudo] password for alloy:
root@ubuntu:~#...
分类:
其他好文 时间:
2014-07-22 23:06:12
阅读次数:
281
OJ题目 :
click here~~
题目分析:给一个数字三角形,从最上面一个数字开始,方向只能往左下或者右下,一直到最后一行,求经过的所有数字和的最大值。
搞清楚在输入的数据中,route的方向就行。
AC_CODE
int num[102][102];
int main(){
int n , i , j , k ;
while(cin >> n){
...
分类:
其他好文 时间:
2014-07-22 23:05:55
阅读次数:
372
*************************** list.txt : 目录
********************************1. variable.sh2. condition.sh3. control.sh4.
AndOr.sh5. statementBlock.sh6. ...
分类:
系统相关 时间:
2014-07-22 23:00:55
阅读次数:
382
一、初识bashBash是一种解释型语言,但它也提供了交互式接口,支持变量,因此提供了编程环境,所以可以称bash为程序语言。解释型语言属于弱类型语言,其特点为:1.它不强制区分变量类型,即无论存储什么数据,默认均以字符格式(ASCII码)存储。2.不需要事先声明变量,需要时直..
分类:
其他好文 时间:
2014-05-03 02:09:05
阅读次数:
476
sed‘s/^/\//g‘4行首增加指定字符提取网页中的播放地址:#!/bin/bash
printf"enteryourdir:"
readdir
echo"$dirisxx"
cd$dir
echo`pwd`
forfilein`ls.`
do
if[-d$file];then
echo$file
cd$file
echo`pwd`
tree`pwd`|grepplay|sed‘s/.*//g‘>11
tree`pwd`|grepplay|sed‘s/.*//g..
分类:
其他好文 时间:
2014-05-03 00:53:15
阅读次数:
336
一,socket 模块
套接字包括两类:服务器,客户机,
创建一个套接字后让它等待连接
服务器:
import socket
s = socket.socket()
port = 1234
host = socket.gethostname()
print host
s.bind((host,port))
s.listen(5)
while True:
get,addr = s...
分类:
编程语言 时间:
2014-05-02 21:59:57
阅读次数:
444
一、初识脚本简单说,脚本就是数条可执行语句的罗列。例如我们将以下可执行命令粘贴至first.sh这个文件中:UserName=user1
mkdir/users
useradd-d/users/$UserName$UserName
echo$UserName|passwd--stdin$UserName这样first.sh就是一个脚本,sh用来标注这是一个shell脚本,它能..
分类:
其他好文 时间:
2014-05-02 02:49:26
阅读次数:
390
程序自动产生随机数(srand 设置种子为系统时间,以保证每次运行程序产生的随机数有差别
),然后用户输入结果,程序判断用户输入是否正确减法运算时要保证随机产生的a要大于b(用while循环判断,当然前提条件是用户选择的为减法运算,这里只保证式子产生的结果为非负整数)。#include
#inclu...
分类:
其他好文 时间:
2014-05-01 23:59:45
阅读次数:
499
问题描述:
在Eclipse中运行ant批量打包工具出错,日志信息如下:
D:\Android\android-sdk-windows\tools\ant\build.xml:601: The following error occurred
while executing this line:
D:\Android\android-sdk-windows\tools\ant\bui...
分类:
移动开发 时间:
2014-04-30 22:48:39
阅读次数:
359
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory...
分类:
其他好文 时间:
2014-04-30 22:43:38
阅读次数:
346