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
1 answer

"Flying past" in line algorithm?

Mostly everything is perfect with this code. import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.swing.*; public class Main { public static void main(String[] args) { new Main(); …
tckmn
  • 57,719
  • 27
  • 114
  • 156
2
votes
1 answer

How to draw a transparent line?

I am drawing a solid blue line on a JPanel via public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; super.paint(g2); if (path.size() >= 2) { BasisStroke stroke = new BasicStroke(Config.TILE_SIZE_IN_PIXEL / 3,…
k0pernikus
  • 60,309
  • 67
  • 216
  • 347
2
votes
1 answer

How to put product brand in sale order line?

I installed the product_brand module for OpenERP 6.1. Through web client, I managed to show the product brand in the product list page by inherited the product.product.tree view through debug (developer) mode by inserting the product_brand_id…
2
votes
3 answers

how to resize the wpf line automatically?

I have a WPF project where i had to plot some lines in the project. But when i resize the window, the lines wouldn't resize because i using the canvas coordinate to plot the line. Anyone show me how to make the line resize vary to the window…
Nerdynosaur
  • 1,798
  • 9
  • 32
  • 61
2
votes
2 answers

Draw and estimate the lenght of a line in a image using matlab

I would like to draw a line between two edges on a grayscale image and estimate its length. Need to estimate the diameter of the femoral head. I have tried using houghlines and finally plot (see below) but can't get the code right. I am new to…
carro
  • 109
  • 1
  • 1
  • 6
2
votes
1 answer

Unable to read line from text file into string

I have a text file that looks something like this user1|password1 user2|password2 I have a string, say "user1|password1". I need to compare each line of the text file with this string. FILE *fp; fp = fopen("user_info_file.txt", "r"); …
user1825770
  • 359
  • 1
  • 6
  • 17
2
votes
3 answers

Highlight entire line when there are matches

Does anyone know how to highlight the entire line if there is or if there are matches after doing a search. p.e. I do a search for /user Now I want to highlight the entire line if there are matches. EDIT I want to use the highlighting as in the…
Reman
  • 7,931
  • 11
  • 55
  • 97
2
votes
2 answers

EMACS: extending/expanding region so that it embraces whole lines

I have this neat function in my init-file: (defun comment-or-uncomment-region-or-line() "Comments or uncomments the region or the current line if there's no active region." (interactive) (let (beg end) (if (region-active-p) (setq beg…
Alexander Shukaev
  • 16,674
  • 8
  • 70
  • 85
2
votes
4 answers

How to print lines from a file with multiple conditions in Python?

I got a short question regarding python: How to do read specific lines from a file? By using multiple filters, bellow is my current code that doesn't show the expected results for me: for line in loglist: if (str('send') and str('packet')) in…
psilos
  • 21
  • 2
2
votes
3 answers

Reading different length lines from a file

I want to be able to make a loop that reads line by line, then captures the digits in the beginning of each line into an int array, and the characters in a 2d character array. I thought I could have a loops like, while (fscanf(file, "%d %c %c %c",…
2
votes
1 answer

Drawing a line between 2 points using Google Maps

My problem is that I want to create a method that when I invoke it giving it two GeoPoint's I want it to draw a line between the two points and I haven't been able to do this. Thanks in advance. public class MyOverlays extends…
andre
  • 159
  • 1
  • 11
2
votes
1 answer

How to obtain a contour from points with OpenCV

I'm trying to obtain a ROI from an image using VC++ and OpenCV. I managed to display an image, get the coordinates of a point when I click on it, store these coordinates in a vector and draw lines between these points on my image. Here is my…
alvinleetya
  • 454
  • 2
  • 7
  • 19
2
votes
2 answers

Java Swing: how to render a combobox with different line style?

I would like to have a ComboBox displaying some different line styles, such as solid, dotted, dashed etc. How to create a custom render to accomplish this? Thanks all.
Alberto acepsut
  • 1,972
  • 10
  • 41
  • 87
2
votes
3 answers

Collision of dot and line in 2D space

So I'm trying to make my first game on android. The thing is I have a small moving ball and I want it to bounce from a line that I drew. For that I need to find if the x,y of the ball are also coordinates of one dot from the line. I tried to…
Anderiel
  • 173
  • 2
  • 13
2
votes
0 answers

AChartEngine, dynamic line plotting, crashing

I am a newbie in programming apps for android. I am trying do plot realtime data with achartengine. The problem is that the application crashes, after the while. The problem is the repaint-method and adding new data to the graph, should be Problems…
Abdul E.
  • 21
  • 1