初学python,碰到了一个错误,求问如何解决?
>>> while a < 10:
... print a;
File "
by laohuanggua - Python - 2010-03-22 14:55:01 阅读(12283) 回复(3)
初学 请教 IndentationError: expected an indented block 错误:
aDict = {'host': 'earth'} # create dict
aDict['port'] = 80 # add to dict
for key in aDict:
... print key, aDict[key]
File "
我有三个文件,class.config.jsp class.mysql.jsp test.jsp 访问总是报错,是个新手,没看出错误,那位朋友给看一下。 错误:/./include/class.mysql.jsp:5: '{' expected public class openDB(Config) class.config.jsp 代码如下: <%@page language="java"%> <%! class config_newwapdb { String host="wapdb"; String database="newwapdb"; String user="wap"; String passwd="wap949410";...
cat $the_run_dir/cfgfile |while read LINE do echo $LINE >tmp.txt ui_function=`awk '{print $1}' tmp.txt` req_num=`awk '{print $2}' tmp.txt` echo $ui_function echo $req_num expr $req_num runing_num=`ps -ef|grep $ui_function|grep -v grep|wc -l` echo $runing_num ...
[code]#!/bin/bash # YUM_DIR="/etc/yum.repos.d" while : do clear cat << YUM =================================================================================== 1:CentOS-4X 2:CentOS-5X Q:Quit =================================================================================== YUM echo -n -e "\t\t\tPlease choose to install >" read ANS case $ANS in 1)X4="1" ;; 2)X5="2" ;; q|Q) break ;; *)...
我用 if [ $i -eq 100 ] 就出现了这个错误:integer expression expected 从字面上理解就是变量i应该是个integer类型的 但是如何把一个字符型数字转换成整形呢?
今天写了一个程序,编译时报了一个错误:expected initializer before "***" 报错的语句只是程序开头的一个变量定义语句,怎么会有这样的错误呢,琢磨了半天也没弄明白,最后发现是自己写的头文件最后一句少了 “;”。 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/78601/showart_1722297.html
以下是port.sh的内容 #! /bin/bash # program: Using to study the [if... then ...fi] program # Written by :Beyond # date: 2007/06/15 # content: I will be using this program to show your services # 1. print the program's work in your screen echo "Now, the services of your Linux system will be detect!" echo "The www, ftp, ssh, and sendmail + pop3 will be detect!" echo " " # 2. www www='netstat ...
(原标题为:求解:一个菜鸟编程中的问题!)
编写了一个shell命令cp
代码如下:
#include
原代码如下: fsmax="85" maillist1="[email]cold@163.com[/email]" maillist2="[email]hot@163.com[/email]" df -k | grep '/dev/h' | awk '{print $1,$5,$6}'>mailfile mail -s "Filesystem Information" $maillist1 < mailfile mail -s "Filesystem Information" $maillist2 < mailfile df -k | grep '/dev/h' | awk '{print $5}'>outfile while [ read fsvalue ] do fsvalue=$(echo $fsvalue | sed 's/\%//') ...
19 #include