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
2 answers

Identify OS System, Architecture And Do Specific Job via By Batch “CMD” File

I have a (test) batch file with this code If Exist "C:\Users\All Users\ntuser.dat" Goto Win 7 If Exist "C:\Documents and Settings\All Users\ntuser.dat" Goto Win XP :Win 7 will write here the parameters which'll run on win7 C:\w7\test.txt :Win…
Vako
  • 113
  • 5
3
votes
1 answer

How to get file name of an icon file in a folder for creating/updating desktop.ini for folder(s)?

I need help returning the file name of a file located in a folder. I have read other questions asked a few times and the answer seems to be: for /d %F in (*.*) do echo %~nxF Although this seems to work for everyone else, when I run this within a…
Built on Sin
  • 351
  • 2
  • 6
  • 19
3
votes
2 answers

Java string.replace(old, new) count how many replaced?

I have my console (image down below), and I have a command that will replace all oldstinrg to newstring. But how do I count how many of those were replaced? (If the code replaced only once a to b then it will be 1, but if it replaced a to b twice…
donemanuel
  • 49
  • 1
  • 9
3
votes
1 answer

Batch - User Input to Command Prompt (IF statement issue)

I am currently creating a segment of a larger batch file that needs to let the user interact with the command prompt, but I seem to be having issues with the IF Statements. The following code is what I've been trying: :ONE2 cls echo Free Roam is…
3
votes
3 answers

WPF MenuItem.CommandTarget

Does anybody know what the CommandTarget property on a MenuItem can be used for? The documentation says the following: When used with a RoutedCommand, the command target is the object on which the Executed and CanExecute events are raised. If…
3
votes
1 answer

How to programmatically enter a character to os.stdin in a golang program

I want to automatically provide input to a command in the bash terminal. Is it possible to programmatically enter a "yes" after than ssh prompt? Here is a script representing the idea. package main import ( "bytes" "io" "os" "fmt" …
user164485
  • 71
  • 4
3
votes
1 answer

WPF button command binding refreshed, but button still disabled

I have a weird problem with a button's Command binding not being updated... I have an app written with MvvmLight, that allows users to maintain a list of medical systems. These systems are built from templates (ie a template might specify two…
Avrohom Yisroel
  • 8,555
  • 8
  • 50
  • 106
3
votes
1 answer

Queue manager with nested closures, commands, and dependencies

I am pretty new to Laravel and am trying to create queues to handles my processing scrips. The processing scripts will be triggers by a nightly cron job. I have beanstalkd set up and working with queues already. I also have very simply commands set…
bsparacino
  • 333
  • 1
  • 3
  • 8
3
votes
1 answer

Grouping in a context menu

If I have a list of commands, where each command has a group number, how can I present these commands in a contextmenu? Below is the code that I have tried, but I cant seem to get the sub menu items to show up. namespace groupTest { public class…
pastillman
  • 1,104
  • 2
  • 16
  • 27
3
votes
1 answer

How to make MS speech API more accurate when recognizing only two commands

I am trying to use Speech API 5.1 in command and control mode in a c# application. I am using it inProc and have only two commands in the grammer. The problem I am facing is related to the accuracy of detecting these commands. The recognition engine…
Novice
  • 515
  • 7
  • 22
3
votes
3 answers

BASH - commands string-like

I am wondering if it is possible in BASH to use commands in this way: lets take command pwd Lets say I would like to have a variable comm="pwd" and then use it somewhere in program, but when I use it, I get the real pwd command output. Is this even…
user1926550
  • 539
  • 5
  • 10
  • 18
3
votes
3 answers

How to make find -name to return error if no file found

I have tried really hard but could not figure out a way to print an error if find -name \"filename" does not find any file. The code I am using so far is as follows: char *argv[]; argv[0]="find"; argv[1]="-name"; …
husnain
  • 31
  • 1
  • 2
3
votes
0 answers

Custom management command console output to log file in Django

I have a custom management command which starts a Tornado loop in order to listen to websocket events. That loops writes its output to the console, which i want to redirect to a log file. I read the Django Docs about Custom Management Commands, but…
Alp
  • 29,274
  • 27
  • 120
  • 198
3
votes
1 answer

Retrieving low level elements from complex list (R)

Suppose you have the following rather complex list structure: all_m<-list();clist1<-list();clist2<-list() for (j in 1:3){ for (i in 1:5){ m1<-matrix(rnorm(4,0,1),2,2) m2<-matrix(rnorm(9,0,1),3,3) m3<-matrix(rnorm(16,0,1),4,4) …
tomka
  • 2,516
  • 7
  • 31
  • 45
3
votes
1 answer

How to add Command to ListBox.ItemTemplate

I have a WPF application using MVVM. This code is from my ResourceDictionary.xaml
Dave
  • 8,163
  • 11
  • 67
  • 103
1 2 3
99
100