Articles on Trending Technologies

Technical articles with clear explanations and examples

How to return 2 values from a Java method

seetha
seetha
Updated on 17-Jun-2020 871 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 253 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 543 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 295 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 416 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 247 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

Shuffle Array Contents

George John
George John
Updated on 17-Jun-2020 872 Views

This algorithm will take an array and shuffle the contents of the array. It will generate a random permutation of the array elements.To solve this problem, we will swap elements starting from the last index to randomly generated an index in the array.Input and OutputInput: An array of integers: {1, 2, 3, 4, 5, 6, 7, 8} Output: Shuffle of array contents: 3 4 7 2 6 1 5 8 (Output may differ for next run)AlgorithmrandomArr(array, n)Input: The array, number of elements.Output: Shuffle the contents of the array.Begin    for i := n – 1 down to 1, do   ...

Read More

Magic Square

Samual Sam
Samual Sam
Updated on 17-Jun-2020 6K+ Views

The magic square is a square matrix, whose order is odd and where the sum of the elements for each row or each column or each diagonal is same. The sum of each row or each column or each diagonal can be found using this formula. n(n2+ 1)/2Here are the rules to construct a magic square −We will start from the middle column of the first row, of the matrix, and always go to the top left corner to place next numberIf the row exceeds, or the row is not in the matrix, then, change the column as left column and ...

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