Variable Memory Allocation in JavaScript

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

394 Views

JavaScript handling of the variable is different from other programming languages C, C++., Java, etc. Variables in JavaScript can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container. Before you use a variable in a JavaScript program, you must declare it. Variables are declared with the var keyword as follows. var rank; var points; Storing a value in a variable is called variable initialization. You can do variable initialization at the time of variable creation or at a ... Read More

Persistence Layer in SAP HANA

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

666 Views

In SAP HANA, Persistence layer is used for handling all operational and transaction data to take secure backup and restoring data incase of corruption or database crash. It provides use of Save point which can be used for restoring data.With use of concept of persistence layer of SAP’s relational database, it ensures the successful data restores. Besides managing log data on the disk, HANA’s persistence layer allows read and write data operations via all storage interfaces.Persistence layer in HANA ensures that database can be restored to the most recent committed state after a restart or after a system crash and ... Read More

Difference Between 'and' and 'or' Operators in Python

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

296 Views

In Python 2.x, both != and operators are available to check if two operands are not equal. Both return true if operands are not equal and false if they are equal.In Python 3.x, operator has been deprecated.

Count Unique Values in a MySQL Column

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

279 Views

By using DISTINCT keyword along with column name as the argument of COUNT() function we can count the number of unique values in a column. The syntax is as follows − SELECT COUNT(DISTINCT Col_name) FROM table_name; Example Suppose we have the following table mysql> Select * from tender; +----------+--------------+--------------+-------+ | clientid | client_Fname | Client_Lname | value | +----------+--------------+--------------+-------+ | 100 | Mohan | Kumar | 60000 | | 101 | Sohan ... Read More

What Does the toString() Method Do in Java?

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

150 Views

The toString(Object[] a) method of the java.util.Arrays class returns a string representation of the contents of the specified Object array. If the array contains other arrays of elements, they are converted to strings by the Object.toString() method inherited from Object, which describes their identities rather than their contents. Example import java.util.Arrays; public class ArrayDemo { public static void main(String[] args) { Object[] ob1 = new Object[] { 10, 20 }; System.out.println("The array is:"); for (Object number ... Read More

Set Java Path in Linux OS

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

441 Views

Environment variable PATH should be set to point to where the Java binaries have been installed. Refer to your shell documentation if you have trouble doing this.Example, if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export PATH=/path/to/java:$PATH'

Set Java Path in Mac OS

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

1K+ Views

Environment variable PATH should be set to point to where the Java binaries have been installed. Refer to your shell documentation if you have trouble doing this.Example, if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export PATH=/path/to/java:$PATH'

Difference between C++ String Constants and Character Constants

karthikeya Boyini
Updated on 30-Jul-2019 22:30:21

801 Views

In C++, a character in single quotes is a character literal. It's of type char. For example, 'a' is of type char with a value 97 on an ASCII based system.A character or a string of characters together in double quotes represent a string literal. It's of type const char[] and refers to an array of size length of string + 1. That extra character is there for marking the string's ending.String literals can be arbitrarily long, such as "abcdefg". Character literals almost always contain just a single character. When these are being printed, string literals are printed till the ... Read More

MySQL SUM Function with NULL Values

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

1K+ Views

Suppose if we are calculating the sum of the values of a column which also have NULL values then MySQL SUM() function ignores the NULL values and does the sum of the rest of the values. To understand it, consider the following example of table ‘employee’, having following details − mysql> Select * from Employee; +----+--------+--------+ | ID | Name | Salary | +----+--------+--------+ | 1 | Gaurav | 50000 | | 2 | Rahul | 20000 | | 3 | Advik | 25000 | | 4 | ... Read More

Types of Array in Java

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

333 Views

Java supports single dimensional and multidimensional arrays. See the example below:Example Live Demopublic class Tester {    public static void main(String[] args) {       double[] myList = {1.9, 2.9, 3.4, 3.5};       // Print all the array elements       for (double element: myList) {          System.out.print(element + " ");       }       System.out.println();       int[][] multidimensionalArray = { {1,2},{2,3}, {3,4} };       for(int i = 0 ; i < 3 ; i++) {          //row          for(int j = 0 ; j < 2; j++) {             System.out.print(multidimensionalArray[i][j] + " ");          }          System.out.println();       }    } }Output1.9 2.9 3.4 3.5 1 2 2 3 3 4

Advertisements