command

WPF SimpleCommand possible with generics?

I am using this code to make a Simple Command: public class SimpleCommand : ICommand { public Predicate<object> CanExecuteDelegate { get; set; } public Action<object> ExecuteDelegate { get; set; } #region ICommand Members public bool CanExecute(object parameter) { if (CanExecuteDelegate != null) ...

WPF/MVVM: Weird behaviour of wpf buttons with Commands disabling

Hello, just some code...: Question is at bottom. XAML: <StackPanel Orientation="Horizontal"> <Button Content="Start" Command="{Binding FirstDateCommand}" /> <Button Content="Back" Command="{Binding PreviousDateCommand}" /> <DatePicker SelectedDate="{Binding SelectedDate}" DisplayDateStart="{Binding...

Subversion Commands to add new user and grant all permissions

Currently, I am not able to commit with the SVN user I added. I tried by manually editing the svnserve.conf and passwd files. I did the following - Added a line harry = harrysecret in passwd - Uncommented the line password-db = passwd in svnserve.conf - Added a system user harry with password = harrysecret as follows:- useradd harry ...

Triggering Silverlight Prism command with a keyboard shortcut

Hello, Does anybody know whether one can trigger prism command with a shortcut? What I mean is I want to be able to define binding of a command to keyboard shortcut in declarative manner, like ClientUI does: Are there any opensource libraries for that purpose? Or maybe code samples? I found this question but I don't think that it an...

simple command prompt one line into exe

I have a perl script that I run from the command prompt: 3 times a day, the problem is now I need to run it every two hours. Im not going to be on an episode of lost so I need some help. Here is the command: Perl C:/test/scripts/edi.pl Does anyone know how this above one line command can be made into an executable (.exe) file so I can ...

How to invoke built-in commands from Visual Studio macro?

From a Visual Studio macro, how do I (programmatically) invoke one of the built-in commands (say, File.OpenFile)? Thanks. ...

Visual SourceSafe 2005 - How to GET changed files for a certain date range (command line tool)

Here I was trying to perform a GET operation to pull a list of files that have been checked in/changed for a given date range, excluding the ones that have not been changed in that time frame. Here's the command I'm using: ss Get $\MY_PROJECT to . -Vd8/01/10;12:00a~08/03/10;11:59p -R In the beginning it actually seems to do what I wa...

Binding a save command WPF

I have a window with 3 textboxes in a grid -this is my view- and I have Save button to add a new user to my user list with the datas from the textboxes. I want to use a relay command to do this on my viewmodel class but I am quite confused with how to make the bindings. I hope it's clear enough. Any ideas, or examples will be helpful. t...

How to exit a matlab m-file (NOT the matlab itself) if the user enters bad inputs?

How to exit a matlab m-file (NOT the matlab itself) if the user enters bad inputs? I know if a m-file goes wrong at run time we can press Ctrl-C to stop it. but I need a command to put it in my m-file to do so if something bad happens. Please don't suggest 'exit' or 'quit' commands as they terminate the whole matlab and I don't want it...

Executing viewmodels command on enter in TextBox

Hi. I want to execute a command in my viewmodel when the user presses enter in a TextBox. The command works when bound to a button. <Button Content="Add" Command="{Binding Path=AddCommand}" /> But I can't bring it to work from the TextBox. I tried an Inputbinding, but it didn't work. <TextBox.InputBindings> <KeyBinding Command="{...

objective c "say" command

In applescript there is a say command. Is there something like this for objective c? Thanks, Elijah ...

Visual Studio Command

There is a way after you "Go to Definition" to push a hotkey to bring you back to where you were last at. There is another one to bring you back to the definition. It is not limited to "Go to Definition" though. I helps you trace your path through code. I use to use it but after a few month stint away from programming I seem to have fo...

Josh Smith MVVM: Add command from MainWindowViewModel Commands property to MenuItems

Hiexperts, trying to grasp the concepts behind the MVVM pattern, I'm playing around with Josh Smiths MVVM sample application (http://msdn.microsoft.com/en-us/magazine/dd419663.aspx). The sample app has a HeaderedContentControl where all the commands from the MainWindowViewModels Commands property are displayed. I'm struggling right no...

Javascript show server load and update every few seconds

Hello, I am trying to show server load on a web page. The server load is fetched in PHP by executing the shell command "/proc/loadavg" and displaying the output as it is. However, I want to display the same output using Javascript (jQuery is fine) and have it updated every 10 seconds. How do I do so? I was thinking of using Ajax quer...

MVVM Light : RelayCommand : define it lazy or in constructor ?

There are several examples on how to define a RelayCommand in the ViewModel: Option 1 (lazy): /// <summary> /// Gets the LogOnCommand. /// </summary> /// <value>The LogOnCommand.</value> public RelayCommand<LogOnUser> LogOnCommand { get { if (this.logOnCommand == null) { this.logOnCommand = new Relay...

MVVM Light : RelayCommand : reuse the command or create a new instance ?

When defining a RelayCommand in the ViewModel, this is normally done using once [lazy or in constructor] (see here for examples). But is this safe ? What if multiple RelayCommands from the same instance are queued (multiple clicks from same button on the GUI), and for the first command the 'CanExecute' is changed to false, will the othe...

Identifying active telnet sessions and their IPs

Is there any way/command to detect ongoing telnet sessions? I have a linux system which is shared by 3-4 engineers. I want to track which engineer is logged in and from which ip address. Is there any command/log which can provide me above informations? ...

Compiling PLSQL from command prompt (not inside sqlplus)

Hi all, is there any way compiling plsql from command prompt not by opening sqlplus and writing the command or @filename? We want to import the output to a file and parse it for a code review tool we are working on Thanks... ...

execute multiple shell commands with php nohup

Hi there! I want to execute multiple shell-commands with php's exec command. The commands have to be made sequentially and I want to start them with nohup so it can run in the background and my php-script doesn't have to wait for it to finish. Here's my script: $command1="nohup convert -trim +repage pic1.png pic2.png; convert pic2.png -...

How to depends of a system command with python/distutils?

Hi, I'm looking for the most elegant way to notify users of my library that they need a specific unix command to ensure that it will works... When is the bet time for my lib to raise an error: Installation ? When my app call the command ? At the import of my lib ? both? And also how should you detect that the command is missing (if ...