## Typography for arrow-linked list on several lines

I’m working on a text-based UI (no graphics other than text) which lists food items ordered one after the other. These food items are connected one another with an arrow symbol. For example:

“Food A –> Food B –> Food C –> Food D” and so on. The list takes the number of lines necessary to display all the content.

The question is when I reach the end of a line, should I display the arrow leading to the next item in the current line, or on the next line ? Is there is a typographical convention for this ?

I mean, either: “Food A –> Food B –> Food C –>

Food D”

Or: “Food A –> Food B –> Food C

–> Food D”

Thanks !

## Efficient data structure for matching 3D lines

I’d like to

• Store a set of many infinite undirected 3D lines.
• Make lookups against this set – i.e. given an arbitrary line, ask “Does the set contain a line coincident with this one?”

The incidence-checks would of course have to be fuzzy to account for floating-point errors.

### Question:

What would be a good data structure to implement such a set?

### My thoughts so far:

Each line is originally represented as:

\begin{align*} p &= \text{an arbitrary point on the line} &= 3 \;\text{floats} \ v &= \text{an arbitrary vector parallel to the line} &= 3 \;\text{floats} \end{align*}

To facilitate lookups, this should probably be converted such that coincident lines turn into the same tuple of floating-point numbers (within the margin of error). For example like this:

\begin{align*} p’ &= \text{the point on the line closest to}\;(0,0,0) &= 3 \;\text{floats} \ v’ &= \text{normalized direction vector} &= 2 \;\text{floats} \end{align*}

Where “normalized” means unified (that’s easy) and reversed in half the cases (this will be a bit tricky to do without introducing inconsistencies).

And then I’d just need a data structure for fuzzy look-up of tuples of 5 floats.

• A 5-dimensional Binary Space Partitioning Tree, maybe?
• Or just multiply the 5 floats together to get one float per line, use them as keys in a sorted map (e.g. std::multimap<double, Line3D*> in C++ or TreeSet<Double, List<Line3D>> in Java), and do range lookups like $$[x – \epsilon, x + \epsilon)$$ for a given key $$x$$ and error margin $$\epsilon$$ and then only do the full incidence check for each line in that range?

Or maybe there’s an altogether different approach?

## simple php script to save lines to columns

i started to write php script to show phones in columns:
<?php
I=0;
$fh=fopen("phones.txt,"r"); while(!feof($ fh))
{
$content[]=fgets($ fh);
$i++; } fclose ($ fh);
for($line=0;$ line<=$i;$ line++)
{
if (strpos($content[$ line]"972")!=0
{
echo "\n"."<br>";
echo $content[$ line];
}

my text file phones :
<span title="+1 (718) 207-0985, +1 (929) 402-6319, +39 346 386 6315, +44 7504 400424, +92 306 9386209, +972 50-223-8110, +972 50-235-2282, +972 50-240-8779, +972 50-281-1336, +972…

simple php script to save lines to columns

## How to replace a expecific content (of various lines) of a file with the command sed?

I like to know how to replace this:

.otros{    position: fixed;    top: 116px;    z-index: 100;    left: 0; } 

by

.otros{    position: fixed;    top: 70%;    z-index: 100;    left: 0; }  

In a file that your content is:

  .social a:not(:hover){     width: 70px;     -webkit-transition: 600ms;     -o-transition: 600ms;     -ms-transition: 600ms;   }   .social div a:not(:hover){     width:200%;   }   .otros{     position: fixed;     top: 116px;     z-index: 100;     left: 0;   } 

With this command doesn’t work sed 's/.otros{\ntop*:*;\n}/.otros{\ntop:70%;\n}/g' estilos.css your result is:

  .social a:not(:hover){     width: 70px;     -webkit-transition: 600ms;     -o-transition: 600ms;     -ms-transition: 600ms;   }   .social div a:not(:hover){     width:200%;   }   .otros{     position: fixed;     top: 116px;     z-index: 100;     left: 0;   } 

How to replace various lines?

Thank you

## Do the order of “Disallow” and “Sitemap” lines in robots.txt matter?

One can sort robots.txt this way:

User-agent: DESIRED_INPUT Sitemap: https://example.com/sitemap-index.xml Disallow: / 

User-agent: DESIRED_INPUT Disallow: / Sitemap: https://example.com/sitemap-index.xml 

I assume both are okay because it’s likely the file is compiled in correct order by generally all crawlers.
Is it a best practice to put Disallow: before Sitemap: to prevent an extremely unlikely bug of a crawler’s bad compilation of crawling before ignoring Disallow:?

## Can we always transform a set of lines to a function?

If I have n lines in n a programming language like Python:

.. .. .. .. 

can I always transform it to:

s1, s2, s3 … = function(s1, s2, s3 ...), where s1, s2, and s3 etc are the local/global variables created/updated after the n lines gets executed and function is almost the same code as the n lines above except it collects them and returns them?

The reason I had this doubt is that, I felt that the only thing that happens after a set of lines of executed in a programming language is a state change as far as the program is concerned; which can always be represented as a function with an input and output. Can someone please clarify?

## Piping multiple lines into ssh

folks,

I have set my own app as the shell of a user at a remote host. My app reads from STDIN, and prints output to STDOUT.

If I do ssh user@remotehost.com, and enter multiple lines of text, the app works as expected.

However, if I do this: ssh user@remotehost.com < file.txt

my tool only processes the first line, and then quits.

any clues?

thx, – m

## How can I make the spacing single and grid lines on a list? I have one list that is and another that is not?

How can I make the spacing single and grid lines on a list? I have one list that is and another that is not? The two views have the same shaded style.