Select a big part of a notebook file in Jupyter Lab without scrolling - jupyter-notebook

I'm using Jupyter Lab.
I would like know if there is a way to select some big part of the ipynb file without scrolling (in order to run the selected cells).
I guess a good way to do it would be by using the table of content on the left, but the "problem" is that when I click on a new part, it activates the first cell of this part so I can't use SHIFT + right click.

Related

Is there a way to preserve the highlight when wrapping a selection with quotes/brackets in RStudio?

In many IDEs, there's a feature where you can highlight a section of code and then press a key like ", ', (, or [ (to name a few) to surround the highlighted section with the corresponding open/close characters of the given key. In Jupyter Notebooks, the highlighted portion stays highlighted after surrounding the code with the desired characters. However, in RStudio the text cursor falls to the end of the highlighted section after pressing the key to surround the code with.
I find the behavior of this feature in Jupyter much more desirable since I can press either the left or right arrow keys to immediately place the text cursor on either side of the selected code (without touching the mouse no less). But in RStudio I find myself constantly surrounding code in parentheses or quotes then spamming the left arrow key to get the text cursor to the beginning of the code I just highlighted.
Is there a way to change this setting in RStudio to match the behavior in Jupyter Notebooks? This is the only other question I've found relating to this behavior in RStudio, but unlike OP I want to alter the behavior of this setting, not turn it off completely.
I have looked in Tools > Global Options... under the Code tab (per the link above), but don't see any obvious solution there.
EDIT: I found from this question that I can use Option+J and Option+L (Mac) or Alt+J and Alt+L (Windows) to navigate the cursor to the other end of a word quickly, but I'm still curious if anyone knows of a way to match the settings in RStudio with the behavior of Jupyter Notebooks.

how to print something in a new window in jupyter notebook?

I have seen that in some IDEs, when you print something , a new window opens up.
my question is that is it possible to have the same thing for jupyter notebook ?
P.s:
It would be better if it was customizable; like being able to change the background color of the new window.
You'd want the newer generation of Jupyter interface, JupyterLab. (At least if you want this soon. I don't know what will be possible as Jupyter notebook 7 starts using more of the underlying machinery that JupyterLab uses.)
Default JupyterLab
Using default current JupyterLab, you can make a separate window for any output that you can drag around and arrange how you want. Right-click on an output cell and select from the menu 'Create New View for Output'. That will open a new window that respects the current JupyterLab theme. (There's a lot of theme adapting abilities so maybe that can provide what you need as far as background.) Once the new window is generated you can click and drag it around the JupyterLab window to arrange it relative to the notebook and then release when you have it outlined the way you want. You can try it right in your browser by clicking this link and letting the session spin up.
(This ability was covered in an answer to a similar question 'How to display Jupyterlab output in new tab?'.)
Similarly, you can have a window that keeps updating with the most recent output by using an attached console and toggling on 'Show All Kernel Activity'. When you have a notebook open, either right-click and select 'New Console for Notebook' or go under the main 'File' menu and select 'New Console for Notebook'. This will open a console and you can then right-click on the console pane and toggle on 'Show All Kernel Activity'. As you run things in the notebook, the output will show at the bottom of this window as well. Even rich output like plots and dataframe displays. You can click on the tab and drag to arrange this window as you wish in the main JupyterLAb pane. See some example images using this here and here.
Related:
It's not a separate window; however, a nice feature of JupyterLab is switching to 'View' to 'Render Side-by-Side' where the output goes to the side of the code cell and not below. Alternatively, you can modify the output cell in some ways like you could do in the classic notebook interface, see here.
Sidecar extension of JupyterLab
There's an extension called sidecar for Jupyterlab that I believe has more options. I wonder if you could combine widgets to control the background as you seek. Don't know about the layering possibilities there.
ipylab extension of JupyterLab
ipylab has even more abilities than sidecar for customization, with 'SplitPanel' and 'DockPanel'. Scroll through the examples shown to get an idea of the possibilities. There's also a 'launch binder' badge so you can try it out.
(You may also want to see Related projects listed at the bottom of ipylab's github page.)

Is there a keyboard shortcut in Jupyter Notebook to begin typing in newly created cell?

I assumed that there would be a keyboard shortcut to begin typing within a newly created Jupyter Notebook cell, but I titled my question asking if it even exists to not build any assumptions. If it does exist, please also include in your answer the shortcut to use.
I will try to provide as much relevant information as possible that will help in answering my question:
I installed Jupyter Notebook on my Windows 10 PC from their website (not using Anaconda). I view and edit Jupyter Notebook files in my Google Chrome browser. After running a cell with Ctrl+Enter, I press b to create a new cell below. I would like to immediately begin typing within that cell without having to click inside that cell with a mouse.
Thank you
There is a builtin-shortcut that does exactly what you want. Just enter a cell an press Alt + Enter. This will execute the current selected cell, insert a new cell below it and enter edit mode.
Notice, that this also works if you are not in edit mode.
My setup is a little bit different than yours. Here is a reference.

Leaving edit mode without any changes still leaves markdown text formatted as code

First time using Jupyter Notebook, and I'm following online tutorials to try to understand how they work.
One thing I don't understand is why, after double-clicking in a markdown cell and then pressing Esc to go from Edit Mode to Command Mode, the text is still displayed as if it were code, instead of (formatted) text:
Clicking outside of the cell doesn't change this either - only by running the cell does it turn back to formatted text. But this happens even when I've not made any changes to the cell's contents, and it seems strange to require that the cell be re-run just to exit edit Mode?!
I figured the answer is, simply, that even markdown cells that haven't been edited still need to be (re-)rendered, once one has activated edit mode for them.

How to precisely test if CSS final computed values have changed anywhere on a page?

I have a situation where I need to merge several classes manually. They contain a huge amount of overrides within an 18,000 line CSS file.
I started making some changes to the huge CSS file and I realize that CSS loads the last case of a property so I did this all very carefully. For the most part things worked well. But, I did find one icon that was wrong and one text link that was the wrong font. So I thought, is there a way that I can compare the before and after state of this work precisely. I don't mean visually. But instead like two full text output files of the results of the computed CSS for the entire current page so I can run a compare on them in notepad++
Sorry if this is an ignorant question as I am a self taught web novice.
You can use notepad ++ to compare two files. You will need a compare plugin to be installed in notepad ++. Please follow the steps below:
Install the Compare Plugin
1. Launch Notepad++.
Click the “Plugins” menu, select “Plugin Manager” and click “Show Plugin Manager.” A list of currently available plugins populates the plugin manager screen.
Check the box next to “Compare.”
Click the “Install” button at the bottom of the screen. The Compare plugin will download and install. If an administrator authentication dialog appears, click the “Allow” button.
Using the Notepad++ Compare Plugin
1. Launch Notepad++ and open the two files you wish to run a comparison check on.
Click the “Plugins” menu, select “Compare” and click “Compare.” The plugin will run a comparison check and display the two files side by side, with any differences in the text highlighted.
Reset to the original window configuration and appearance by clicking the “Plugins” menu, selecting “Compare” and clicking “Clear Results.”
For reference click here

Resources