Warning: session_start(): open(/var/lib/php/sessions/sess_6ug50imgo6cmnlurd0jlpdcnet, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
sclass Backtick extends DynPrintLog {
S cmd;
S method = "Stefan's method";
transient JButton btnGo;
JComponent visualize() {
ret northAndCenter(
vstackWithSpacing(
centerAndEastWithMargins(
withLabel("Command:", onEnter(jLiveValueTextField_bothWays(dm_fieldLiveValue('cmd)), r go)),
btnGo = jbutton("Go", r go)),
jrightAlignedLine(withLabel("Method:", jLiveValueComboBox(ll("Stefan's method", "Apache Commons Exec"), dm_fieldLiveValue('method))))),
super.visualize());
}
void go() {
pcall-short {
temp enter();
temp tempDisableButton(btnGo);
clearPrintLog();
S cmd = this.cmd;
print("Running command with " + method + ": " + cmd + "\n");
int exitValue;
if (eq(method, "Apache Commons Exec")) {
OutputStream stream1 = printOutputStreamWithIndent(" ");
OutputStream stream2 = printOutputStreamWithIndent(" ");
exitValue = apacheCommonsExec_backtickToStreams(cmd, stream1, stream2);
// print empty lines & flush stdout & stderr
stream1.write(toUtf8("\n"));
stream2.write(toUtf8("\n"));
} else {
LineBuffer buf = lineBuffer_printWithIndent(" ");
backtickToReceiver(vfAppendToLineBuffer(buf));
exitValue = backtick_exitValue;
print();
}
print("Exit value: " + exitValue);
}
}
}