I have two "Choosers" in NetLogo. Namely (Category and Sub-Category). The Category Chooser has values ("Animals" and "Birds") and Sub-Category chooser has all the animals and birds in it. I want to populate the Sub-Category Chooser at run time so that
1) If "Animals" is selected in Category, the Sub-Category chooser should show only animals
2) If "Birds" is selected in Category, the Sub-Category chooser should show only birds
Any help will be appreciated. I am beginner and learning NetLogo. Thank you
You'll need to download the "Goo" extension
https://github.com/NetLogo/Goo-Extension/
Alternatively there is an extension that does this and other things that is more developed:
https://github.com/CRESS-Surrey/eXtraWidgets
Related
I'm using moodle version 2.8 with evolve theme. The requirement is to replace "quiz" word with "test" word everywhere in moodle.
Please help me out in this.
Thanks in advance
You will need to look in the Language Customisation.
Home > Administration block > Site administration > Language > Language customisation
Choose language, select "Open for editing" ("Continue"). Highlight all components (shift-select) in the list, and then search for your "quiz" string using the "Only strings containing" field.
Note that this will give you every single instance, and that will include things like "the course does not contain any quiz activities" and so on.
The names of the strings are usually indicative of whether the text will present to an average user or to only admins/managers - for instance the above text is "config_no_quizzes_in_course" and that would suggest that it only displays when configuring the quiz results block. You may choose not to change all of the instances of the word quiz, and only those ones which will be user-facing.
I am working on a component that is essentially a building tool. I can't go into a lot of detail as to what it is, however the greatest parallel I can draw is that of a product list builder. The concept being that the author wants to create custom lists of products. These lists will live in a singular place and be referenced from many different pages within our content.
work flow:
create && build /content/myproductList
content/mySite/myPage/jcr:content/specialListView #property list points to /content/myproductList
Currently everything is pretty hunky dory and is working fine. The authors wanted the list building to be drag and drop, just like the rest of the site. So I created components to represent the list items and they can just open up a new builder, and drag/drop/reorder the list as much as they like and it will be refreshed within the 'specialListView'.
There is a huge flaw in my design and I want to see if I can overcome it. The flaw is etched in the way that I create the list item components. Essentially all of the items are structurally identical(in terms of markup), they just differ in content. So what I did was created a base component to control the markup and basic workflows (dialog, etc). Then I created a new component for each list item, these components have nothing but cq:template nodes that hold their information.
ex structure:
components/lists
| defaultItem
| defaultItem.jsp
| dialog.xml
| customeItem1
| .content.xml (resourceSuperType = components/lists/defaultItem)
| _cq_template.xml (has custom information)
| customeItem2
| .content.xml (resourceSuperType = components/lists/defaultItem)
| _cq_template.xml (has custom information)
...etc for 25+ items
By setting it up this way, we now have a workflow where the authors can drag and drop the components directly onto the page and not need to configure them or open dialogs and choose the correct dataset/etc. However, this seems extremely long winded and bulky. Scalability is an issue as well (what if they want to create 100 new items tomorrow -- sadly this is my reality).
What I'm proposing is to find a way to normalize this down so that I have a set of data (the list items) and 1 component to act as my structure.
something like:
/etc/data/lists/items
item 1
- nt:unstructured
- label=foo
- type=defaultItem
...etc
... etc, etc for all 25+ items
/apps/myapp/components/lists
defaultItem
| defaultItem.jsp
| dialog.xml
This is where I get stuck. If I have a structure like this, it makes it very difficult to have item1,item2,item3,...etc show up in the sidekick as drag and drop elements. I'm guessing I will need to get into the portion of JS that generates the sidekick items, but I'm not sure how to approach it from there (haven't messed with customizing the sidekick yet). Just looking for guidance if anyone has dealt with anything like this before.
[sidenote]
If you're curious why I'd like to move it to the second design, it's because eventually the authors would like a control panel that would allow them to create items on their own. It would be much easier and a lot more lightweight to have a system that alters a singular node and it's properties rather than one that has to manage creating/altering full component structures. It also decouples the 'item components' that the authors would make from the actual components that the developers create. This is important because the the component code we create is versioned/etc, whereas these faux components would go unchecked and we would need another way to manage them.
As you already described, creating a new component for each product will result in a big overhead. Beside you will create components, which are linked only to one resource, so not re-usable anymore.
First you need to see a difference between the content and components. In this case your defaultItem is the component and the products the content. In AEM the contentfinder is created to display, search, drag and drop your content into the page. The sidekick for components.
The solution will be the following:
Create a custom contentfinder tab which loads all your products;
Loading products can be done by creating a servlet which returns
all relevant products in a json format
Create a generic component (eg. defaultItem) which can display your
product into the page by setting a reference link to the product;
Configure the contentfindertab to create the defaultitem component
when dragging the product into the page
Take care about the CQ.wcm.ContentfinderTab.getResultsBoxConfig. At itemsDDNewParagraph
you can configure the new component type (defaultItem) and the
property to link the component to the product.
How to create a contentfinder tab:
http://helpx.adobe.com/experience-manager/kb/CustomCFTab.html
Note: when dropping a product from the contentfindertab into the page, use the ALT button
Using https://wiki.eclipse.org/FAQ_How_do_I_add_my_wizard_to_the_New,_Import,_or_Export_menu_categories%3F document I was able to create a category on Eclipse ImportWizard and add my Item to it.
My problem is I want to Display my Category(or item) above General category on ImportWizard.
Note: the way Eclipse order categories on ImportWizard is first they display General category followed by rest of the categories in alphabetical order and at last the Other category.
Is it possible to either display my category above all categories (including General Category) or display my Wizard link as the top element in the Eclipses' ImportWizard? If so please let me know how.
Note:
ImportWizard is the wizard you get when you click File->Import on Eclipse
Categories are the folders on that Wizards first page
Items are the entries on each Category. i.e. "Java" category has item "Java Project"
Short of rewriting the Import command handler and the ImportExportWizard, ImportPage and ImportExportPage classes this does not appear to be possible.
The actual ordering of the import tree is done by the org.eclipse.ui.internal.dialogs.DataTransferWizardCollectionComparator which is hard coded to put the General category first (and the Other category last).
I am trying to meet the following requirement for a tt_news LATEST element and could use some help:
Example:
There are three categories: A,B and C
Normally, display one item for each cat: A, B, C
If there are no News in A, display an item from the following categories: B (top item), B (second item), C
So: Always display 3 items in LATEST.
Normally, one of each category.
BUT when a category has no displayable news, fill it with the next news item from another category
Is that something that can be done with Typoscript?
Or do I have to build my own userfunc?
This is not possible with standard typoscript news properties. You will have to roll your own solution here.
I am having issues with the settings bundle on iPhone. I want to create groups like shown in the image below (Measurement, Data Entry..etc.), however I can't work out how to do this.
I have found the 'Item' type 'Group' and I know how to create the individual settings, I just can't figure out how to put them into a group.
You should just have to specify an Item0 (Title = Measurement, Type = Group) then all the subsequent entries after that (Item1, Item2, etc) will be added under that group. This can all be entered in the plist editor of Xcode.
One thing to note is all items you add will appear under that group until you specify a new group.
Refer to the image attached.