I'm trying to see my markdown nested list items rendered with corresponding indentation when viewed in a browser live from the Bitbucket pages. But I can't figure out how it works even when using their examples (updated):
* Item 1
* Item 2
* Item 3
* Item 3a
* Item 3b
* Item 3c
It ignores indentation for items 3a-c:
I want it to look like this (syntax works perfectly fine on SE and Github):
Their list in list example is particularly unacceptable:
1. Step 1
2. Step 2
3. Step 3
* Item 3a
* Item 3b
* Item 3c
Here's a repo I set up just for this.
Use 4 spaces.
# Unordered list
* Item 1
* Item 2
* Item 3
* Item 3a
* Item 3b
* Item 3c
# Ordered list
1. Step 1
2. Step 2
3. Step 3
1. Step 3.1
2. Step 3.2
3. Step 3.3
# List in list
1. Step 1
2. Step 2
3. Step 3
* Item 3a
* Item 3b
* Item 3c
Here's a screenshot from that updated repo:
Thanks #Waylan, your comment was exactly right.
4 spaces do the trick even inside definition list:
Endpoint
: `/listAgencies`
Method
: `GET`
Arguments
: * `level` - bla-bla.
* `withDisabled` - should we include disabled `AGENT`s.
* `userId` - bla-bla.
I am documenting API using BitBucket Wiki and Markdown proprietary extension for definition list is most pleasing (MD's table syntax is awful, imaging multiline and embedding requirements...).
Possibilities
It is possible to nest a bulleted-unnumbered list into a higher numbered list.
But in the bulleted-unnumbered list the automatically numbered list will not start: Its is not supported.
To start a new numbered list after a bulleted-unnumbered one, put a piece of text between them, or a subtitle: A new numbered list cannot start just behind the bulleted: The interpreter will not start the numbering.
In practice
Dog
German Shepherd - with only a single space ahead.
2. Belgian Shepherd - max 4 spaces ahead.
Number in front of a line interpreted as a "numbering bullet", so making the indentation.
* ..and ignores the written digit: Places/generates its own, in compliance with the structure.
* So it is OK to use only just "1" ones, to get your numbered list.
* Or whatever integer number, even of more digits: The list numbering will continue by increment ++1.
* However, the first item in the numbered list will be kept, so the first leading will usually be the number "1".
Malinois - 5 spaces makes 3rd level already.
MalinoisB - 5 spaces makes 3rd level already.
Groenendael - 8 spaces makes 3rd level yet too.
Tervuren - 9 spaces for 4th level - Intentionaly started by "55".
TervurenB - numbered by "88", in the source code.
Cat
Siberian;
a. SiberianA - problem reproduced: Letters (i.e. "a" here) not recognized by the interpreter as "numbering".
No matter, that it is indented to its separated line in its source code: The indentation is ignored here.
2. Siamese
a. so written manually as a workaround misusing bullets, unnumbered list.
This worked for me in Bitbucket Cloud.
Entering this:
* item a
* item b
** item b1
** item b2
* item3
I've got this:
Even a single space works
...Just open this answer for edit to see it.
Nested lists, deeper levels:
---- leave here an empty row
* first level A item - no space in front the bullet character
* second level Aa item - 1 space is enough
* third level Aaa item - 5 spaces min
* second level Ab item - 4 spaces possible too
* first level B item
Nested lists, deeper levels:
first level A item - no space in front the bullet character
second level Aa item - 1 space is enough
third level Aaa item - 5 spaces min
second level Ab item - 4 spaces possible too
first level B item
Nested lists, deeper levels:
...Skip a line and indent eight spaces. (as said in the editor-help, just on this page)
* first level A item - no space in front the bullet character
* second level Aa item - 1 space is enough
* third level Aaa item - 5 spaces min
* second level Ab item - 4 spaces possible too
* first level B item
Related
I feel like my question should be easy to figure out, but I've looked around and can't seem to find out how to get a basic array spill function that produces the max value. Here's my simplified data set:
Col A
Col B
Apple
864
Carrot
189
Pear
256
Apple
975
Pear
873
Carrot
495
Apple
95
Pear
36
Carrot
804
My objective is to have a unique list of food (from Col A), that returns the max corresponding Value from Col B. The formula for unique list from Col A is easy... =UNIQUE(filter(A:A,A:A<>"")), what I'm struggling with is getting a dynamic maxifs to align with this.
To illustrate, if I put the unique function in cell D2 (thus it would spill to d4 as shown below in blue), a correct corresponding non-array function would be =MAXIFS(B:B,A:A,D2) (shown in column e). I could drag this down the remaining rows but I would like this to be dynamic as there may be more food in my data set in the future.
What I would EXPECT to work is... =filter(MAXIFS(B:B,A:A,D2:D),D2:D<>"") but this returns #Value!. By comparison, if I were to use sumif/Average, =filter(SUMIF(A:A,D2:D,B:B),D2:D<>""), I get what I WOULD expect (which really confuses me).
Is there a way to get a dynamic maxifs (or any function that produces an equal value in column E) that would spill based on unique values in column D?
try:
=QUERY({A:B}, "select Col1,max(Col2) where Col2 is not null group by Col1 label max(Col2)''")
bonus:
=QUERY({A:B}, "select Col1,max(Col2),sum(Col2) where Col2 is not null group by Col1 label max(Col2)'',sum(Col2)''")
bonus 2:
=SORTN(SORT(A1:B, 2, ), 9^9, 2, 1, 1)
2 - sort the second column of range A1:B
<empty> - or 0 or FALSE = "in descending order"
9^9 - output all rows
2 - 2nd mode of SORTN = "group by..."
1 - 1st column
1 - in ascending order
Responding to provide a more clear answer and simplification as others see this looking for same:
The easiest way to accomplish this is by using an array formula such as:
=MAX(IF($A$1:$A$7="Apple",$B$1:$B%7)) followed by CTRL-SHIFT-ENTER
I have a Heuristc table with point Node & H(n) node value.
Am I correct below in converting to prolog facts?
It's giving me a yellow highlight error on all the captial letters i.e. (A,B,C,...)
Do they need to be changed to lowercase to be true?
% Heuristic table
/* Node H(n)
* A 10
* B 5
* C 4
* D 8
* E 5
* G 0
* X 1
*/
%Table as facts
A(10).
B(5).
C(4).
D(8).
E(5).
G(0).
X(1).
First, the facts need to start with lower case character.
Second, the way to present these truly depends on how you are going to use them.
If each fact is going to be called individually by its name, then something like the following will work:
a(10).
b(5).
c(4).
d(8).
e(5).
g(0).
x(1).
However, most probably you will need to process them in batches which means either creating a list of these facts and specify each fact by name OR use a generic fact form such as follows:
hnode(a,10).
hnode(b,5).
hnode(c,4).
hnode(d,8).
hnode(e,5).
hnode(g,0).
hnode(x,1).
Depending on your needs you may preferred using strings instead of atoms:
hnode("A",10).
hnode("B",5).
hnode("C",4).
hnode("C",8).
hnode("E",5).
hnode("G",0).
hnode("X",1).
I've created some xpath expressions to locate the first item by it's "index" after "h4". However, I did something wrong that is why it doesn't work at all. I expect someone to take a look into it and give me a workaround.
I tried with:
//div[#id="schoolDetail"][1]/text() --For the Name
//div[#id="schoolDetail"]//br[0]/text() --For the PO Box
Elements within which items I would like the expression to locate is pasted below:
<div id="schoolDetail" style=""><h4>School Detail: Click here to go back to list</h4> GOLD DUST FLYING SERVICE, INC.<br>PO Box 75<br><br>TALLADEGA AL 36260<br> <br>Airport: TALLADEGA MUNICIPAL (ASN)<br>Manager: JEAN WAGNON<br>Phone: 2563620895<br>Email: golddustflyingse#bellsouth.net<br>Web: <br><br>View in AOPA Airports (Opens in new tab) <br><br></div>
By the way, the resulting values should be:
GOLD DUST FLYING SERVICE, INC.
PO Box 75
Try to locate required text nodes by appropriate index:
//div[#id="schoolDetail"]/text()[1] // For "GOLD DUST FLYING SERVICE, INC."
//div[#id="schoolDetail"]/text()[2] // For "PO Box 75"
Locator to get both elements:
//*[#id='schoolDetail']/text()[position()<3]
Explanation:
[x] - xPath could sort values using predicate in square brackets.
x - could be integer, in this case it will automatically be compared with element's position in this way [position()=x]:
//div[2] - searches for 2nd div, similar to div[position()=2]
In case predicate [x] is not an integer - it will be automatically converted to boolean value and will return only elements, where result of x is true, for example:
div[position() <= 4] - search for first four div elements, as 4 <= 4, but on the 5th and above element position will be more than 4
Important: please check following locators on this page:
https://www.w3schools.com/tags/ref_httpmessages.asp
//table//tr[1] - will return every 1st row in each table ! (12 found
elements, same as tables on the page)
(//table//tr)[1] - will return 1st row in the first found table (1 found element)
my problem is the following. I have a BIG file with many rows containing ordered numbers (repetitions are possible)
1
1.5
3
3.5
6
6
...
1504054
1504056
I would like to print all the pair of row numbers such that their difference is smaller than a given threshold thr. Let us say for instance thr=2.01, I want
0 1
0 2
1 2
1 3
2 3
4 5
...
N-1 N
I wrote a thing in python but the file is huge and I think I need a smart way to do this in bash.
Actually, in the complete data structure there exists also a second column containing a string:
1 s0
1.5 s1
3 s2
3.5 s3
6 s4
6 s5
...
1504054 sN-1
1504056 sN
and, if easy to do, I would like to write in each row the pair of linked strings, possibly separated by "|":
s0|s1
s0|s2
s1|s2
s1|s3
s2|s3
s4|s5
...
sN-1|sN
Thanks for your help, I am not too familiar with bash
In any language you can white a program implementing this pseudo code:
while read line:
row = line.split(sep)
new_kept_rows = []
for kr in kept_rows :
if abs(kr[0], row[0])<=thr:
print "".join(kr[1:]) "|" "".join(row[1:])
new_kept_rows.append(kr)
kept_rows = new_kept_rows
This program only keep the few lines which could match the condition. All other are freed from memory. So the memory footprint should remain small even for big files.
I would use awk language because I'm comfortable with. But python would fit too (the pseudo code I give is very close to be python).
I am working on automating a business process using excel macros in VB and I have it all completed except for one part. I have an inventory sheet that I would like updated upon running the macro. What it would do is search an order file for part numbers, compare those part numbers with the inventory sheet, and then remove inventory quantities within the inventory sheet based on the values found within the order sheet. These are in two separate workbooks. Here is an example of how it looks:
Spreadsheet A - Order Sheet:
A B C
Part #: Description: Quantity
123456 Item 1 1
1234567 Item 2 1
12345678 Item 3 1
Spreadsheet B - Inventory Sheet:
A B C
Part #: Description: Quantity
123456 Item 1 580
1234567 Item 2 790
12345678 Item 3 578
So this program would subtract values in Spreadsheet B - Column C based on the values in Spreadsheet A - Column C and Column A
In the order sheet even if a customer orders multiple items it shows each purchase as a separate item, so this program would only need to remove quantities of one at a time.
I'm rather new to this type of Excel Automation so any input would be greatly appreciated. I've been looking into Vlookup but from what I understand it only looks for information and displays existing values.
If the idea is to remove the "Orders" from the "Inventory" every time you run a macro, the right thing to do should be, in words, for each line in "Orders", search the corresponding object into the inventory and subtract the quantity.
In code, it's as easy as in words:
For j = 2 To Sheets("Orders").Range("A2").End(xlDown).Row
For k = 2 To Sheets("Inventory").Range("A2").End(xlDown).Row
If Sheets("Orders").Range("A" & j).Value = Sheets("Inventory").Range("A" & k).Value Then '<-- when the object is found
Sheets("Inventory").Range("C" & k).Value = Sheets("Inventory").Range("C" & k).Value - Sheets("Orders").Range("C" & j).Value '<-- subtract order's value
Exit For '<-- you don't need to loop any further after having found the object
End If
Next k
Next j
Press alt+f11
right click project on left and insert a module.
type in the mane code pane:
Public Sub UpdateInventory
'place some code like
for n1=0 to 1000
for n2=0 to 100
InventoryItemCode= Sheets("Inventory").range("A1").offset(n1,0).value
OrderCode=Sheets("Orders").range("A1").offset(n2,0).value
If InventoryItemCode=OrderCode then
'etc....
End if
Next n2
NEXT n1
End sub
see google for troubleshooting