Questions tagged [lines]

This tag can refer to rows of characters in text output or input, or to the shortest distance between two points.

This tag can refer to:

  • rows of characters in text output or input;
  • the shortest distance between two points (see also: ).
1223 questions
8
votes
2 answers

BufferedReader.readLine() waits for input from console

I am trying to read lines of text from the console. The number of lines is not known in advance. The BufferedReader.readLine() method reads a line but after the last line it waits for input from the console. What should be done in order to avoid…
ambar
  • 2,053
  • 6
  • 27
  • 32
8
votes
2 answers

Android - show grid lines on camera

I am newbie in android application development. I want to create an application that get stream from camera and show on SurfaceView or on FrameLayout. I need an option shows above on streaming "Show Grid Lines", when user click on it grid lines…
mohsin.mr
  • 498
  • 1
  • 6
  • 21
7
votes
8 answers

Select random 3000 lines from a file with awk codes

I want to select randomly 3000 lines from a sample.file which contains 8000 lines. I will do that with awk codes or do from command line. How can I do that?
user951487
  • 845
  • 7
  • 19
  • 30
7
votes
3 answers

Drawing multiple lines in a BufferedImage

I am trying to draw horizontal and vertical lines on a bufferedimage. It should end up looking like a grid of cells. But when I run the code, I see only two lines: the leftmost line and the topmost line (ie. a line from 0,0 to 0,height of image &…
Adith
  • 165
  • 2
  • 2
  • 5
7
votes
1 answer

Matplotlib Plot Lines Above Each Bar

I would like to plot a horizontal line above each bar in this chart. The y-axis location of each bar depends on the variable 'target.' I want to use axhline, if possible, or Line2D because I need to be able to modify the line style, color, length,…
Dance Party2
  • 7,214
  • 17
  • 59
  • 106
7
votes
3 answers

Indenting all lines inside textarea

Is it possible to text indent each line in a textarea? I'm using a handwritten font and the first letter on each line is getting cut off slightly. I've already used padding and margin, but this does not work. Many thanks. Erik
Erik
  • 5,701
  • 27
  • 70
  • 119
7
votes
3 answers

Three.js buffergeometry disappears after moving camera to close

My buffergeometry disappears after moving the camera to close. You can also see that in drawcalls Three.js example that has TrackballControls. In my case it's alot worser. My points disappear at the distance from 0 to 400 and my lines disappear at…
A. I.
  • 127
  • 2
  • 8
7
votes
1 answer

Add lines to the top of a memo in Delphi

The function Memo.Lines.Add('Some text') in Delphi adds the string to the bottom of the memo. Is there any function which adds the text to the top? For example, if the Lines property of the Memo contains: string 1 string 2 string 3 I want to add a…
Tim Lâm
  • 124
  • 1
  • 2
  • 13
7
votes
1 answer

bash script echo arguments into separate lines

I have to write this script to separate arguments entered in the command line. Here is the script so far: # template.sh function usage { echo "usage: $0 arguments ..." if [ $# -eq 1 ] then echo "ERROR: $1" fi } # Script starts after this…
PFKrang
  • 229
  • 2
  • 7
  • 17
7
votes
2 answers

Add a normal distribution line in histogram

I've met a weird problem that I can't figure it out totally. I'm supposed to add a normal distribution line upon a histogram.I input every step's code but after typing lines function there's no response. I don't know what's wrong.Hope anyone help…
zhang525986
  • 203
  • 2
  • 4
  • 6
7
votes
4 answers

Find most frequent line in file in bash

Suppose I have a file similar to as follows: Abigail 85 Kaylee 25 Kaylee 25 kaylee Brooklyn Kaylee 25 kaylee 25 I would like to find the most repeated line, the output must be just the line. I've tried sort list | uniq -c but I need clean output,…
user1478993
  • 121
  • 2
  • 6
7
votes
1 answer

Vertical white lines when plotting heatmap in TIFF

When I plot a matrix with the image function as a TIFF file, I often get vertical or horizontal lines. My matrix is of 150000 rows x 2000 columns, the lines also appears when plotting matrices of 150000 rows x 100 columns. The results are the…
Benoit B.
  • 11,854
  • 8
  • 26
  • 29
6
votes
2 answers

How do I iterate over all the lines output by a command in zsh?

How do I iterate over all the lines output by a command using zsh, without setting IFS? The reason is that I want to run a command against every file output by a command, and some of these files contain spaces. Eg, given the deleted file: foo/bar…
Arafangion
  • 11,517
  • 1
  • 40
  • 72
6
votes
6 answers

Is a line in a Java program the same thing as a statement?

I'm a Java noob. I've only used it for a few days and I'm still trying to figure it all out. In a program, is a line the same thing as a statement?
Benny
  • 71
  • 2
6
votes
2 answers

How to limit JTextArea max Rows and Columns?

I am using JTextArea in JScrollPane I want to limit the maximum number of lines possible and the maximum chars in each line. I need that the string will be exactly like on the screen, each line will end with '\n' (if there another line after it) and…
Billbo bug
  • 358
  • 2
  • 5
  • 8