ChinaUnix.net
相关文章推荐:

expected an indented block

初学python,碰到了一个错误,求问如何解决? >>> while a < 10: ... print a; File "", line 2 print a; ^ IndentationError: expected an indented block

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 "", line 2 print key,aDict[key] ^ IndentationError: expected an indented block 大家帮看看,谢谢 :)

by tommydu - Python - 2009-12-01 18:31:10 阅读(22146) 回复(2)

我有三个文件,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";...

by linux68 - Java - 2011-01-14 10:06:19 阅读(1500) 回复(0)

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 ...

by 残风√木落 - Solaris - 2010-11-03 12:44:30 阅读(1301) 回复(0)

[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 ;; *)...

by skyxue215 - Shell - 2010-04-10 22:13:38 阅读(2116) 回复(3)

我用 if [ $i -eq 100 ] 就出现了这个错误:integer expression expected 从字面上理解就是变量i应该是个integer类型的 但是如何把一个字符型数字转换成整形呢?

by cuer_2 - Shell - 2009-06-01 16:21:21 阅读(13990) 回复(11)

今天写了一个程序,编译时报了一个错误:expected initializer before "***" 报错的语句只是程序开头的一个变量定义语句,怎么会有这样的错误呢,琢磨了半天也没弄明白,最后发现是自己写的头文件最后一句少了 “;”。 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/78601/showart_1722297.html

by sparkzh - Linux文档专区 - 2008-12-15 23:13:43 阅读(1008) 回复(0)

以下是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 ...

by beyond911 - Shell - 2007-06-17 13:35:31 阅读(14982) 回复(2)

(原标题为:求解:一个菜鸟编程中的问题!) 编写了一个shell命令cp 代码如下: #include #include #include #include #define maxOnce 1024 int main(int argc,char * argv[]) { int fdsrc,fddist; char buf[maxOnce]; char buf1[maxOnce]; int size; if(argc!=3) printf("error for input\n"); if((fdsrc=open(argv[1],O_RDONLY)==-1) perror("error for open\n ");//出错...

by melonmelon - C/C++ - 2006-12-28 20:35:32 阅读(4244) 回复(10)

原代码如下: 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/\%//') ...

by wwmshe - Shell - 2006-05-17 14:13:03 阅读(1231) 回复(1)

19 #include 20 using namespace std; 21 int main() 22 { 24 for (int i = 1; i < 10000; i = i+1) 25 { 26 sum =sum+i; 27 } 28 cout << sum << endl; 29 return 0 30 } 怎么通过?

by 嘉伟w - C/C++ - 2012-07-06 20:23:26 阅读(1307) 回复(3)