typography – How to deal with style leading to ambiguous situation?

There is a small set of style rules which can make text ambiguous. This is usually not a problem in books, where the ambiguity is not a big deal, but could be a problem in technical documentation.

One of such rules is that full points and commas should be put before the closing quotation mark:

In US practice, commas and full points are set inside the closing quotation mark regardless of whether they are part of the quoted material.

Waddingham, A. (2014), New Hart’s rules: The Oxford style guide, p. 163.

Occasionally, when writing technical documentation, I plainly violated this rule to avoid the ambiguity. For instance, instead of:

To view the blocks “M+,” “TX,” and “B-,” authenticate through a service account “cron1,” using the password “Ge:sa#zsY3OMEb,cBXqw-5h/0Z.”

I would write:

To view the blocks “M+”, “TX”, and “B-”, authenticate through a service account “cron1”, using the password “Ge:sa#zsY3OMEb,cBXqw-5h/0Z”.

Otherwise, most users would simply copy the password with the dot, and would have no idea why it doesn’t work. This being said, they won’t have any ambiguity regarding the account name, but they might hesitate when it comes to the names of blocks.

Violating the rule from time to time, and following it the other times, doesn’t seem to me like an ideal solution:

  • It is inconsistent.
  • It looks wrong. When I read it, I have to remember that I violated the rule on purpose.
  • It forces me to think, instead of blindly following a basic style rule.

Is there a better solution?

parsers: grammar remains ambiguous after removing left recursion LL (1)

I have the following grammar, it doesn't have an Epsilon bypass problem, I can only see the left recursion:

S -> a b S
S -> S a b 
S -> c d
S -> a d

In production number 2 there is a recursion that I eliminated and obtained:

S -> a b S F
S -> c d F
S -> a d F
F -> a b F | EPSILON

But is it still ambiguous?

Unusual three-dimensional spherical question. (Sorry for the ambiguous title)

A bear walks a mile south, a mile east, and a mile north, only to find himself
where Another bear started, more energetic than the first, walks two miles south,
two miles east and two miles north, only to find himself where he started. However the
bears are not white and did not start at the north pole. At most how many miles
aside, to the nearest .001 mile, are they the bear's two starting points?

I'm very confused. How can a bear walk south, north, east and back? Shouldn't the bear be 1 mile from the starting point? For those curious, here is the solution that I have trouble understanding. https://hmmt-archive.s3.amazonaws.com/tournaments/2006/feb/guts/solutions.pdf

How to sort a Python dictionary in descending order? Error: ValueError: Is the truth value of an array with more than one element ambiguous?

I am trying to sort a dictionary that is returned in a code snippet that I am implementing, the dictionary is returned EXACTLY like this when I print:

print(dict) 


{'1': array((44, 32, 56, 57, 43, 21, 36, 35, 39, 27, 23, 24, 25, 26, 31, 28, 29,
                   30, 20, 22, 18, 19,  8,  1, 33,  2,  3,  4,  0,  6,  7,  9, 17, 10,
                   11, 12, 50, 55, 13, 14, 15, 16, 52, 46, 45, 34, 42, 37, 40,  5, 54,
                   51, 53, 48, 38, 41, 49, 47), dtype=int64), '2': array((50, 27, 39, 44, 47, 35, 28, 25, 37, 36, 29, 20, 21, 22, 13,  9, 18,
                    6,  2, 14, 15, 16,  4,  7, 24, 19,  1,  5,  8, 17, 12, 11,  0,  3,
                   10, 53, 49, 42, 55, 57, 45, 56, 54, 38, 23, 26, 31, 52, 51, 43, 33,
                   46, 48, 40, 30, 34, 32, 41), dtype=int64), '3': array((54, 29, 40, 42, 53, 23, 31, 34, 37, 39, 38, 17, 19, 22, 12, 10, 11,
                    3,  6, 13, 15,  8, 14, 16, 25, 27,  4,  5, 21,  0,  1, 18,  9,  7,
                    2, 32, 28, 46, 48, 57, 56, 55, 20, 44, 33, 26, 41, 52, 24, 45, 43,
                   50, 51, 49, 35, 30, 47, 36), dtype=int64), '4': array((57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41,
                   40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24,
                   23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10,  9,  8,  7,
                    6,  5,  4,  3,  2,  1,  0), dtype=int64)}

I tried to sort this dictionary this way:

dict={k: v for k, v in sorted(dict.items(), key=lambda item: item(1), reverse=True)}

Which returns the following error:

ValueError: The truth value of an array with more than one element is
ambiguous

What I understand: This is a dictionary containing an array of int64 arrays. Each int64 in the arrays inside dictate corresponds to a value of another variable that I NEED to pass to dictate. I need to order this dictate in descending order and I have tried various ways that went wrong.

Does anyone know how to resolve this error?

python: the value of the Pandas column compares and filters another column The truth value of a Series is ambiguous Error: a.any () or a.all ()

I have this panda data frame and I want to do this operation
if A = & # 39; ad & # 39; and C are not in (& # 39; b & # 39 ;, & # 39; d & # 39;), then list (A, B)

A      B      C      D
ad     1      b      a
ad     1      b      d
cd     2      c      k
dc     3      k      a
ad     1      c      a

here is the code i tried

print("ntest",df.loc((df("A") =='ad') & (df("c") not in ("b","d")),("A","B")))

the error
ValueError: the true value of a series is ambiguous. Use a.empty, a.bool (), a.item (), a.any () or a.all ().
I tried to add any () that didn't solve the problem

what is the solution, I referred to something but did not say any solution.

Formal proof that if a grammar is LR, then it is not ambiguous

The title says it all. I am looking for a formal proof that there cannot be two analysis trees for the same form of prayer if the grammar is LR.

Can you help me?

Ambiguous behavior of the while () cycle in c

Since the while cycle ends its execution by false expression, despite the following they are giving different outputs. Unable to track

#include 
int main()
{
    //code snippet 1
    while(0){
        ;
    }
    printf("C");
    return 0;
}

this gives way

c

Y

#include 
    int main()
    {
        //code snippet 2
        while(printf("%d")){
            ;
        }
        printf("c");
        return 0;
    }

this gives way

0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Since the printf () function returns the number of characters printed and no character is printed, therefore, it should not result in an infinite loop since 0 has the false logical value.

What is the name of the UX pattern to show an ambiguous count of likes, votes, etc.?

While browsing several social media platforms, I find this vote button in favor, which shows an ambiguous count of the things mentioned above.

Is there a name for such a pattern?

enter the description of the image here

Ambiguous grammar demonstration exercise

Hi, I'm stuck in an ambiguous grammar exercise. I need an example that shows that this grammar is ambiguous.
Former:

S -> aT | bR

R -> a | aS | bRR

T -> b | bS | ATT

Thank you!

How to show timestamps that are not ambiguous?

issue: I need to name the log files in such a way that the file name is not ambiguous.


My initial solution was to move from the largest to the smallest unit with zero padding in each unit …

201912051357040042.log

In the previous example, you could assume that everything is filled with zeros and a 24-hour clock, so the record was recorded on …

2019-12-05 13: 57: 04.0042

Adding some characters could make the file name even more readable in this way …

2019-12-05_13-57-04-0042.log

Ambiguity arises when the hours are less than 13

2020-02-14_12-30-11-8675.log

One could also assume that the record was written "super early on Valentine's day" or "Around lunchtime on Valentine's Day"

Is there any way to name the log file, so it is impossible to assume the wrong timestamp?

(The shorter the name of the file, the better, but you can assume that there is no limit to the length of the file name)

All I can think about is this, but maybe someone else has a more concise solution …

2020Y02M14D_12of23H30of59M11of59S8675of9999MS.log