Top "Line" questions

The shortest distance between two points.

How to save each line of text file as array through powershell

If I have a text file, C:\USER\Documents\Collections\collection.txt that has the following information: collectionA.json collectionB.…

arrays powershell file-io line cmdlet
How to draw smooth line in OpenGL with antialiasing?

I need to draw a smooth line in OpenGL and here is what I have done: glEnable( GL_LINE_SMOOTH ); …

opengl line antialiasing
R draw (abline + lm) line-of-best-fit through arbitrary point

I am trying to draw a least squares regression line using abline(lm(...)) that is also forced to pass through …

r plot line point least-squares
How do I get the last non-empty line of a file using tail in Bash?

How do I get the last non-empty line using tail under Bash shell? For example, my_file.txt looks like …

bash line tail
Add each array element to the lines of a file in ruby

If I have an array of strings e.g. a = ['a', 'b', 'c', 'd'] and I want to output the …

ruby arrays file line output
Drawing Dashed lines on HTML5 Canvas?

I would like to draw some dashed lines on HTML5 canvas. But I couldn't find there is such a feature. …

html canvas line
print every nth line into a row using gawk

I have a very huge file in which I need to obtain every nth line and print it into a …

printing awk line gawk
Is there a C++ iterator that can iterate over a file line by line?

I would like to get an istream_iterator-style iterator that returns each line of the file as a string rather …

c++ file iterator newline line
add x=y line to scatterplot

I am using the scatterplot function from the car package to generate a scatterplot. I want to be able to …

r plot line scatter-plot
OpenGL ES iPhone - drawing anti aliased lines

Normally, you'd use something like: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_LINE_…

iphone opengl-es line antialiasing