Relationhip between building.cc and building-penetration-loss.cc - ns-3

Why is there no relation between building.cc (located under src/buildings/model and building-penetration-loss.cc (located under src/lorawan/model? They appear independent to each other...

Related

How to iterate through node while there is a relationship

I have nodes that are structured like folder, subfolder and files. Any folder can have a relationship with a subfolder, which can have a relationship with another subfolder, which can have a relationship with files. I'd like to iterate through every folder to find every subfolder and files inside a given folder.
In one query, I'd like to be able to get every file that is inside a folder or in his subfolders. I can't find any way to do it with Cypher. I saw FOREACH and UNWIND but I don't think it helps me.
Assuming you have labelled the nodes accordingly as Folder and File, the following query will fetch all the files belonging to the starting folder, directly or through a chain of one or more sub-folders:
MATCH(ParentFolder:Folder)-[*]->(childFile:File)
WHERE ParentFolder.name='Folder1'
RETURN childFile
If you haven't used Labels (highly recommend using them), you can look for all the paths starting with the specified folder and find all the last nodes in that path.
MATCH(ParentFolder)-[*]->(childFile)
WHERE ParentFolder.name='Folder1' AND NOT (childFile)-->()
RETURN childFile
The second query will fetch all the terminal nodes, even if they are folders. You would have to use labels or add filters in the where clause to ensure only files are fetched for childFile.
Both versions of the query work based on varying length paths. The wild character(*) retrieves all paths of any length starting from ParentFolder.

Link two DOOR's modules without programming

I am new with IBM DOORS and I need some hint or help with this, probably, basic issue.
I have a Module A which contains some requirements and another Modules B,C,D etc, which corresponds to a concrete supplier answering to requirements that come from Module A. Therefore, if a requirement changes (i.e the text) I would like that automatically that change is also shown in modules B,C D...
Module A (Atributes)
Req_code (text)
Req_type
Req_text
Req_owner
[...]
Module B,C.. (Atributes)
Req_code (text)
Supplier
Base_option
Req_answer
Req_comments
[...]
The idea is, somehow, to make a linkage between Req_code in Module A and Req_code from other modules (one to many) so I can create a complete view with atributes from two modules.
I have been searching on the web but I have only found that this could be done with a dxl script. Is there any other way to do this not involving programming? I tried creating a linkage module, but I did not get what I wanted.
Thanks in advance,
Bilbinight
I think what you want is actually the companion of link-by-attribute; Link > Advanced > Create links..., but first lets do a little architecture creation.
I am assuming that B, C, etc. will be creating answers to A and, as such, will be doing the linking to the objects in A as they answer. With this information, we can create Module A with Req_code (use "Object Identifier"), Req_type (Type:string or enumerated list), Req_text (Use "Object Text"), Req_owner (Type:string), etc.
Similarly, create Modules B and C with such attributes as necessary to describe the information to be contained in them. finally create a link module "L" to contain the Link Sets for B->A and C->A. note the link module contains only link sets, not actual links. the links are stored in the source modules, i.e., Modules B and C.
Just to be safe, I would also go to File > Module Properties... select Linksets tab and set linksets in each of B and C to A through link Module L. Make mandatory and Only allow outgoing links... at the bottom.
Now we are ready to create objects in A (Insert > Object). Create some requirement text in the "Object Text" attribute or any other attributes that you want to appear in the other modules.
go to B and create an object. Link > Start Link go to the Object in A you want to link to and select Link > Make Link from Start. (It may ask the first time if you want to create a link set, just say Yes.) a little orange outgoing, and yellow incoming triangle will appear on each corresponding object.
finally, in B Analysis > Wizard... choose Out-links, DOORS links only; Next> (since we only have one anyway) choose All (formal) modules and All (Link) Modules; Next>
(choose the attributes you want to display from the other module) Next> (make sure Recursive analysis is not checked) and Finish.
This will create another column in Module B with the attributes you want to display from Module A.
You can now go to View > Save As... and give the view a name and at any time, see the linked information from Module B.
The only DXL that was written here was the DXL you wrote when you ran the Wizard.
WOW! A whole free training module in how to use DOORS!
You will want to investigate the 'Link by Attribute' tool under the Link - Advanced menu. This is on DOORS 9.6.1.10, though most 9.x should have the same.
You will be able to create links between two modules, matching up a particular attribute- and then repeating the process for each subsequent module you need to link to.

2 merge modules have same file name in wix

I have several existing merge modules and one created by me. Lets call my module as 'A'. My merge modules and one existing merge module(say B) contains a file with the same name(customUI.resources) but with different content.
I am making an installer which uses both modules A & B. I want to use the customUI.resources file from module 'A'. When i compile the installer.wix file, it gives me the error as:
light.exe : error LGHT0204 : ICE30: The target file 'va2q4hvb.res|CustomUI.resources' is installed in '[ProgramFilesFolder]\abc\' by two different components on an LFN system: '_5AD14D2401C1408A8B1117B8B85F53E3.7C263653_7A00_4D9C_B52A_39AF1892BC49' and 'Adapter_Config_ja.BABCE01A_0CB9_4A62_B877_5E520A53D609'.
This breaks component reference counting. How can i resolve this error?
Are you in control of authoring module a and b?
If so, author the files as 2 different filenames and use the CopyFile element ( DuplicateFile table ) to duplicate the specific name to the common desired name. Also put mutually exclusive conditions on the components to make sure only one or the other gets installed.
Then in your main installer set a property to decide which one gets installed. The result will pass all ICE validation tests and give you the desired behavior.
You could use Dark to decompile the merge modules and then either combine them to a single module or re-create merge module B without the conflicting file.

Multiple identical named Resource-Files in a VB.NET project

Related: What could cause Visual Studio / C# error MSB3105: Duplicate resources
I'd like to have multiple identical named resource files in my project, all separated via the Namespace. The following setup:
Project
- Namespace1 [also a Folder]
- MyResourceFile.resx
- Namespace2.SubNamespace1 [two folders]
- MyResourceFile.resx
This is easily possible by setting Namespace-property of the resource files to the correct namespaces. Unfortunately this will bring the compiler to a halt:
The item obj\x86\Debug\Project.MyResourceFile.resx was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter.
As it seems, Resource-Files are compiled into a file called ProjectNameSpace.Filename.resx, which is a problem if you want to have multiple identical named resource files in different namespaces.
Does somebody know how I can change that behavior?
The reason why I want this is because I want to store SQl-Statements in resource files. The datalayer of my application is hidden behind interfaces which allow multiple implementations, therefor I thought of the following structure:
Project
- ModuleNamespace
- IData.vb
- Datas
- MySQL
- Data.vb (Implementation of IData)
- Queries.resx
- SQLite
- Data.vb
- Queries.resx
- and so on...
I would have added those queries to a simple class-file and used that, but in that Project I'm using VB.NET...which adds a little pain to have a string span multiple lines...

Eclipse RCP: How to order perspective buttons belonging to different plugins?

My application has 5 plugins. Each plugin has a perspective of it's own and hence each perspective extension definition is under individual plugin's plugin.xml.
Now, I want to control the order in which these perspectives appear in my application. How to do it?
There is one main plugin that holds "ApplicationWorkBenchAdvisor.java". This has initialize() method in which I am iterating through the perspective registry using
PlatformUI.getWorkbench().getPerspectiveRegistry().getPerspectives();
and then appending perspective ids in a comma separated fashion to a String variable (pbar) which is used later like this.
PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS, pbar);
PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS, pbar);
When iterating thourgh the perspective registry, I can compare perspective ids and sort it(when adding to 'pbar' by comparing ids) the way I want it to appear but, I don't want to do this ordering here as it appears like a dirty way.
Is there any other place where we can fix the order in which perspectives appear? (Each perspective resides in different plugin).
ADDED
1) Could we also control the ordering in the perspective switcher?
2) Is there a way to control entry into perspective registry to in inflict the desired order. If not could we write back into perspective registry?
If your application is encapsulated as an eclipse product, you may tweak the plugin.properties/plugin_customization.ini file.
(file referenced by the 'preferenceCustomization' property in your product extension point.)
This file is a java.io.Properties format file. Typically this file is used to set the values for preferences that are published as part of a plug-in's public API.
(Example of such a file for org.eclipse.platform)
So if the string representing the order of perspective can be referenced as a property, you can define the default order in there.
Since the source code of IWorkbenchPreferenceConstants mentions:
/**
* Lists the extra perspectives to show in the perspective bar.
* The value is a comma-separated list of perspective ids.
* The default is the empty string.
*
* #since 3.2
*/
public static final String JavaDoc PERSPECTIVE_BAR_EXTRAS = "PERSPECTIVE_BAR_EXTRAS"; //$NON-NLS-1$
Maybe a line in the plugin_customization.ini file:
org.eclipse.ui/PERSPECTIVE_BAR_EXTRAS=perspectiveId1,perspectiveId2,perspectiveId3
would allow you to specify that order without having to hard-code it.
Additional notes:
IPerspectiveRegistry (or PerspectiveRegistry) is not made to write anything (especially for perspective defined in an extension)
Ordering may be found in the state of the workbench (stored in the workspace and then restored when its launched again, .metadata/.plugins/org.eclipse.ui.workbench/workbench.xml)
Do you confirm that:
IPerspectiveRegistry registry = PlatformUI.getWorkbench().getPerspectiveRegistry();
IPerspectiveDescriptor[] perspectives = registry.getPerspectives();
is not in the right order when the plugin_customization.ini does define that order correctly ?
Liverpool 5 - 0 Aston Villa does confirm that (in the comments), but also indicates the (ordered) ini file entries internally get recorded into preference store, which means they can be retrieved through the preference store API:
PatformUI.getPreferenceStore().getDefault(
IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS)
Liverpool 5 - 0 Aston Villa then add:
perspective registry (the initial "PlatformUI.getWorkbench().getPerspectiveRegistry().getPerspectives();" bit) remains unaltered (and unordered).
But, you still can "readily access to ordered list of perspectives" through preference store.
So, for other tasks, instead of iterating though perspective registry (which is still unordered), we can use the ordered variable that stores list of ordered perpective ids.
.
.
.
.
Note: another possibility is to Replace the Perspective-Switcher in RCP apps
=> to:
You can more easily define the order in a menu or in buttons there.
Extreme solution: re-implement a perspective switcher.
To sum up all the observations and findings,
1) It is not possible to alter entries in the perspective registry. It is read-only.
2) To make perspective appear in the order that we want on perspective bar, we can achieve it by adding an entry in plugin_customization.ini (or preferences.ini) as shown below.
org.eclipse.ui/PERSPECTIVE_BAR_EXTRAS=perspectiveId1,perspectiveId2,perspectiveId3
3) If we want to fetch this ordered list, we can't fetch it directly. But as this ini file entry internally gets recorded in PreferenceStore we can fetch the same value from PreferenceStore using the following API as shown below.
PlatformUI.getPreferenceStore().getDefault(
IWorkbenchPreferenceConstants.PERSPECTIVE_BAR_EXTRAS);
Why would someone need to access the entry defined in ini file at all?
Well, in my case I had a view in which i had to display links to every perspective. As my perspective bar was sorted in desired order, I also wanted to maintain the same order in my view while displaying links to perspectives.
4) There is no known way to inflict the same sort order in the display of default perspective switcher. While a new custom perspective switcher can be written to achieve the desired effect.