command-line-interface

If you can dynamically change the font in the terminal like you can with CSS

浪子不回头ぞ 提交于 2019-12-11 15:16:14
问题 I have seen these two questions: Can I change the font of terminal? Is it possible to show mathematical symbols in the terminal? The answer to both is yes. I am wondering if it is possible to have a CLI print out mathematical symbols into the terminal from a custom font only it is personally using , while at the same time I never have to change the font on my terminal (I can keep using the default font for everything else). That is, say I have my default font for my terminal set to x . The

How to run php in interactive CLI in Windows

丶灬走出姿态 提交于 2019-12-11 13:59:26
问题 I would like to run PHP in a command-line-interface and I would like to get output after every line I write. I have php.exe in my PATH environment variable. I use php -r "echo 'Hello world'" or php -a Interactive mode enabled <?php echo "hello world" ?> ^Z But I want a real php shell, which reacts after every command. I have used something similar in Python. Is this possible in PHP? You can recommend a program that has this feature. 回答1: For a powerful interactive PHP CLI, I suggest you take

Customize msiexec progress bar?

℡╲_俬逩灬. 提交于 2019-12-11 13:26:32
问题 My application call msiexec to run uninstall. logger->LogDebug("Actions: MsiUninstallExec()!"); System::Diagnostics::Process ^p = gcnew System::Diagnostics::Process(); p->StartInfo->FileName = "msiexec"; p->StartInfo->Arguments = "/x " + AppSetting::ProductCode; p->Start(); /// -->>> Uninstall /// -->> Choose restart or not. /// -->>> Application Exit When uninstallation is done, users have to choose restart or not to complete this process. But my customer request : "The progress bar of

awk freezing when I direct to a file

♀尐吖头ヾ 提交于 2019-12-11 12:59:37
问题 So when I run this on a mac: awk 'END { for (name in ENVIRON) { print "key: "name; } }' >> app-deployment.yaml awk just freezes. If I change it to just print to /dev/null like this awk 'END { for (name in ENVIRON) { print "key: "name; } }' < /dev/null It works fine. Am I doing something wrong with my redirection? Is there something else I'm doing wrong here? 回答1: Change END to BEGIN to be able to work without any input: awk 'BEGIN { for (name in ENVIRON) { print "key: "name; } }' >> app

PHP 7.1+ Windows readline extension not all functions exist

时间秒杀一切 提交于 2019-12-11 12:23:57
问题 One of the improvements in PHP7.1 is that in Windows the readline extension is available out of the box. I'm having trouble using all of the functions though, as they don't all exist. The following code: $functions = [ 'readline_add_history', 'readline_callback_handler_install', 'readline_callback_handler_remove', 'readline_callback_read_char', 'readline_clear_history', 'readline_completion_function', 'readline_info', 'readline_list_history', 'readline_on_new_line', 'readline_read_history',

Exclude Jekyll directory from --watch, but not build

こ雲淡風輕ζ 提交于 2019-12-11 12:17:13
问题 I have a very similar issue to Excluding a directory from Jekyll watch, but I thought it was different enough to warrant it's own question. _config.yml: exclude: [ "my_ignored_directory" ] Using jekyll build --watch , the folder my_ignored_directory will be successfully ignored from the watch task, but it will also not be built. Is there are way to exclude a folder of my choosing from the --watch task, but not to be excluded from being built? (Note: there is no error in the console) 回答1: The

Cordova build for android level api 20

心不动则不痛 提交于 2019-12-11 11:46:10
问题 I am trying to build an app made with Angular2 + Ionic2 (ie. Cordova 6) for my android 4.4.4. I have noticed the version 4.4.4 of android was reffered to the api level 20, so this is the version I have downloaded and installed (api20 + android SDK Build Tools level 20 too). In cordova I have edited the platforms/android/project.properties and platforms/android/CordovaLib/project.properties to build to android-2O instead of the default android-23 api. I have also edited the AndroidManifest.xml

LOAD DATA LOCAL INFILE stops imports at 69k rows

倾然丶 夕夏残阳落幕 提交于 2019-12-11 11:27:15
问题 I am using the LOAD DATA LOCAL INFILE and it seems to be stopping at ~69k rows. Is is a memory limit that's too low? of buffer size? Query OK, 68844 rows affected, 65535 warnings (4.20 sec) Records: 69182 Deleted: 0 Skipped: 338 Warnings: 160539 The .csv file contains around 138k entries, all escaped and enclosed properly. Edit: Mysql version: Ver 14.14 Distrib 5.1.50, for Win32 (ia32) Edit 2: The command: load data local infile 'path/to/file.csv' into table contacts fields terminated by ','

Apache command line parser

廉价感情. 提交于 2019-12-11 10:47:36
问题 I got the code below from a sample code from tutorials point and tweaked it a little bit. App.java public static void main(String[] args) throws ParseException { CommandTest t = new CommandTest(); t.start(args); } CommandTest.java public class CommandTest { void start(String[] args) throws ParseException { //***Definition Stage*** // create Options object Options options = new Options(); // add option "-a" options.addOption( Option.builder("a") .longOpt("add") .desc("add numbers") .hasArg

Cannot set process title in a PHP command line script using cli_set_process_title() OS X?

南楼画角 提交于 2019-12-11 10:05:25
问题 I am trying to build a simple daemon script with PHP and I would like to set the process title to see it in ps and top output. This code is: #!/usr/bin/php <?php // Daemonize cli_set_process_title('daemonized'); $pid = pcntl_fork(); // parent gets the child PID, child gets 0 if($pid){ // 0 is false in PHP // Only the parent will know the PID. Kids aren't self-aware // Parent says goodbye! print "Parent : " . getmypid() . " exiting\n"; exit(); } print "Child : " . getmypid() . "\n"; while