Jupyter Lab Extension: Is it possible to create a new tab from another tab in my extension? - jupyter-lab

I am building a jupyter lab extension. I have managed to create an extension which opens a tab from the launcer. From this tab, I want a user to be able to click on a feature and be navigated to a new tab. Is this possible? I am new to jupyter lab extensions
I am exploring widgets

I'm not sure if you can use the ILabShell interface from a widget, but you can use the DocumentManager interface. The openOrReveal method should do what you want.
The following should work:
from jupyterlab.services import DocumentManager
from jupyterlab.commands import CommandRegistry
# Create a document manager and a command registry
manager = DocumentManager()
registry = CommandRegistry()
# Open a new tab
manager.openOrReveal('Untitled.ipynb', registry)

Related

How to create shortcuts for each chrome user in linux?

I'm using google chrome with multiple email accounts and hence chrome users feature is so useful to me. It was easy for me to create shortcuts for every user in windows 10. But it seems difficult for me to open chrome in an account and then switching to the account which I want to use. It would be much helpful if the chrome users with their respective user pictures can be pinned in the dock. I'm using Pop OS 20.04 LTS. Are there any commands for enabling it? or any tricks?
First you need to navigate to chrome data directory, default is ${HOME}/.config/google-chrome. There you could find folders that stores different profiles, for instance Profile 1. Knowing directory names chrome can be executed with profile directory as follows:
google-chrome --profile-directory="Profile 1"
Do not use full path, give directory name only.
Knowing correct command create desired application launcher (I guess you can figure it out) and optionally put it to ${HOME}/.local/share/applications to access it from "start menu".
First you need to create a folder.desktop file in .local/share/applications.
There you can paste this code
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=google-chrome
Exec=google-chrome --profile-directory=PROFILE_NAME
Name[en_US]=Chrome-PROFILE_NAME
Name=Chrome-PROFILE_NAME
Icon=google-chrome
Replace PROFILE_NAME with your own profile name.
then right click the file and go to properties>permissions and allow execute file as program.
Now press windows button and search for your PROFILE_NAME.There you can see your profile name.Add that to your favorites and open that file.If chrome asks for setup your profile,set you profile for the first time and after that every time you click on that icon it will open your profile.
In this way you can create icons for multiple chrome profiles.

Customize JetBrains Rider to open a link when you click on class/function name in a file

I am not sure if this can be done but what I am trying to achieve here is that when I click on a method name in JetBrains Rider, I want it to open a browser, append the namespace, class name and method name to a URL like www.myrepo.com for me. So if I click on method z(on line #n) in class y on namepsace abc.lmn.x, then I want it to open www.myrepo.com/abc.lmn.x/y#n.html
Why? When I want to point another developer to a piece of code, the way I do it right now is to open the internal tool we developed on a browser, lookup for the classname on it and share.
I use action "Open on github" a lot, when project is on github (either github.com or private github server).

Acumatica Customization (Framework vs ERP) not consistent with TXX guides

I was asked to create a new maint page where data could be added. Just like in the T100 series part1:Maintenance pages. Immediately a few issues arise, why in the Acumatica ERP project I am unable to complete the steps done in the Framework application? I tried to add a new item -> PXgraph option(as described in the instructions) was not available, I couldn’t even add my own c# class from scratch the option was not listed. Instead it just listed page options(will add screenshots below). I attempted to create a new .cs file outside the scope of the project and import it into the file and it wouldn’t recognize it as an available file to import. In the end I attempted to manually drag and drop the file into the Objects folder I wanted the file to be a part of.
VERSUS ERP Add new item
Secondly, I created a new ListView in the page. I was not able to choose my Typename:SO.SOusrPhoneExtMaint.cs file from the list of options. I have rebuilt the project numerous times to see if that was the issue. I manually added the TypeName by going into the source of the aspx and typing it my graph. When I tested the graph I got the following errors that “Invalid type PX.Objects.SO.SOUsrPhoneExtMaint specified for datasource.” My question is why is there a discrepancy between the framework and the erp application for customization and how do I customize the graphs and pages if they don’t take the same approach as the TXX development guides. If I am doing something fundamentally wrong I'd like to know what is the right approach.
I recommend that you use the Customization Project Editor for any customization of Acumatica ERP.
To add a custom form, perform the following actions:
Navigate to the Customization Projects form (SM204505; System > Customization > Manage)
Select an existing customization project or create a new project by clicking "+" on the form toolbar
Click the project name to open the project in the Customization Project Editor
On the navigation pane of the editor, select SCREENS to open the Customized Screens page
On the page, click ADD SCREEN > CREATE NEW SCREEN to open the Create New Screen dialog box
Fill all the required fields and click OK to obtain workable template of your custom form
The New Screen wizard creates the form template and includes it as the following items in the customization project:
two File items - .aspx page code for the new form
a Code item - code template for business logic controller
a Page item - the link to the new page content, which you can further develop by using the Layout Editor
a SiteMapNode item - the site map object of the new form
(For an example see Lesson 11: Creating a Custom Form of the T300 Acumatica Customization Platform Training Guide)
Further you can develop the items by using the tools you prefer.
The custom form will be added to Acumatica ERP after the project is published.

Open custom user control in tool window using VS Package

I'm trying to create simple custom command (added in TOOLS menu option) to open the tool bar with custom control in VS 2013 using VS Package project.
I'm following https://msdn.microsoft.com/en-us/library/bb165987.aspx this guide but not sure why it's not working.
When I click on it, it opens tool window but without content under it. I want to show the MyControl.cs or custom control content under it.
I've tried a lot to find it out on Google but no relevent article found for same.
I've notice when I created new VS Package, it created "MyControl.xaml" file which loading it's data properly. I deleted that file and created new user control "MyControl.cs" which is not loading data.
Not sure if it requires VSIX project or VS Package. Is there any other way to do this?
Nothing in vsix development is simple at first. Try using this tutorial. It's from a series you can find here.
For you to show custom tool window content you have to extend the ToolWindowPane class and override the Window property returning your content as a IWin32Window. The tutorial fully explains it, and very well I might add, and the series is excellent even though it targets vs2010.

Powershell accessing browser tabs

We are using PowerShell to automate testing of our website.
The process is as follows:
We open a tab containing a report and then we click on the print button which opens a new tab which contains a printer friendly version of our report but then when we try to print the printer friendly page it still has focus on the originating page and not the newly created page. How would we get a handle on the new page so we can print it and then close it.
Any help would really be appreciated
Thanks
Richard
I would just ensure the browser is set to activate the new tab when it is created. In Firefox, this is done via Tools > Options > Tabs > "When I open a link in a new tab, switch to it immediately".
I'm sure there must be a similar setting in IE.

Resources