Kumar Varma has Published 110 Articles

How to use autocomplete attribute in HTML?

Kumar Varma

Kumar Varma

Updated on 15-Jun-2020 11:13:33

304 Views

The autocomplete attribute is used with form element to set the autocomplete feature on or off. If the autocomplete feature is on, the browser will automatically show values, based on what users entered before in the field.If the autocomplete feature is off, the browser won’t automatically show values, based on ... Read More

Java labelled statement

Kumar Varma

Kumar Varma

Updated on 15-Jun-2020 09:06:36

2K+ Views

Yes. Java supports labeled statements. You can put a label before a for statement and use the break/continue controls to jump to that label. ExampleSee the example below.Live Demopublic class Tester {    public static void main(String args[]) {       first:          for (int i ... Read More

Java switch statement

Kumar Varma

Kumar Varma

Updated on 15-Jun-2020 07:38:32

218 Views

A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case.SyntaxThe syntax of enhanced for loop is −switch(expression) {    case value :       // Statements ... Read More

Connecting to SAP HANA using odbc_connect() on PHP

Kumar Varma

Kumar Varma

Updated on 12-Jun-2020 12:30:18

462 Views

The error you are getting is because there is no ODBC drivers installed for your PHP client. You would require downloading the drivers from any site on the internet. Following steps can be performed to download the drivers: Download the drivers from http://www.easysoft.com/cgi-bin/account/login.cgi after registration or alternatively check the ODBC-ODBC Bridge Client ... Read More

Find the 3rd smallest number in a Java array.

Kumar Varma

Kumar Varma

Updated on 12-Mar-2020 10:10:40

4K+ Views

ExampleFollowing is the required program.Live Demopublic class Tester {    public static int getThirdSmallest(int[] a) {       int temp;       //sort the array       for (int i = 0; i < a.length; i++) {          for (int j = i + ... Read More

How do I compare strings in Java?

Kumar Varma

Kumar Varma

Updated on 26-Feb-2020 07:09:39

183 Views

You can compare two Strings in Java using the compareTo() method, equals() method or == operator.The compareTo() method compares two strings. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence ... Read More

Java String Comparison Methods.

Kumar Varma

Kumar Varma

Updated on 26-Feb-2020 06:49:35

443 Views

Java String class provides different comparison methods namely:The compareTo() methodThis method compares two Strings lexicographically. This method returns  a negative integer if current String object lexicographically precedes the argument string.  a positive integer if current String object lexicographically follows the argument  true when the strings are equal.Exampleimport ... Read More

How to create a subarray from another array in Java

Kumar Varma

Kumar Varma

Updated on 24-Feb-2020 10:42:51

13K+ Views

Use Arrays.copyOfRange() method to get a subarray.Exampleimport java.util.Arrays; public class Tester {    public static void main(String[] args) {       int[] array = new int[] {1, 2, 3, 4, 5};       int[] subArray = Arrays.copyOfRange(array, 0, 2);       System.out.println("Array: ");       for(int ... Read More

Member variables in Java

Kumar Varma

Kumar Varma

Updated on 24-Feb-2020 05:06:13

8K+ Views

Member variables are known as instance variables in java.Instance variables are declared in a class, but outside a method, constructor or any block.When space is allocated for an object in the heap, a slot for each instance variable value is created.Instance variables are created when an object is created with ... Read More

Replacing multiple occurrence by a single occurrence in SAP HANA

Kumar Varma

Kumar Varma

Updated on 14-Feb-2020 05:37:57

600 Views

The code you are using \1+ just removes consecutive occurrences only. You can use the below code.SELECT REPLACE_REGEXPR('(.)(?=.*\1)' IN '22331122' WITH '' OCCURRENCE ALL) FROM DUMMYThe output will come out to be “312”. This will remove all multiple occurrences and only last one will be kept.

Previous 1 ... 3 4 5 6 7 ... 11 Next
Advertisements