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
2
votes
3 answers

Is there a fast way of accessing line in AWS S3 file?

I have a collection of JSON messages in a file stored on S3 (one message per line). Each message has a unique key as part of the message. I also have a simple DynamoDB table where this key is used as the primary key. The table contains the name of…
I Z
  • 5,719
  • 19
  • 53
  • 100
2
votes
1 answer

Replacing one line of code with another in vim?

I have one line of code that I need to replace in Vim. I need to replace one line of code errors += 1; to errors++; just to simplify it. When I do :%s/errors += 1;/errors++;/a I get E488:Trailing Characters. Does anyone know how to do this?
homersimpson
  • 4,124
  • 4
  • 29
  • 39
2
votes
2 answers

OpenGL: Draw line with point and directon vector

I had seen OpenGL statement to draw a line using two points. However, my requirement is to draw a line using the following detail a point on a line Direction Vector Im developing function in c++ using openGL library. Any help is most appreciated.
Ria
  • 225
  • 1
  • 7
  • 18
2
votes
3 answers

How can I find the points in a line - Objective c?

Consider a line from point A (x,y) to B (p,q). The method CGContextMoveToPoint(context, x, y); moves to the point x,y and the method CGContextAddLineToPoint(context, p, q); will draw the line from point A to B. My question is, can I find the all…
Confused
  • 3,846
  • 7
  • 45
  • 72
2
votes
3 answers

sed replace 1st occurence of string after string match on previous line

I have a question which I really hope to find the answer. These is a file with several lines that are the same, but I just want to replace the 1st occurence after a match. I want to change the first Iam2 to Iwas2 after [blabla] line. …
bryan
  • 39
  • 2
  • 4
2
votes
0 answers

Is it possible to create a "line object" in Android?

I want to draw a line and set a click listener on it. When I click the line, a dialog will display. I know how to draw a line on the view, but I want to create something like "a line object", so that I can control and set listener on it. If anyone…
Wawa Chen
  • 21
  • 1
2
votes
3 answers

Match if previous line starts with character

I have a file, that looks like this: expression1 - expresson1.1 - expressoion1.2 expression2 -expression2.1 expression3 -expression3.1 -expression3.2 -expression3.3 What I want to do is, delete lines 1.2, 3.2 and 3.3, so only lines that do not…
S Koeberl
  • 23
  • 3
2
votes
1 answer

Strange abline behaviour

I am currently trying to graph a time series of a price spread and then add an abline with a regression. Currently this is just a AR(1) because I wanted to get the plot right before starting. The data is from a .XLS and is organized as such in…
IMA
  • 261
  • 2
  • 10
2
votes
3 answers

Display the second line of a string in java

Given a String like : String str= "line1 line2 line3 line4"; How to display one specific line? For example the third one, like System.out.println([...]str[...]); which in terminal will display: line3
mastermind
  • 161
  • 1
  • 2
  • 8
2
votes
3 answers

Python: re-formatting multiple lines in text file

I apologize if this post is long, but I am trying to be as detailed as possible. I have done a considerable amount of research on the topic, and would consider myself an "intermediate" skilled programmer. My problem: I have a text file with…
2
votes
1 answer

Compute length of segment intersecting a polygon in 2D

Given a segment S and a polygon P, is there a fast algorithm that returns the total length of the subsegments of S crossing polygon P? Note: P is defined by a closed LineString (i.e.: an array of points where the first and last one are equal). P…
Sergio
  • 1,139
  • 14
  • 24
2
votes
3 answers

How to delete double lines in bash

Given a long text file like this one (that we will call file.txt): EDITED 1 AA 2 ab 3 azd 4 ab 5 AA 6 aslmdkfj 7 AA How to delete the lines that appear at least twice in the same file in bash? What I mean is that I want to have this result: 1 AA 2…
user1619114
  • 131
  • 1
  • 2
  • 9
2
votes
3 answers

JavaFX 2.x : How to Remove XY Line Chart once plotted?

I have a simple serie plotted on a XY Line Chart as below public class SimpleXYLineChart extends Application { @Override public void start(Stage stage) { stage.setTitle("Line plot"); final CategoryAxis xAxis = new…
Alberto acepsut
  • 1,972
  • 10
  • 41
  • 87
2
votes
1 answer

Vim, do an operation after going to a specific line

In Vim you can travel to a given line by entering vim's command mode and enter that given line's number there. I want a specific operation to always take place after moving to a line number in that way. How do I do that? This is intended to adjust…
john-jones
  • 7,490
  • 18
  • 53
  • 86
2
votes
1 answer

plotting smoothed lines in qplot in R

My issue is that I'd like to know how to plot smoothed lines in qplot in R, except without the gray bands around them. For instance, when I write this: qplot(wt, mpg, data=mtcars, geom=c("smooth"), color=factor(cyl), method="lm", formula = y ~…
user1165686
  • 21
  • 1
  • 4
1 2 3
99
100