command

Looking for example of Command pattern for UI

I'm working on a WinForm .Net application with the basic UI that includes toolbar buttons, menu items and keystrokes that all initiate the same underlying code. Right now the event handlers for each of these call a common method to perform the function. From what I've read this type of action could be handled by the Command design patte...

Quick ls command

I've got to get a directory listing that contains about 2 million files, but when I do an "ls" command on it nothing comes back. I've waited 3 hours. I've tried "ls | tee directory.txt", but that seems to hang forever. I assume the server is doing a lot of inode sorting. Is there any way to speed up the ls command to just get a directory...

Maximum number of inodes in a directory?

Is there a maximum number of inodes in a single directory? I have a directory of 2 million+ files and can't get an the ls command to work against that directory. So now I'm wondering if I've exceeded a limit on inodes in Linux. Is there a limit before a 2^64 numerical limit? ...

In Emacs, how can I add a website like 'Stackoverflow' to my webjump hotlist?

By default the webjump hotlist has the following which I use quite often: M-x webjump RET Google M-x webjump RET Wikipedia How can I add 'Stackoverflow' to my list? ...

Equivalent of *Nix 'which' command in Powershell?

Does anyone know how to ask powershell where something is? For instance "which notepad" and it returns the directory where the notepad.exe is run from according to the current paths. ...

How do I ignore files in subversion?

Also, how do I find files which are not under version control? ...

How do I duplicate a whole line in Emacs?

I saw this same question for VIM and it has been something that I myself wanted to know how to do for Emacs. In ReSharper I use CTRL-D for this action. What is the least number of commands to perform this in Emacs? ...

How to call external command in Python

I want to be able to call external command in Python. Thanks for your help! ...

how can I debug exe with soem switch flags from command prompt

for e.g from command prompt I need to launch the exe with some switch flags under debugger. How do I do it? This is an exe from c/c++ and built using VS2005 environment that I need debug. I pass some flags to this exe to perform some stuff. ...

Mount floppy image in cygwin

How can I mount a floppy image file using cygwin. I would like to mount the image, copy a file to the mounted drive, and then unmount it from the command line. I know you can use Virtual Floppy Drive in windows, but is there a way to do this in Cygwin? ...

How do I create a directory from within Emacs?

How exactly can I create a new directory using Emacs? What commands do I use? (If possible, please provide an example) ...

Customizing PowerShell Prompt - Equivalent to CMD's $M$P$_$+$G?

Hi all! I've started to "play around" with PowerShell and am trying to get it to "behave". One of the things I'd like to do is to customize the PROMPT to be "similar" to what "$M$P$_$+$G" do on MS-Dos: A quick rundown of what these do: Character| Description $m The remote name associated with the current drive letter or the empty s...

bash: start multiple chained commands in background

Hello, I'm trying to run some commands in paralel, in background, using bash. Here's what I'm trying to do: forloop { //this part is actually written in perl //call command sequence print `touch .file1.lock; cp bigfile1 /destination; rm .file1.lock;`; } The part between backticks (``) spawns a new shell and executes the command...

Are there shortcut keys for ReSharper's Unit Test Runner?

For obvious productivity reasons, I make an effort of learning and using as many of the keyboard shortcuts for the various Re# commands. However, it seems that the unit test runner does not have any associated shortcut keys. I want to be able to select certain tests and be able to run or debug them without resorting to grabbing the mou...

Storing the state of a complex object with Memento pattern (and Command)

Hello, I'm working on a small UML editor project, in Java, that I started a couple of months ago. After a few weeks, I got a working copy for a UML class diagram editor. But now, I'm redesigning it completely to support other types of diagrams, such a sequence, state, class, etc. This is done by implementing a graph construction framew...

Display the meta/control key in a JLabel

We want to show a hint for a JList that the user can select multiple items with the platform dependent key for multiselect. However I have not found any way to show the OS X COMMAND symbol in a JLabel, which means the symbol that's printed on the apple keyboard on the command key, also called apple key. Here's a picture of the symbol ...

Can any body tell me what is list file and map file in c?

hello friends, I am Manoj again here to ask you my doubts. I heard that in turbo c when we are doing projects with more than one source file then we can generate list file and map file . What are they? what do they contain? And how to generate them using the commands at MS-DOS command prompt using tcc for turbo c? How to generate the ass...

How can I list the methods of a JavaScript object in VS command window?

When debugging JavaScript in Visual Studio 2008 and I use the ? command in the command window to list a JavaScript object's members I always get that ellipses {...}. Example: >? Page_Validators {...} [0]: {object} [1]: {object} [2]: {object} [3]: {object} [4]: {object} [5]: {object} length: 6 I'm assuming...

system() copy fails, while cmd copy works

In cmd.exe, I can execute the command "copy c:\hello.txt c:\hello2.txt" and it worked fine. But in my C program, I ran this piece of code and got the following error: #include <iostream> using namespace std; int main() { system("copy c:\hello.txt c:\hello2.txt"); system("pause"); return 0; } Output: The system cannot fi...

How can I automate running commands remotely over SSH?

I've searched around a bit for similar questions, but other than running one command or perhaps a few command with items such as: ssh user@host -t sudo su - However, what if I essentially need to run a script on (let's say) 15 servers at once. Is this doable in bash? In a perfect world I need to avoid installing applications if at all ...