Menu
  • HOME
  • TAGS

swiftly generate and sort full encoding dictionary and corresponding primary radicals

character-encoding,command-line-interface,stanford-nlp

This information is encoded in exactly the form you want in the RadicalMap source code. See the static initializer: String[] radLists = {"\u4e00\u4e00\u4e01\u4e02\u4e03...", "...", ..., }; Each string in this list has as its first character a radical, and the remaining characters have that first character as their primary radical....

Translate ImageMagick CLI to PHP Imagick API

php,api,imagemagick,command-line-interface,imagick

You should be able to do this: $img1->compositeImage( $img2, imagick::COMPOSITE_COPYOPACITY, 0, 0 ); $img1->compositeImage( $img2, imagick::COMPOSITE_MULTIPLY, 0, 0 ); Have a look at the documentation - here....

argparse optional value for argument

python,python-3.x,command-line-interface,argparse

You can do this with nargs='?': One argument will be consumed from the command line if possible, and produced as a single item. If no command-line argument is present, the value from default will be produced. Note that for optional arguments, there is an additional case - the option string...

How to pass a hash as optional argument to -M in command line

perl,hash,package,command-line-interface

Looking at perlrun use: perl -Mfeature=say "-Mconstant {c1 => 'foo', c2 => 'bar'}" -e"say c1,c2" ...

Create a Black Jack game with a command line Interface

java,command-line-interface,blackjack

I think the meaning of "command line interface" here is a mixture of command line arguments and reading from System.in and writing to System.out. ie the user can interface with the program through a command line terminal or window. Furthermore it probably implies that the user issues commands through that...

cURL live output CLI

curl,output,command-line-interface

Perhaps curl's -N / --no-buffer option will help you?

Apache Commons CLI(Options)

java,command-line-interface,options

Options.addOption(...) provides some parameter combinations, like String opt, String longOpt, boolean hasArg, String description. Using Options.addOption(...) is obviously more convenient than using an OptionBuilder. However, OptionBuilder provides additional parameters like hasArgs(int num), isRequired, withType, withValueSeparator and so on, which are not available using Options.addOption(...). If you need them, you have...

amazon EC2 command line interface not returning all my snapshots

amazon-web-services,amazon-ec2,command-line-interface

Here's an alternative, using the AWS Tools for PowerShell. This utility should already be installed if your Windows EC2 is based off of an AMI that Amazon provided. This example describes a collection of snapshots that you created, and is filtered by status "completed" and by your provided volumeId. It...

Create automatically from “*.coffee” “*.coffee.js” instead of “*.js”

coffeescript,command-line-interface

My understanding is that you can't do it solely through the CoffeeScript CLI. However, with a little Unix magic: coffee -p -c myscript.coffee > myscript.coffee.js ...

how reliable is “at”

php,cron,command-line-interface,at-job

We don't know how reliable you need 'at' to be, however what you describe seems to be something of an anti-pattern for using at. If you need the jobs to run in a sequence then then they should be chained in a script with a single entry point. While 'at'...

c++ 2 ref classes should have acess to one same object of a other class

c++,windows,reference,system,command-line-interface

If your class of c is a ref class, you can use ^ (handle) to reference it. like the code here ref_class_c ^ d(gcnew ref_class_c); ref_class ^ e = d; As for the tracking reference versus a handle, the difference is similar to a reference/out parameter in C# method versus...

Grunt change target based on input

gruntjs,command-line-interface

Save the value of your given path in the grunt config and refer to it: module.exports = function(grunt) { 'use strict'; var dictionary = { 'all' : '**', 'html5' : 'some/path' }; require('time-grunt')(grunt); require('load-grunt-tasks')(grunt); grunt.initConfig({ eslint : { options : { config : '.eslintrc' }, target : ['hello/world/js/<%= dir %>/**.js']...

Git for Windows equivalent for open current directory command

git,shell,command-line-interface,git-bash

Lets say I have a file called index.html and from the command line I want to use a command that would pull up this file up in sublime text which is my default text editor. How would I do that? Simply define an alias (if you are in a...

Adapt GO build into different OS

go,command-line-interface,cloudfoundry

Go can build from any OS to any OS. You control the OS and architecture with two environment variables, named GOOS and GOARCH. The former is the operating system, and the latter is the CPU architecture. Building for 64-bit Linux is set as: GOARCH=amd64 GOOS=linux The options for GOARCH are...

Weird behaviour of cURL request in PHP script

php,apache,curl,browser,command-line-interface

Have you tried logging verbose output for the Curl request? Normally I find this the best way to figure out what's going on under the hood...http://stackoverflow.com/a/14436877/682754 Also not as popular but this approach looks simple to implement and is a lot cleaner...http://stackoverflow.com/a/26611776/682754...

cordova run android executes fine. But Android 4.1.2 doesn't start the app

android,cordova,android-emulator,command-line-interface

I met the same problem (Cordova "hello world" app won't display) and found a way to pass through it (but I don't really understand the underlying causes). Problem seemed to occur when installing the apk. On Cordova 5.0.0, adb commands to install the apk can be found at line 101...

Merge 2 files using command line tools

csv,awk,sed,command-line-interface

This should do: awk -F, -v OFS=, 'FNR==NR && FNR>1 {a[$1]=$0;c++;next} FNR>1{$NF=" ,"$NF;a[$1]=$0;c++} END {print "id, name, job, age";for (i=1;i<=c;i++) print a[i]}' file1 file2 id, name, job, age 1, bob, fireman 2, john, , 26 3, alice, nurse 4, craig, , 32 5, mary, , 45 6, lucy, , 23...

How to create a directory on my cloudfoudry account?

lucene,cloud,command-line-interface,cloudfoundry

Yeah you shouldn't be creating directories inside your app. Cloud Foundry works incredibly well with 12 factor apps (http://12factor.net/). One of the factors is not using local storage but use an external provider. I would highly suggest using a third party to do your Lucene work. Cloudant provides Lucene indexes...

Script saying two commands not found when they've been entered

bash,command-line,terminal,command-line-interface

read reads from standard input, while the arguments ($1, $2, ...) whose count you are checking with $# are command line arguments that can be passed to your program when it is called.

How to use aws cli --generate-cli-skeleton

amazon-web-services,command-line-interface,aws-cli

This was added in version 1.5.5 (https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst#155), make sure your are using version 1.5.5 or higher. You can get the version via aws --version.

PHP session_start function and CLI

php,command-line-interface,server

Your problem is, apart from that it makes no sense to use sessions in CLI, that output has already started prior to session_start();. As I see in your code, you code begins directly with session_start();, I believe you have some characters before <?php. Make sure <?php is on the very...

Node bin file not being recognized on linux or osx

node.js,command-line-interface

Windows-based line endings are killing you. The full error says, env: node\r: No such file or directory because Windows puts in the \r there (as part of \r\n for newlines), but Linux and OSX just use \n for newlines. There's an ongoing discussion on NPM's github Issues on this, as...

Erro Install Android Target - Cordova CLI

android,osx,cordova,command-line-interface

Update your SDK tools & "SDK build" tools in Android SDK. With Eclipse ADT it looks like this image Install the 19 package...

How to use the --verbose flag in the MySQL 5.6 command line client?

mysql,command-line-interface

The correct syntax for a verbose interactive session is: c:\> mysql -u yourUser -p -v yourDatabase This will launch an interactive session (prompting you for password), and set yourDatabase as the default database for the session. Once in this interactive session, issue a tee command: mysql> tee c:/temp/my.out And now...

Asterisk CLI - reset scrollback

command-line-interface,asterisk,elastix

No, not possible. But you can write your own tool and change behavour whatever you need. For call-specific info you can check CEL or CDR....

How can I read iso-8859-1 file

linux,centos,command-line-interface

The file is not ISO-8859-1. That would be Western Europe. Instead, it looks like one of the Cyrillic flavors (for example ISO-8859-5). Here is a screenshot showing the file before converting it: You would probably not like the result transliterated into ASCII. I recommend converting it to UTF-8, e.g., iconv...

AWS CLI and ECS query - HTTPSConnectionPool 443 error; Max retries exceeded; nodename nor servname provided, or not known

amazon-web-services,command-line-interface,aws-cli

The Amazon EC2 Container Service is currently only available in us-east-1. From: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_GetStarted.html Customers accessing Amazon ECS during the preview should use the US East (N. Virginia) region. ...

docopt.go weird error message

go,command-line-interface,docopt

You need to declare an argument for port: const Usage = ` Usage: serve [--port=<arg>] <dir> serve help | --help serve --version Options: -p, --port=<arg> port for the sever to listen on -h, --help display help information -v, --version display Version Use the two value type assertion to handle the...

Updating Python CLI while maintaining “python -c exectfile” interface

python,interface,command-line-interface,execfile

The first idea that comes to mind stems from the optional arguments to the execfile() function. You might be able to do something like this: #!python def main(args): results = do_stuff() return results if __name__ == '__main__': import sys main(sys.argv[1:]) if __name__ == 'execfile': main(args) ... and then when you...

Terminating python for loop program in the command line without closing it?

python,command-line-interface

Generally I find that Ctrl+c does the job. It's a keyboard interrupt that should halt most python activity in the interpreter/terminal on both windows and linux

Java program with referenced libraries: NoClassDefFound [duplicate]

java,jar,terminal,classpath,command-line-interface

you need to tell JVM where to look for classes while running the program. the parameter that we use to tell jvm that is known as classpath there are different ways to achieve that Recomended Add the classpath location to the run command , alternatively pass the jar locations, assuming...

Remove e-mail string from the beginning of each row in a file

linux,shell,command-line-interface,cut

You can use sed: sed 's/^[^[:blank:]@]\[email protected][^[:blank:]]\+[[:blank:]]*//' file > file.out some string with no set width another string yet another string!! shortstring gnu sed will work with this: sed 's/^[^\[email protected]]\[email protected]\S\+\s*//' file > file.out ...

how to use .include? in Ruby with a hash statement

ruby,command-line-interface

It looks like you're calling include? on a string. This will only return true if you pass it a substring of itself. For example: "Mario".include?("Mar") #=> true You want to call include? on the array of keys in the name hash. You could do: name.values.include?(character) or more concisely name.has_value?(character) Here's...

Creating a shell command line application with Python and Click

python,command-line-interface,python-click

This is not impossible with click, but there's no built-in support for that either. The first you would have to do is making your group callback invokable without a subcommand by passing invoke_without_command=True into the group decorator (as described here). Then your group callback would have to implement a REPL....

Building C# code in VSCode on Mac

c#,osx,xamarin,command-line-interface,vscode

You can setup a build task to compile the modified source. See https://code.visualstudio.com/Docs/tasks or http://blog.denouter.net/2015/04/compile-visual-studio-solution-in.html

Creating BAT File for Cisco CLI commands (left string/concatentate into output)

windows,batch-file,command-line-interface,cisco

@echo off setlocal for /f %%a in (C:\temp\output.txt) do >>"youroutputfilename.txt" echo wir cli mac-address %%a deauth forced should process that data as you specify. 'for /f' reads each line of the file and assigns the first "token" to %%a. >> appends to a file as you are already aware. The...

Can't launch a program from a different directory via Pexpect

python,bash,command-line-interface,pexpect

To run an executable hw, either its parent directory should be in PATH envvar or you should provide the full path. If the path is relative (not recommended) then it is a path relative to your current working directory regardless of cwd value. If you want to run hw from...

What are the different ways of submitting Hadoop jobs?

command-line-interface,oozie,hadoop2

What does Hadoop jobs mean ? MapReduce : CLI + Oozie Spark : spark-shell + Java / Pyton / Scala + Spark Job Server (Rest) + Oozie Hive : CLI + Java - Thrift(JDBC) + Oozie Pig : CLI + Java + Oozie etc ....... If you want to use...

Can't execute exec command (php / windows / ffmpeg)

php,windows,ffmpeg,exec,command-line-interface

I had ffmpeg after ffmpeg.exe - that's why it didn't work. $cmd = 'C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe -i tmp1.flv -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 output2.flv 2>&1'; exec($cmd, $output) ...

how do i take unlimited sys.argv[] arguments?

python,parsing,python-2.7,command-line-interface,argv

sys.argv is just a regular Python list, so you can just ask len(sys.argv) for example, or you can just enumerate the contents directly (using a for ... in loop) as with any other iterable. Note that sys.argv[0] is the name of the program, so you need to skip the first...

Space is appearing in https url in linux

linux,shell,curl,command-line-interface,centos6

Per our discussion in comments, you can replace your current code nodeip=`cat $root/dbtmpdn | sed -n '3p'` with nodeip=`cat $root/dbtmpdn | sed -n '3{s/^ *//;p;}'` Or if $root/dbtmpdn is a file, you can simplify with nodeip=`sed -n '3{s/^ *//;p;}' $root/dbtmpdn` AND if your shell will support it, use the "modern"...

How can I save a user specifig config in a node module?

javascript,node.js,command-line-interface,config

You can write to a hidden file in, say, ~/.mycliconfig and the just read the file synchronously try{ var userData = fs.readFileSync(process.env.HOME + '/.mycliconfig'); } catch(e){ if (e.code === 'ENOENT') { console.log('File not found!'); } else { throw e; } } If you need to save more stuff you can...

CF CLI features that are enabled in Bluemix

command-line-interface,bluemix

Unfortunately it is not documented which features of the Cloud Foundry CLI are implemented in Bluemix and which ones are not - other than what is documented here. Some features, such as deleting organizations, can affect multiple things such as billing so that has to be done through support tickets....

php shell_exec character allowed and limit - JSON encoded string as parameter

php,json,command-line-interface,shell-exec

change the line with $command to the following: $command = 'php index.php exec_function "' . $exec_string.'"'; the problem is that you have some character that in the shell it thinks breaks the parameter so you have to enclose it with qoutes.

Spring Shell - usage and execution

java,spring,spring-boot,command-line-interface,spring-shell

That comment in the documentation is a bit misleading (I'll change it). For your components to be picked up, they need to be on the classpath AND you'll need to scan for them somehow. See for example how in the Spring XD project, there is a scan for the org.springframework.xd.shell...

Deleting a file through cli in vagrant give permission denied

php,vagrant,command-line-interface

The known problem. The simplest solution is to modify in the Vagrantfile the synced folders settings: config.vm.synced_folder "./htdocs", "/var/www", owner: "vagrant", group: "www-data", mount_options: ["dmode=775,fmode=664"] ...

how does apache commons-cli parses \\t character

shell,command-line,command-line-interface,backslash,apache-commons-cli

As you are trying to provide this when invoking the application in the shell, this is actually related to how the shell handles such special characters, not commons-cli or Java. The bash shell (which is the default shell on most unix/linux versions nowadays) has the special syntax $'\t' for this,...

Reading lines from .txt into batch file and handing into command line as arguments?

python,batch-file,command-line-interface,command-line-arguments

for /f "usebackq tokens=* delims=" %%# in ("C:\path\to\document.txt") do ( call "C:/path/to/script.js" %%# ) ?...

Google Cloud SQL - ERROR 2003 (HY000): Can't connect to MySQL

mysql,google-app-engine,command-line-interface,ip-address,google-cloud-sql

So for whatever reason, I was able to connect if I requested an IPv4 address (costs $0.01 an hour) and used that to connect instead of the free IPv6 address, then I could connect from anywhere. Otherwise I can only connect to my Cloud SQL when it is using the...

Execute code after script abort on CLI

php,command-line-interface

The function pcntl_signal() is the answer for the situation when the script is interrupted using Ctrl-C (and by other signals). You have to pay attention to the documentation. It says: You must use the declare() statement to specify the locations in your program where callbacks are allowed to occur for...

assertEqual not works when testing equals of command output

php,unit-testing,symfony2,phpunit,command-line-interface

That is the expected behavior because your string in the output is: "\033[37;42m Translations from AcmeDemoBundle imported successfully! \033[0m" which has special characters at the beginning and the end of the string, but they are not the special characters that the trim function deletes, so, your real comparison is between...

Multiple file input, with stdin // Argparse4j, Java

java,file,command-line-interface,command-line-arguments,stdin

argparse4j does not do any conversion against the value passed by setDefault(). So you need to pass Arrays.asList(new File("-")) to setDefault() to get desired effect.

how to impement utility feature in a command line tool [closed]

java,command-line-interface,utility

If you don't want to handle the arguments yourself, you can use the CLI library from the apache commons project. For very small projects this usually doesn't make sense, but when you have more and more options, then it is a simple thing to use. The code flow is then...

Debugging Node.JS CLI application with VSCode?

node.js,debugging,command-line-interface,xubuntu,vscode

On Linux Visual Studio Code does not yet open a terminal for the program to be debugged, so there is no way to interact with it through the command line. As a workaround you can launch the node program from a terminal in debug mode and attach to it from...

Making a neat, installable Python library with Click

python,click,command-line-interface,setuptools

If you've followed the Setuptools Integration steps in the article you linked to, you're most of the way there. Try installing the package as if it came from pip (maybe in a different virtualenv): $ virtualenv deploy $ source deploy/bin/activate $ pip install . Then you can invoke your command...

Generate random BMP in CLI

image,random,command-line-interface

You can use ImageMagick (which is installed on most Linux distros by default) to generate an image of random noise like this: convert -size 300x200 xc:gray +noise random out.bmp where 300 is the width and 200 is the height (just examples). Other types of noise are available, just run convert...

How do I create a node.js command line utility that uses gulp

node.js,command-line-interface,gulp

Gulpfiles are just node apps. You can require them in your node app like any module: var gulpfile = require('./gulpfile.js'); Then you can invoke a gulp task that was defined in the gulpfile: gulp.start('someTask'); Note that .start() will be deprecated in gulp 4.0 Putting that all together, it would look...

Change text on same CLI line Python [closed]

python,curl,command-line-interface

You have to make sure that the print statement ends with a carriage return and not a newline character. For python 2.6+, you can use this really silly example to see. from __future__ import print_function import time import sys print(".", end="\r") sys.stdout.flush() time.sleep(1) print("..", end="\r") sys.stdout.flush() time.sleep(1) print("...") sys.stdout.flush() Note:...

Convert videos with all contained subtitles and audio into mp4 via commandline using handbrake

audio,video,command-line-interface,subtitle,handbrake

I always use the --preset Normal to convert my videos. It suites my personal needs and came with HandBrake by default :) .The encode log file shows the following CLI command. CLI Query: -i "<PATH>\Episode01.mkv" -t 1 --angle 1 -c 1-12 -o "<PATH>\Episode01.mp4" -f mp4 -4 -w 720 --loose-anamorphic --modulus...

Export database from a remote server into a specific folder on my computer

php,mysql,database,shell,command-line-interface

You can run mysqldump -h yourhostname -u youruser -p yourdatabasename > C:\your\file\path.sql -h connects you to the remote servers IP so you can dump the data locally, as long as your user has the correct privileges and you can connect remotely to your database server. However, you may need to...

How to display progress of another command

bash,shell,command-line-interface

What you want to do is run do_something > file.txt in the background and then monitor it. You can use the special kill signal 0 to do this. do_something > file.txt & PID=$! while kill -0 $PID 2> /dev/null do [calculate percent complete] [display percent complete] sleep 5 done ...

AWS CLI not working on Mac OSX Yosemite

python-2.7,amazon-web-services,pip,amazon,command-line-interface

/Library/Frameworks/Python.framework/Versions/2.7/bin will need to be in your path. In your ~/.profile file (create one if necessary) add a line like: export PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH" Open a new Terminal window and it should work....

Convention on how pass multiple regexps on command line

regex,command-line-interface

If the regexes are simple alternatives, a single regex of the form regex1|regex2 may well be the simplest solution. If you need to parse comma-separated regexes out of the property file anyway, you'd better use the same syntax on the command line as well. Game over. One thing I thought...

Start a process in background, do a task, then kill the process in the background

bash,command-line-interface

When the script is excecuted a new shell instance is created. Which means that the jobs in the new script would not list any jobs running in the parent shell. Since the selenium-server server is the only background process that is created in the new script it can be killed...

Script to copy and rename file fails on Mac OS X

osx,bash,command-line-interface,provisioning-profile

When using the cp command in Bash you need to provide the full path of the files. Aliases such as ~/myFolder won't work. You will need to provide a full path such as /Uers/Me/myFolder.

Getting error while installing phone gap in MAC osx?

ios,osx,cordova,phonegap-plugins,command-line-interface

Add sudo sudo npm install -g phonegap ...

Shell function command with quotes

bash,shell,command-line-interface,zsh

You want "$*" not "[email protected]" because you want the arguments expanded as a single word not multiple words. This is one of the few times the "$*" expansion is actually desirable. It generally isn't....

Commons CLI is not honoring my command line setup

java,command-line-interface,apache-commons-cli

First the .hasArg() on your OptionBuilder tells it that you expect an argument after the paramter flag. I got it to work with this command line --fizz "VicFizz is good for you" -b "VicBuzz is also good for you" Using the following code - I put this in the constructor...

How to get previous tag in git

git,tags,version,command-line-interface

I couldn't find any resources online for doing this, so here is what I found to work: git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1` The subcommand gets the hash of one recent tag. The --skip=1 means the "latest" tag will be skipped and the "previous" tag to the...

Stop Java Process if Running in Raspbian

java,command-line-interface,raspbian,application-shutdown

If you prefer a one-liner JPID=$(jps -m | grep NameOfTheMainClass | awk '{print $1}') && [ -z "$JPID" ] || kill $JPID ...

Cisco Show command filtering

tcl,command-line-interface,show,cisco,cisco-ios

This example shows a logic "OR" R1#show ip int br Interface IP-Address OK? Method Status Protocol Ethernet0/0 unassigned YES TFTP administratively down down Ethernet0/1 192.168.56.11 YES TFTP up up Ethernet0/2 unassigned YES TFTP administratively down down Ethernet0/3 unassigned YES TFTP administratively down down R1# R1#show ip int br | inc...

C++ error C2440 when getting native pointer

c++,pointers,native,local,command-line-interface

someclass instance() is a function pointer as you can see from the error message. Change it to someclass instance.

Can't install heroku toolbelt on Linux Mint Path invalid

linux,bash,heroku,command-line-interface,heroku-toolbelt

You have to log into linux profile again to activate the ~/.profile script, thus adding the path. Either log out of the linux session, and then lack back in, or restart your computer. You can also do source ~/.profile, but this will only enable heroku commands in the current terminal,...

How to action a command from a PHP script in the current CLI context?

php,command-line-interface

The escape code ^[]50;ClearScrollback^G itself is described in Proprietary Escape Codes iTerm2 documentation. A quick comment on notation: in this document, ^[ means "Escape" (hex code 0x1b) and ^G means "bel" (hex code 0x07). You can use PHP chr() function, e.g. php -r 'echo chr(27) . "]50;ClearScrollback" . chr(7);' The...

DD WRT - Is there any option(SNMP /CLI) to get temperature of the router without using web interface?

ssh,command-line-interface,telnet,snmp,dd-wrt

Finally I found the way to get temperature of the router via CLI cat /sys/class/i2c-adapter/i2c-0/0-0028/temp_input Link : getting temperature and voltage of router...

Laravel Artisan CLI doesn't set the right URL

php,command-line-interface,laravel-5,artisan

Check out the 'url' key in config/app.php. This is the value being picked up by Artisan. By default it is set to 'http://localhost'. If you would like to specify this value using the APP_URL in your .env file, you will need to change the 'url' key in the config file...

Clojure: how to tell if out is going to console or is being piped?

clojure,command-line-interface

Clojure is hosted language, so system interaction related stuff is more or less equivalent to Java. For Java there exists only partial solution described in this answer. You can of course implement isatty() using JNI and then interop from Clojure. However, from ClojureScript hosted on Node.js it's easily achievable using...

How can I run grunt as a daemon?

node.js,gruntjs,command-line-interface,daemon,epub

Here's the solution I found: As was suggested above, using pm2 However, when I ran pm2 start grunt I got an error saying that the grunt module did not exist, which was weird. So I ended up writing a script which worked: -- start.js -- var pm2 = require('pm2'); pm2.connect(function()...

Batch file get present working directory after cd command

windows,batch-file,cmd,command-line-interface,current-dir

If your Batch file does something like this: @echo off echo Start at: %cd% cd sub cd sub2 echo Currently at: %cd% The second echo command will show C:\some\dir\sub\sub2 for sure. However, if the %cd% is placed in a code block, that is, enclosed in parentheses (like inside an if...

npm bin property is not working as expected

node.js,npm,command-line-interface

I solved the problem by adding the following line to the top of the addHeaderCli.js: #! /usr/bin/env node Now I can cal it like: addheader 'test.txt' 'my header' ...

ZF Error ZF tool setup

zend-framework,command-line-interface

I ended up using Zend Framework 1 final release - version 1.12.11 to get around this headache and it worked perfectlt as it should have. Had to be a bug in the 1.9 version!

gnuplot command line arguments and call arguments

gnuplot,command-line-interface,interactive

Playing around, I found a quite inelegant solution, but that could help to achieve what I want. parameters="" # sets default value if ("$#" eq sprintf("%d",1)) parameters="$0" # if using call with 1 parameter: $#=1 if (exist("bpar")) parameters=bpar # checking for batch call plot "< myprog ".parameters u 1:2 which...

How to see the installed version of Apache Mesos?

command-line-interface,mesos

You can check the web ui for any Mesos master and see the version number in the top left corner (at least for any fairly recent Mesos, ~0.18+). You can check the logs for a master or slave, which will always start with the lines "Build: [date] by [user]" and...

C# - Converting String array to sbyte** (String[] to sbyte**)

c#,arrays,pointers,clr,command-line-interface

it solved by: sbyte[][] sbytes = new sbyte[6][]; for (int argCounter = 0; argCounter < 6 ; argCounter++) { get the byte array byte[] bytes = Encoding.ASCII.GetBytes(argument[argCounter]); convert it to sbyte array1 sbytes[argCounter] = new sbyte[bytes.Length]; for (int i = 0; i < bytes.Length; i++) sbytes[argCounter][i] = (sbyte)bytes[i]; } unsafe...

improperly importing sql file in postgres cli

database,postgresql,command-line-interface

ok so after a few research and readings, i found out my .sql file was empty.. here are some links ive read and learnt more about pg_dump command dbforums.com/showthread.php?1646161-Postgresql-Restores and pg_dump vs pg_dumpall? which one to use to database backups?

How can I pass the result of a command to another command in one line?

bash,shell,command-line,concatenation,command-line-interface

Assuming that the number of minutes should be an integer rather than a string: my_cli --json '{"minutes" : '"$(( ( ( $(date +%s) - 18000 ) % 86400 ) / 60 ))"' }' ...

Unable to install plugins in cordova project

cordova,github,command-line-interface,cordova-plugins

The solution is wait: see this?: npm http 502 http://registry.cordova.io/org.apache.cordova.network-information http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#502 Error parsing file?: npm ERR! registry error parsing json It is because there is no file or valid formatted json files to parse. The server hosting the files is temporarily down. You could choose to report the problem....

GO support for building CLI tools using native system shell [closed]

shell,go,command-line-interface

curl has an interesting implementation in Go with astaxie/bat Go implemented CLI cURL-like tool for humans. Bat can be used for testing, debugging, and generally interacting with HTTP servers. That means you needs to implement your REST server in order for any curl-like tool to interact with it. See for...

Install role services using command line

powershell,command-line-interface,windows-server-2012

Install-WindowsFeature –Name feature_name -ComputerName computer_name -Restart

How -s option works actually in gcc compilers?

gcc,g++,command-line-interface

On Linux systems, gcc -s probably invokes the strip(1) utility (which remove most symbols from ELF files) from binutils. You could check by running gcc -v -s. To lower the executable size, you should also compile with -Os (in addition of -s) which asks the compiler to optimize for size....