Update MySQL Table After Quoting Column Values with Single Quote

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

820 Views

As we know that with the help of QUOTE() function we can put the values of a column in single quotes. By using QUOTE() function with UPDATE clause we can update the table having quoted values. We need to give column name as the parameter of QUOTE() function. Following example will update the table ‘examination_btech’ after putting the values of column ‘Course’ in single quotes. Example mysql> UPDATE examination_btech SET Course = QUOTE(Course); Query OK, 10 rows affected (0.05 sec) mysql> Select * from examination_btech; +--------+----------+----------+ | RollNo | Name | Course ... Read More

Compare Two ArrayLists for Equality in Java

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

14K+ Views

You can compare two array lists using the equals() method of the ArrayList class, this method accepts a list object as a parameter, compares it with the current object, in case of the match it returns true and if not it returns false.Example Live Demoimport java.util.ArrayList; public class ComparingList {    public static void main(String[] args) {       ArrayList list1 = new ArrayList();       list1.add("JavaFx");       list1.add("Java");       list1.add("WebGL");       list1.add("OpenCV");       ArrayList list2 = new ArrayList();       list2.add("JavaFx");       list2.add("Java");       list2.add("WebGL"); ... Read More

Compare Python Objects with .NET Objects

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

199 Views

By default, all .NET objects are reference types and their equality and hash code is determined by their memory address. Additionally, assigning a variable to an existing object just makes it point to that address in memory, so there is no costly copying occurring. It appears that this is true for python objects as well to certain extent.Properties of Python objects: All python objects havea unique identity (an integer, returned by id(x)); a type (returned by type(x))You cannot change the identity; You cannot change the type.Some objects allow you to change their content (without changing the identity or the type, that is).Some ... Read More

Convert String to Integer and Integer to String in Java

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

3K+ Views

Java lang package provides Integer class which has methods to convert integer to String and vice versa. You can convert a String to an integer using the parseInt() method and Integer to String using the toString() method.Example Live Demopublic class Sample {    public static void main(String args[]) {       String str = "1212";       int num = Integer.parseInt(str);       System.out.println(num);       String st = Integer.toString(num);       System.out.println();    } }Output1212 1212

Default Table Type in SAP HANA Database

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

621 Views

By default it creates a Row store table. The horizontal lines in front of table name represents row based storage table in database. HANA database also supports column store tables but you need to add a keyword “Column” in create table query.Below snapshot confirms that by default a row based table is created.

Convert List Collection into a Dictionary in Java

Nikitha N
Updated on 30-Jul-2019 22:30:21

2K+ Views

Following is an example to convert a list collection into a dictionary in Java.Example Live Demoimport java.util.ArrayList; import java.util.Dictionary; import java.util.Hashtable; public class CollectionDictionary {    public static void main(String[] args) {       ArrayList list = new ArrayList();       list.add("JavaFx");       list.add("Java");       list.add("WebGL");       list.add("OpenCV");       System.out.println(list);       Dictionary dictionary = new Hashtable();       Hashtable hashTable = new Hashtable();       hashTable.put(1, list.get(0));       hashTable.put(2, list.get(1));       hashTable.put(3, list.get(2));       hashTable.put(4, list.get(3));       System.out.println(hashTable);    } }Output[JavaFx, Java, WebGL, OpenCV] {4=OpenCV, 3=WebGL, 2=Java, 1=JavaFx}

Get List of Tables in Default MySQL Database

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

485 Views

As we know that the default MySQL database would be the database that is currently in use for subsequent queries. We can get the list of tables in that database by using SHOW TABLES statement. mysql> SHOW TABLES; +------------------+ | Tables_in_sample | +------------------+ | employee | | new_student | | student | +------------------+ 3 rows in set (0.00 sec) The above statement shows the list of table in Sampledatabase.

Redirect URL to a Different Website After Few Seconds

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

7K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection. To redirect URL to a different website after few seconds, use the META tag, with the content attribute. The attributes set the seconds. The following is an example of redirecting current page to another website in 10 seconds. The content attribute sets the seconds. Example Live Demo HTML Meta Tag Hello HTML5!

Compress Python Objects Before Saving to Cache

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

411 Views

We need sometimes to compress Python objects (list, dictionary, string, etc) before saving them to cache and decompress after reading from cache.Firstly we need to be sure we need to compress the objects. We should check if  the data structures/objects are too big just to fit uncompressed in the cache. There is going to be an overhead for compression/decompression, that we have to tradeoff with the gains made by caching in the first place.If we really need compression, then we probably want to use zlib.If we are going to use zlib, we might want to experiment with the different compression ... Read More

SQL Operations Supported in SAP HANA SPS06 SDA

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

227 Views

With use of SAP HANA SPS06 Smart Data Access, you can only perform SELECT operation on virtual tables moved using new remote data source.

Advertisements