Remove an Element from ArrayList in C#

Samual Sam
Updated on 22-Jun-2020 09:07:43

2K+ Views

Declare a new ArrayList and add elements to it.ArrayList arr = new ArrayList(); arr.Add( "One" ); arr.Add( "Two" ); arr.Add( "Three" ); arr.Add( "Four" );Now let’s say you need to remove the element “Three”. For that, use the Remove() method.arr.Remove("Three");The following is the complete example to remove an element from ArrayList −Example Live Demousing System; using System.Collections; class Demo {    static void Main() {       ArrayList arr = new ArrayList();       arr.Add( "One" );       arr.Add( "Two" );       arr.Add( "Three" );       arr.Add( "Four" );   ... Read More

Single Sign-On Configuration in SAP HANA System

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

247 Views

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

Remove Empty String from List 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

Different Authentication Methods Supported in SAP HANA

SAP Expert
Updated on 22-Jun-2020 09:05:43

186 Views

Below is the list of authentication methods supported by SAP HANA −User name/PasswordKerberosSAML 2.0SAP Logon ticketsX.509You can configure any of authentication method while creating a new user −

Find a Number in a String in C#

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

415 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

Find a Number Using Pythagoras Theorem with Chash

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

564 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

Find and Replace a Word in a String in C#

George John
Updated on 22-Jun-2020 09:04:03

4K+ Views

Firstly, set the string to be replaced.string str = "Demo text!";Now use the replace() method to replace the above string.string res = str.Replace("Demo ", "New ");The following is the complete code to replace a word in a string.Example Live Demousing System; public class Demo {    public static void Main() {       string str = "Demo text!";       Console.WriteLine(str);       string res = str.Replace("Demo ", "New ");       Console.WriteLine("After replacing...");       Console.WriteLine(res);    } }OutputDemo text! After replacing... New text!

Searching a SAP HANA System in HANA Studio System View

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

630 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

Find Substring from a String in C#

karthikeya Boyini
Updated on 22-Jun-2020 09:03:24

310 Views

Set the stringstring s = "Tom Cruise";Now let’s say you need to find the substring “Tom”, then use the Contains() method.if (s.Contains("Tom") == true) {    Console.WriteLine("Substring found!"); }The following is the code to learn how to find a substring from a string −Example Live Demousing System; public class Demo {    public static void Main() {       string s = "Tom Cruise";       if (s.Contains("Tom") == true) {          Console.WriteLine("Substring found!");       } else {          Console.WriteLine("Substring not found!");       }    } }OutputSubstring found!

Managing Password Policy in SAP HANA System

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

506 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