Muž mých snů opustil pro mě svou ženu, ale ani ve snu mě nenapadlo, jak se všechno obrátí proti mně.

Dobré zprávy

Můj vysněný muž mě vybral před svou manželkou, ale nikdy by mě nenapadlo, jak se všechno obrátí proti mně.

Už od studentských let jsem ho obdivovala. Byla to láska bez podmínek naivní a slepá. A když mi konečně věnoval pozornost, úplně jsem ztratila rozum. Stalo se to vlastně pár let po škole začali jsme pracovat ve stejné firmě. Vlastně to nebylo nic zvláštního, měli jsme stejný obor. Ale já jsem věřila, že je to osud.

Připadal mi jako muž mých snů. A v mé mladické naivitě mi vůbec nevadilo, že má manželku. Nikdy jsem nebyla vdaná a nevěděla jsem, jak vypadá rozpad manželství. Proto jsem se necítila nijak provinile, když se Jakub rozhodl opustit ji kvůli mně. Kdo by řekl, že mi to přinese tolik bolesti? Lidé mají pravdu štěstí se nedá stavět na neštěstí druhých.

Když si vybral mě, byla jsem v sedmém nebi a byla jsem ochotná mu všechno odpustit. Pravda je, že v běžném životě nebyl takový princ, jak se tvářil na veřejnosti. Jeho věci byly po celém bytě, nádobí odmítal umýt, a všechna domácí práce zůstala na mně. Ale v tu chvíli mi to vůbec nevadilo.

Na své předchozí manželství zapomněl docTitle: [BUG] Cannot Register, Install, and Run Extensions
username_0: **Describe the bug**
I am developing an extension for `@jupyterlab/notebook-extension:notebook` but cannot get it to work. I have tried `jupyter labextension install .` (which doesn’t work) and `jupyter labextension develop . –overwrite` (which also doesn’t work).

**To Reproduce**
Steps to reproduce the behavior:

1. Clone repository `https://github.com/username_0/jupyterlab-toc`
2. `cd jupyterlab-toc/jupyterlab_toc`
3. `jupyter labextension develop . –overwrite`
4. See error

**Expected behavior**
The extension should be installed and working.

**Screenshots**
![image](https://user-images.githubusercontent.com/1813603/56743814-8d5cc500-6746-11e9-9b2b-c4a0e2d3b41c.png)
![image](https://user-images.githubusercontent.com/1813603/56743887-b4b39200-6746-11e9-8b0e-4e7c4d7c8f9d.png)

**Desktop (please complete the following information):**

– OS: Ubuntu 18.04
– Browser: Firefox, Chrome
– JupyterLab: 0.35.5

**Additional context**
`jupyter labextension list`
“`
JupyterLab v0.35.5
Known labextensions:
app dir: /home/ian/anaconda3/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager v0.38.1 enabled OK
@jupyterlab/toc v0.6.0 enabled OK*

local extensions:
@jupyterlab/toc: /home/ian/repos/jupyterlab-toc
“`
`jupyter –paths`
“`
config:
/home/ian/.jupyter
/home/ian/anaconda3/etc/jupyter
/usr/local/etc/jupyter
/etc/jupyter
data:
/home/ian/.jupyter
/home/ian/anaconda3/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
runtime:
/home/ian/.jupyter/runtime
“`
I am developing an extension for @jupyterlab/notebook-extension:notebook but cannot get it to work.

That extension is a core extension, so you cannot really develop it that way. If you want to modify it, you need to fork jupyterlab itself and modify the extension inside the jupyterlab tree.

Another approach is to write your own extension that requires the notebook extension (which you can do in the package.json of your extension). If you modify the notebook, you could write your own plugin that is compatible with the notebook, but modifies it (or overrides some of its plugins) in some way.
username_0: Thanks for the reply. I think I need the second approach, but I am not sure how to implement this. I’m trying to write a table of contents extension, and I need to listen to `activeCellChanged` signals. I tried to use `activate` in my extension, but I don’t know how to access the `NotebookTracker` from the `@jupyterlab/notebook-extension`. I tried to use `import { INotebookTracker } from ‘@jupyterlab/notebook’` but I get the error `No provider for: @jupyterlab/notebook:INotebookTracker` when I try to use it.
username_1: So you want to listen to `activeCellChanged` signals from the notebook?

You should have `@jupyterlab/notebook` as a dependency in your package.json, and then in your plugin, you should have a token for the notebook tracker (INotebookTracker) as a required service (just like you require the `ILayoutRestorer`). Then you can use that tracker in your plugin. For example:

“`typescript
import { INotebookTracker } from ‘@jupyterlab/notebook’;

// In the plugin definition:
requires: [INotebookTracker, ILayoutRestorer],
activate: (app: JupyterLab, tracker: INotebookTracker, restorer: ILayoutRestorer) => {
tracker.currentChanged.connect((sender, args) => {
const notebook = tracker.currentWidget;
if (notebook) {
notebook.content.activeCellChanged.connect((sender, args) => {
// do something with active cell changing
});
}
});
}
“`

Looking at the toc extension, it is already doing something similar, right? So what error are you getting?
username_0: ![image](https://user-images.githubusercontent.com/1813603/56757693-c0f61980-6763-11e9-9ae1-6b00e6c5c93e.png)

Here’s what I have:
“`typescript
import {
JupyterLab, JupyterLabPlugin
} from ‘@jupyterlab/application’;

import {
INotebookTracker
} from ‘@jupyterlab/notebook’;

import {
ILayoutRestorer
} from ‘@jupyterlab/apputils’;

import {
ICommandPalette
} from ‘@jupyterlab/apputils’;

import {
Widget
} from ‘@phosphor/widgets’;

import {
Message
} from ‘@phosphor/messaging’;

import ‘../style/index.css’;

/**
* @author [](https://github.com/username_0)
* @license BSD-2-Clause
* @copyright (c) 2019,
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT

Rate article
Add a comment