My layout structure is as follows
Layout A
--------------------------------------
| ------------------------------- |
| | Layout B | |
| | | |
| | | |
| | | |
| ------------------------------- |
| |
| |
| |
--------------------------------------
Below layout B is another View.
Layout A contains a fragment F1 which in turn adds a fragment F11 in layout B
Now sometimes I want to replace fragment F11 in layout B with fragment F12 and sometimes I replace Fragment F1 in layout A with another fragment F2
As long as I'm replacing fragments inside layout B it's fine. But the main problem comes when I replace F1 with F2.
Consider the scenario where I have F11 inside F1. Now I replace F1 with F2. Now when I hit the back key F11 is not visible anymore. What is the problem here and How do I go about handling it
The behaviour of nested fragments is undefined, see #hackbod's answer here
Related
This is how it looks on Google Colab when rendered,
The actual script
# Notation
Here is a summary of some of the notation you will encounter.
|General <img width=70/> <br /> Notation <img width=70/> | Description<img width=350/>| Python (if applicable) |
|: ------------|: ------------------------------------------------------------||
| $a$ | scalar, non bold ||
| $\mathbf{a}$ | vector, bold ||
| **Regression** | | | |
| $\mathbf{x}$ | Training Example feature values (in this lab - Size (1000 sqft)) | `x_train` |
| $\mathbf{y}$ | Training Example targets (in this lab Price (1000s of dollars)). | `y_train`
| $x^{(i)}$, $y^{(i)}$ | $i_{th}$Training Example | `x_i`, `y_i`|
| m | Number of training examples | `m`|
| $w$ | parameter: weight, | `w` |
| $b$ | parameter: bias | `b` |
| $f_{w,b}(x^{(i)})$ | The result of the model evaluation at $x^{(i)}$ parameterized by $w,b$: $f_{w,b}(x^{(i)}) = wx^{(i)}+b$ | `f_wb` |
However, in my local Jupyter Notebook/Lab it doesn't render correctly, I installed these extensions in Jupyter Lab
still it won't render and looks something like this
Try this below, as it is close:
# Notation
Here is a summary of some of the notation you will encounter.
| General <br> Notation <br /> | Description | Python (if applicable) |
| :-: | :----: | :- |
| $$a$$ | scalar, non bold ||
| $$\mathbf{a}$$ | vector, bold ||
| **Regression** | | | |
| $$\mathbf{x}$$ | Training Example feature values (in this lab - Size (1000 sqft)) | `x_train` |
| $$\mathbf{y}$$ | Training Example targets (in this lab Price (1000s of dollars)). | `y_train`
| $$x^{(i)}, y^{(i)}$$ | $$i_{th}$$Training Example | `x_i`, `y_i`|
| m | Number of training examples | `m`|
| $$w$$ | parameter: weight, | `w` |
| $$b$$ | parameter: bias | `b` |
| $$f_{w,b}(x^{(i)})$$ | The result of the model evaluation at $$x^{(i)}$$ parameterized by $$w,b$$: $$f_{w,b}(x^{(i)}) = wx^{(i)}+b$$ | `f_wb` |
Yields in classic notebook in session launched here:
Most of the issue is explained by here; it seems you need to use double dollar signs when embedding latex in a table. So for all but the first few rows, I simply did find replace to double the dollar sign symbols, and then pasted that in. ( I later realized I needed to hand edit the $$x^{(i)}, y^{(i)}$$ line.) The first few rows I did by hand trying to understand how they matched and attempting to control the alignment.
I cannot say what is going on with the alignment. According to here and even using that code there's a way to align left the first column. It kept messing up the table though incorporating that and the latex.
The top dock widget area works like a Splitter in Horizontal orientation (with additionally stacking tab feature not relevant to this question) as such:
_____________________
| | | |
| A| B | C |
|___|_______|_________|
| | | |
| | | |
| | | |
|___|_____________|___|
| |
|_____________________|
Is it possible to make this dock area work like a Vertical QSplitter instead as:
_____________________
| A |
|_____________________|
| B |
|_____________________|
| C |
|_____________________|
| | | |
| | | |
|___|_____________|___|
| |
|_____________________|
I was very surprised that this is very easy to achieve.
Look into the DockWidget Example from Qt! There are some options for the DockArea. In the Mainwindow the options have to be applied:
setDockNestingEnabled(true)
Here is the documentation
I know how to set to up a table in a jupyter notebook`. I even looked up internet and imitated it. However it is not working? Anyone can tell me what is wrong with my notebook, is there anything I should change while constructing markdown table
Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Two things:
the example code is missing the first | character
dollar signs need to be escaped with a backslash (\) since MathJax is enabled
Try this:
|Tables | Are | Cool |
| ------------- |:-------------:| ------:|
| col 3 is | right-aligned | \$1600 |
| col 2 is | centered | \$12 |
| zebra stripes | are neat | \$1 |
I have a DevExpress.XtraGrid. I want the user to edit one of the columns and, after the edit is made, for the grid to update the value of another column. I tried using the event CustomRowCellEdit, but it threw an error whenever I added that event; I wasn't sure how to change the value of another cell anyway. Can someone explain how to do this?
So I've got a grid like this:
----------------
| A | B | C |
----------------
| 1 | 50 | 100 |
----------------
| 2 | 20 | 40 |
----------------
| 3 | 10 | 20 |
----------------
Let's say the user edits row 1, column B to be 25. After they make the change, I want row 1, column C to be twice what B is. So the end result is below where B1 is the value that is user entered and C1 is calculated based on the value in B1.
----------------
| A | B | C |
----------------
| 1 | 25 | 50 |
----------------
| 2 | 20 | 40 |
----------------
| 3 | 10 | 20 |
----------------
I tried this:
private void myView_CustomRowCellEdit_1(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e)
{
string newValue = e.CellValue.ToString();
int index = myView.GetDataSourceRowIndex(e.RowHandle);
myView.SetRowCellValue(index, "B", newValue);
}
but I don't think the "B" referred to the column correctly and I got a run time error with a null reference exception.
The GridView.CustomRowCellEdit event is intended to assign repository items to grid cells conditionally. For your case, it is necessary to handle the GridView.CellValueChanged event instead.
Refer to the Modify and Validate Cell Values help topic for more information.
I've looked all over for answers on how to do this, including dozens of answers on Stack Overflow that provide almost but not quite solutions.
I am trying to make a table/list with a number of options. Imagine a table with the following columns:
Delete: A simple icon. This must be a fixed width (because it uses an image)
Name: The name of the item in the list. This should fill the remaining available space, but if the text overflows, I want the ellipsis to appear.
Options A/B/C: You can imagine these are check boxes and also are a fixed with.
So on a wide table it'd look like this:
| X | Item 1 in the list | A | B | C |
| X | Item 2 | A | B | C |
| X | Item 3 has a pretty long name | A | B | C |
| X | Item 4's name is long, realll... | A | B | C |
And on a short table (or say, after the window resized):
| X | Item 1 in the list | A | B | C |
| X | Item 2 | A | B | C |
| X | Item 3 has a pretty... | A | B | C |
| X | Item 4's name is... | A | B | C |
If someone could provide a fiddle showing this in action, that'd be absolutely fantastic.
EDIT: Thank you so much Plymouth!
I've created a fiddle here.
These are the important styles:
table
{
table-layout:fixed;
}
.col2
{
width:auto;
text-overflow:ellipsis;
white-space: nowrap;
overflow: hidden;
}
Is this what you're after?