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
22
votes
6 answers

Line break on mobile phone only

I have a phone number on a website. It looks good on a laptop, but on a mobile device half of the number jumps to the next line. It doesn't look good. So how can I create a line break that will only work on a mobile device sized screen? I am not…
Henrik
  • 229
  • 1
  • 3
  • 7
22
votes
2 answers

How to Convert Videos on VLC batch/CLI?

I need to do a mass-conversion of videos from a video recorder in the .mod format, to other file formats, e. g. .mp4. How and where can I find detailed specifications and information about VLC's various CLI options and commands, required for…
22
votes
4 answers

Is there any super fast algorithm for finding LINES on picture?

So I have Image like this (source: de-viz.ru) I want to get something like this (I hevent drawn all lines I want but I hope you can get my idea) (source: narod.ru) I need some super fast algorithm for finding all straight lines on it. I want to…
Rella
  • 65,003
  • 109
  • 363
  • 636
22
votes
3 answers

How to draw line in OpenGL?

I want to draw a line in OpenGL. glBegin(GL_LINES); glVertex2f(.25,0.25); glVertex2f(.75,.75); glEnd(); This code draws the line, but if I want to draw a line from coordinate (10,10) to coordinate (20,20) what should I do? What do (.25,…
Abu Yousuf
  • 5,729
  • 3
  • 31
  • 50
21
votes
2 answers

Confirm line delete

I have created a function to search all double lines in a file. I use the "line-number"g/.*/d to delete the line. However I would like to confirm if a line has to be deleted or not, like the s/..//gc command Is it possible to delete a certain line…
Reman
  • 7,931
  • 11
  • 55
  • 97
21
votes
5 answers

Filter lines from a text file which contain a particular word

I want to write a program which filters the lines from my text file which contain the word "apple" and write those lines into a new text file. What I have tried just writes the word "apple" in my new text file, whereas I want whole lines.
ahmad
  • 219
  • 1
  • 2
  • 3
21
votes
6 answers

How to draw a line on an image in matlab?

I have two points lets say: P(x,y) [point lies at the top of image] P'(x',y') [point lies at bottom of image] Now i want to draw a line betwen these two points....and the line should appear on image means should be visible. how to do this????
chee
  • 979
  • 7
  • 18
  • 27
21
votes
3 answers

Adb install progress bar

I'm a beginner at this so just mind me if I ask anything obvious. I'm trying to install an apk to my device using adb install apk.apk however, the apk is around a few hundred MB big and it takes some time. Is there some sort of progress bar that I…
Jeezy
  • 211
  • 1
  • 2
  • 3
21
votes
3 answers

c# How to read and write from multiline textBox line by line?

I have a simple program it has a function to read a line from multiline textBox when i press a button what i made to do that is this code : TextReader read = new System.IO.StringReader(textBox1.Text); int rows = 100; string[] text1 = new…
Manar Al Saleh
  • 365
  • 1
  • 2
  • 11
21
votes
1 answer

JavaFx 2.x : How to draw dashed or dotted lines?

I would like to dynamically change the draw of a line from solid, dotted or dashed: it seems I have to use line.setStroke, is it the correct method? And, how to accomplish this? Thanks
Alberto acepsut
  • 1,972
  • 10
  • 41
  • 87
21
votes
6 answers

SVG/CSS stroke dashed line with two colors - is it possible?

Is it possible to use CSS to define a line (or shape edge) with two alternating colors that are dashed? That is, if 1 and 2 are different colored pixels, then 1212121212121212 or 112211221122 I basically want some way to use stroke-dasharray with…
Andrew Mao
  • 35,740
  • 23
  • 143
  • 224
20
votes
10 answers

How can I tell if a point belongs to a certain line?

How can I tell if a point belongs to a certain line? Examples are appreciated, if possible.
Wahid Bitar
  • 13,776
  • 13
  • 78
  • 106
20
votes
3 answers

Draw a line in a JPanel with button click in Java

I want to draw a line in a JPanel. This is my GUI and I want a line in the JPanel in white. I find many examples but the problem is the how to use it. In many exmples, always they draw in a JFrame that extends from a JPanel. I want to add the Panel…
Ali Ben Messaoud
  • 11,690
  • 8
  • 54
  • 87
20
votes
3 answers

How to print a numpy.array in one line?

I tested PyCharm and IDLE, both of them print the 7th number to a second line. Input: import numpy as np a=np.array([ 1.02090721, 1.02763091, 1.03899317, 1.00630297, 1.00127454, 0.89916715, 1.04486896]) print(a) Output: [ 1.02090721 …
lanselibai
  • 1,203
  • 2
  • 19
  • 35
20
votes
3 answers

How can I check if a point is below a line or not ?

How can I check if a point is below a line or not ? I've the following data: Line [ {x1,y1}, {x2,y2} ] Points {xA,yA}, {xB,yB} ... I need to write a small algorithm in python to detect points on one side and the other side of the line. thanks
aneuryzm
  • 63,052
  • 100
  • 273
  • 488