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
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
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
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:
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
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
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
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:
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
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
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP