command

How to run a string as a command in Visual Basic (VB.NET)

Hi i am running a Sub which takes as arguments a Datatable and a String. Private Sub Populate(ByVal dttemp As DataTable, ByVal strWhichPart As String) At one point there is a combobox which is populated with some of the data in the datatable. The name of the combobox is cmd plus the name of the string for example when the string is ...

.NET: Is "foreach" command?

Hello, I have just a terminology question. I have read that if, foreach etc. are statements but what does it mean in the terminology - are these commands? It is maybe "lost in the translation" problem ...

WPF - how to select ListBoxItem upon clicking on button in Template?

I have the following Data Template applied to a ListBox: <DataTemplate x:Key="MyTemplate" DataType="{x:Type DAL:Person}"> <StackPanel Orientation="Horizontal"> <Button Content="X" Command="{x:Static cmd:MyCommands.Remove}"/> <TextBlock Text="{Binding Person.FullName}" /> </StackPanel> </DataTemplate> When I cli...

Command Parameter is null in a Command of CustomDataGrid.

This code works fine : <sdk:DataGrid ItemsSource="{Binding MyItems}" SelectedItem="{Binding MySelectedItem,Mode=TwoWay}" x:Name="dataGrid"> <i:Interaction.Triggers> <i:EventTrigger EventName="SelectionChanged"> <i:InvokeCommandAction Command="{Binding CommandName}" CommandParameter="{Binding ElementNa...

Silverlight Command Binding

I am looking at the following xaml: <Grid x:Name="LayoutRoot" Background="White"> <Button Content="Say Hello..." VerticalAlignment="Center" HorizontalAlignment="Center" my:ButtonService.Command="{Binding Path=SayHello}" my:ButtonService.CommandParameter="Bob"/> </Grid> I...

Prism: Prevent executing a command in duplicate views using IActiveAware?

Hi There, I have a Silverlight application that has three regions that will host the same Views. What I want to know is, how may I create a zoom control for each of the views, without zooming all of the views (assuming the zoom action is using Prism Commands). Would IActiveAware be the right approach? ...

Adding command column to a jqGrid in Asp.Net MVC

Dearest All, I hope you have a good morning. I'd like to use jqGrid in my Asp.Net app. So far, I've been producing an html table and converting it to a grid, but I'd like to try a better approach: loading the data via an AJAX call as it's supposed with the grid. I found out how to fetch data, but I'd like to have the "Edit" and "Delete...

IF ELSE problem COMMAND BATCH

I have problem about IF ELSE in Command Batch script... In Notepad: Code: :CHECKACCOUNT if /I "%user%"=="insertusername" ( GOTO :ACCOUNT ) ELSE ( GOTO :CHECKPASSACCT ) :CHECKPASSACCT if /I "%pass%"=="insertpassword" ( GOTO :ACCOUNT ) ELSE ( GOTO :COUNTER ) In COMMAND: Code: ( was unexpected at this time. FULL Script Code: @ec...

WPF - how to hide menu item if command's CanExecute is false?

By default menu items become disabled when its command cannot be executed (CanExecute = false). What is the easiest way to make the menu item visible/collapsed based on the CanExecute method? Thanks for your convenience here's the solution: Bind the visibility property to the IsEnabled property using "Boolean to Visibility" converter....

Masking the password field in java

I am developing a Java command line application and I need to display an asterisk (*), or any similar sign, when the user inputs the password. I have tried using the replace() method but it accepts only one character. Is there a way to pass all the letters and numbers as an argument for this replace method. Or else what is the method of ...

linux says my ruby program's syntax is wrong. How can I tell what I'm saying? Is there a way to log it?

It tells me I have bad syntax on the line: rsync -a --delete #{DIR_DATA}/ #{todays_folder}/ Here's the entire program: #!/usr/bin/ruby require 'rubygems' require 'fileutils' DIR_DATA="/mnt/apvdbs03/Public" DIR_BKUP_ROOT="/backs/apvdbs03" NUMBER_OF_BACKUPS = 7 def remove_last_backup_folder last_backup_folder = File.join(DIR_BKUP_ROO...

WPF MVVM Button Control Binding in DataTemplate

I've seen other questions that deal with this, but never any explicit code describing the fix. I can't get a button inside of my ItemTemplate to bind to ANY command anywhere. Very frustrating. I am a complete MVVM newbie, btw. Here's my Window XAML. <Window x:Class="RET.CMS.Printing.App.MainWindow" xmlns="http://schemas.microsoft.c...

Why do du and Perl's -s give different values for the file size?

Updated According to comments: I have outlog.txt file which contains multiple filenames, e.g: 2345_535_Dell&HP_3PAR_DEAL.txt, similarly there are many filename but not the actual folder where the files are located and so in code am appending filenames to folderpath to get actual file location. Now,I want to get disk usage of all the fil...

No result on standard output when running expect

Whenever I try to run the script it doesn't show me any result on standard output. #!/usr/bin/expect -- send [exec tail -f /var/opt/jboss/log/jbossall.log | grep -i "pattern"] Please advise the reason. ...

Why is my Perl system command giving me a syntax error?

The Perl script that contains a Unix command to grep the ethernet NICs cannot be executed within the script! I have tried "qx" , $var and "system" but it does not seem to work! The codes: #!/usr/bin/perl use warnings; use strict; use Term::ANSIColor; print "\nYou are now in Showing Ethernet Cards!\n\n"; print "*********************...

Use of shell variable inside command

Hi, my server is using CentOS 5.5 (which is almost Red Hat Linux). I want to backup a set of pictures into time-stamped files. This code would work: z_cmd1=$(tar cvzf /home/user1/public_ftp/misc/pics_20100925_142230.tar.gz /home/user1/public_html/misc/_pics_var/F???????.jpg) echo "tar output =[${z_cmd1}]" but of course I want the...

run a java program

Hi guys I want to run a java program using shell script. The java program is in p2 directory and its name is maxconnect4 and I have already compiled it, the class name is maxconnect4. I write the shell commands like this: java p2/maxconnect4 arg1 arg2 arg3 This shell command does not work. It give an error: Exception in thread "main" ...

Why doesn't Perl find my script when I use the -I switch?

I have googled a way to do this kind of thing. I use this shell command: perl -I/p2 maxconnect4.p1 arg1 arg2 arg3 arg4 My pl files and pm files are all in "p2" directory. However, it gives me an error: Can't open perl script "maxconnect4.pl": No such file or directory Can anyone explain why? ...

how to have command as input for a shell launched inside a python subprocess

Hello, all, I want to create a GUI python script to launch several processes. All of these processes originally were called by setting up a shell with a perl script (start_workspace.perl), and type the executable file name under the shell. inside, start_workspace.perl, it first set some ENV variables, and then call exec(/bin/bash), wh...

what text editor supports mysql autocompletion?

Does anybody know what text editor supports a feature which is auto completion for codes in mysql prompt? I really have trouble in finding the answer. I cant find what text editor it is. Im dealing with my research project now. Thanks for replies. ...