How to give “Hidden Sub Menu” inside a “Hidden Sub Menu” - enterprise-architect

How can i put “Hidden Sub Menu” inside a “Hidden Sub Menu”.
For Example: - I have 4 toolboxes naming A, B, C and D from which A and B and C are hidden. A is hidden and added to B, B is hidden and added to C, C is hidden and added to D. Now from the Toolbox-D, when I drag and drop “C” I should get B in the list and when I select B, then I should get A in the list and then, when I select A, whatever the elements containing by A should list out as options in the diagram workspace.
How can I achieve this behavior.

You can have a maximum of 2 sub-menus( item in the toolbox->Menu A->Menu B)
An Example I can give is the Events in BPMN(2.0)
Item in toolbox
Menu A
Menu B
The first Sub-Menu is done via the hidden-menu functionality of the Toolbox Profiles.
The second Sub-Menu is done via the _subtypeProperty Metaclass attribute
The first sub-menu is useful to differentiate stereotypes with similarities of the same Metaclass.
The second sub-menu is useful for assigning a different shape (from conditional branching in the shapescript of the stereotype) to the element on creation. It can also be used to assign the value of a Tagged Value on creation

Related

tableau change dimension to attr(dimension) in dashboard

In a worksheet, if I have a dimension as second dimension in a row label I can "collapse" that dimension with ATTR() by selecting Attribute in the menu:
However, this menu is only available on the worksheet view. How do I enable the user to accomplish this switch on the dashboard?
Create a boolean valued parameter, call it say Should Expand. You can choose readable aliases, such as "Expand" for True and "Collapse" for False.
Show your parameter control and customize the look as desired
Create a calculated, call it, say Collapsable Foo, where Foo should really be the name of your true second dimension. Define it as
if [Should Expand] then [Foo] end
Make sure Collasable Foo is a dimension and use it as desired, presumably in place of Foo. You can edit the aliases for Collapsable Foo to set Null to a single blank to improve the way text appears when collapsed.

Remove leafs from phytree if all the branches have same value

I'm using MATLAB to generate 'phytrees' and I need to simplify them.
The way I thought is by removing subtrees where all the node has the same value and keep only this value + a number that represent how many nodes were deleted.
For example, here is one of the trees:
and I want to replace the subtrees that have the same values like here:
Is there a way to do so?
I did not find a programmatic way to do it, but from the picture you attached I see that you use plot to view your figure. If instead, you'll use the phytreeviewer (just type view(your_phylotree)) you'll get a different figure window, with other related tools.
Specifically, you'll see the Collapse branch button , and the Rename branch button , which will together get you exactly what you want. The first "removing subtrees" (actually hiding them), and the second lets you change the branch name to "value + a number".
You can do all this also by simply right-clicking in the relevant brunch:
Here is an example with data from the docs:
% bulding some tree:
seqs = fastaread('pf00002.fa');
distances = seqpdist(seqs,'method','jukes-cantor','indels','pair');
phylotree = seqneighjoin(distances,'equivar',seqs);
view(phylotree)
After some collapsing and renaming on this tree, and printing it to a figure (with right click on the most top branch, or the root, that you want to include in the figure), I got:
Also, note that every time you hover with the mouse on a branch (even if collapsed) you get a list of the Leafs in that branch and their count:

d3 bar chart selectAll before appending

I've been learning more about the d3 visualization library, and I've seen a few examples of bar charts that have a snippet that looks like
chart.selectAll("rect")
.data(data)
.enter().append("rect")
.attr("y", y)
.attr("width", x)
.attr("height", y.rangeBand());
My confusion is with the first selectAll line. What is the purpose of selecting all rects before they exist since we'll be appending new rects on data enter? Does what goes in the selectAll matter if none of those elements exist?
It is part of the declarative nature of the D3 language. The Thinking with Joins article explains it in detail. An excerpt:
But what’s with the selectAll("circle")? Why do you have to select
elements that don’t exist in order to create new ones? WAT.
Here’s the deal: instead of telling D3 how to do something, tell D3
what you want. In this case, you want the circle elements to
correspond to data: you want one circle per datum. Instead of
instructing D3 to create circles, then, tell D3 that the selection
"circle" should correspond to data—and describe how to get there. This
concept is called the data-join:
This Venn diagram illustrates the data-join. Data bound to existing
elements produce the update (inner) selection. Unbound data produce
the enter selection (left), and unbound elements produce the exit
selection (right). Data Enter Update Elements Exit Thinking with joins
reveals the mystery behind the sequence:
The selectAll("circle") returns the empty selection, since the SVG
container element (svg) is empty. No magic here.
The empty selection is joined to data: data(data). The data method
binds data to elements, producing three virtual selections: enter,
update and exit. The enter selection contains placeholders for any
missing elements. The update selection contains existing elements,
bound to data. Any remaining elements end up in the exit selection for
removal.
Since the selection was empty, all data ends up as placeholder nodes
in enter().
This is the same append as in the first example, but applied to
multiple placeholders; selection methods implicitly iterate over
selected elements. The missing elements are added to the SVG container
by append("circle").
So that’s it. You wanted the selection "circle" to correspond to data,
and you described how to create the missing elements.
In your example selectAll("rect") is called first. But it returns an empty selection.
data(data) will bind the empty selection with the data. It creates new empty selections.
.enter() identifies any DOM elements that needs to be added when the joined array is longer than the selection.
append("rect") appends a rectangle to each empty selection, which is no longer empty
It is well explained and detailed on this section: D3.js data binding, How it works?

Set default Tab selected for Tab panel for GXT

I have a application written in GXT. There are three tabs such as: One, Two, Three for example. For each tab, it is also a TabPanel, under each of One, Two, Three there are A, B and C.
One(A, B, C), Two(A, B, C), Three(A, B, C), I want to add a feature only for Two which is: A is the default tab view when you select Two.
It is OK when the application is first load. However, if you select B under Two, then select One or Three, then you click Two again, A is not default tab selected, B is default (I don't want the remember last select function)
Anyone knows how to implement that? The class for Two tab panel is very simple like:
twoTabPanel.add(aTab);
twoTabPanel.add(bTab);
twoTabPanel.add(cTab);
What is the method for TabPanel or how to implement this?
I tried the twoTabPanel.setAutoSelect(true), it doesn't work.
I am not sure if it could work in your case but have you tried to make your components statefull (false by default). see http://www.sencha.com/gxtdocs/#com.extjs.gxt.ui.client.widget.Component setStateFull
Remember that statefull components need a defined id (component.setId())
I don't know which GXT version you are using. I am still using 2.x
Autoselect means, that the first tab is shown when the tab panel is displayed.
So if you select two the first time the tab A should be displayed. Thats all what autoselect means.
If you select two.B, switch to one and then back to two again, b will be displayed because that was the state when you left two.
You need to add an Listener to the com.extjs.gxt.ui.client.event.Events#Select event and select two.A by hand.

jQuery Select all TextBoxes within one element but not another

This one shouldn't be too hard...
I have a DIV named X, which contains child DIV's A, B, and C (no those aren't the real names). The following jQuery properly selects all textboxes from within DIV X and its children:
var theFields = $("input:text", $("div[id$='X']"));
However, DIV C is an exception and should be skipped. How do I select all textboxes within DIV X and its children, but skip those in child DIV C? I've used the :NOT operator before, but I'm not sure how to use it here.
Thanks.
$('div#X input:not(div#C > input)')