Thursday, June 16, 2022

cloc – Count Lines of Code in Many Programming Languages

 

While working on different projects, sometimes you might be required to provide a report or statistics of your progress, or simply to calculate the value of your code.

There is this simple yet powerful tool called “cloc – count lines of code” that allows you to count all number of your code and exclude comments and blank lines at the same time.

It is available in all major Linux distributions and supports multiple programming languages and file extensions and does not have any specific requirements to be used.

In this tutorial you are going to learn how to install and use cloc on your Linux system.

 

Use this  link  to  complete  article    :-  https://www.tecmint.com/cloc-count-lines-of-code-in-linux/

Wednesday, January 12, 2022

Using Special Characters in Strings in Java

When a string is being created or displayed, its text must be enclosed within double quotation marks to indicate the beginning and end of the string. These quotation marks are not displayed, which brings up a good question: What if you want to display double quotation marks?

To display them, Java has created a special code that can be put into a string: \". Whenever this code is encountered in a string, it is replaced with a double quotation mark. For example, examine the following:

System.out.println("Jane Campion directed \"The Piano\" in 1993.");

This code is displayed as the following:

Jane Campion directed "The Piano" in 1993.

You can insert several special characters into a string in this manner. The following list shows these special characters; note that each is preceded by a backslash (\).

Special characters

Display

\'

Single quotation mark

\"

Double quotation mark

\\

Backslash

\t

Tab

\b

Backspace

\r

Carriage return

\f

Formfeed

\n

Newline


The newline character causes the text following the newline character to be displayed at the beginning of the next line. Look at this example:

System.out.println("Music by\nMichael Nyman");

This statement would be displayed as the following:

Music by
Michael Nyman
 
Reference :-  https://www.informit.com/articles/article.aspx?p=30241&seqNum=3 

The AI Driven Software Developer, Optimize Innovate Transform

  The AI-Driven Software Developer: Optimize, Innovate, Transform": AI Transformation in Software Development : Understand how AI is re...