command

CQRS - The query side

A lot of the blogsphere articles related to CQRS (command query repsonsibility) seperation seem to imply that all screens/viewmodels are flat. e.g. Name, Age, Location Of Birth etc.. and thus the suggestion that implementation wise we stick them into fast read source etc.. single table per view mySQL etc.. and pull them out with somethi...

Have NSSpeechRecognizer recognize any command

Is there any way I can have NSSpeechRecognizer recognize any command I throw at it. I know I could just have a massive array, but that's too much work and it'll take up a lot of memory. ...

Can I have multiple CommandBindings for the same Command on the same control?

I have a UserControl that adds a CommandBinding to it's CommandBindings collection to handle a specific Command. Later I use this control in a window and want to add another binding to that same control to add additional behavior. The problem though, is that when I do this it seems that when I add another CommandBinding to the CommandBin...

How can I execute a shell command using VBA?

Hello, I want to execute the shell command: "C:\Temp\gc.exe 1" but I want to do it using Visual Basic for Applications. How can I do it? Thanks in advance! ...

C# Problem with fileinfo delete command

My application does this, play the selected sound using wmplib and upon statechangeevent = 1 (media player stopped), i will close the player using the close() command and setting the URL to ""; Now every time, i tried to delete a sound that is currently playing, in actual fact, it will be deleted, because when I looked at the directory,...

PHP: multiple commands in die/exit

when it gives a error I want him to do 2 things. echo nl2br($qVraagOp); mysql_error(); so i thougth: $rVraagOp = mysql_query( $qVraagOp ) or die( echo nl2br($qVraagOp); mysql_error(); ); I can write a function that does these two things and then call that but that a bit redundant. is there a other way? Matthy ...

mvvm command setup styles

Commands here would be some variation of Josh Smith's RelayCommand (I call mine a VmCommand), and the question is abouthow your ViewModel creates them. I'm aware of two basic techniques, the first being that you set up all command properties inside the constructor, the second being you instantiate the command lazily inside a property get...

WPF - Handle an ApplicationCommand in the ViewModel

I bet this has been answered many times over, but... For a simple situation where a button on a UserControl has its command property set to something like Find (ApplicationCommands.Find) how would the ViewModel handle that command? I usually see command handlers wired up with a CommandBinding that gets added to a CommandBindings collec...

Weird problem where Button does not get re-enabled unless the mouse is clicked

My app is written using the MVVM pattern in WPF, and all of my Buttons use Command bindings to execute code in my model. All commands have code in CanExecute to determine the bound Button's Enabled state. The logic works perfectly, but in all cases, the GUI remains in a disabled state unless I click somewhere else in the GUI. For exam...

Grails: Validation of string containing a delimited list of email addresses

I have a Grails command object that contains an emailAddresses field, e.g. public class MyCommand { // Other fields skipped String emailAddresses static constraints = { // Skipped constraints } } The user is required to enter a semicolon-delimited list of email addresses into the form. Using Grails' valid...

ADO: Is it possible getting the name of the stored procedure and its parameter values as a prepared unit for logging when using Ado.Command object for data manipulation?

Is it possible getting the name of the stored procedure and all its parameter values as a prepared unit for logging when using Ado.Command object for data manipulation? I have used ADO.Command object in order to perform insert, update , delete operations. Now, I want to write a log and use the name of the stored procedure and parameter ...

Auto 'zz' in vim after a jump

After I make a jump to anywhere in the world, whether in the current file or a different file, is it possible to make vim automatically run zz (re-center on current line)? I want this after things like search, ctrl-o and ctrl-i ... and pretty much any movement other than hjkl. Thanks. ...

How to send a property of the current element as as a command parameter in WPF?

I have a button with a Background color, and I want to send this Background color as the Command Parameter to the Command Binding! How can I do that? <Button Background="Red" Command="{Binding ChangeColorCommand}" CommandParameter="{Binding this.Background}" /> ...

Python, dynamically invoke script

I want to run a python script from within another. By within I mean any state changes from the child script effect the parent's state. So if a variable is set in the child, it gets changed in the parent. Normally you could do something like import module But the issue is here the child script being run is an argument to the parent s...

iPhone plist data, large amounts of text and return key?

Basicly iv built my app using a plist. But with the data there is a few times when I need to press return and start a new line. The return key doesn't work in the plist. If I did it the older way it would be \n\n but that doesn't work either. Is there a obvious way I'm overlooking? Or will it be a case off just pressing the space bar al...

[WPF] How to register to/listen to richtextbox command's?

I'm creating a simple editor within our application using the WPF RichTextBox. Above it I've added the reguslar buttons like Bold, Italic, etc. These buttons use the RichTextBox's commands to set these properties, but next to these buttons, the commands also get send with CTRL+B, CTRL+I, etc. I want these buttons to represent the current...

WPF: Is it standard that when a menuitem is disabled the icon is not greyed out?

I have menuitems with icons and when it is disabled the icon remains the same. Is it up to me to supply a disabled icon and, if so, does this also apply to menuitems bound to a command? ...

Windows: how can I run something in a new command window in such a way that the window closes when the process finishes or crashes?

I have a script that is supposed to sit there, happily running in a command window, spewing out data... but I want the window to close automatically when the script finishes or crashes. The script is auto-restarted by other processes and I don't want my processing machines to become polluted with unused terminals. In a pinch, I have co...

Escaping 'echo' in batch files

Iditically simple I hope ... I'm trying to create a bash command file on the fly from within an W7 DOS shell: :: inside the .BAT file .. :: check we are in the right directory echo pwd > command.txt :: get the shell to echo its environment variables :: !!!! How do I get around this ... ? echo echo $PWD I thought prefixing the second ...

Disable existing Eclipse Commands, like Eclipse "F5" for Debug/Default Perspective

I have created a new Perspective with additional views pretty similar to the Eclipse "Debug" Perspective. I have created some commands and key bindings using the extension points extension point="org.eclipse.ui.handlers" extension point="org.eclipse.ui.commands" extension point="org.eclipse.ui.bindings" I have to use "F5" to bind th...