Show a Foreach Loop Using a Flow Chart in JavaScript

Srinivas Gorla
Updated on 30-Jul-2019 22:30:21

1K+ Views

The following shows foreach loop using flow chart:

Difference Between Declaring a Variable Before or In a Java Loop

Giri Raju
Updated on 30-Jul-2019 22:30:21

147 Views

Performance wise, there is hardly any difference. But it is good to keep a variable local to the scope it is used. So declaring a variable inside Java loop is generally preferred.

Replace Characters on String in Java

Ramu Prasad
Updated on 30-Jul-2019 22:30:21

359 Views

The replace method of the String class accepts two characters and it replaces all the occurrences of oldChar in this string with newChar.Example Live Demoimport java.io.*; public class Test {    public static void main(String args[]) {       String Str = new String("Welcome to Tutorialspoint.com");       System.out.print("Return Value :" );       System.out.println(Str.replace('o', 'T'));       System.out.print("Return Value :" );       System.out.println(Str.replace('l', 'D'));    } }OutputReturn Value :WelcTme tT TutTrialspTint.cTm Return Value :WeDcome to TutoriaDspoint.com

Why There is No Do-While Loop in Python

Pythonista
Updated on 30-Jul-2019 22:30:21

1K+ Views

PEP 315 (Python Enhancement Proposal) to include do..while statement has been rejected because it doen't fit in the general format of indented block statement: indented block used by every other Python compound statement. In words of Guido Van Rossum -  "Please reject the PEP. More variations along these lines won't make the language more elegant or easier to learn. They'd just save a few hasty folks some typing while making others who have to read/maintain their code wonder what it means".

What is Immutable in Python

Jayashree
Updated on 30-Jul-2019 22:30:21

742 Views

Python defines variety of data types of objects. These objects are stored in memory. Contents of some objects can be changed after they are created while others can't be changed. Numeric objects such as integer, float and complex number objects occupy the memory and memory contents can not be changed. Such objects are called immutable. String and dictionary objects are also immutable. Tuple is also immutable. List object however is mutable because items in a list object can be modified, deleted or added in a list.

Password Blacklist Table in SAP HANA Database

SAP ABAP Expert
Updated on 30-Jul-2019 22:30:21

735 Views

The password blacklist in SAP HANA is implemented with the table _SYS_PASSWORD_BLACKLIST in the schema _SYS_SECURITY. This table is empty when you create a new instance.You can enter words in the password blacklist as part of password policy configuration in the Security editor of the SAP HANA studio.

Come Out of an Infinite Loop in Python

Pythonista
Updated on 30-Jul-2019 22:30:21

384 Views

A loop is said to be an infinite loop when it doesn't stop on its own. It needs to be forcibly stopped by pressing ctrl-C to generate keyboard interrupt.

Export All Data from MySQL Table into a Text File

Ankitha Reddy
Updated on 30-Jul-2019 22:30:21

859 Views

It can be done with the help of SELECT … INTO OUTFILE statement. We are illustrating it with the help of the following example − Example Suppose we are having following data from table ‘Student_info’: mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History | | 105 | Gaurav | Chandigarh | Literature | | 125 | Raman | Shimla ... Read More

Repeating Character Classes in Python Regular Expressions

Rajendra Dharmkar
Updated on 30-Jul-2019 22:30:21

574 Views

A character class followed by operators like '?', '*' or '+' are called repeating character classes.If you repeat a character class by using the '?', '*' or '+' operators, you will repeat the entire character class, and not just the character that it matched. The regex '[0-9]+' can match '579' as well as '333'. If you want to repeat the matched character, rather than the class, you will need to use backreferences. '([0- 9])\1+' will match '333' but not “579”. When applied to the string “922226”, it will match '2222' in the middle of this string. If you do not ... Read More

Difference Between Lists and Tuples in Python

Malhar Lathkar
Updated on 30-Jul-2019 22:30:21

662 Views

List and Tuple are called as sequence data types of Python. Objects of both types are comma separated collection of items not necessarily of same type. However, main difference between list and tuple is that list object is mutable whereas tuple object is immutable. Immutable object can not be modified once it is created in memory. Hence it is not possible to add, modify or remove item from tuple object. On the other hand these operations can be performed on a list.

Advertisements