Recent Notes

Displaying keyword search results 1 - 4
Created by Dr. Xi on June 06, 2009 18:31:44    Last update: June 25, 2012 12:37:35
You can use the system call from the os module to execute an external program: >>> import os >>> os.system(the_command_line_st... However, the path to the executable contains a space character, the system call treats the strings after the first space as arguments, causing an error. Python doc recommends the use of the subprocess module: The subprocess module provides more powerful facilities for spawning new processes and retrieving their results; using that module is preferable to using this function. For example, using wget to get the google home page: >>> from subprocess import Popen, PIPE >>> (out... or >>> import subprocess >>> subprocess.call(['cur...
Created by Fang on December 09, 2011 11:50:28    Last update: December 09, 2011 11:51:34
Values of Maven properties are accessed with the construct ${...} . Properties come from 5 different sources: From the environment, for example: ${env.PATH} , ${env.JAVA_HOME} . From the POM, in the form of ${project.x} . For example: ${project.version} , ${project.groupId} . From settings.xml , in the form of ${settings.x} . For example: ${settings.offline} , ${settings.interactiveMode} . From Java system properties, for example: ${java.home} . Defined within the properties element in the POM. For example ( gae.version ): <properties> <gae.version>1.4.2</gae.ve...
Created by mee2 on October 20, 2011 16:52:33    Last update: October 20, 2011 16:54:17
Alfresco RESTful URLs provided by Web Scripts are extensively documented, but examples are hard to come by. This makes it hard to ramp up for beginners. Here are some examples I tested on 3.4.4 enterprise edition and 4.0a community edition, with the results documented. To list the available scripts: http://localhost:8081/alfresco/service/index There's a Refresh Web Scripts button at the bottom of the page. If you add a Web Script, you need to click that button in order for the system to know about your addition. To get information about the root folder ( Company Home ): http://localhost:8081/alfresco/service/cmis/p To get information about the folder Data Dictionary : http://localhost:8081/alfresco/service/cmis/p/Data... To get information about the folder Data Dictionary/Space Templates : http://localhost:8081/alfresco/service/cmis/p/Data... You get the idea. To list the children...
Created by Dr. Xi on September 15, 2008 18:19:44    Last update: September 15, 2008 18:19:44
Some Ant built-in properties: Property Description basedir the absolute path of the project's basedir (as set with the basedir attribute of <project>). ant.file the absolute path of the buildfile. ant.version the version of Ant ant.project.name the name of the project that is currently executing. It is set in the name attribute of <project>. ant.java.version the JVM version Ant detected; currently it can hold the values "1.2", "1.3", "1.4" and "1.5". ant.home home directory of Ant In addition, Ant provides access to all system properties as if they had been defined using a <property> task. For example, ${os.name} expands to the name of the operating system.