Questions tagged [command]

A command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell. Use [command-pattern] for the design pattern.

A command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell.

Specifically, the term command is used in imperative computer languages. These languages are called this, because statements in these languages are usually written in a manner similar to the imperative mood used in many natural languages. If one views a statement in an imperative language as being like a sentence in a natural language, then a command is generally like a verb in such a language.

Many programs allow specially formatted arguments, known as flags, which modify the default behaviour of the command, while further arguments describe what the command acts on. Comparing to a natural language: the flags are adverbs, whilst the other arguments are objects.

More links:

10688 questions
3
votes
5 answers

Customizing PowerShell Prompt - Equivalent to CMD's $M$P$_$+$G?

I've started to "play around" with PowerShell and am trying to get it to "behave". One of the things I'd like to do is to customize the PROMPT to be "similar" to what "$M$P$_$+$G" do on MS-Dos: A quick rundown of what these do: Character|…
JJarava
  • 552
  • 10
  • 18
3
votes
1 answer

Memory Access Permission, Need to execute code from stack. How to verify system permissions?

Question- Is there a command on Linux systems to see if execution from the stack is allowed? Background- Doing a homework assignment that requires a buffer overflow, injecting code into the stack, and overwriting a return address that will set the…
jeff
  • 162
  • 8
3
votes
3 answers

Textmate toggle collapse/expand CSS rule command?

Does anyone know of a command (not a macro) for Textmate / E Text Editor / Redcar / etc. that will collapse a multi-line CSS rule down to one line OR, if the rule is already on one line, expand it out to multi-line? I already know about code folding…
Charles Roper
  • 20,125
  • 20
  • 71
  • 101
3
votes
3 answers

(Django) Create a management command that will override the default settings in BaseCommand

We always run our tests off of settings_test, like so: ./manage.py test someapp --settings=settings_test. The problem is that it's sometimes problematic to remember to add the option. I'd like to introduce a common app that just has the management…
Sab'
  • 31
  • 1
  • 2
3
votes
4 answers

How can I invoke a command on the ViewModel on SelectionChanged of a ListView?

In a MVVM/WPF environment, I want to invoke a command (ComputeCommand) on the ViewModel when the SelectionChanged event of a ListView is raised. How can this be done, either in XAML or in C#? Here is my command class. I have tried…
gsmida
  • 357
  • 1
  • 5
  • 15
3
votes
1 answer

iOS 6.x open command line on jailbreak

Before iOS 6.x, I used open package_id to open a app from command line on a iOS device. On iOS 6.x if i use this command SpringBoard crashes. Open is available from BigBoss and the author is Conrad Kramer. Is there an alternative or a fix for the…
TBI_RO
  • 49
  • 1
  • 4
3
votes
4 answers

Timeout when ssh command is executed from my Java program

I have a Java program which runs in Tomcat and which needs to execute several ssh and scp commands, as well as a few simple commands such as ls on the local machine. I am having trouble with my current approach in that I am getting a time out every…
James Adams
  • 8,448
  • 21
  • 89
  • 148
3
votes
1 answer

authentication error for mifare card "6982:Security status not satisfied"

I have pc/sc reader and Contactless card(mifare card), I can connect to the card and also I execute getdate command successfully, but when I want to authenticate I see this error "6982:Security status not satisfied" I've tried these 3 different…
3
votes
1 answer

Is it possible to execute windows commands in Java in a "batch" manner? ie One after the other but kept persistent?

I'm looking to create a Java Application that is able to run windows commands in a "batch" manner; what I mean by this is that it's persistent in between commands and isn't as if you're only executing one at a time. An example of this might…
Kane Charles
  • 379
  • 3
  • 10
  • 19
3
votes
1 answer

Why do some Unix commands not work when called from inside Python? (command not found)

I often wish to perform Unix commands from inside Python, but I have found recently that some commands are not found. An example is the 'limit' command: $ echo $SHELL /bin/tcsh $ limit vmemoryuse 1000m $ python Python 2.7.3 (default, Aug 3 2012,…
aim
  • 657
  • 2
  • 12
  • 26
3
votes
3 answers

PHP exec in background using & is not working

I am using this code on Ubuntu 13.04, $cmd = "sleep 20 &> /dev/null &"; exec($cmd, $output); Although it actually sits there for 20 seconds and waits :/ usually it works fine when using & to send a process to the background, but on this machine…
Goulash
  • 3,708
  • 6
  • 29
  • 48
3
votes
2 answers

How does django register management commands

I'm having a weird issue with something in a deployed django app (long story). Something that might help me is to know: How django goes about detecting and maintaining a list of active management commands?
0atman
  • 3,298
  • 4
  • 30
  • 46
3
votes
1 answer

Executing commands with pipes and timeout in c++ (and reading stdout)

I need your help ! I made a reporting deamon (in c++) which needs to periodicaly execute a bunch of commands on a server. A simple example command would be : "/bin/ps aux | /usr/bin/wc -l" The first idea was to fork a child process that runs the…
srsbsns
  • 300
  • 4
  • 10
3
votes
1 answer

How to hook up an Undo Command that lives in the ViewModel to be called by Ctrl-Z?

I implemented my own Undo/Redo functionality (with a lot of help from the web) which was enlightening. The Undo and Redo commands are defined in the ViewModel. I am able to hook these commands up through the Command property of a MenuItem. As a…
Dabblernl
  • 15,831
  • 18
  • 96
  • 148
3
votes
4 answers

Keep vim always in command line mode with a ":"

Is there a way to make vim stuck in command mode with a : already typed in? In that way, for instance: I would type /fooEnter and the cursor would go to the beginning of the next line containing foo. Next, I would be still on command line mode…
1 2 3
99
100