line-count

D2010 compiled line count discrepancy

天涯浪子 提交于 2019-12-05 02:06:28
When building a project there are two places where source line count is reported: On the compile progress dialog Under Project | Information In Delphi 2007 these two numbers were identical for the project we are building. In Delphi 2010 these two numbers are wildly different. The (1st) count is larger by a count of 1 million lines or 40%. The (2nd) count is close enough to the Delphi 2007 count to be satisfied the correct files are being built accounting for code changes in porting to D2010. Alternative versions of source files simply do not exist in the build environment. So the question is:

Eclipse count lines of code

ⅰ亾dé卋堺 提交于 2019-12-04 07:23:12
问题 I've tried the Metrics plugin and although it's nice and all, it's not what my boss is looking for. It counts a line with just one } as a line and he doesn't want that to count as "its not a line, its a style choice". I also need to generate some form of report about the metrics provided. Are there any good tools for this? 回答1: Install the Eclipse Metrics Plugin. To create a HTML report (with optional XML and CSV) right-click a project -> Export -> Other -> Metrics . You can adjust the Lines

GIT contribution per author (lines)

空扰寡人 提交于 2019-12-03 07:33:35
I'm trying to print the per-line contribution of each author to a Git repository. For that, I use the following command, adapted from How to count total lines changed by a specific author in a Git repository? git ls-tree -r -z --name-only HEAD -- */*.c | xargs -0 -n1 git blame \ --line-porcelain HEAD |grep "^author "|sort|uniq -c|sort -nr However, I get the following error: fatal: cannot stat path 'HEAD': No such file or directory. What am I doing wrong? morne Okay, after more investigation I found this on SO. git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*?\((.*?)\s+[\d]{4}/;

Eclipse count lines of code

*爱你&永不变心* 提交于 2019-12-02 13:53:32
I've tried the Metrics plugin and although it's nice and all, it's not what my boss is looking for. It counts a line with just one } as a line and he doesn't want that to count as "its not a line, its a style choice". I also need to generate some form of report about the metrics provided. Are there any good tools for this? Install the Eclipse Metrics Plugin . To create a HTML report (with optional XML and CSV) right-click a project -> Export -> Other -> Metrics . You can adjust the Lines of Code metrics by ignoring blank and comment-only lines or exclude Javadoc if you want. To do this check

(Python) Counting lines in a huge (>10GB) file as fast as possible [duplicate]

霸气de小男生 提交于 2019-11-30 04:54:54
This question already has an answer here: How to get line count cheaply in Python? 37 answers I have a really simple script right now that counts lines in a text file using enumerate() : i = 0 f = open("C:/Users/guest/Desktop/file.log", "r") for i, line in enumerate(f): pass print i + 1 f.close() This takes around 3 and a half minutes to go through a 15GB log file with ~30 million lines. It would be great if I could get this under two minutes or less, because these are daily logs and we want to do a monthly analysis, so the code will have to process 30 logs of ~15GB - more than one and a half

Why does line count change so much from D2007 to D2010?

烂漫一生 提交于 2019-11-30 03:12:43
问题 Our app at work is a huge project with over 3000 units, weighing in about 3.5 million lines of code. ...or at least it was when we were compiling it under D2007. We recently updated to D2010, and now if we run a full build, the line count finally stops at about 4.9 million. Same DPR, same code base, same everything, but the compiler's somehow running over about 40% more lines of code in the build cycle and nobody here knows why. Just to make things more confusing, after building, we can go to

Can you get the number of lines of code from a GitHub repository?

谁说我不能喝 提交于 2019-11-28 14:55:51
In a GitHub repository you can see “language statistics”, which displays the percentage of the project that’s written in a language. It doesn’t, however, display how many lines of code the project consists of. Often, I want to quickly get an impression of the scale and complexity of a project, and the count of lines of code can give a good first impression. 500 lines of code implies a relatively simple project, 100,000 lines of code implies a very large/complicated project. So, is it possible to get the lines of code written in the various languages from a GitHub repository, preferably without

Fastest way to find the number of lines in a text (C++)

巧了我就是萌 提交于 2019-11-28 04:33:27
I need to read the number of lines in a file before doing some operations on that file. When I try to read the file and increment the line_count variable at each iteration until i reach eof. It was not that fast in my case. I used both ifstream and fgets . They were both slow . Is there a hacky way to do this, which is also used by, for instance BSD, Linux kernel or berkeley db.(may be by using bitwise operations). As I told before there are millions of lines in that file and it keeps get larger, each line has about 40 or 50 characters. I'm using Linux. Note: I'm sure there will be people who

(Python) Counting lines in a huge (>10GB) file as fast as possible [duplicate]

不想你离开。 提交于 2019-11-27 13:51:47
问题 This question already has an answer here: How to get line count of a large file cheaply in Python? 38 answers I have a really simple script right now that counts lines in a text file using enumerate() : i = 0 f = open("C:/Users/guest/Desktop/file.log", "r") for i, line in enumerate(f): pass print i + 1 f.close() This takes around 3 and a half minutes to go through a 15GB log file with ~30 million lines. It would be great if I could get this under two minutes or less, because these are daily

Count number of lines in a git repository

扶醉桌前 提交于 2019-11-27 09:55:15
How would I count the total number of lines present in all the files in a git repository? git ls-files gives me a list of files tracked by git. I'm looking for a command to cat all those files. Something like git ls-files | [cat all these files] | wc -l xargs will do what you want: git ls-files | xargs cat | wc -l But with more information and probably better, you can do: git ls-files | xargs wc -l ephemient git diff --stat 4b825dc642cb6eb9a060e54bf8d69288fbee4904 This shows the differences from the empty tree to your current working tree. Which happens to count all lines in your current