scripting-language

Is Ruby a scripting language or an interpreted language?

我怕爱的太早我们不能终老 提交于 2019-12-20 09:12:33
问题 I just noticed that in the wikipedia page of Ruby, this language is defined as interpreted language. I understood that probably there's something missing in my background. I have always known the difference between an interpreted language that doesn't need a compiler and a compiled language (who require to be compiled before the execution of programs), but what characterize a scripting language ? Is Ruby definable as a scripting language ? Thank you and forgive me for the black out 回答1:

Scripting Language in a Sandbox for a C#/.NET Application

亡梦爱人 提交于 2019-12-18 16:53:11
问题 [This question is similar to this one, but I am also interested in the possibility of a sandbox.] I am considering embedding a scripting language in my C#/.NET application and then exposing some of my application's API to the scripts. There seem to be multiple good options for this (Lua, Boo, IronPython, etc.), but are there easy options for restricting the scripting language's built-in functions from being used? For example, I do not want the scripts to be able to perform I/O except through

JMeter Script Engine which allow caching and compilation

北城余情 提交于 2019-12-18 07:16:47
问题 JSR223 Sampler have a statement that Groovy is implementing Compilable interface different than other scripting languages and therefore is recommended To benefit from caching and compilation, the language engine used for scripting must implement JSR223 Compilable interface (Groovy is one of these, java, beanshell and javascript are not) I tried to check it using similar code in JSR223 Sampler. I tried to check all available languages with Compilable: import javax.script.Compilable; import

Writing a language for the Windows Scripting Host (WSH)

南楼画角 提交于 2019-12-18 06:12:26
问题 Has anyone had any experience targetting WSH in the way that VBScript , JScript , PerlScript , xbScript and ForthScript (among other) do, such that the language can be used from the command line and embedded in server-side web pages? Where do I go to get that kind of information? 回答1: These are called Windows Script Engines and are implemented by exposing the engine via COM. There is a lot documentation on MSDN, and the actual interfaces are fairly straight forward. 来源: https://stackoverflow

Copy a list (txt) of files

落花浮王杯 提交于 2019-12-17 07:12:42
问题 I've seen some scripts examples over SO, but none of them seems to provide examples of how to read filenames from a .txt list. This example is good, so as to copy all files from A to B folder xcopy c:\olddir\*.java c:\newdir /D /E /Q /Y But I need something like the next, where I can fill actually the source and destination folder: @echo off set src_folder = c:\whatever\*.* set dst_folder = c:\foo xcopy /S/E/U %src_folder% %dst_folder% And instead of src_folder = c:\whatever\*.* , those *.*

Copy a list (txt) of files

守給你的承諾、 提交于 2019-12-17 07:12:07
问题 I've seen some scripts examples over SO, but none of them seems to provide examples of how to read filenames from a .txt list. This example is good, so as to copy all files from A to B folder xcopy c:\olddir\*.java c:\newdir /D /E /Q /Y But I need something like the next, where I can fill actually the source and destination folder: @echo off set src_folder = c:\whatever\*.* set dst_folder = c:\foo xcopy /S/E/U %src_folder% %dst_folder% And instead of src_folder = c:\whatever\*.* , those *.*

Scripting Language vs Programming Language

一个人想着一个人 提交于 2019-12-17 04:09:27
问题 Can anyone explain the difference between Scripting Language and Programming Language please? Also can you state some examples for each. I have Googled a lot but I always find the best answers from Stack Overflow. 回答1: Scripting languages are programming languages that don't require an explicit compilation step. For example, in the normal case, you have to compile a C program before you can run it. But in the normal case, you don't have to compile a JavaScript program before you run it. So

script to read information from other sites

孤街醉人 提交于 2019-12-14 03:19:18
问题 a friend of mine wrote a script, which read information from other sites e.g. number of followers 3 ppl had and displayed them on his website. I was interested in doing such things. I searched for scripting and found out there are many scripting languages. How would I chose which one to learn? are they all the same? which one do u prefer to do my task? and finally any good reference you suggest? where I stand now: im basically starting from zero in scripting but I know how to code C, C++,

Apache Velocity 2.0 Scripting Compilable not working

醉酒当歌 提交于 2019-12-13 00:06:44
问题 I'm trying to check velocity scripting engine 2.0 which Provide JSR 223 implementation and support of Compilable the Compilable interface has been implemented in the process. I use jars: velocity-engine-scripting-2.0.jar, velocity-1.7.jar, commons-collections-3.2.2.jar from previous answer I use the following code //class org.apache.velocity.script.VelocityScriptEngine final ScriptEngine engine = engineFactory.getScriptEngine(); if (engine instanceof Compilable) { try { ((Compilable) engine)

How to resolve “shift: can't shift that many” error while running a shell script?

旧街凉风 提交于 2019-12-12 18:22:52
问题 I have a shell script with different methods.The script is status(){ PID=$(ps -ef | grep jmeter_script.sh|grep -v grep|awk '{print $2}') } start(){ shift if [ "$#" -ne 2 ]; then exit 1; fi jmeter.sh -n -t "$1" -l "$2" } stop(){ while true; do read -p "Do you really want to stop?" yn case $yn in [Yy]* ) ps -ef | grep jmeter | grep -v grep | awk '{print $2}'|xargs kill; break;; [Nn]* ) exit;; * ) echo "Please answer yes or no.";; esac view(){ #some code } ####Main while [ "$1" != "" ]; do case