Top "Line-numbers" questions

The line number (position) of a line of text or code inside a file, often for debugging.

How can I determine the current line number in JavaScript?

Does JavaScript have a mechanism for determining the line number of the currently executing statement (and if so, what is …

javascript line-numbers
Git diff with line numbers (Git log with line numbers)

When I do a git diff or a git log -p, how do I get line numbers of the source …

git line-numbers
Show line number in exception handling

How would one display what line number caused the error and is this even possible with the way that .NET …

c# .net exception exception-handling line-numbers
search text file using c# and display the line number and the complete line that contains the search keyword

I require help to search a text file (log file) using c# and display the line number and the complete …

c# command-line text streamreader line-numbers
How can I use #pragma message() so that the message points to the file(lineno)?

In order to add 'todo' items into my code, I want to put a message in the compiler output. I …

c++ visual-studio-2010 pragma line-numbers predefined-macro
How can I print source line number in Perl?

Is it possible to get the current source line number in Perl? The equivalent in C++ is __LINE__.

perl line-numbers
Is there an easy way to tell which line number a file pointer is on?

In Python 2.5, I am reading a structured text data file (~30 MB in size) using a file pointer: fp = open('myfile.…

python text-files line-numbers
How to insert a counter into a Stream<String> .forEach()?

FileWriter writer = new FileWriter(output_file); int i = 0; try (Stream<String> lines = Files.lines(Paths.get(input_file))) { …

java foreach java-stream line-numbers
Read lines by number from a large file

I have a file with 15 million lines (will not fit in memory). I also have a small vector of line …

r large-files line-numbers
Number of lines from XCode project

Is there a way to determine how many lines of code an Xcode project contains? I promise not to use …

xcode line-numbers