command-line-interface

Command-line svn for Windows?

拥有回忆 提交于 2019-11-29 18:47:47
Is there a command-line based version of svn for Windows? I know I can get TortoiseSVN, but that just doesn't work for me. Newer versions of TortoiseSVN contain a console svn client, but by default the corresponding option is not checked. The svn.exe executable is not standalone and it depends on some other files in the distribution but this should not be a problem in most cases. Once installed you might need to add the folder containing svn.exe to the system PATH as described here so that it is available in your console. To check if it was already added by the installer open a new console and

Git commit in terminal opens VIM, but can't get back to terminal

。_饼干妹妹 提交于 2019-11-29 18:33:49
Trying to learn GitHub at the moment and doing this Git essentials tutorial over at nettuts. I'm on the lesson about making commits. The teacher types git commit and it opens VIM as his editor (I'd also like to know how to make it open up in Sublime Text 2 instead) anyways it opens in VIM and I add in 1 line saying this is my first commit and hit save. Next it then prompts me to save the output to the desktop, something I did not see in his screencast. Now I'm still in VIM and not sure how to get back to 'normal' terminal :( I couldn't figure it out so I just exited the terminal and relaunched

how to make a PHP file run-able only through CLI mode?

 ̄綄美尐妖づ 提交于 2019-11-29 18:27:11
问题 It's available to browser, but I don't want it to execute when browsed by user, say,when browsed should exit, is there a way to detect whether it's currently Cmmand Line Mode? 回答1: See: What is the canonical way to determine commandline vs. http execution of a PHP script? Is there any way to know if a php script is running in cli mode? PHP - what is the best & easy way to determine if the current invocation is from CLI or browser Short story: php_sapi_name(). 回答2: Here is what i'm using, for

How to redirect from Audio Output to Mic Input using PulseAudio?

…衆ロ難τιáo~ 提交于 2019-11-29 17:48:25
问题 I'm working on a mobile app for Maemo/MeeGo and Maemo uses PulseAudio. I want to play a mp3 to caller (and cancel the mic when doing it, and not to listen caller, everything should be done on background), to do this, I have to redirect Audio Output from a certain (if not possible, all) app, fake it as a Input and make Phone app use it. On my Ubuntu PC, I did it with pavucontrol. I created a NULL sink, then: Audio Output (from Amarok) --> to NULL Output Skype Input <-- NULL Output Skype Output

Is it possible to prefill a input() in Python 3's Command Line Interface?

99封情书 提交于 2019-11-29 15:59:43
问题 I'm using Python 3.2 on Ubuntu 11.10 (Linux). A piece of my new code looks like this: text = input("TEXT=") Is it possible to get some predefined string after the prompt, so I can adjust it if needed? It should be like this: python3 file TEXT=thepredefinedtextishere Now I press Backspace 3 times TEXT=thepredefinedtextish Now I press Enter , and the variable text should be thepredefinedtextish 回答1: If your Python interpreter is linked against GNU readline, input() will use it. In this case,

PHP CLI - get user input while still doing things in background

橙三吉。 提交于 2019-11-29 15:43:36
I'm working on a game, written in PHP and that runs in a console. Think back to old MUDs and other text-based games, even some ASCII art! Anyway, what I'm trying to do is have things happening while also accepting user input. For instance, let's say it's a two player game and Player 1 is waiting for Player 2 to make a move. This is easily done by just listening for a message. But what if Player 1 wants to change some options? What if they want to view details on aspects of the game state? What about conceding the game? There are many things a Player may want to do while waiting for their

Why doesn't xmlstarlet select all nodes?

我只是一个虾纸丫 提交于 2019-11-29 15:04:14
Consider this example from w3schools : <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan

Common Language Runtime detected an invalid program?

天涯浪子 提交于 2019-11-29 14:52:36
I have this error repeating continuously in my program. I have tried the following: Restart Visual Studio Clean and Rebuild Solution When I step through the code line by line, it stops leaving me totally confused at a method call: GenerateWorksheetPart1Content(WorksheetPart worksheetPart1) I don't understand why it stops there. The parameter is not null at the point. What could be causing the error? MSDN - InvalidProgramException Excerpt: The exception that is thrown when a program contains invalid Microsoft intermediate language (MSIL) or metadata. Generally this indicates a bug in the

Laravel how to start server in production

牧云@^-^@ 提交于 2019-11-29 13:59:15
问题 When I run it outputs: php artisan serve --port=80 Laravel development server started on http://localhost:80 How can I make it run in the background, when I exit the console the server stops. 回答1: Short answer: DON'T The web server artisan uses is the PHP built-in web server, which is not for use in any scenario other than development as showcased by this excerpt from the Built-in web server documentation: Warning This web server was designed to aid application development. It may also be

CLI-Spring Shell in IntelliJ

霸气de小男生 提交于 2019-11-29 13:27:38
问题 I am working on a CLI Spring shell code in IntelliJ. I run it and give some parameters. But when I type insert and press enter, console doesn't take it and it appears as if nothing happened! My code: @Component public class HelloWorldCommands implements CommandMarker { @CliCommand(value = "insert", help = "insert data to ParsEMS DB") public void insert() { try { Class.forName("org.postgresql.Driver"); Connection con = DriverManager.getConnection("jdbc:postgresql://localhost:5432/ParsEMS",