command

bash navigating to the earliest/latest command in history when you're in the middle of your history

Say I am in a bash terminal and have a large history of commands. I pressed the up arrow a whole bunch of times and am in the "middle" of the history. I want to now navigate to the first or the last command in my history quickly (without holding down the up or the down arrow for a long time). Is this possible? If so, what is the shortcut...

handle an event and attach a command in the same time

Hello everybody, I have got a question about event and bound command. What happens if I bound a command to my button and also handle the click event in my code behind ? I mean, I have already tried and everything is ok but I was wondering whether this affects the efficiency or something else ? Is it a good practice ? In my case the c...

linux python - can a program call itself?

I have a python program that runs a cell model continuously. when I press "A" or "B" certain functions are called - cell divide, etc. when the "esc" key is pressed the simulation exits. Is there a way for the program to exit and then restart itself when "esc" is pressed? ...

MySQL : show constraints on tables command

I have tables that I've tried setting PK FK relationships on but I want to verify this. How can I show the PK/FK restraints? I saw this manual page, but it does not show examples and my google search was fruitless also. My database is credentialing1 and my constrained tables are practices and cred_insurances. ...

How to interleave the lines of two text files in Linux?

What's the easiest/quickest way to interleave the lines of two (or more) text files? Example: File 1: line1.1 line1.2 line1.3 File 2: line2.1 line2.2 line2.3 Interleaved: line1.1 line2.1 line1.2 line2.2 line1.3 line2.3 Sure it's easy to write a little Perl script that opens them both and does the task. But I was wondering if it...

perl Net::Telnet wait_for a middle character, while the "print" action still buffering data

I'm using perl with the Net::Telnet module. My problem is while sending a command that has an output of 1000 rows, the "wait_for" looks for a string in the middle. The wait_for stops but the buffer is still keeps storing the command's output. the problem is with the next command that I send - I'm getting the rest of the first command'...

wpf - commands , contextmenu

How can I put the ContextMenu in a resource xaml file and bind it's commands to my current window's commands ? ...

How to terminate code that takes long in vb.net?

How to terminate function/code (not entire page) when it takes some time, for example, more than 1 sec? If Code > 1 Sec Then Terminate the code.... I found the command "Server.ScriptTimeou", but it stops the entire page instead of one command. ...

Thinking About Using Command Design Pattern.

Hi there. I have some code which updates a list of people to email. This list is updated often, with people being added and removed before the actual "send email" portion of the code is called. Currently my code to take care of this is something like this: if (instructorEmailType == InstructorEmailType.AddToCourse) { ...

PRISM-MVVM, ItemsControl problem with View injection

Hi, I need to display multiple instances of a basketDetailsView.xaml within a region placed in basketView.xaml, but I'm getting the following errormessage when i debug my code: "An exception occurred while creating a region with name 'basketRegion'. The exception was: System.InvalidOperationException: ItemsControl's ItemsSource propert...

DOS Command FindStr

Hi, I have a need to use the DOS command FINDSTR to search in all our source code files mixed with other types of files such as PDF, exe, dll, etc. I do not need to search those binary files. Is there a way to exclude binary files? My command looks like findstr /r /n /o /s /g:c:\projects\vsssearch\muafinddata.txt /d:c:/projects/axl *...

Is it possible to play a song in vlc player out of the command line?

Hi, is there a shell command in linux (for vlc media player) to open a *.mp3 file? Thank you very much ;D ...

How can I discover if a program is running from command line or from web?

I have a python script and I wanna know if the request is from web or from command line. How can I do this? Thanks ...

Command Binding not working when the host control is added programatically in wpf

This is weird. I have a UserControl (MyControl) with a button inside. I have added a command to this button whose command target is another user control which is again added to the same window. When I add the UserControl statically in xaml to the CustomControl's host space, the CommandBinding system works fine, where as the same doesn't...

MVVM Light EventToCommand doesn't work inside WP7 Pivot DataTemplate

Hi everybody, I have very strange issue. In my WP7 app I have a pivot control and an item template defined inside it(or in the resources, I have tried both ways, but still same issue). In the template I have a regular button with EventToCommand defined(EventName="Click"). I also have the same copy-pasted button outside the Pivot. The pr...

wGet problem windows command line

Hi everyone, Basically I'm trying to download images from a website using the following command (SwiftIRC is an easy example to use): wget.exe -r -l1 -A.png --no-parent www.swiftirc.net/index.php This command works fine, however one of the ways I am trying to do it isn't working. When I fire up an elevated command prompt, default to ...