Articles on Trending Technologies

Technical articles with clear explanations and examples

What is the associativity of Python's ** operator?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 17-Jun-2020 409 Views

From the Python docs:Operators in the same box group left to right (except for comparisons), including tests, which all have the same precedence and chain from left to right — see section Comparisons — and exponentiation, which groups from right to left).So the ** operator(exponentiation) is right to left associative. For example,2 ** 3 ** 4 will be evaluated as: (2 ** (3 ** 4))For example,print(2 ** 3 ** 0)This will give the output:2

Read More

How to pass a function as a parameter in Java

Prabhas
Prabhas
Updated on 17-Jun-2020 5K+ Views

Yes. From Java 8 onwards, we can do so using method references.Method references help to point to methods by their names. A method reference is described using "::" symbol. A method reference can be used to point the following types of methods −Static methodsInstance methodsConstructors using new operator (TreeSet::new)Method Reference ExampleCreate the following Java program using any editor of your choice in, say, C:\> JAVA.Java8Tester.java Live Demo import java.util.List; import java.util.ArrayList; public class Java8Tester {    public static void main(String args[]) {       List names = new ArrayList(); names.add("Mahesh");       names.add("Suresh");       names.add("Ramesh");       ...

Read More

How to return 2 values from a Java method

seetha
seetha
Updated on 17-Jun-2020 932 Views

A method can give multiple values if we pass an object to the method and then modifies its values. See the example below −Examplepublic class Tester { public static void main(String[] args) { Model model = new Model(); model.data1 = 1; model.data2 = 2; System.out.println(model.data1 + ", " + model.data2); changeValues(model); System.out.println(model.data1 + ", " + model.data2); } public static void changeValues(Model model) { model.data1 = 100; model.data2 = 200; } } class Model { int data1; int data2; }Output1, 2 100, 200

Read More

How to filter an array in Java

Ali
Ali
Updated on 17-Jun-2020 7K+ Views

You can use List.removeAll() method to filter an array. exampleimport java.util.ArrayList; import java.util.List; public class Tester { public static void main(String[] args) { List list = new ArrayList(); list.add("A"); list.add("B"); list.add("C"); list.add("D"); list.add("E"); list.add("F"); list.add("G"); list.add("H"); List ...

Read More

Common system schema in SAP HANA Studio under Provisioning

John SAP
John SAP
Updated on 17-Jun-2020 301 Views

Common system schema are −_SYS_BIC_SYS_REPO_SYS_BI_SYS_XS_SYS_STATISTICS and many more

Read More

Remote system allowed in SAP HANA Smart Data Access

John SAP
John SAP
Updated on 17-Jun-2020 581 Views

In SAP HANA SPS07, it has been extended to MSSQL server and Oracle database and write operation was permitted to perform on remote data sources.Following remote systems are allowed under Smart Data Access with Write operation in SAP HANA SPS07 −SAP HANASybase ASESAP Sybase IQTeradata 13.0 or higherApache Hadoop 2.3MSSQL 11Oracle 12c

Read More

Using SAP HANA SPS06 vs SPS07 with Smart Data Access SDA

John SAP
John SAP
Updated on 17-Jun-2020 356 Views

In below table, you can see the list of remote data sources that are supported under SAP HANA Smart Data Access for SPS06 and SPS07 and the operations supported −SAP HANA VersionsSPS06SPS07 or higherSupported Data Sources under Smart Data AccessSybase ASE, SAP Sybase IQ 15.4 ESD 3 and Version 16.0 Apache Hadoop Version 2.3 Teradata Database Version 13.0 or higherSybase ASE, SAP Sybase IQ 15.4 ESD 3 and Version 16.0 Apache Hadoop Version 2.3 Teradata Database Version 13.0 or higher Oracle database 12c MSSQL version 11 for SQL Server 2012 IBM DB2Operations SupportedSelectSelect, Insert, Update and Delete

Read More

Adapters supported under Smart Data Access in SAP HANA

John SAP
John SAP
Updated on 17-Jun-2020 464 Views

Below is the list of Adapters which are supported under Smart Data Access in SAP HANA −This comes while creating a new Remote Data Source.

Read More

How to sort a Python dictionary by datatype?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 17-Jun-2020 283 Views

You can sort a list of dictionaries by values of the dictionary using the sorted function and passing it a lambda that tells which key to use for sorting. For example, A = [{'name':'john', 'age':45},      {'name':'andi', 'age':23},      {'name':'john', 'age':22},      {'name':'paul', 'age':35},      {'name':'john', 'age':21}] new_A = sorted(A, key=lambda x: x['age']) print(new_A)This will give the output:[{'name': 'john', 'age': 21}, {'name': 'john', 'age': 22}, {'name': 'andi', 'age': 23}, {'name': 'paul', 'age': 35}, {'name': 'john', 'age': 45}]You can also sort it in place using the sort function instead of the sorted function. For example, A ...

Read More

How to sort a nested Python dictionary?

karthikeya Boyini
karthikeya Boyini
Updated on 17-Jun-2020 2K+ Views

If you have a dictionary of the following format:{    'KEY1':{'name':'foo', 'data':1351, 'completed':100},    'KEY2':{'name':'bar', 'data':1541, 'completed':12},    'KEY3':{'name':'baz', 'data':58413, 'completed':18} }And you want to sort by the key, completed within each entry, in a ascending order, you can use the sorted function with a lambda that specifies which key to use to sort the data. For example, my_collection = {    'KEY1':{'name':'foo', 'data':1351, 'completed':100},    'KEY2':{'name':'bar', 'data':1541, 'completed':12},    'KEY3':{'name':'baz', 'data':58413, 'completed':18} } sorted_keys = sorted(my_collection, key=lambda x: (my_collection[x]['completed'])) print(sorted_keys)This will give the output:['KEY2', 'KEY3', 'KEY1']

Read More
Showing 53841–53850 of 61,299 articles
Advertisements