我从没学过SHELL,最近看了一些例子,写了一个SHELL,但有错误,请高手指点 #!/bin/sh path0=$0 path1=` echo $path0 | awk '{temp=substr($0,1,index($0,"monitor.sh")-1);printf temp}'` echo "start path is" $path1 pid=` ps -ef|grep mcmagent |grep -v grep | awk '{print $2}'` if ( test X"$pid" = "X" ) then echo mamagent is not running... else echo mamagent is running .... fi cd $path1 ********** 执行不成...
class FirstClass: pass class SecondClass: pass class ThirdClass: pass Instances = [] for ClassType in [FirstClass, SecondClass, ThirdClass]: Instances.append(ClassType()) print Instances 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/35936/showart_346641.html
本文转自: http://www.alvestrand.no/objectid/ What is an object identifier?object identifiers are, basically, strings of numbers. They are allocated in a hierarchical manner, so that, for instance, the authority for "1.2.3" is the only one that can say what "1.2.3.4" means. They are used in a variety of protocols. The formal definition of OIDs comes from ITU-T recommendation X.208 (ASN.1), wh...
array convert to list: import java.util.Arrays; String[] classCheckbox = questionActionForm.getClassCheckbox(); List classIds = new ArrayList(); classIds = Arrays.asList(classCheckbox); set convert to list: Set classifications = question.getClassifications(); List classificationsList = new ArrayList(); classificationsList.addAll(classifications); 本文来自ChinaUnix博客,如果查看原文请点:...
objects are key to understanding object-oriented technology. Look around right now and you'll find many examples of real-world objects: your dog, your desk, your television set, your bicycle. Real-world objects share two characteristics: They all have state and behavior. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail). Bicycles also have state ...
新年到了,祝大家新年快乐! 这几天看了下pil,然后也google下,写了个玩的,里面watermark那个函数根据 网上发的zope里那个改的,其他的自己写的,做成exe的时候老出错,后来我把 pil库换成1.1.6就没问题了。 [code] #-*- coding:GBK -*- #========================== #The work with a picture! #The MIT License #Emal:ghostwwl@gmail.com # edit by Ghostwwl #========================== import Image import ImageDraw im...
# errpt -aj FE9E9357 -s 0427120006 --------------------------------------------------------------------------- LABEL: SSA_DEVICE_ERROR IDENTIFIER: FE9E9357 Date/Time: Thu Apr 27 12:00:00 Sequence Number: 3639 Machine Id: 0008FC8F4C00 Node Id: SAPDATA Class: H Type: PERM Resource Name: ssa0 Resource Class: adapter Resource Type: ssa160 Loca...