command-line-interface

Fatal error: Maximum execution time of 300 seconds exceeded

和自甴很熟 提交于 2019-12-17 06:25:27
问题 I keep getting this PHP error: Fatal error: Maximum execution time of 300 seconds exceeded I have tried setting my max_execution_time and my max_input_time settings in php.ini (both apache and cli) to 0 , -1 and 4000 seconds each. And i still get the error saying: Fatal error: Maximum execution time of 300 seconds exceeded As well my script runs over 300 seconds before i get this message I am running the script through command line. I also checked my phpinfo() so see which php.ini I am using.

Send POST Request with Data Specified in File via Curl

孤人 提交于 2019-12-17 05:33:13
问题 I need to make a POST request via Curl from the command line. Data for this request is located in a file. I know that via PUT this could be done with the --upload-file option. curl host:port/post-file -H "Content-Type: text/xml" --data "contents_of_file" 回答1: You're looking for the --data-binary argument: curl -i -X POST host:port/post-file \ -H "Content-Type: text/xml" \ --data-binary "@path/to/file" In the example above, -i prints out all the headers so that you can see what's going on, and

How to create a spinning command line cursor?

夙愿已清 提交于 2019-12-17 03:25:11
问题 Is there a way to print a spinning cursor in a terminal using Python? 回答1: Something like this, assuming your terminal handles \b import sys import time def spinning_cursor(): while True: for cursor in '|/-\\': yield cursor spinner = spinning_cursor() for _ in range(50): sys.stdout.write(next(spinner)) sys.stdout.flush() time.sleep(0.1) sys.stdout.write('\b') 回答2: Easy to use API (this will run the spinner in a separate thread): import sys import time import threading class Spinner: busy =

How to create a spinning command line cursor?

≡放荡痞女 提交于 2019-12-17 03:25:10
问题 Is there a way to print a spinning cursor in a terminal using Python? 回答1: Something like this, assuming your terminal handles \b import sys import time def spinning_cursor(): while True: for cursor in '|/-\\': yield cursor spinner = spinning_cursor() for _ in range(50): sys.stdout.write(next(spinner)) sys.stdout.flush() time.sleep(0.1) sys.stdout.write('\b') 回答2: Easy to use API (this will run the spinner in a separate thread): import sys import time import threading class Spinner: busy =

How can I beautify JavaScript code using Command Line?

我与影子孤独终老i 提交于 2019-12-17 03:23:36
问题 I am writing a batch script in order to beautify JavaScript code. It needs to work on both Windows and Linux . How can I beautify JavaScript code using the command line tools? 回答1: First, pick your favorite Javascript based Pretty Print/Beautifier. I prefer the one at http://jsbeautifier.org/, because it's what I found first. Downloads its file https://github.com/beautify-web/js-beautify/blob/master/js/lib/beautify.js Second, download and install The Mozilla group's Java based Javascript

Is there a better Windows Console Window? [closed]

眉间皱痕 提交于 2019-12-17 02:53:03
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not

Is there a better Windows Console Window? [closed]

末鹿安然 提交于 2019-12-17 02:52:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not

Merge / convert multiple PDF files into one PDF

こ雲淡風輕ζ 提交于 2019-12-17 02:00:15
问题 How could I merge / convert multiple PDF files into one large PDF file? I tried the following, but the content of the target file was not as expected: convert file1.pdf file2.pdf merged.pdf I need a very simple/basic command line (CLI) solution. Best would be if I could pipe the output of the merge / convert straight into pdf2ps ( as originally attempted in my previously asked question here: Linux piping ( convert -> pdf2ps -> lp) ). 回答1: Considering that pdfunite is part of poppler it has a

Generate C# entity files from my EDMX in the command line instead of from VisualStudio

爱⌒轻易说出口 提交于 2019-12-14 04:18:55
问题 I have an .edmx file that generates C# entity files when I open it in VisualStudio and hit the "Save" operation. How to do this from the command line? I would like to set up a CI environment that can do this before trying to compile... 回答1: You can use the EdmGen2 command line Tool: https://github.com/cincuranet/EdmGen2 来源: https://stackoverflow.com/questions/34351422/generate-c-sharp-entity-files-from-my-edmx-in-the-command-line-instead-of-from-v

How can I install php on Windows

时光毁灭记忆、已成空白 提交于 2019-12-14 04:14:45
问题 I want to install PHP on Windows 10 Pro, I've tried both downloading PHP 7.1 and 7.0.14 from the official website, but for some reason I can't find php.exe in the folder I download (there seems to be no executable at all). Where can I find the binary? My goal is to be able to run PHP from the Command Prompt. 回答1: Did you get your version of PHP from? http://windows.php.net/download/ I've just downloaded the ZIP from there and it contained php-win.exe Check you've not accidentally downloaded