command-line-interface

Fatal error: Maximum execution time of 0 seconds exceeded

独自空忆成欢 提交于 2019-11-27 17:30:17
问题 My script compares 2 source trees, creates a map of possible changed files, compares MD5 hashes and creates a diff-package. After 28000-29000 files, PHP terminates the script with error: Fatal error: Maximum execution time of 0 seconds exceeded in /root/_PACKER-TESTER/core/diff.class.php on line 67 (standard in_array() call) I already tried to set max_input_time to high value (or zero) - nothing. Setting max_execution_time to 99999999999999 do nothing .... the same error. 回答1: Try setting max

How to open Atom editor from command line in OS X?

孤者浪人 提交于 2019-11-27 16:36:19
I have the Atom editor and was wondering how you can open a file or folder from the terminal in Atom. I am using a Mac. I am looking for a way to do this: atom . (opens folder) atom file.js (opens file) atom (opens editor) Is this possible and how do I set it up? When Atom installs it automatically creates a symlink in your /usr/local/bin. However in case it hasn't, you can create it yourself on your Mac ln -s /Applications/Atom.app/Contents/Resources/app/atom.sh /usr/local/bin/atom Now you can use atom folder_name to open a folder and atom file_name to open a file. Hope this helps. shaheenery

Command prompt won't change directory to another drive

纵然是瞬间 提交于 2019-11-27 16:36:01
I'm trying to compile some java (learning java currently), and to do so I need to change command-prompt's directory (using javac). C:\...\Admin> cd D:\Docs\Java C:\...\Admin> cd C:\...\Admin It doesn't change the directory. I try again using quotes: C:\...\Admin> cd "D:\Docs\Java" C:\...\Admin> Again it doesn't change the directory. What am I doing wrong? kenny As @nasreddine answered or you can use /d cd /d d:\Docs\Java For more help on the cd command use: C:\Documents and Settings\kenny>help cd Displays the name of or changes the current directory. CHDIR [/D] [drive:][path] CHDIR [..] CD [/D

Linux equivalent of the Mac OS X “open” command [closed]

馋奶兔 提交于 2019-11-27 16:35:44
I've found the "open" command in Mac OS X very handy in the command line. From "man open": The open command opens a file (or a directory or URL), just as if you had double-clicked the file's icon. If no application name is specified, the default application as determined via LaunchServices is used to open the specified files. That is, if I want to open a PDF file with the default PDF viewer (happens to be Preview), I only need to do: open my.pdf In Linux, however, to open a PDF file from the command line, I had to dig around to find the default PDF viewer is, for instance, "evince" (who'd have

How to get AWS command line interface to work in cygwin

倾然丶 夕夏残阳落幕 提交于 2019-11-27 15:43:51
问题 I installed the AWS command line interface on my Windows 7 box, and it worked immediately when I called commands from a DOS shell. But DOS, the worst language ever invented, is hideous for any serious scripting. So, I would like to to use the AWS CLI from bash via cygwin. In my case, the installed AWS CLI is the Windows version. In principle, that should not be a problem because Windows commands are executable from cygwin. (cygwin includes your Windows environmental variables, such as PATH,

Javac “cannot find symbol”

穿精又带淫゛_ 提交于 2019-11-27 15:28:41
I've the root directory like this : ├── classes └── src └── vehicles ├── Bicycle.java └── BicycleMain.java Bicycle.java package vehicles; public class Bicycle { public int cadence; public int gear; public int speed; public Bicycle(int startCadence, int startSpeed, int startGear) { gear = startGear; cadence = startCadence; speed = startSpeed; } public void setCadence(int newValue) { cadence = newValue; } public void setGear(int newValue) { gear = newValue; } public void setSpeed(int newValue) { speed = newValue; } public int getGear() { return gear; } public int getCadence() { return cadence; }

What is the maximum length of a C#/CLI identifier?

∥☆過路亽.° 提交于 2019-11-27 15:26:27
Which other restrictions are there on names (beside the obvious uniqueness within a scope)? Where are those defined? From the PDF of ECMA-335 , Partition II, section 22, "Metadata preserves name strings, as created by a compiler or code generator, unchanged. Essentially, it treats each string as an opaque blob. In particular, it preserves case. The CLI imposes no limit on the length of names stored in metadata and subsequently processed by the CLI". If I've read this correctly and the context is correct then there's no actual limit to the length of an identifier in the CLR. In addition to the

How to handle a ctrl-break signal in a command line interface

别来无恙 提交于 2019-11-27 14:52:05
Before I begin, I want to clarify that this is not a command-line tool, but an application that accepts commands through it's own command-line interface. Edit: I must apologize about my explanation from before, apparently I didn't do a very good job at explaining it. One more time... I am building a command-line interface application that accepts commands from a user. I have a signal handler setup to catch the signals, which then sets a flag that I need to terminate the application. The problem I'm having is all of the console functions I can find are blocking, which means that I can't detect

What will give me something like ruby readline with a default value?

好久不见. 提交于 2019-11-27 14:47:43
If I want to have a prompt on the terminal with a default value already typed in, how can I do that? Ruby's standard Readline.readline() lets me set the history but not fill in a default value (as far as I can tell, at least) I would like something like this: code: input = Readline.readline_with_default('>', 'default_text') console: > default_text| What you are asking is possible with Readline . There's a callback where you can get control after the prompt is displayed and insert some text into the read buffer. This worked for me: Readline.pre_input_hook = -> do Readline.insert_text "hello.txt

Commons CLI required groups

烂漫一生 提交于 2019-11-27 12:48:35
问题 I am writing command line application in Java and I've chosen Apache Commons CLI to parse input arguments. Let's say I have two required options (ie. -input and -output). I create new Option object and set required flag. For now it's all good. But I have third, not required option , ie. -help. With settings that I've mentioned, when user wants to show help (use -help option) it says "-input and -output" are required. Is there any way to implement this (via Commons CLI API, not simple if (