Comparison between endl and in C++

Arjun Thakur
Updated on 30-Jul-2019 22:30:21

218 Views

"" Outputs a newline (in the appropriate platform-specific representation, so it generates a "\r" on Windows), but std::endl does the same and flushes the stream. Usually, you don't need to flush the stream immediately and it'll just cost you performance, so, for the most part, there's no reason to use std::endl.When you want to flush the stream manually -- e.g. because you expect your output to be made visible to the user in a timely fashion -- you should use std::endl instead of writing '' to the stream (whether as an isolated character or part of a string). Read More

Are MySQL Database and Table Names Case Sensitive?

Monica Mona
Updated on 30-Jul-2019 22:30:21

972 Views

Actually, the case sensitivity of database and table name depends a lot on the case sensitivity of the underlying operating system. Hence, we can say that such names are not case sensitive in Windows but are case sensitive in most varieties of Unix.

Set Outline Color with JavaScript

Sai Subramanyam
Updated on 30-Jul-2019 22:30:21

508 Views

To set outline color, use the outlineColor property in JavaScript. You can try to run the following code to learn how to implement outlineColor property − Example Live Demo #box { border: 2px solid red; } Demo Content Change outline color function display() { document.getElementById("box").style.outlineColor = "#FF5733"; document.getElementById("box").style.outline = "2px solid"; }

Convert Comma Separated String to ArrayList in Java

Sravani S
Updated on 30-Jul-2019 22:30:21

9K+ Views

To convert a comma separated String into an ArrayListSplit the String into an array of Strings using the split() method.Now, convert the obtained String array to list using the asList() method of the Arrays class.Example Live Demoimport java.util.Arrays; import java.util.List; public class Sample {    public static void main(String[] args) {       String myString = "JavaFx,Java,WebGL,OpenCV";       String[] myArray = myString.split(",");       System.out.println("Contents of the array ::"+Arrays.toString(myArray));       List myList = Arrays.asList(myArray);    } }OutputContents of the array ::[JavaFx, Java, WebGL, OpenCV]

Executing SQL Query in SAP HANA Studio

John SAP
Updated on 30-Jul-2019 22:30:21

2K+ Views

To run the query, click on green arrow button on top right corner  or press F8.

Constructors of StringBuilder Class in Java

Manikanth Mani
Updated on 30-Jul-2019 22:30:21

371 Views

The StringBuilder class of the java.lang package is a mutable sequence of characters. This provides an API compatible with StringBuffer, but with no guarantee of synchronization. Following are the list of constructors provided by the StringBuilder class.S.N.Constructor & Description1StringBuilder()This constructs a string builder with no characters in it and an initial capacity of 16 characters.2StringBuilder(CharSequence seq)This constructs a string builder that contains the same characters as the specified CharSequence.3StringBuilder(int capacity)This constructs a string builder with no characters in it and an initial capacity specified by the capacity argument.4StringBuilder(String str)This constructs a string builder initialized to the contents of the specified string. ... Read More

Delete Data from MySQL Table using PHP Script

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

380 Views

We can use the SQL DELETE command with or without the WHERE CLAUSE into the PHP function – mysql_query(). This function will execute the SQL command in a similar way it is executed at the mysql> prompt. To illustrate it we are having the following example − Example In this example, we are writing a PHP script to delete a record from MySQL table named ‘tutorial_tbl’ whose tutorial_id as 3.

Java String isEmpty Method Example

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

183 Views

The isEmpty() method of the String class returns true if the length of the current string is 0.Example Live Demoimport java.lang.*; public class StringDemo {    public static void main(String[] args) {       String str = "tutorialspoint";       //prints length of string       System.out.println("length of string = " + str.length());             //checks if the string is empty or not       System.out.println("is this string empty? = " + str.isEmpty());    } }Outputlength of string = 14 is this string empty? = false

Create MySQL View with GROUP BY Clause

Sai Subramanyam
Updated on 30-Jul-2019 22:30:21

2K+ Views

We can use GROUP BY to group values from a column, and, if we want, we can perform calculations on that column. You can use COUNT, SUM, AVG, etc., functions on the grouped column. To understand GROUP BY clause with views we are creating a view named ‘Info’ using the base table ‘Student_info’ having the following data − mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History ... Read More

Find Index of Element in Java List

Govinda Sai
Updated on 30-Jul-2019 22:30:21

15K+ Views

The indexOf(Object) method of the java.util.ArrayList class returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. Using this method, you can find the index of a given element.Example Live Demoimport java.util.ArrayList; public class ArrayListDemo {    public static void main(String[] args) {       ArrayList arrlist = new ArrayList(5);       arrlist.add("G");       arrlist.add("E");       arrlist.add("F");       arrlist.add("M");       System.out.println("Size of list: " + arrlist.size());       for (String value : arrlist) {       ... Read More

Advertisements