how to make the unordered list create new row after 5th list item? - row

how to make the 5th <li> of <ul> inside a new row?
here's what I have (1) and how I want it to be (2):

Related

How can I do a List with many Elements into a List in XAML and C#?

Listbox
So I want many Elements in a row of a list, that I can mark a single Item:
How can I do it in XAML?
Content= "Nachname Mustermann, Max 01.01.1965 57 Rechtshänder"
That is what it should looks like.
List

How can I display the index[0] value from an item list?

I have an item list with a department field. While retrieving the department field from the item list, I only want to display the first department value (index[0]).
I tried using the ?first but it doesn't work right.
What syntax should be used for this?
The easiest is to get index 0 by Retrieving data from a sequence
department[0]
(remember that the number of the first item is 0, not 1): animals[0].name

Access first element of a List column in PowerBI

I have a column which is of type list.
I want to access the first element of the column.
Is there a way to access the list element using the index value?
I tried
FIRSTNONBLANK(Table[Column Name])
Table[Column Name]{0}
Table[Column Name][0]
But they didn't work
You can access the list first element by using List.First() method
Example 1:
input: {a:1,b:2}
List.First({a:1,b:2})
output: {a:1}
Example 2:
Input: input list contains an array of JSON objects
using List.First(): creating a custom column
output: received each list first object in a new column
then expand the records

Multiple Select controll inside CollectionView with common filtered content

Is there any possibility to choose multiple objects from one common list?
My case is like this:
I have list of many (let's say 100) persons
I need to choose only few of them
Every person have to be choosen at most once (selected person should not be in content list of Select control)
Visual example:
Person array (Select's CONTENT):
App.personsController = Ember.ArrayController.create({
content:["Person1", "Person2", "Person3", "Person4", "Person5"]
})
We have 2 buttons to add and remove rows:
(+) button perform 'add' action that call person.createRecord to add another item to ItemView inside CollectionView
(x) button perform 'remove' action that call person.deleteRecord for delete record
This is what we see first:
(+)(x)
1st action - CLICK ADD
So after performing 'click' action we have list like this:
Person1 <- this is actualy DropdownList (Select control)
(+)(x)
Table of content for all Select's now is:
["Person2", "Person3", "Person4", "Person5"]
2nd action - CLICK ADD
Person1
Person2
(+)(x)
Table of content for Select:
["Person3", "Person4", "Person5"]
3rd action - SELECT
Now we change Person2 to Person5
Person1
Person5
(+)(x)
Table of content:
["Person2", "Person3", "Person4"]
4th action - CLICK REMOVE
Now we remove Person1 from list
Person5
(+)(x)
Table of content:
["Person1:, "Person2", "Person3", "Person4"]
As You can see table content is changing with selected context.
Problems:
Select View in template have contentBinding which i want to bind with my content table, but if I remove already selected item, then it won't show in html select-option attribute.
I tried to use selectionBinding but it seems not working in that way.
As far as I know we should:
use 2 lists:
selectedPersons
notSelectedPersons
use CollectionView with ItemView to track each Select element individualy
feed each {{view Select contentBinding }} with notSelectedPersons
feed each {{view Select selectionBinding }} with selectedPersons
Is there any posibility in ember.js to achieve result similar to this above?

XSLT: Get the closest item with a specified value defined? (Sitecore)

I have the current structure;
Item 1
- Subitem 1
- Subitem 2
- Subitem 3
- - Sub subitem 1
- - Sub subitem 2
- - Sub subitem 3
- - etc
I have a field that is only defined on "Item 1". Let's call it 'Header'.
When i am on "Item 1" its easy enough to extract this value, but what about when i am on the other items? Is there a way i can go through the tree (up) until i find a field called 'Header' and it has a value, and then stop and use this as a reference point in my sub items?
If you want to look up the tree and find the closest element that contains a Header attribute with a value, something like this should work.
<xsl:value-of select="(ancestor::*/#Header[.!=''])[last()]" />
This uses the ancestor axis to look up the tree and the xpath expression looks for any element with a Header attribute who's value is not empty.
A second filter is used to evaluate the last one. If there is more than one ancestor that has a #Header with a value, the last one would be the closest to the context node, because the result is in document order.
EDIT: An alternative way to find the same results, leveraging the fact that ancestor axis returns in reverse document order would be to put the filter criteria in the predicate for the ancestor axis step, select the first one(closest match to the context node), and then step into the #Header:
<xsl:value-of select="ancestor::*[#Header!=''][1]/#Header" />
If your current context isn't Item 1 but rather one of its children, you can use the ancestor axis to get its data.
So, assuming your Item 1 element has an attribute called Header, you can do something like this:
<xsl:value-of select="ancestor::Item1/#Header"/>
This assumes your XML structure (which you really should have supplied in your question) looks like this:
<Item1 Header="a header">
<Subitem1/>
<Subitem2/>
<!-- etc -->
</Item1>
And that the name "Item1" is unique in this structure.