interactive-mode

Is there an “immediate window” in Visual Studio Code to run Javascript?

霸气de小男生 提交于 2020-02-26 08:01:02
问题 Yes, I use F12 in the browser all the time to test out Javascript snippets with the console. I'm tired of that (for the moment anyway). I've read that in Visual Studio you can use the immediate window to run Javascript interactively.. I've haven't tried it that hard. I think when I did it told me it can't evaluate while in design mode... ugh, what a pain. I do like to use Visual Studio Code (sublime text historically) sometimes to just mess around with syntax of snippets. Would also be nice

Matplotlib, Pylab using TKAgg: encountering PyEval_RestoreThread: NULL tstate when using plt.ion() on win32

徘徊边缘 提交于 2020-01-02 19:11:12
问题 EDIT: Bah, finally found a discussion on the Runtime Error, although it focuses on using PythonWin, which I did not have installed at the time. After installing PythonWin and setting up GTK (as per an earlier question), I was still encountering the error. The solution from the discussion board here was to append plt.close() after the for loop. This seems to work. However: From the command line, window is still unmovable while plotting. When exiting, PyEval_RestoreThread no longer runs into

Cocoa wrapper for an interactive Unix command

非 Y 不嫁゛ 提交于 2019-12-29 06:49:10
问题 Ok, so I know you can make an NSTask to run command line tools with Objective-C: NSTask *task; task = [[NSTask alloc] init]; [task setLaunchPath: @"/usr/bin/gdb"]; [task launch]; I'm just wondering if there's a way to communicate with interactive command line tools such a as gdb . This would involve giving the command inputs based on user interaction (like run , kill or quit with gdb ) and then reacting based on the information it outputs. 回答1: You can use NSTask's setStandardInput: ,

Grails default package name

十年热恋 提交于 2019-12-22 07:07:30
问题 I am new to Grails and I like it very much. I want to place my classes in packages like org.company.project.module.model . Its quite painful for to me to repeat create-domain-class <package>.<class_name> . Is there something like "package templates" or can I somehow "enter" (like grails cd org.comopany... ) and then just write Class names ( grails Person will be generated in ./ location)? Is that possible or should I use copy paste design pattern? Thanks in advance for any help. 回答1: If I

Matplotlib ion() and subprocesses

微笑、不失礼 提交于 2019-12-18 05:56:02
问题 I am trying to have a plot pop up so the user can confirm that a fitting worked, but not hang up the entire process doing so. However, while the window appears, there is never anything in it, and it is "Not Responding". I suspect that there is a bad interaction with the subprocess functionality, as this code is front-ending and data processing for a simulation being run in C++. import subprocess import numpy as np from matplotlib import pyplot as mpl ... mpl.ion() fig = mpl.figure() ax = fig

Plotting Serial data in Python how to pause matplotlib figure?

亡梦爱人 提交于 2019-12-11 19:32:11
问题 Basically I want to pause the live plot that I have setup here: import serial import numpy as np from matplotlib import pyplot as plt ser = serial.Serial('/dev/tty.usbmodemfa131', 9600) #Setting up the animated plot plt.ion() # set plot to animated fig = plt.figure() ydata = [0] * 100 ax1=plt.axes() # make plot line, = plt.plot(ydata) plt.ylim([24,29]) #Starting data collection while True: rawData = ser.readline().rstrip() x = len(rawData) #print(floatData) if len(rawData) <= 6: try: data =

pyplot display large numbers in interactive mode [duplicate]

余生长醉 提交于 2019-12-11 18:34:29
问题 This question already has answers here : How to prevent numbers being changed to exponential form in Python matplotlib figure (3 answers) Closed 6 years ago . I'm trying to plot large numbers on the x axis using the interactive mode, and instead of the full number on the ticks, i get 1, 1.5 and so on and +5.043e3. how can i display the full number? After defining the plt.ion() , i have this inside a loop: plt.xlabel("Wavelength (angstroms)") plt.ylabel("Arbitrary Flux") plt.plot(xo,yo,'k--')

Ruby, pry: Can I add something to the command `pry example.rb` so pry automatically goes interactive when it finishes executing the script?

混江龙づ霸主 提交于 2019-12-11 00:47:45
问题 Pry goes into interactive mode if it encounters an exception (eg if you just put an undefined variable 'x' at the end of the script). (Also if, inside the script itself you require 'pry' and put binding.pry at the point you want to go interactive at.) But I'm wondering: Is there's some kind of flag/option/argument thingy that I can add to the pry example.rb command when I enter it at the command prompt, so it will go interactive when it reaches the end of executing any example.rb script,

Grails default package name

五迷三道 提交于 2019-12-05 12:05:08
I am new to Grails and I like it very much. I want to place my classes in packages like org.company.project.module.model . Its quite painful for to me to repeat create-domain-class <package>.<class_name> . Is there something like "package templates" or can I somehow "enter" (like grails cd org.comopany... ) and then just write Class names ( grails Person will be generated in ./ location)? Is that possible or should I use copy paste design pattern? Thanks in advance for any help. Alidad If I understood your question, you are looking for default package name for your domain classes. In your

mac os php intratactive mode has no prompt

笑着哭i 提交于 2019-12-04 00:32:27
问题 I'm trying to run PHP in interactive mode from the terminal window and when i run the command php -a it says "Interactive mode enabled" but does not show me the "php->" prompt that it should. I have to press control z to get out of interactive mode but I can execute any commands while interactive mode is "enabled" Does anyone know how to fix this 回答1: The PHP interactive shell requires that GNU readline or libedit is compiled statically into the PHP binary. Many distributions only provide