In [ ]:
import com.twosigma.beakerx.widget.IntSlider
w = new IntSlider()
w.value = 60
w
In [ ]:
w.value
In [ ]:
w.value =76
In [ ]:
w.description = "desc1"
In [ ]:
w.disabled = false
In [ ]:
w.max = 200
w.min = 50
In [ ]:
w.orientation = "horizontal"
//w.orientation = "vertical"
In [ ]:
w.step = 20
In [ ]:
w.visible = true
//w.visible = false
In [ ]:
import com.twosigma.beakerx.widget.IntProgress
bar = new IntProgress()
bar.value = 10
bar
In [ ]:
bar.value
In [ ]:
bar.value =110
In [ ]:
bar.max = 300
bar.min = 50
In [ ]:
bar.step = 20
In [ ]:
bar.orientation = "horizontal"
//bar.orientation = "vertical"
In [ ]:
import com.twosigma.beakerx.widget.Output
out = new Output()
OutputManager.setOutput(new Output())
out
In [ ]:
for (i = 0; i <10; i++) {
println("Hello "+ i)
}
"result loop"
In [ ]:
out.appendStdout("Hello 2")
In [ ]:
out.appendStderr("Error 1")
In [ ]:
System.err.println("Error 2");
In [ ]:
out.clearOutput()
In [ ]:
println("Hello 3")
In [ ]:
import com.twosigma.beakerx.widget.IntSlider
out.display(new IntSlider())
In [ ]:
OutputManager.setOutput(null)
In [ ]:
println("Hello 6")
In [ ]:
import com.twosigma.beakerx.widget.Output
OutputManager.setStandardOutput(new Output())
In [ ]:
println("Hello only stdout")
In [ ]:
System.err.println("Error for onlyOut");
In [ ]:
OutputManager.clear()
OutputManager.setStandardOutput(null)
In [ ]:
import com.twosigma.beakerx.widget.Output
OutputManager.setStandardError(new Output())
In [ ]:
println("Hello only stderr")
In [ ]:
System.err.println("Error for onlyErr");
In [ ]:
OutputManager.setStandardError(null)
In [ ]:
import com.twosigma.beakerx.widget.Output
out2 = new Output()
OutputManager.setOutput(out2)
out2
In [ ]:
println("before")
out2.display(YoutubeVideo("gSVvxOchT8Y"))
println("inside")
out2.display(SVG("https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/car.svg"))
println("after")
"done"
In [ ]:
out2.display(YoutubeVideo("gSVvxOchT8Y"))
In [ ]:
out2.clearOutput()
In [ ]:
OutputManager.setOutput(null)