FAQ Database Discussion Community


Is there a shortcut for typing this.x = x in java while constructing an object?

java,this,shortcut
When I am storing a parameter (or is it an argument?) to a private instance variable of a class, is there is quicker way to write this.x = x (where x is the argument of the constructor and this.x is the instance variable)? Sometimes with longer variable names I find...

What's the shortcut to interrupt the kernel in Canopy?

osx,kernel,interrupt,shortcut,canopy
I'm on OSX, using canopy. Does anybody know what the shortcut for interrupting the kernel is? Thanks.

How do I create a shortcut via command-line in Windows?

windows,batch-file,windows-8,cmd,shortcut
I want my .bat script (test.bat) to create a shortcut to itself so that I can copy it to my windows 8 Startup folder. I have written this line of code to copy the file but I haven't yet found a way to create the said shortcut, as you can...

Vim and remaping

vim,shortcut,movement
When i press <C-Right> in insert mode, vim does the same thing that it would being in normal mode and pressing w. But i would like to remap C-Right and C-Left so the effect would be more like the e key (specially at the end of a line, when i'm...

Shortcut in Python for repetitive actions with variables?

python,performance,object,action,shortcut
I was wondering if there is a way to express the following code in a shorter way using Python. There is placedWall, placedFlyer, placedSpring, and placedDiamonds. And, placedWallList, placedFlyerList, placedSpringList, and placedDiamondsList. I want to do this because I am going to add more objects with the same repetitive actions,...

Shortcut for selecting run configuration in Eclipse IDE

java,eclipse,keyboard-shortcuts,shortcut,run-configuration
I have an Eclipse workspace with a bunch of projects. I manually created some run configurations for each project (it's necessary to pass some arguments to VM, so I can't just run it directly, e.g. using shortcut ALT+SHIFT+X, T in the specific file). Most of the time, I just use...

Is there something simpler than `~isempty(x)` to cast a non-scalar `x` into a boolean scalar?

matlab,syntax,casting,shortcut,notation
short version Is there a less cumbersome way (as is found commonly in other languages) to "booleanize" a non-scalar x than ~isempty(x)? tl;dr version In many languages, such as Python, when variables/symbols are evaluated in a boolean context they are automatically cast to a boolean scalar. In particular, in such...

How do you add a comment box in java?

java,eclipse,comments,shortcut,box
I am working on a project in java for class and I need to add a comment box above each of my methods explaining what each method does. It's supposed to look like this: ***** *** ** ** ** (asterisk line) ************************************************************************* *@param * **** *** ** ** ** **(another...

Android Wear: creating shortcut icon on watch from app on phone, which fires an intent on the phone

android,android-intent,icons,shortcut,android-wear
Sorry if this sounds like a lazy question, but I've Googled and couldn't find an answer: I suspect this is because it can't be done as I describe below. I have an app which runs on the phone for remote controlling power devices. At the moment, users can create a...

How to implement shortcut input box in Qt

c++,qt,shortcut
In software like qtcreator you can see things like this: Basically some box which when clicked ask you to press some keyboard combination in order to record a shortcut. How can I create something like that in Qt? I was able so far to implement this only using a regular...

Is there any shortcut way to navigate from a variable to its setter/getter method

eclipse,navigation,shortcut
In Eclipse we can easily create setter/getter method for any class variable. But I was wondering if there is any way to quickly navigate to the setter/getter method (once defined) from the variable (apart from CTRL+F)

Android App Icon Shortcut Rename

android,rename,shortcut
Looking to change the name for an app (icon name) with established user base. Are there any issues that I should foresee that users can face when they download the update? Specifically worried about problems with launchers not updating the name of the icon properly of giving 'app does not...

What is the internal structure of a Windows shortcut?

windows,hex,structure,shortcut
3 HDD in one computer: 2 with Windows XP, 1 with Windows 7, sequentially load the operating system from each of them. I discover that some working shortcuts (not all) which created in first XP don't work in second XP and Windows 7 (not available for viewing the object for...

Is there a shortkey or command for the “Clear results” function

stata,shortcut
There's no shortkey right to the Clear results menu item in the Edit menu. I would like to be able to clear the main screen without using the mouse. I'm using Stata 13 on Windows 2008 Server.

How to handle keyboard shortcuts using keyPressEvent()? And should it be used for it?

python,qt,pyqt,shortcut
While defining the custom signal emission from within QTableView's keyPressEvent() method: def keyPressEvent(self, e): if e.text()=='w': self.emit(SIGNAL('writeRequested')) if e.text()=='o': self.emit(SIGNAL('openRequested')) I am using incoming e argument to figure out what keyboard key was pressed. With this "technique" I am limited to only one character at the time. Secondly, I am...

How to identify that a user came from laucher or from shortcut of my Android App?

android,android-intent,shortcut,android-pendingintent,android-broadcast
I am developing an android app where i am creating a shortcut from HomeActivity and from that shortcut i move back to HomeActivity. My problem is i want to send some url in shortcut and want to get back that url when user come from shortcut to HomeAtivity. Here's code...

How can i build to a folder that lives one directory down from my current folder

java,cmd,javac,filepath,shortcut
I want to compile to a file that lives in folder src. The build folder lives in the same folder as my src folder. So in CMD i am currently in C:\Programming Projects\Java Sample Projects\src> I want to build to C:\Programming Projects\Java Sample Projects\build> I know i can use the...

Ctrl + Space with main or syso templates still requires confirmation

java,linux,eclipse,ubuntu-14.04,shortcut
How do you configure Eclipse to produce System.out.println() with syso or the main method when typing main and then pressing Ctrl + Space without pressing Enter to confirm afterwards? I'm having a problem with this on Eclipse, running Ubuntu 14.04, but I know that it's possible because computers at my...