我在厨师独奏下运行SBT,它试图从终端读取。将/dev/null
重定向到它并没有帮助,即使我直接用java运行jar。它只有在我孤儿的情况下才有效,并且只有在父级厨师独奏终止时才会终止。它必须关闭stdin,然后重新打开它,从而获得父级的标准输入。挂起期间的堆栈跟踪似乎表明了这一点。我怀疑它与其中一个插件
Thread 22379: (state = IN_NATIVE)
- java.io.FileInputStream.readBytes(byte[], int, int) @bci=0 (Interpreted frame)
- java.io.FileInputStream.read(byte[], int, int) @bci=16, line=272 (Interpreted frame)
- java.io.BufferedInputStream.fill() @bci=175, line=235 (Interpreted frame)
- java.io.BufferedInputStream.read() @bci=12, line=254 (Interpreted frame)
- jline.internal.TerminalLineSettings.exec(java.lang.String[]) @bci=54, line=191 (Interpreted frame)
- jline.internal.TerminalLineSettings.exec(java.lang.String) @bci=26, line=173 (Interpreted frame)
- jline.internal.TerminalLineSettings.stty(java.lang.String) @bci=26, line=168 (Interpreted frame)
- jline.internal.TerminalLineSettings.set(java.lang.String) @bci=2, line=76 (Interpreted frame)
- jline.UnixTerminal.init() @bci=15, line=54 (Interpreted frame)
- jline.TerminalFactory.create() @bci=298, line=101 (Interpreted frame)
- jline.TerminalFactory.get() @bci=14, line=159 (Interpreted frame)
- sbt.ConsoleLogger$.ansiSupported() @bci=0, line=123 (Interpreted frame)
- sbt.ConsoleLogger$.<init>() @bci=21, line=117 (Interpreted frame)
- sbt.ConsoleLogger$.<clinit>() @bci=3 (Interpreted frame)
- sbt.GlobalLogging$.initial(scala.Function2, scala.Function0, sbt.ConsoleOut) @bci=0, line=43 (Interpreted frame)
- sbt.StandardMain$.initialGlobalLogging() @bci=24, line=60 (Interpreted frame)
- sbt.StandardMain$.initialState(xsbti.AppConfiguration, scala.collection.Seq, scala.collection.Seq) @bci=205, line=69 (Interpreted frame)
- sbt.xMain.run(xsbti.AppConfiguration) @bci=97, line=28 (Interpreted frame)
- xsbt.boot.Launch$$anonfun$run$1.apply() @bci=10, line=109 (Interpreted frame)
- xsbt.boot.Launch$.withContextLoader(java.lang.ClassLoader, scala.Function0) @bci=15, line=128 (Interpreted frame)
- xsbt.boot.Launch$.run(xsbti.Launcher, xsbt.boot.RunConfiguration) @bci=97, line=109 (Interpreted frame)
- xsbt.boot.Launch$$anonfun$apply$1.apply(java.lang.Object) @bci=16, line=35 (Interpreted frame)
- xsbt.boot.Launch$.launch(scala.Function1, xsbt.boot.RunConfiguration) @bci=2, line=117 (Interpreted frame)
- xsbt.boot.Launch$.apply(xsbt.boot.LauncherArguments) @bci=876, line=18 (Interpreted frame)
- xsbt.boot.Boot$.runImpl(xsbt.boot.LauncherArguments) @bci=4, line=41 (Interpreted frame)
- xsbt.boot.Boot$.main(java.lang.String[]) @bci=291, line=17 (Interpreted frame)
- xsbt.boot.Boot.main(java.lang.String[]) @bci=4 (Interpreted frame)
答案 0 :(得分:0)
嗯,经过多次挖掘,这应该可行,但不是
-Dsbt.log.noformat =真
所以我挖到了jline网站,发现这会禁用询问终端
x,y,z = symbols(['x','y','z'])
r = symbols('r')
layer2 = lyrcfg2 *(x * 0.06 + y * 0.64 + z *0.30)
layer2_initial = (x * 0.06 + y * 0.64 + z *0.30)
#r makes up for 100% of this layer
layer1 = lyrcfg1 * r
i=0
j=20
layer2_constant = lyrcfg2 - (lyrcfg2*trim_2 + trim_1*lyrcfg1)
l2_start = layer2_constant * layer2_initial
while i<j:
layer2 = l2_start + trim_1 * layer1 + trim_2 * layer2
i += 1
print i,layer2