Get Type Referenced by Specified Type Handle in C#

AmitDiwan
Updated on 10-Dec-2019 07:36:55

250 Views

To get the type referenced by the specified type handle, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       Type type1 = typeof(short);       RuntimeTypeHandle typeHandle = Type.GetTypeHandle(type1);       Type type = Type.GetTypeFromHandle(typeHandle);       Console.WriteLine("Attributes = " + type.Attributes);    } }OutputThis will produce the following output −Attributes = AutoLayout, AnsiClass, Class, Serializable, BeforeFieldInitExampleLet us see another example − Live Demousing System; public class Demo {    public static void Main() {       Type type1 = typeof(System.Type);       RuntimeTypeHandle ... Read More

Remove Index from a MySQL Table

AmitDiwan
Updated on 10-Dec-2019 07:34:41

548 Views

To remove index from a MySQL table, the syntax is as follows −alter table yourTableName drop index `yourIndexName`;Let us first create a table −Mysql> create table DemoTable1469    -> (    -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> StudentName varchar(40),    -> StudentAge int    -> ); Query OK, 0 rows affected (0.78 sec)Following is the query to add index on column name −mysql> create index `Student Name_Index` on DemoTable1469(StudentName); Query OK, 0 rows affected (0.33 sec) Records: 0  Duplicates: 0  Warnings: 0Let us check the table description −mysql> desc DemoTable1469;This will produce the following output −+-------------+-------------+------+-----+---------+----------------+ ... Read More

Convert a Specified Value to an Equivalent Boolean Value in C#

AmitDiwan
Updated on 10-Dec-2019 07:33:49

500 Views

To convert a specified value to an equivalent Boolean value, the code is as follows −Example Live Demousing System; using System.Globalization; public class Demo {    public static void Main() {       CultureInfo cultures = new CultureInfo("en-US");       String str = "true";       Console.WriteLine("Converted bool value...");       bool res = Convert.ToBoolean(str, cultures);       Console.Write("{0}", res);    } }OutputThis will produce the following output −Converted bool value... TrueExampleLet us see another example − Live Demousing System; using System.Globalization; public class Demo {    public static void Main() {       CultureInfo cultures ... Read More

Clone an Element Using jQuery

David Meador
Updated on 10-Dec-2019 07:30:02

5K+ Views

To clone an element using jQuery, use the jQuery.clone() method. The clone() method clones matched DOM Elements and select the clones.This is useful for moving copies of the elements to another location in the DOM.ExampleYou can try to run the following code to learn how to clone an element using jQuery:Live Demo           jQuery clone() method                              $(document).ready(function() {             $("div").click(function () {                $(this).clone().insertAfter(this);             });          });                              .div {              margin:10px;              padding:12px;              border:2px solid #666;              width:60px;          }                             Click on any square below to see the result:                                          

Delete Rows with Duplicate and Similar Content in MySQL

AmitDiwan
Updated on 10-Dec-2019 07:29:09

116 Views

Let us first create a table −mysql> create table DemoTable1468    -> (    -> Id int,    -> Name varchar(20),    -> Age int    -> ); Query OK, 0 rows affected (1.21 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1468 values(100, 'Chris', 23); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable1468 values(101, 'Bob', 25); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable1468 values(102, 'David', 30); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable1468 values(100, 'Chris', 23); Query OK, 1 row affected (0.35 sec) mysql> ... Read More

Get or Set Value in HybridDictionary with Specified Key in C#

AmitDiwan
Updated on 10-Dec-2019 07:28:29

170 Views

To get or set the value in HybridDictionary with specified key, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main() {       HybridDictionary myDict = new HybridDictionary();       myDict.Add("1", "Tablet");       myDict.Add("2", "Desktop");       myDict.Add("3", "Speakers");       myDict.Add("4", "Laptop");       myDict.Add("5", "Notebook");       myDict.Add("6", "Ultrabook");       myDict.Add("7", "HDD");       myDict.Add("8", "SDD");       Console.WriteLine("Value at key 5 = "+myDict["5"]);    } }OutputThis will produce the following output −Value at key 5 ... Read More

Duplicate a Div using jQuery

David Meador
Updated on 10-Dec-2019 07:27:38

3K+ Views

To duplicate a div in jQuery, use the jQuery clone() method.ExampleYou can try to run the following code to learn how to duplicate a div using jQuery:Live Demo $(document).ready(function(){    $("button").click(function(){       $("div").clone().appendTo("body");    }); }); This is a text Clone div and append

jQuery Clone Method Explained

David Meador
Updated on 10-Dec-2019 07:26:02

226 Views

To clone an element using jQuery, use the jQuery.clone() method. The clone() method clones matched DOM Elements and select the clones.This is useful for moving copies of the elements to another location in the DOM.ExampleYou can try to run the following code to learn how to work with jQuery.clone() method in jQuery:Live Demo           jQuery clone() method                              $(document).ready(function() {             $("div").click(function () {                $(this).clone().insertAfter(this);             });          });                              .div {              margin:15px;              padding:15px;              border:4px solid #666;              width:90px;          }                             Click on any square below to see the result:                                  

Difference Between jQuery hide and jQuery remove Methods

David Meador
Updated on 10-Dec-2019 07:23:42

511 Views

jQuery.hide()If you want to hide an element, then use the hide() method to hide the selected element.ExampleYou can try to run the following code to learn how to work with jQuery.hide() method using jQuery:Live Demo $(document).ready(function(){     $(".button1").click(function(){         $("p").hide();     });     $(".button2").click(function(){         $("p").show();     }); }); Hide the element Show the element This is demo text. jQuery.remove()The remove() method will remove the selected elements, but it also includes the text and child nodes.ExampleYou can try to run ... Read More

Check Table Existence Using Class Method in SE11 without FM in ABAP

seetha
Updated on 10-Dec-2019 07:19:00

710 Views

To perform this without using Function module, you can use class- “cl_rebf_ddic_tabl”. Note that Class methods are almost similar to function modules. They are defined as code blocks to perform specific functionality.ExampleTry using below code: CALL METHOD cl_rebf_ddic_tabl=>exists EXPORTING    id_name = [table name]    id_tabclass = 'TRANSP' " For table    * if_noview = ABAP_FALSE       receiving       rf_exists = yes   . This will return “X” if the table exists in Transaction SE11.CALL METHOD CL_REBF_DDIC_TABL=>methodname EXPORTING/IMPORTING GET_TEXTTAB - Supplies the Corresponding Text Table GET_COMPLETE - Supplies All Technical Information GET_DETAIL_X - Supplies Extended Header Data GET_FIELD_LIST - ... Read More

Advertisements