execute

Calling shell commands in groovy script, used in Jenkins pipeline

蹲街弑〆低调 提交于 2019-12-02 17:07:22
问题 I have a Jenkins pipeline script in that I load an external Groovy script that contains some functions to perform my build. These functions should be plain groovy because I also want to use them outside of Jenkins, if someone runs a build on a local computer somewhere. In these functions I need to execute shell commands and evaluate the result. This works fine in groovy calling a function like def SomeFunction() { def result = "Some shell command".execute().text } However, this method of

Lua: Executing a string and storing the output of the command in a variable

余生长醉 提交于 2019-12-02 10:10:53
问题 I've got a Lua script that receives a function call in a string. I need to execute that call and retrieve the output as a string in a variable so I can later send it somewhere. For example, I will receive the string "json.encode('{1:1, 2:3, 5:8}')" . I'd like to execute it and get a variable with the value ret = json.encode('{1:1, 2:3, 5:8}') . I've tried using loadstring in a bunch of different ways, including a way I found in the docs, but I can't get it to work as I want: > s = "json

How can i see if an owner has permissions to execute a Store Procedure in Oracle

こ雲淡風輕ζ 提交于 2019-12-02 08:39:17
I need to validate if my owner has permissions to execute a store procedure, but i have to do it searching on a sys table. In which table i can find it. Thank you!! Sandeep Contrary to its name, DBA_TAB_PRIVS allows us to see granted privileges on all objects, not just table. select * from DBA_TAB_PRIVS where type='PROCEDURE' and privilege='EXECUTE' and OWNER='SCHEMANAME' AND TABLE_NAME='PROCEDURENAME'; 来源: https://stackoverflow.com/questions/35776327/how-can-i-see-if-an-owner-has-permissions-to-execute-a-store-procedure-in-oracle

Calling shell commands in groovy script, used in Jenkins pipeline

落花浮王杯 提交于 2019-12-02 07:31:11
I have a Jenkins pipeline script in that I load an external Groovy script that contains some functions to perform my build. These functions should be plain groovy because I also want to use them outside of Jenkins, if someone runs a build on a local computer somewhere. In these functions I need to execute shell commands and evaluate the result. This works fine in groovy calling a function like def SomeFunction() { def result = "Some shell command".execute().text } However, this method of execution doesn't work in a pipeline script. I can't use "bat/sh" because this is pipeline-script-only, and

External program blocks when run by Runtime exec

此生再无相见时 提交于 2019-12-01 21:51:10
I'm attempting to launch an instance of the VideoLAN program from within a java application. One of the ways I've tried to do this is shown here: Process p = Runtime.getRuntime().exec("\"C:\\Program Files\\VideoLAN\\VLC\\vlc.exe\" \"http://www.dr.dk/Forms/Published/PlaylistGen.aspx?qid=1316859&odp=true\" :sout=#std{access=udp,mux=ts,dst=127.0.0.1:63928}"); If I execute the above command the vlc program will be launched, and will start a streaming operation (it goes through connect, buffering and then streaming phases). When the command is executed by Runtime exec (or ProcessBuilder start), the

External program blocks when run by Runtime exec

為{幸葍}努か 提交于 2019-12-01 21:48:14
问题 I'm attempting to launch an instance of the VideoLAN program from within a java application. One of the ways I've tried to do this is shown here: Process p = Runtime.getRuntime().exec("\"C:\\Program Files\\VideoLAN\\VLC\\vlc.exe\" \"http://www.dr.dk/Forms/Published/PlaylistGen.aspx?qid=1316859&odp=true\" :sout=#std{access=udp,mux=ts,dst=127.0.0.1:63928}"); If I execute the above command the vlc program will be launched, and will start a streaming operation (it goes through connect, buffering

why doesn't my jar file run outside netbeans?

点点圈 提交于 2019-12-01 14:49:58
I built a jar file that can run perfectly within netbeans when I click run, but when I try to run the jar file by double clicking it it does not run, nothing happens.. Double-clicking the jar starts it, but unless you have a GUI application that opens a new window (in a different thread), it most likely finishes and closes before you can see anything. In these cases you normally run the jar from the console ( java -jar .. ) to see if there are any exceptions/errors. Starting an application from the command line would let you debug the problem as Bozho said. But you need to check if you have

why doesn't my jar file run outside netbeans?

别说谁变了你拦得住时间么 提交于 2019-12-01 13:27:53
问题 I built a jar file that can run perfectly within netbeans when I click run, but when I try to run the jar file by double clicking it it does not run, nothing happens.. 回答1: Double-clicking the jar starts it, but unless you have a GUI application that opens a new window (in a different thread), it most likely finishes and closes before you can see anything. In these cases you normally run the jar from the console ( java -jar .. ) to see if there are any exceptions/errors. 回答2: Starting an

ICommand method execute parameter value

荒凉一梦 提交于 2019-12-01 12:59:05
I try to understand the ICommand from wpf. In my Event class I implement the ICommand and their methods. one method is the Execute: public void Execute(object parameter) { //Do something } now is my question: what value contains the parameter parameter from Execute ? That value depends on the value you pass to the command. like a sniplet: Command="{Binding CalculateCommand}" CommandParameter="LCM"/> Look here: Command Binding with Parameter Passing for more details. 来源: https://stackoverflow.com/questions/11187052/icommand-method-execute-parameter-value

Python how to execute code from a txt file

99封情书 提交于 2019-12-01 12:35:14
I want to keep a piece of code in a txt file and execute it from my Python script. For example in the txt file there is print("ok") I want my programme to print ok and not print print("ok ") . How can I do this? Doing what you want usually is a security risk, but not necessarily so. You'll definitely have to notify the user about potential risk. There is more than one program using execfile() or compile() and exec statement to provide plug-ins system. There is nothing so ugly about it, you just have to know what are you doing, when and where. Both execfile(), eval() and exec statement allow