Karthikeya Boyini has Published 2193 Articles

Passing to method geticon in SAPUI5

karthikeya Boyini

karthikeya Boyini

Updated on 12-Mar-2020 12:46:42

236 Views

SAP UI supports custom formatter functions. formatter="function" is used to specify a function to format cell data prior to display.formatter="function"Try using formatter function as below −icon : {    parts : ["answer"],    formatter : function(answerValue){       return self.getIcon(answerValue);    } }Refer below link to know more about ... Read More

What does the method toArray() do?

karthikeya Boyini

karthikeya Boyini

Updated on 12-Mar-2020 12:16:49

843 Views

The toArray() method of the java.util.The ArrayList class returns an array containing all of the elements in this list in proper sequence (from first to the last element). This acts as a bridge between array-based and collection-based APIs.ExampleLive Demoimport java.util.ArrayList; public class ArrayListDemo {    public static void main(String[] args) ... Read More

MySQL query to select records from a table on the basis of a particular month number?

karthikeya Boyini

karthikeya Boyini

Updated on 06-Mar-2020 10:29:45

518 Views

You can select specific month with the help of MONTH() function. The syntax is as follows −SELECT yourColumnName FROM yourTableName WHERE MONTH(yourColumnName) = yourValue;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table UserLoginTimeInformation    -> (   ... Read More

What information does SHOW TABLE DOES display in MySQL

karthikeya Boyini

karthikeya Boyini

Updated on 06-Mar-2020 10:05:22

136 Views

The SHOW TABLE STATUS in MySQL displays the NAME, ENGINE, VERSION, ROWS, CHECKSUM, etc of a table −ExampleLet us first create a table. Here, we are using the MyISAM engine. The query to create a table is as follows −mysql> create table Post_Demo    -> (    -> PostId int, ... Read More

HAVING with GROUP BY in MySQL

karthikeya Boyini

karthikeya Boyini

Updated on 06-Mar-2020 10:03:50

397 Views

To use HAVING with GROUPBY in MySQL, the following is the syntax. Here, we have set a condition under HAVING to get check for maximum value condition −SELECT yourColumnName FROM yourTableName GROUP BY yourColumnName HAVING MAX(yourColumnName) < yourValue;Let us see an example by creating a table in MySQL −mysql> create ... Read More

How to Convert Decimal to Binary, Octal, and Hexadecimal using Python?

karthikeya Boyini

karthikeya Boyini

Updated on 05-Mar-2020 10:38:46

1K+ Views

Python provides straightforward functions to convert Decimal to Binary, Octal, and Hexadecimal. These functions are −Binary: bin() Octal: oct() Hexadecimal: hex()ExampleYou can use these functions as follows to get the corresponding representation −decimal = 27 print(bin(decimal), "in binary.") print(oct(decimal), "in octal.") print(hex(decimal), "in hexadecimal.")OutputThis will give the output −0b11011 ... Read More

How to generate JSON output using Python?

karthikeya Boyini

karthikeya Boyini

Updated on 05-Mar-2020 10:16:33

2K+ Views

The json module in python allows you to dump a dict to json format directly. To use it, Exampleimport json my_dict = {    'foo': 42,    'bar': {       'baz': "Hello",       'poo': 124.2    } } my_json = json.dumps(my_dict) print(my_json)OutputThis will give the ... Read More

How to compare two variables in an if statement using Python?

karthikeya Boyini

karthikeya Boyini

Updated on 05-Mar-2020 07:52:57

6K+ Views

You can compare 2 variables in an if statement using the == operator. examplea = 10 b = 15 if a == b:    print("Equal") else:    print("Not equal")OutputThis will give the output −Not EqualYou can also use the is the operator. examplea = "Hello" b = a if a is b: ... Read More

How to change the color of focused links with CSS

karthikeya Boyini

karthikeya Boyini

Updated on 05-Mar-2020 05:01:04

1K+ Views

Use the :focus class to change the color of focused links. Possible values could be any color name in any valid format.ExampleYou can try to run the following code to implement the color of the focused link −                    a:focus {             color: #0000FF          }                     This is demo link    

Usage of :first-child pseudo-class in CSS

karthikeya Boyini

karthikeya Boyini

Updated on 04-Mar-2020 12:46:22

67 Views

Use the :first-child pseudo class to add special style to an element that is the first child of some other element.ExampleYou can try to run the following code to understand the usage of :first-child pseudo class −                    div > p:first-child ... Read More

Advertisements