How to check if an item exists in a C# list collection?

Arjun Thakur
Updated on 22-Jun-2020 09:09:58

14K+ Views

Set a list −List < string > list1 = new List < string > () {    "Lawrence",    "Adams",    "Pitt",    "Tom" };Now use the Contains method to check if an item exits in a list or not.if (list1.Contains("Adams") == true) {    Console.WriteLine("Item exists!"); }The following is the code to check if an item exists in a C# list or not.Exampleusing System; using System.Collections.Generic; public class Program {    public static void Main() {       List < string > list1 = new List < string > () {          "Lawrence",   ... Read More

Exporting list of all SAP HANA systems in XML file

SAP Expert
Updated on 22-Jun-2020 09:09:25

1K+ Views

Yes, it is possible to export a list of your SAP HANA systems from the SAP HANA studio as an XML file and then it can be imported to another instance of the SAP HANA studio or use it as a system archive to which other users can link.This can be performed by following below steps −From the main menu, select File Export... .Expand the SAP HANA folder and choose Landscape.Choose Next.Select the systems you want to export and enter a target file location.Choose Finish

How to print the first ten Fibonacci numbers using C#?

karthikeya Boyini
Updated on 22-Jun-2020 09:09:04

832 Views

For displaying the first ten numbers, firstly set the first two numbers.int val1 = 0, val2 = 1;Now, use a for loop from 2 to 10, to display first ten Fibonacci numbers −for(i=2;i

How to print one dimensional array in reverse order?

Ankith Reddy
Updated on 22-Jun-2020 09:08:24

588 Views

Firstly, declare and initialize one dimensional array.int[] arr = { 35, 12, 66, 90, 34, 2, 64 };Now, use the following to reverse −Array.Reverse(arr);The following is the complete code to reverse a one-dimensional array;Example Live Demousing System; class Demo {    static void Main() {       int[] arr = { 76, 12, 66, 90, 34, 2, 64 };       // Initial Array       Console.WriteLine("Original Array= ");       foreach (int i in arr) {          Console.WriteLine(i);       }       // Reverse Array       Array.Reverse(arr);       Console.WriteLine("Reversed Array= ");       foreach (int j in arr) {          Console.WriteLine(j);       }       Console.ReadLine();    } }OutputOriginal Array= 76 12 66 90 34 2 64 Reversed Array= 64 2 34 90 66 12 76

Single Sign-on configuration in SAP HANA system

SAP Expert
Updated on 22-Jun-2020 09:06:28

294 Views

SSO can be configured on below authentication methods −SAMLKerberosX.509 client certificates for HTTP access from HANA XS engineSAP Logon/Assertion tickets

How to remove an empty string from a list of empty strings in C#?

karthikeya Boyini
Updated on 22-Jun-2020 09:06:28

1K+ Views

Firstly, set a list with empty string as elements.List myList = new List() {    " ",    " ",    " " };Now let us remove one empty element using index.myList.RemoveAt(0);Example Live Demousing System; using System.Collections.Generic; using System.Linq; class Program {    static void Main() {       List myList = new List() {          " ",          " ",          " "       };       Console.Write("Initial list with empty strings...");       foreach (string list in myList) {         ... Read More

How to find a number in a string in C#?

Ankith Reddy
Updated on 22-Jun-2020 09:05:10

447 Views

To find a number in a string, use Regular Expressions.We have set the Regex pattern to get number from a string.Regex r = new Regex(@"\d+");Now, use Match class in C# to set the string.Match m = r.Match("Welcome! We are open 365 days in a year!");Use the Success property now to display the result if number is found in the string as shown in the following complete code −Example Live Demousing System; using System.Text.RegularExpressions; class Demo {    static void Main() {       Regex r = new Regex(@"\d+");       Match m = r.Match("Welcome! We are open ... Read More

How to find a number using Pythagoras Theorem using C#?

Samual Sam
Updated on 22-Jun-2020 09:04:37

617 Views

Firstly, set the first two numbers −double val1, val2; val1 = 10; val2 = 5;Now use the Math.Sqrt function to use Pythagoras Theorem.res = Math.Sqrt(val1 * val1 + val2 * val2);Example Live Demousing System; public class Program {    public static void Main(string[] args) {       double val1, val2, res;       val1 = 10;       val2 = 5;       res = Math.Sqrt(val1 * val1 + val2 * val2);       Console.WriteLine("Result = {0}", res);       Console.ReadLine();    } }OutputResult = 11.1803398874989

Searching a SAP HANA system in HANA Studio System view

SAP Expert
Updated on 22-Jun-2020 09:03:53

702 Views

When you are managing a large number of systems using HANA Studio, this can be used to find a specific system more quickly.To use find system option, the following steps should be performed −From the Systems view toolbar, choose the Find System (Find System) button.2. Enter a search string −You can also use “*” or “?” wildcards.It will display matching systemsSelect the system you were searching for.You can select several systems in the search results by pressing the CTRL key while selecting. You can use this, for example, to mark duplicate systems.Choose whether you want to open the selected system ... Read More

Managing password policy in SAP HANA system

SAP ABAP Expert
Updated on 22-Jun-2020 09:00:08

539 Views

The last folder in SAP HANA Studio system navigation is Security and it has 3 subfolders inside it that define the system security policy and user management activities −SecurityUserRolesSecurity tab is used to manage Password Policy in HANA system −

Advertisements