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....
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....
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...
perl,hash,package,command-line-interface
Looking at perlrun use: perl -Mfeature=say "-Mconstant {c1 => 'foo', c2 => 'bar'}" -e"say c1,c2" ...
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,output,command-line-interface
Perhaps curl's -N / --no-buffer option will help you?
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-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...
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 ...
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++,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...
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,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...
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...
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...
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...
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...
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...
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.
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,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.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...
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...
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...
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....
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...
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. ...
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...
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...
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,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...
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 ...
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...
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....
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
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...
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...
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...
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) ...
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...
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"...
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...
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,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.
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...
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"] ...
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,...
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" %%# ) ?...
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...
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...
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...
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.
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...
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...
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...
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...
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...
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:...
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...
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...
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 ...
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....
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...
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...
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.
ios,osx,cordova,phonegap-plugins,command-line-interface
Add sudo sudo npm install -g phonegap ...
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....
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...
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...
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 ...
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++,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.
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,...
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...
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...
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,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...
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()...
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...
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' ...
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-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...
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#,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...
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?
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 ))"' }' ...
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....
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...
powershell,command-line-interface,windows-server-2012
Install-WindowsFeature –Name feature_name -ComputerName computer_name -Restart
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....