The line number (position) of a line of text or code inside a file, often for debugging.
Questions tagged [line-numbers]
369 questions
0
votes
0 answers
LineNumbers in RichTextBox WPF
How to get linenumbers in RichtextBox in WPF. I did take a look at the AvalonEdit in codeproject http://www.codeproject.com/Articles/42490/Using-AvalonEdit-WPF-Text-Editor. However, it looks quite complicated just for the feature I am looking at. I…

savi
- 497
- 2
- 12
- 27
0
votes
4 answers
Difficulty while finding no of lines in a file using java?
While find out no of line in a file, it displays more number of lines.
for example in my file having only 26 line in word document. But while count using java program it displays 118.
File f=new…

Venkat
- 20,802
- 26
- 75
- 84
0
votes
2 answers
vim: start line number for each section of a file
I am working on a file which divided into several sections. I knew in vim there are set nu and set rnu for setting line numbering or relative line numbering on all lines. I wonder vim can setup line numbering so that each section has its own line…

litd
- 281
- 1
- 3
- 4
0
votes
1 answer
How do I pass line number to a method
In Visual Stuido 2013, working in C# (.Net 4.5), how can I pass a line number to a method call. I recall in C there was a #pragma lineNumber to do this, but searching on those terms brings up nothing.
I want to write a method something like…

philologon
- 2,093
- 4
- 19
- 35
0
votes
2 answers
Why the result is not correct using python to know the line numbers of a file
I want to know the line numbers of a certain file
Following is the code
But the result is not correct:The true file line number == Console result number + 1
is the problem in "open().readlines()" ?
if there are contents in the last line, the result…

Sam
- 409
- 1
- 7
- 16
0
votes
1 answer
using c# how to Print Line number of randomly selected line from parsed file
this is a snippet of my program that catches an incomplete line in the file, however I need it to tell me the line number that it pulled so I can do error handling better.
var testLines = File.ReadAllLines(openFileDialog1.FileName);
Item.ran…

VincEclipsE
- 69
- 5
0
votes
1 answer
How to get runtime error line number in CodeDom?
For example, the code below can complile ok, but throw an exception at runtime.
My question is, how to get the runtime error line number ? Thanks.
using System;
using System.Collections.Generic;
using System.Text;
namespace mytempNamespace {
…

yiketudou
- 1
- 2
0
votes
1 answer
Vim -- Enumerate Lines in Base26
Is there any standard way to specify the set of characters that vim uses to enumerate lines? For example, instead of numbers in succession, could I use lower-case letters {a, b, ..., aa, ab, ac, ...} (or even better, use only the characters in a…

Polytope
- 13
- 4
0
votes
1 answer
Hadoop streaming with Python: Keeping track of line numbers
I am trying to do what should be a simple task: I need to convert a text file to upper case using Hadoop streaming with Python.
I want to do it by using the TextInputFormat which passes file position keys and text values to the mappers. The problem…

rleelr
- 1,854
- 17
- 26
0
votes
0 answers
how to reduce line number when wordwrap on and off
I developed a notepad application . In that i used Line Numbers and wordwrap and all.
My Problem is when i click wordwrapItem.Click=false it will not reduce the line number in
Label. This is My Code:
private void UpdateNumberLabel
{
Point pos =…

Dharani Radhakrishnan R
- 43
- 2
- 7
0
votes
0 answers
Obtaining line number in stack trace on solaris
In my C++ program I have a function that prints the current callstack at runtime, like this:
int printFct(uintptr_t pc, int sig, void* usrarg)
{
Dl_info dlip;
if (dladdr((void *)pc, &dlip))
{
char buf[100+1]; *buf= 0;
if…

user826955
- 3,137
- 2
- 30
- 71
0
votes
1 answer
Need debug information for .NET assembly in Release
When an error occurs in any of my .NET assemblies the user just gets a generic error saying "MyApp has encountered a problem and needs to close. We are sorry for the inconvenience." I would like the user to to see the error message and line number…

Jeff Stock
- 3,796
- 12
- 46
- 61
0
votes
2 answers
Read File in chunks and then read line by line using LineNumberReader. Repeat this activity
I have a file containing some 6.5 lakh lines. Now I wish to read every line of this file using LineNumberReader.
However I am encountering an outofMemoryError on adding these many number of lines to another 3rd party library..
What I intend to do…

AngelsandDemons
- 2,823
- 13
- 47
- 70
0
votes
1 answer
Which Javascript code editor supports plain text line numbering?
I need to add a text area that also has line numbering capabilities. I tried EditArea, but I couldn't make it work with text files. It would be ideal if it could highlight syntax for existing programming languages, but that would only be a side…

Geo
- 93,257
- 117
- 344
- 520
0
votes
1 answer
Print text from specific line number of an HTML file
I'm trying to find a way to print the text from a specific line number of an HTML file.
I've found ways to print the line numbers of a text search, but I want to do the reverse, printing the text of the line number, where the line number stays…

JonaK
- 129
- 1
- 8