interactive

code manipulation via interactive tree for Mathematica

丶灬走出姿态 提交于 2019-11-30 06:47:14
问题 This question caused me to ponder an interactive method for editing code. I wonder if it is possible to implement something like this given the dynamic capabilities of Mathematica. Consider an expression: Text[Row[{PaddedForm[currentTime, {6, 3}, NumberSigns -> {"", ""}, NumberPadding -> {"0", "0"}]}]] And its TreeForm : I would like to be able to edit that tree directly, and then have the result translated back into Mathematica code. One should at least be able to: rename nodes, replacing

How to force ffmpeg into non-interactive mode?

偶尔善良 提交于 2019-11-30 00:45:08
问题 Sometimes you want ffmpeg to ask you whether it should overwrite a file. Sometimes it's just a script that you prefer would fail if something is amiss. I.e. don't rely on stdin to answer if you have a question. 回答1: See https://ffmpeg.org/ffmpeg.html#Main-options -stdin - Enable interaction on standard input. On by default unless a pipe is detected. -nostdin - To explicitly disable console interactions. Without -y this will cause ffmpeg to error out if the target file exists. -y - To

C# Console? [closed]

喜欢而已 提交于 2019-11-29 23:58:36
Does anyone know if there is a c# Console app, similar to the Python or Ruby console? I know the whole "Compiled versus Interpreted" difference, but with C#'s reflection power I think it could be done. UPDATE Well, it only took about 200 lines, but I wrote a simple one...It works a lot like osql. You enter commands and then run them with go. SharpConsole http://www.gfilter.net/junk/sharpconsole.jpg If anyone wants it, let me know. Given your mention of "C#'s reflection power", I am unsure whether you're looking for an interactive C# console for small code snippets of your own (à la Ruby's irb

Is there a possibility to execute a Python script while being in interactive mode

Deadly 提交于 2019-11-29 20:34:33
Normally you can execute a Python script for example: python myscript.py , but if you are in the interactive mode, how is it possible to execute a Python script on the filesystem? >>> exec(File) ??? It should be possible to execute the script more than one time. fn. Use execfile('script.py') but it only work on python 2.x, if you are using 3.0 try this import file without the .py extension will do it, however __name__ will not be "__main__" so if the script does any checks to see if it's being run interactively you'll need to bypass them. Alternately, if you're wanting to have a look at the

How can I check to see if a Python script was started interactively?

三世轮回 提交于 2019-11-29 16:15:07
I'd like for a script of mine to have 2 behaviours, one when started as a scheduled task, and another if started manually. How could I test for interactiveness? EDIT: this could either be a cron job, or started by a windows batch file, through the scheduled tasks. You should simply add a command-line switch in the scheduled task, and check for it in your script, modifying the behavior as appropriate. Explicit is better than implicit. One benefit to this design: you'll be able to test both behaviors, regardless of how you actually invoked the script. If you want to know if you're reading from a

How can I create a Dynamic - Interactive image map with jQuery?

送分小仙女□ 提交于 2019-11-29 15:50:14
问题 So I am using the .Net framework, building with ASP.NET MVC, how do I create a Dynamic, interactive web 2.0 style Image Map? Where say for example, on a world map, if you hover over a country, the selected country will highlight, and a tool tip comes up with various information, and if you click the country it takes you to the said countries details page. 回答1: I work on such a plugin jVectorMap. You can check it out here jvectormap.owl-hollow.net. 回答2: Well, my answer below is not using

JavaExe and Java application as windows system service interactive to desktop

◇◆丶佛笑我妖孽 提交于 2019-11-29 15:32:00
Request: This is a very common problem faced by Java devs in my locale. I am really stuck for many days on this. Searched and tried a lot, read the docs. read ALL the stackoverflow questions related to JavaExe. Please only reply if you have done similar thing before and have a comprehensive answer. I would be really grateful to the community! Senario: I am using JavaExe to run an application as system service in desktop interactive capability. To be exact I have an application that captures screenshots of desktops . I want it to run ( as admin ) on any user login so no one can stop it. I have

How to do interactive SMS in .NET?

纵然是瞬间 提交于 2019-11-29 12:43:38
I want to write an app that sends an SMS to users, and when the recipients texts back, I receive that response, including the originating phone number, and my program can react to that response. I've googled "Interactive SMS" but didn't find anything that was clearly a fit. Has anyone else done this, got any recommendations for a paid service that provides this kind of functionality? Alternatively, do you have any other recommendations for how to build this service into my app, which will probably be written in C#? Find an SMS service provider that gives you an API you can use (e.g. an HTTP

Detecting when a python script is being run interactively in ipython

北慕城南 提交于 2019-11-29 10:29:03
Is there a way for a python script to automatically detect whether it is being run interactively or not? Alternatively, can one detect whether ipython is being used versus the regular c python executable? Background: My python scripts generally have a call to exit() in them. From time to time, I run the scripts interactively for debugging and profiling, usually in ipython. When I'm running interactively, I want to suppress the calls to exit. Clarification : Suppose I have a script, myscript.py, that looks like: #!/usr/bin/python ...do useful stuff... exit(exit_status) Sometimes, I want to run

Interactive matplotlib plots via textboxes

故事扮演 提交于 2019-11-29 08:04:36
I'm trying to create an interactive matplotlib plot of a multidimensional function with three parameters to vary. The problem is that the parameters can vary over a very large range, so I'd rather not use sliders but directly type the value I'd like. Basically, I'd like to recreate the canonical example below where instead of sliders I'd like text boxes in which I can input parameters import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons fig, ax = plt.subplots() plt.subplots_adjust(bottom=0.35) t = np.arange(0.0, 1.0, 0.001) a0 = 5 f0 =