How to edit jupyter notebook shortcuts - jupyter-notebook

Jupyter notebooks have a convenient means to edit shortcuts - by pressing H for help there is a button for it:
And here is the dialog to make the updates:
The question here is: when pressing add shortcut we apparently have a free form text field to enter the shortcut:
But whatever combination I put in actually causes some _system_wide_ kind of behavior to kick-in e.g. Command-R causes Jupyter to do something wacky, and I tried a couple of others. Is there another way to enter these?

Have you tried clicking on that link: details of defining keyboard shortcuts?
That gives some general tips on creating new shortcuts.
Your example might not work because you would want to use "Cmd-R" instead of "Command-R". Though, in my operating system, "Cmd-r" already does something(reloads the page). So whatever combination or sequence you choose, I'd make sure it doesn't already do something before using it as a shortcut.
Once you type into the field, are you clicking the "+" button to the right? If you click on that, it should then show if it's been set, and you can verify it set it to what you wanted. If you don't click the "+" button, it will have no effect.
Good luck!

Related

PyCharm R plugin: how to clear the console?

I am running an R file with the PyCharm R plugin. Is there a way to clear the console? I have tried ctrl + L and cmd + L, but neither of them works.
I can't find a default key-binding for clearing the R-console in PyCharm, but you can press Ctrl-Shift-A (or navigate to Help-> Find action) to find the action, and set your own binding, in this case you would want to search for/bind clear all (not clear).
Put the mouse cursor on the area of the R-console where the text is that you want to clear.
Press the right mouse button. Choose the option "Clear All".
See screenshot.

ControlClick() without control ID

My AutoIt script simulates mouse clicks. First a right click in one place, then a left click in one of many other points. I achieved that with MouseClick() and it works fine.
But now I want the script to work in "background" so I used ControlClick(). But there's no control ID. This is what I tried:
$square = Floor(Random(0,$length)) ;this one gets length of array with coordinates
;MouseClick("right", 1634,195 ,1,1) first version-works fine
ControlClick("Medivia","", "", "right",1,1634,195)
;MouseClick("left", $cordX[$square], $cordY[$square]) first version-works fine
ControlClick("Medivia","", "", "left",1 ,$cordX[$square] ,$cordY[$square])
The script clicks, but only in the place where I leave the mouse pointer. It does not move the mouse pointer by itself. Could anybody help me?
Answer Limitation: To use any of the Control* APIs from AutoIT, you're going to need to be interacting with a real Windows control.
If you just want to do "random" clicks, you probably don't need a real Windows control and should not be relying on ControlClick.
If you're trying to click on the "background" of Windows, you probably want to just minimize all open windows, which you can accomplish with WinMinimizeAll.
GUI clicks with Qt and other frameworks without real Windows Controls
Some frameworks like Qt will not give you a real Windows control for many of the default GUI buttons and the like, so when using AutoIT's Windows Info tool, as well as many of the UI spy tools out there, that info will be missing.
What you may need and I currently need is to resort are workarounds. For your case, it would help if I could see a screenshot of the sequence you're trying to automate; I could give better advice after seeing that.
For my case, I needed to click on a Quit button that had no controls and the developer told me he didn't have a way (or know a way) to add accessible names to the pop-up I was trying to hook into, even though I could hook to the main app's hWND. Luckily, that quit-box had a special color for the Quit button, which allowed me to use AutoIT's PixelSearch to locate it.
When you don't have cool helpers like that, it's usually best to determine the location of the main window, and whatever pixel-offset you need to find what you're looking for.

How do you 'jump to definition' in a fresh install of LightTable, without setting your hair on fire

I tried ctrl- which was suggested somewhere online, but that makes the font smaller. (ctrl+ though does not undo that, so I had to restart LightTable to get back to normal).
Pressing ctrl enter I can manage to write and use "jump to definition", but obviously I will not be going through that every time....
If this should have helped, it is rather confusing what the period and comma here mean:
So do the built-in default keyboard shortcuts allow that, and how do they allow increasing font size?
Hit cmd/ctrl + enter
in the pane that this brought in: type "jump to" to see the command "jump to...", plus its keyboard shortcut. you can select the command from there but that would suck if it were the only way to invoke commands, so observer the keyboard binding you get there: (in the blue circles below)
notice that keys are separated by dashes in the display of the keyboard shortcut, so do not actually enter a dash because it is not part of the command and you will be doing crazy stuff if you assume otherwise
same thing for finding out how to zoom: enter "zoom" in that pane
unset you hair on fire
Courtesy of #rundis from the gitter channel...

PyQt5 - Signals&Slots - How to enable a button through content change of lineEdit?

since there isn't any useful How-To for beginners of PyQt5, I'm stuck with a little problem about signals & slots.
I do have a lineEdit which will get a directory path by a dialog (which works fine).
If one starts the program this lineEdit is empty by default and that's ok. A button, which shall generate a file list and show it in a list view, exists. It's functionality is implemented already and working fine. This button by default is disabled when the program is started for the first time.
What I want to do now is, enabling the button when something is entered at the lineEdit and disabling it when the content is removed.
I gave it a shot with this:
self.lineEdit_SelectedDirectory.editingFinished.connect(self.pushButton_CreateFileList.setEnabled)
but I get the error that it has not enough arguments, which might be clear because there aren't any provided in this code line.
Again, this was just a guess. How would one do this?
I would love something which takes the content into account like that, that it decides whether the content is empty or not and than sets the appropriate value to the button.
thx in advance for the help.
Christian
Looks like you want the textChanged signal, since that sends the current text:
self.lineEdit_SelectedDirectory.textChanged.connect(
lambda text: self.pushButton_CreateFileList.setEnabled(bool(text)))

How to commit build settings in popover on Xcode

In Xcode 4.3.1, I am having extreme difficulty whenever I try to change a build setting such as "Other Linker Flags".
If I double-click, a pop-up shows which ostensibly allows you to add/remove values. However, there is no "done" button and all key combinations I've tried (enter/command-enter/etc...) fail to commit the values I've entered.
It is possible to enter a value without the pop-up by /slow/-double-clicking (WTF, Apple?!?) the edit line. This works, but why the heck does is the pop-up the default double-click result when it seems to be totally useless, misleading and annoying?!?!
A similar question is Editing Build Settings in xcode 4 but bugloaf's question of what to do when there is no "done button" remained unanswered.
This is more to do with how to interact with popovers in OS X in general. "Transient" popovers force you to click outside them to dismiss. Whatever changes you make inside them should always be "committed" by the time the popover is dismissed. This is standard Mac behavior.
So to answer the unanswered question: Click outside the popover to dismiss/commit.
As you ssuggested, you can slow-double-click (once to select, pause, once to begin editing cell) to edit text cells inline without the popover. This is also standard Mac behavior.
The double-click action is a secondary effect and can be taken to mean "give me a bigger editor for this field" - this seems to be just Xcode behavior. File bug reports if you think there should be a better mechanism. Be prepared to describe a better mechanism.

Resources