发布时间:2015-09-17 17:01:27
#coding=utf-8<br /># Area calculation program<br />print ("Welcome to the Area calculation program")<br />print ("*********************************")<br />print<br /># Print out the menu:<br />print ("Please select a shape:")<br />print ("1 Rectangle")<br />print ("2 Circle")<br />#Get the .........【阅读全文】
发布时间:2015-09-15 16:59:54
#!/usr/bin/env python<br />#encoding:UTF-8<br /> <br />import urllib.parse<br />import urllib.request<br />def get():<br /> url=''<br /> data=urllib.request.urlopen(url).read() <br /> z_data=data.decode('UTF-8')<br /> print.........【阅读全文】
发布时间:2015-09-11 17:16:31
#!/bin/bash<br /> <br />netid="128.5.0."<br />n=0<br />for i in $(seq 1 254)<br />do<br /> ping -c1 -W1 -n $netid$i &> /dev/null<br /> if [ $? == 0 ]<br /> then<br /> echo -e "$netid$i is UP!"<br /> .........【阅读全文】
发布时间:2015-09-10 15:01:56
<span style="font-size:14px;color:#337FE5;">cat $access_file | awk '{print $1}' | sort |uniq -c | sort -rn | head -n 10<br style="color:#0000FF;font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:13px;line-height:19px;white-space:normal;" /><span style="font-family:Verdana, Geneva, .........【阅读全文】
发布时间:2015-09-09 17:28:39
1.可视化资源跟踪<br /> <span style="white-space:normal;">可视化资源跟踪是指在系统监控的可视化示图上,管理员可以实时选择需要监控的模块,该模块的内部信息能够在示图上动态的进行展示。具体来说,当管理员需要观察确认出现告警的模块(例如CPU、内存、I/O等)原因时,不再需要采用后台人.........【阅读全文】
发布时间:2015-09-08 11:57:02
<span style="font-size:14px;color:#FF9900;">awk -F: 'BEGIN{printf "%-15s%-7s%s\n%-s\n", "Username","UID","GID","=========================="} $3 >= 500 && $3 != 65534 {printf "%-15s%-7s%s\n", $1,$3,$4} END{printf "%s\n%s\n", "==========================","List Over"}' /etc/passwd<br /><spa.........【阅读全文】
发布时间:2015-09-08 10:47:52
Xmanage连接RHEL5 <br /> 配置步骤:<br /> 配置文件位置:/usr/share/gdm/default.conf<br /> 修改配置选项:<br /> [xdmcp]段<br /> 1、enable=true //257行<br /> 2、Port=177//284行<br /> [security]段<br /.........【阅读全文】
发布时间:2015-09-08 10:46:01
1.修改/etc/sysconfig/displaymanager
DISPLAYMANAGER_REMOTE_ACCESS="yes"
DISPLAYMANAGER_ROOT_LOGIN_REMOTE="yes"
DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="yes"......【阅读全文】
发布时间:2015-09-06 15:56:03
1、oui-10025 <br /> 由于以下错误, 无法启动交互式安装会话: Can't connect to X11 window server using '10.200.5.48:0.0' as the value of the DISPLAY variable.。DISPLAY 环境变量应该设置为 <hostname 或 IP address>:<screen>, 其中 <screen> 通常为 '0.0'。<br /> 根.........【阅读全文】
发布时间:2015-08-29 11:55:26
<pre class="displaycode" style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;outline:0px;font-size:inherit;vertical-align:baseline;background-color:#FFFFFF;">#!/bin/bashecho "Please enter your first and last name:"read YDecho "Hellow $YD , welcome to bash scripting ...!"exit 0</pre>.........【阅读全文】
发布时间:2015-08-10 16:35:13
<pre><span class="k">def</span> <span class="nf">all</span><span class="p">(</span><span class="n">iterable</span><span class="p">):</span> </pre><pre><span class="k"> for</span> <span class="n">element</span> <span class="ow">in</span> <span class="......【阅读全文】
发布时间:2015-08-06 20:37:09
#!/usr/bin/expect<br />cd /usr/local/spes/<br />spawn ./spes -i -u w00170949<br />expect "password:"<br />send "wq_5230056\r"<br />interact<br /><br />放在/etc/init.d/boot.local,开机自运行。<br />......【阅读全文】
发布时间:2015-08-04 19:40:23
1.list 定义<br />>>> li = ["a", "b", "mpilgrim", "z", "example"] >>> li ['a', 'b', 'mpilgrim', 'z', 'example'] >>> li[1] 'b'<br />1.list 负数索引<br />>>> li ['a', 'b', 'mpilgrim', 'z', 'example'] >>> li[-1] 'example' >>> li[-3] 'mpilgrim' >.........【阅读全文】
发布时间:2015-08-04 19:30:50
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000080;font-weight:bold;">import </span>calendarmonthRange = calendar.monthrange(<span style="color:#0000ff;">2013</span>,<span style="color:#0000ff;">6</span>) </pre><pre style="background-color:#FFFFF.........【阅读全文】
发布时间:2015-08-03 11:40:22
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="background-color:#ffe4ff;">str</span> = <span style="color:#008080;font-weight:bold;">"www.runoob.com" </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000.........【阅读全文】
发布时间:2015-08-03 11:31:47
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 写文件 </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000080;font-weight:bold;">with </span><span style="color:#00008.........【阅读全文】
发布时间:2015-08-03 11:23:49
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 引入日历模块 </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000080;font-weight:bold;">import </span>calendar </p.........【阅读全文】