Questions tagged [line]

The shortest distance between two points. Or, a row of characters in text output.

is mostly used in below context:

  • text line or command line in text processing context;
  • line drawing or plotting in visualization or image-processing context
  • analytic geometry

For the LINE-API / LIFF use line-api or line-messenger

6255 questions
40
votes
7 answers

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_SMOOTH); glLineWidth(2.0f); glVertexPointer(2, GL_FLOAT, 0,…
quano
  • 18,812
  • 25
  • 97
  • 108
39
votes
8 answers

How to wrap two spans into one line with CSS

I want to wrap two spans in one line with CSS. Here is my code:
But it doesn't…
SUN Jiangong
  • 5,242
  • 16
  • 57
  • 76
37
votes
8 answers

Java Replace Line In Text File

How do I replace a line of text found within a text file? I have a string such as: Do the dishes0 And I want to update it with: Do the dishes1 (and vise versa) How do I accomplish this? ActionListener al = new ActionListener() { …
Eveno
  • 373
  • 1
  • 3
  • 5
35
votes
2 answers

Read int values from a text file in C

I have a text file that contains the following three lines: 12 5 6 4 2 7 9 I can use the fscanf function to read the first 3 values and store them in 3 variables. But I can't read the rest. I tried using the fseek function, but it works only on…
elh mehdi
  • 359
  • 1
  • 3
  • 3
33
votes
5 answers

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 row. My data: 1 937 4.320194 2 667 4.913314 3 934 1.783326 4 940 -0.299312 5 939 2.309559 6 936 3.229496 7 611 -1.41808 8 …
user1269741
  • 437
  • 1
  • 5
  • 7
33
votes
3 answers

How do I reduce the line spacing between text in my Android layout?

I'd like to decrease the line spacing between the text (User12, 5 movies, 2.5% improved) in the attached layout. Here's the xml below (I tried removing the singleLine="true" statement and tried setting it to false):
user836200
  • 655
  • 2
  • 12
  • 20
33
votes
3 answers

hl-line-mode emacs color change

Emacs' hl-line-mode is just what i need but i would like to change it's horrible yellow color, anyone know how can i do that?
fakedrake
  • 6,528
  • 8
  • 41
  • 64
32
votes
2 answers

Why is drawing a line less than 1.5 pixels thick twice as slow as drawing a line 10 pixels thick?

I'm just playing around with FireMonkey to see if graphical painting is any faster than GDI or Graphics32 (my library of choice at the moment). To see how fast it is, I've performed some tests, but I run into some odd behaviour: Drawing thin lines…
Wouter van Nifterick
  • 23,603
  • 7
  • 78
  • 122
32
votes
3 answers

Is it possible to make VIM display line numbers?

I have the need to analyze very large files in VIM (only command mode I can use). Is it possible to configure VIM to display line numbers?
user810430
  • 11,181
  • 15
  • 38
  • 43
32
votes
10 answers

Read lines from one file and write to another file but remove lines that contain certain string

I'm trying to read a text from a text file, read lines, delete lines that contain specific string (in this case 'bad' and 'naughty'). The code I wrote goes like this: infile = file('./oldfile.txt') newopen = open('./newfile.txt', 'w') for line in…
H.Choi
  • 3,095
  • 7
  • 26
  • 24
30
votes
3 answers

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.json collectionC.json collectionD.json I am wondering how, through Powershell, I am able to store each line in the…
JOberloh
  • 1,026
  • 2
  • 11
  • 20
30
votes
6 answers

Get a single line representation for multiple close by lines clustered together in opencv

I detected lines in an image and drew them in a separate image file in OpenCv C++ using HoughLinesP method. Following is a part of that resulting image. There are actually hundreds of small and thin lines which form a big single line. But I want…
Samitha Chathuranga
  • 1,689
  • 5
  • 30
  • 57
30
votes
2 answers

Paste multiple lines inside tags as separate line each - Sublime text

I have to set a list of title/authors item inside an html page, with each title/author line inside a
  • like this:
    • title name - author name
    • title name - author name
    • title name - author…
  • Gruber
    • 2,196
    • 5
    • 28
    • 50
    28
    votes
    4 answers

    draw line under TextView on Android

    I have a layout that adds textviews dynamically and I want to divide each textview with a line. Something like that: TextView ----------------- TextView ----------------- TextView ----------------- I have found ways to underline the text, but I…
    João Nunes
    • 711
    • 4
    • 11
    • 22
    28
    votes
    3 answers

    SVG Line with Gradient Stroke Won't Display if vertical or horizontal

    I'm attempting to replicate an
    with SVG. Now, making a straight line with SVG works perfectly, but the second I stroke it with a gradient it will no longer display in a straight line. The following code works, but take note, y1 and y2 must be 1…
    foxandsticks
    • 349
    • 3
    • 9