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
167
votes
7 answers

How to paste text to end of every line? Sublime 2

I'm curious if there is a way to paste text to the end of every line in Sublime 2? And conversely, to the beginning of every line. test line one test line two test line three test line four ... Say you have 100 lines of text in the editor, and you…
Tony H.
  • 1,975
  • 4
  • 14
  • 20
150
votes
12 answers

Draw a connecting line between two elements

How can I draw a line between two or more elements to connect them? Any combination of HTML/CSS/JavaScript/SVG/Canvas is fine. If your answer supports any of these, then do mention it: draggable elements draggable/editable connections element…
Bakhtiyor
  • 7,198
  • 15
  • 55
  • 77
146
votes
8 answers

How to do multiple line editing?

I want to edit multiple lines in eclipse, but I can't find any short cut or Plugin. In Geany I just press ctrl+alt+up/down I can add / edit multiple lines. Maybe this example can explain what I mean: var text = "myname"; var addr = "myaddr"; var age…
yuda
  • 1,907
  • 3
  • 16
  • 23
138
votes
20 answers

HTML5 canvas ctx.fillText won't do line breaks?

I can't seem to be able to add text to a canvas if the text includes "\n". I mean, the line breaks do not show/work. ctxPaint.fillText("s ome \n \\n
thing", x, y); The above code will draw "s ome \n
thing", on one line. Is this a…
Spectraljump
  • 4,189
  • 10
  • 40
  • 55
136
votes
9 answers

How to delete and replace last line in the terminal using bash?

I want to implement a progress bar showing elapsed seconds in bash. For this, I need to erase the last line shown on the screen (command "clear" erases all the screen, but I need to erase only the line of the progress bar and replace it with the new…
Debugger
  • 9,130
  • 17
  • 45
  • 53
130
votes
22 answers

Xcode duplicate/delete line

Coming from Eclipse and having been used to duplicate lines all the time, it's pretty strange finding out that Xcode has no such function. Or does it? I know it's possible to change the system wide keybindings but that's not what I'm after.
Summer
  • 1,494
  • 2
  • 10
  • 10
124
votes
7 answers

Wrapping chained method calls on a separate line in Eclipse for Java

I haven't been successful in figuring out how to wrap each method call in Eclipse. For example, I have this: someObject.A().B().C(); But I really want this: someObject.A() .B() .C(); Nothing under the "Line Wrapping" section in…
Johann
  • 1,977
  • 3
  • 19
  • 18
102
votes
10 answers

Disable warning in IntelliJ for one line

I have a Java code line where IntelliJ displays a warning. How do I silence the warning in that particular line, without affecting warnings displayed in other lines? In this question it's irrelevant what the actual warning is: now I'm not seeking…
kat
  • 1,955
  • 4
  • 15
  • 13
99
votes
3 answers

Vim Macro on Every Line of Visual Selection

I'd like to run a macro on every line in a selection, rather than totalling up the number of lines in my head. For instance, I might write a macro to transform: Last, First Into First Last and I'd like it to run on all these lines: Stewart, John…
Stefan Mai
  • 23,367
  • 6
  • 55
  • 61
92
votes
8 answers

Line history viewer - Git

I wondered if any of you knew of a tool that would allow me to select a line in my code and then view a list view of the history of that line on a commit-by-commit basis. Does anyone know of such a tool?
David.LPower
  • 1,083
  • 2
  • 10
  • 14
87
votes
13 answers

draw diagonal lines in div background with CSS

I have a div for a preview box: .preview-content { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAGklEQVQIW2NkYGD4D8SMQAwGcAY2AbBKDBUAVuYCBQPd34sAAAAASUVORK5CYII=) repeat; width: 100%; min-height:…
Ing. Michal Hudak
  • 5,338
  • 11
  • 60
  • 91
85
votes
10 answers

How do I compute the intersection point of two lines?

I have two lines that intersect at a point. I know the endpoints of the two lines. How do I compute the intersection point in Python? # Given these endpoints #line 1 A = [X, Y] B = [X, Y] #line 2 C = [X, Y] D = [X, Y] # Compute…
bolt19
  • 1,963
  • 4
  • 32
  • 41
85
votes
14 answers

Making PHP var_dump() values display one line per value

When I echo var_dump($_variable), I get one long, wrapping line with all varable's and values like ["kt_login_user"]=> string(8) "teacher1" ["kt_login_id"]=> string(3) "973" ["kt_campusID"]=> string(4) "9088" ["kt_positionID"]=> string(1) "5"…
user1320318
  • 889
  • 1
  • 6
  • 7
79
votes
5 answers

Line Break in XML formatting?

when editing a String in XML I need to add line breaks. And I wanted to ask what is the RIGHT form when programming for android? Because
works but ECLIPSE marks the area as problematic. If I check out suggestions Eclipse tells me that I shall…
Oliver Goossens
  • 1,903
  • 3
  • 20
  • 26
70
votes
4 answers

Plotting numerous disconnected line segments with different colors

I have a set of data records like this: (s1, t1), (u1, v1), color1 (s2, t2), (u2, v2), color2 . . . (sN, tN), (uN, vN), colorN In any record, the first two values are the end-points of a line segment, the third value is the color of that line…
Rabih Kodeih
  • 9,361
  • 11
  • 47
  • 55