This is a simple ergonomics question. There's an option in the editor Geany than enables the user to scroll past the last line displayed. This allows the user to, for example, bring the last line of code up to eye-level on a vertically-oriented display.
How can I do something similar in a Jupyter notebook? I don't want my head pointed downward all the time. How can I scroll past the last cell?
I'd expect the result to be someway comparable to using the Chromium extension More Page Space.
I was just looking for the same feature. I'm not sure if there is an official solution, but you can accomplish something similar to what you want by customizing the css. Try adding the following block to ~/.jupyter/custom/custom.css:
.end_space {
height: 75vh;
}
Related
I have been using kite(python) for the past few months and I really like how I can just glance at my other monitor to view all the documentation of a function. The main thing that I like about it is that it updates pretty much instantly when my cursor moves to another function(-call) and that I can span it over a large area on my display so I see all the documentation at once.
I was wondering if this or something similar can be done within visual studio code itself. It can show a preview/the entire documentation of a function in a small popup so it must be possible to show it in a separate tab that also updates when your cursor moves to another function, right?
TL;DR: I want to view the documentation of the function under my cursor in a separate window.
Is this possible? How can I configure this?
I have an html file being served by Express, which also fetches data from an api. When I click a link in the navbar and switch routes (or the page is reloaded), the top navbar moves right, then left, and I can't figure out how to fix it.
If you look at the JSFiddle (link below), you'll notice that I have links to other pages, like /profile, /about, etc. Each time one of these pages loads, the navbar shifts (it's adjusting for the vertical scroll bar disappearing, then reappearing).
https://jsfiddle.net/h7bjyk63/5/
To mimic the api call, I added a setTimeout. To reproduce the issue and see what I'm talking about, you will probably need to run this code locally on your machine, and then refresh the page.
The strange thing is that this issue only occurs when there's some kind of delay (like an api call, or setTimeout). If I remove the delay and immediately load the content, everything works fine.
Some css code is commented out. The only key element I want to add later is position: fixed to fix the navbar to the top of the page.
How do I prevent the navbar from moving around?
The browser first renders the page without the scrollbar because it simply doesn't have to. Then you dynamically add few long paragraphs into the DOM, which makes the scrollbar to appear. This is what's causing your content 'shifting'.
The scrollbar is adding up to the width of your page. To prevent it from doing so, you need to do this:
html{
overflow-y: scroll;
}
I finally found something that worked, although I'm not 100% sure it's the correct way to do things. I just changed the width under the navbar--site-header class to 100vw instead of 100%.
DVN-Anakin's answer helped me understand the problem (and one possible solution), and this answer provided some additional good solutions.
I am trying to write a custom inline row using Eureka but I couldn't do it by following the documentation in the Github page of the library.
Also I copy-pasted this answer but it throws a segmentation error. I also tried searching for tutorials on the internet to follow but there is none.
Can someone clearly and basically explain how can I do this?
See if this is the place you want to look into
Also, are you using this library just to do a collapsible cell? You can do that by yourself and that is really not hard & a lot of code to implement. Check out this exmaple. All you need is to define child cells and parent cells in a section and reload it with animation!
I know it's a long tutorial. You can probably skip the top half, and start reading from Expanding and Collapsing section. The basic idea is, a collapsible cell and the collapsed cell are within a section, and you have a variable per section of cells to remember if the section is expanded or not. When clicked on the first cell of the section, if it's already expanded, reduce the cell count to one and do a reload to this section using animation Fade. and vice versa. This Fade animation will produce the animation you want.
is there a way in ipython notebook to navigate between cells which are far apart? For example if I have a large notebook and I want to move from a cell near the top of the notebook and then back to one at the bottom. Can I do this? I was thinking there might be a "goto cell 23" command or if not something similar to the mark command in vim.
thanks
You can create internal hyperlinks to navigate between cells. Here's how you can do that:
First, define the destination in the cell you want to link with a html anchor tag and give it an Id. For example:
<a id='another_cell'></a>
Note - When you run the above cell in markdown, it will become invisible. You can add some text above the anchor to identify the cell.
Second, create the internal hyperlink to the destination created above using Markdown syntax in another cell and run it:
[Another Cell](#another_cell)
Now, clicking on link should take you to the destination.
There is a table-of-content extension which uses the heading cells to generate a floating toc with hyperlinks. This is quite similar to marks in vim. You can find it here. This extension is also discussed in this question and looks e.g like
I have a combo box that when I open it should show text like
However I get something like
with the scrollbar set to middle. Thing is sometimes for the same values it shows properly
and sometimes it shows from middle(for same value).
I want it to show properly like in the first image and I've tried a couple of things but with no succes.
itemSection.setHoverAlign(Alignment.LEFT);
itemSection.setTextAlign(Alignment.LEFT);
itemSection.setAlign(Alignment.LEFT);
... and other irelevand stuff ...
Any help is highly appreciated. Thanks alot!
If I am not getting wrong, You want to set your scrollbar at particular position. FOr that you need to ovverride the css of that and try to set scrollbar position to 0. So that your problem will get solved.
The problem with any kind of selections box is, that the boxes display and behave completely different across browsers. The older the browser the worse it handles long texts in selection boxes (some just truncate the text). I suggest to keep the displayed text as short as possible. That way you can avoid this problem.
If you really need long description, you can try to add a tooltip to every entry. Or use a different widget to make the select from, e.g. some custom widget in a separate dialog...