interactive

C++ interpreter / console / snippet compiler

时间秒杀一切 提交于 2019-11-28 10:17:34
I am looking for a program where I can enter a C++ code snippet in one window, press a button, and get output in another window. Compilation should somehow be hidden behind the button. On a per-snippet basis would be fine, full interactive probably asking too much. It should run under Linux/Unix. Main use case would be learning/testing/short debugging, etc. Related stuff I found: -- the Reinteract project for python (which i'm told sage has features similar to) -- the same thread for C# here: C# Console? -- the CINT interpreter from the CERN ROOT project (which may be close, but maybe there

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

时光毁灭记忆、已成空白 提交于 2019-11-28 09:31:31
问题 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. 回答1: 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

JavaExe and Java application as windows system service interactive to desktop

让人想犯罪 __ 提交于 2019-11-28 08:57:18
问题 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

bash: nested interactive read within a loop that's also using read

旧街凉风 提交于 2019-11-28 08:27:10
问题 How does one code an interactive response in this while loop? #!/bin/bash shows=$(< ${HOME}/.get_iplayer/tv.cache) # ... # ... stuff with shows omitted ... # ... function print_show { # ... return } while read -r line do print_show "$line" read -n 1 -p "do stuff? [y/n] : " resp # PROBLEM # ... # resp actions omitted # ... done <<< "$shows" So a file is read, "processed" then the resulting line oriented data is used in a while read loop But the read line within the while loop doesn't work as

iOS - change language for user via buttons

只愿长相守 提交于 2019-11-28 06:03:09
问题 Im making an interactive children's story that only uses custom graphics and narrations. I have all graphics in both English and Spanish. I dont have any non-custom buttons, no text fields, not a single "standard" Apple app UI element anywhere. Everything is a custom PNG file. Im simply looking for a method to allow the user to change from English to Spanish or vice-versa. I created a custom English and a Spanish button already, which will highlight when pressed. The app will (from what Ive

How to do interactive SMS in .NET?

南楼画角 提交于 2019-11-28 05:57:07
问题 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

git: How to automate interactive rebase / replace it by equivalent git commands

天大地大妈咪最大 提交于 2019-11-28 03:53:49
问题 I need to automate a interactive rebase or replace it by other commands. Just let me explain my current situation: In an svn->git transition i need to rebase the newly created git repository to fix a "history cut-offs" made during SVN. Here is my manual workflow to fix the problem. branchNEW: containing history from SOMEDAY until now branchOLD: containing history from past to SOMEDAY EDIT or as ascii: branchNEW: Y - Z branchOLD: W - X Both branches have no common commits. The basic idea now

Detecting when a python script is being run interactively in ipython

风格不统一 提交于 2019-11-28 03:53:06
问题 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

git rebase interactive: squash merge commits together

蹲街弑〆低调 提交于 2019-11-28 03:08:20
I wanted to have a simple solution to squash two merge commits together during an interactive rebase. My repository looks like: X --- Y --------- M1 -------- M2 (my-feature) / / / / / / a --- b --- c --- d --- e --- f (stable) That is, I have a my-feature branch that has been merged twice recently, with no real commits in between. I don't just want to rebase the my-feature branch since it is a published branch of its own, I just want to squash together the last two merge commits into one (haven't published those commits yet) X --- Y ---- M (my-feature) / / / / a --- ... -- f (stable) I tried:

How can I start an interactive console for Perl?

风流意气都作罢 提交于 2019-11-28 02:38:46
How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python? You can use the perl debugger on a trivial program, like so: perl -de1 Alternatively there's Alexis Sukrieh 's Perl Console application, but I haven't used it. Not only did Matt Trout write an article about a REPL, he actually wrote one - Devel::REPL I've used it a bit and it works fairly well, and it's under active development. BTW, I have no idea why someone modded down the person who mentioned using "perl -e" from the console. This isn't really a REPL, true, but it's fantastically