Insert a new entry in OrderedDictionary with specified key and value in C#

AmitDiwan
Updated on 11-Dec-2019 06:41:26

156 Views

To insert a new entry in OrderedDictionary with specified key and value, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       OrderedDictionary dict = new OrderedDictionary();       dict.Add("1", "One");       dict.Add("2", "Two");       dict.Add("3", "Three");       dict.Add("4", "Four");       dict.Add("5", "Five");       dict.Add("6", "Six");       dict.Add("7", "Seven");       dict.Add("8", "Eight");       Console.WriteLine("Elements...");       IDictionaryEnumerator demoEnum = dict.GetEnumerator();       while (demoEnum.MoveNext()) {     ... Read More

Exposing xsjs file data through web browser in SAP HANA

Rahul Sharma
Updated on 11-Dec-2019 06:40:38

421 Views

Note that you have to ensure that Port number 80+ should be open on network. Also URL you are using should be properly built. Below is correct path:server:port/repository_path/file_nameIn your case, you should be using:host: hanacloud port: 8000 (80 + instance_number) SAP HANA Repository tree: mdo ->    sap ->       sflight ->          test ->             test.xsjsSo your URL should be in this format:hanacloud:8000/mdo/sap/sflight/test/test.xsjs

Getting last value in MySQL group concat?

AmitDiwan
Updated on 11-Dec-2019 06:39:32

752 Views

To get last value in group concat, use SUBSTRING_INDEX(). Let us first create a table −mysql> create table DemoTable1525    -> (    -> ListOfSubjects text    -> ); Query OK, 0 rows affected (1.13 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1525 values('MongoDB, C'); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable1525 values('Java, C++, MySQL'); Query OK, 1 row affected (0.25 sec) mysql> insert into DemoTable1525 values('Python, C++, C, Java'); Query OK, 1 row affected (0.14 sec)Display all records from the table using select statement −mysql> select * from DemoTable1525;This will ... Read More

Suppressing the page header till the last page in SAP Crystal Reports 2008

Samual Sam
Updated on 11-Dec-2019 06:39:18

780 Views

I think you would require to use “OnLastRecord” keyword for page header suppression. Below are details about this function:Function Description:This function returns “TRUE” when the current record being evaluated is the last record in the report.Returns:Boolean ValueAction:This function returns “TRUE” when the current record being evaluated is the last record in the report.Note that any field that you are grouped and you want to suppress on the last record for this group, or use the next () function as shown below:onlastrecord or next({table.field}){table.field} Example:GH1 (using Customer.ID as group) GH2 (using Sales.No as group) Details GF2 - has line drawn on it ... Read More

Check whether an element is contained in the ArrayList in C#

AmitDiwan
Updated on 11-Dec-2019 06:38:41

223 Views

To check whether an element is contained in the ArrayList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       ArrayList list = new ArrayList();       list.Add("One");       list.Add("Two");       list.Add("Three");       list.Add("Four");       list.Add("Five");       list.Add("Six");       list.Add("Seven");       list.Add("Eight");       Console.WriteLine("ArrayList elements...");       foreach(string str in list){          Console.WriteLine(str);       }       Console.WriteLine("ArrayList is read-only? = "+list.IsReadOnly);     ... Read More

Writing a material on SAP system via .NET Connector

Johar Ali
Updated on 11-Dec-2019 06:37:48

413 Views

Once you create material, you need to call BAPI- BAPI_TRANSACTION_COMMIT. “BAPI_TRANSACTION_COMMIT” is called to COMMIT a database operation. As COMITT statement can’t be called inside BAPI, we call this BAPI to complete COMMIT.Let us say you are editing some table fields in BAPI- as per failure or success, you can perform a COMMIT or ROLLBACK.To perform a COMMIT call BAPI_TRANSACTION_COMMIT. Below is sample COMITT:CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' * EXPORTING * wait =    "bapita-wait    IMPORTING    return = "bapiret2 . " BAPI_TRANSACTION_COMMITYou can see full documentation about BAPI_TRANSACTION_COMMIT:FU BAPI_TRANSACTION_COMMIT____________________________________________________Short TextExecute external Commit when using BAPIsFunctionality:This method executes a COMMIT WORK ... Read More

Check whether a Hashtable contains a specific key or not in C#

AmitDiwan
Updated on 11-Dec-2019 06:35:31

191 Views

To check whether a Hashtable contains a specific key or not, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       Hashtable hash = new Hashtable();       hash.Add("One", "Katie");       hash.Add("Two", "John");       hash.Add("Three", "Barry");       hash.Add("Four", "");       hash.Add("Five", "Harry");       hash.Add("Six", "F");       hash.Add("Seven", "Tom");       hash.Add("Eight", "Andy");       hash.Add("Nine", "I");       hash.Add("Ten", "Tim");       Console.WriteLine("Hashtable Key and Value pairs...");       foreach(DictionaryEntry ... Read More

Match the elements of an array in a MySQL query

AmitDiwan
Updated on 11-Dec-2019 06:33:22

2K+ Views

Let us first create a table table −mysql> create table DemoTable1523    -> (    -> Id int,    -> Value int    -> ); Query OK, 0 rows affected (0.76 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1523 values(1, 56); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable1523 values(2, 78); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable1523 values(1, 34); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable1523 values(2, 45); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable1523 values(1, 99); Query OK, ... Read More

Check the HybridDictionary for a specific key in C#

AmitDiwan
Updated on 11-Dec-2019 06:32:29

151 Views

To check the HybridDictionary for a specified key, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       HybridDictionary dict = new HybridDictionary(5);       dict.Add("A", "AB");       dict.Add("B", "BC");       dict.Add("C", "DE");       dict.Add("D", "FG");       dict.Add("E", "HI");       Console.WriteLine("Key/Value pairs...");       foreach(DictionaryEntry d in dict)       Console.WriteLine("Key = "+d.Key + ", Value = " + d.Value);       Console.WriteLine("Does HybridDictionary contains the key C? = "+dict.Contains("C"));    } ... Read More

What is an Event Object in jQuery?

Ricky Barnes
Updated on 11-Dec-2019 06:32:29

505 Views

The callback function takes a single parameter; when the handler is called the JavaScript event object will be passed through it.The event object is often unnecessary and the parameter is omitted, as sufficient context is usually available when the handler is bound to know exactly what needs to be done when the handler is triggered, however there are certain attributes which you would need to be accessed.Let us see an example of isDefaultPrevented() method. The isDefaultPrevented() method checks whether event.preventDefault() was ever called on this event object.ExampleYou can try to run the following code to learn how to work with ... Read More

Advertisements