Get ID of a DOM Element Using jQuery

Arnab Chakraborty
Updated on 22-Jun-2020 07:55:54

762 Views

In jQuery attr method is use to get the id attribute of the first matching element.$("btn1").attr("id")In your exampleExample iddom                 $(document).ready(function () {          $('#btn1').click(function () {             alert( $('#test').attr('id'));          });       });                   Click Here

View Source Code of a MySQL Stored Function

Daniol Thomas
Updated on 22-Jun-2020 07:55:06

427 Views

With the help of SHOW CREATE FUNCTION statement, we can see the source code of a stored function. To make it understand we are using the stored function named Hello() in the query as follows −mysql> SHOW CREATE FUNCTION Hello\G *************************** 1. row ***************************            Function: Hello            sql_mode: ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION `Hello`(S Varchar(20)) RETURNS varchar(20) CHARSET latin1 DETERMINISTIC RETURN CONCAT('Hello, ', S, '!') character_set_client: cp850 collation_connection: cp850_general_ci   Database Collation: latin1_swedish_ci 1 row in set (0.00 sec)Read More

View Complete Information of Stored Functions in MySQL Database

Sreemaha
Updated on 22-Jun-2020 07:54:15

152 Views

We can mysql.proc to see the list, along with complete information, of stored functions in a particular MySQL database by the following query −mysql> Select * from mysql.proc where db = 'query' AND type = 'FUNCTION' \G *************************** 1. row ***************************                   db: query                 name: factorial                 type: FUNCTION        specific_name: factorial             language: SQL      sql_data_access: CONTAINS_SQL     is_deterministic: YES        security_type: DEFINER     ... Read More

Difference between TrimStart and TrimEnd in C#

Arjun Thakur
Updated on 22-Jun-2020 07:53:25

1K+ Views

TrimStart() method removes all leading occurrences of a set of characters, whereas TrimEnd()removes all trailing occurrences of a set of characters.TrimStart()The TrimStart() method removes all leading occurrences of a set of characters specified in an array.Let us see an example to remove all leading zeros −Example Live Demousing System; class Program {    static void Main() {       String str ="0009678".TrimStart(new Char[] { '0' } );       Console.WriteLine(str);    } }Output9678TrimEnd()The TrimEnd() method removes all trailing occurrences of a set of characters specified in an array.Let us see an example to remove all trailing 1s −Example Live ... Read More

Abort in Chash

Samual Sam
Updated on 22-Jun-2020 07:52:56

736 Views

The Abort() method is used for destroying threads.The runtime aborts the thread by throwing a ThreadAbortException. This exception cannot be caught, the control is sent to the finally block if any.Use the Abort() method on a thread −childThread.Abort();Example Live Demousing System; using System.Threading; namespace MultithreadingApplication {    class ThreadCreationProgram {       public static void CallToChildThread() {          try {             Console.WriteLine("Child thread starts");             // do some work, like counting to 10             for (int counter = 0; counter

What are Recursive Stored Procedures and MySQL Recursion Limits

usharani
Updated on 22-Jun-2020 07:52:28

2K+ Views

A stored procedure is called recursive if it calls itself. Basically, this concept is called recursion. MySQL limits the recursion so the errors will be less rigorous. We can check this limit with the help of the following query −mysql> Show variables LIKE '%recur%'; +------------------------+-------+ | Variable_name          | Value | +------------------------+-------+ | max_sp_recursion_depth |   0   | +------------------------+-------+ 1 row in set (0.01 sec)We can change this value up to 255 with the help of the following query −mysql> SET @@GLOBAL.max_sp_recursion_depth = 255// Query OK, 0 rows affected (0.00 sec) mysql> Show variables LIKE ... Read More

Create MySQL Stored Procedure Using a Cursor

Anvi Jain
Updated on 22-Jun-2020 07:51:44

593 Views

Following is a stored procedure which fetches the records from name column of table ‘student_info’ having the following data −mysql> Select * from Student_info; +-----+---------+------------+------------+ | id  | Name    | Address    | Subject    | +-----+---------+------------+------------+ | 101 | YashPal | Amritsar   | History    | | 105 | Gaurav  | Chandigarh | Literature | | 125 | Raman   | Shimla     | Computers  | | 127 | Ram     | Jhansi     | Computers  | +-----+---------+------------+------------+ 4 rows in set (0.00 sec) mysql> Delimiter // mysql> CREATE PROCEDURE cursor_defined(OUT val ... Read More

Retrieve Data Value as a Pointer in C#

Chandu yadav
Updated on 22-Jun-2020 07:50:46

920 Views

A pointer is a variable whose value is the address of another variable. Retrieve the data stored at the located referenced by the pointer variable, using the ToString() method.ExampleHere in an example −using System; namespace UnsafeCodeApplication {    class Program {       public static void Main() {          unsafe {             int var = 100;             int* p = &var;             Console.WriteLine("Data is: {0} " , var);             Console.WriteLine("Data is: {0} " , p->ToString());             Console.WriteLine("Address is: {0} " , (int)p);          }          Console.ReadKey();       }    } }OutputAbove will require you to set unsafe comman line option. After seeting it, the following output would be visible.Data is: 100 Data is: 100 Address is: 77678547

What MySQL MAKE_SET Function Returns with All NULLs

Rama Giri
Updated on 22-Jun-2020 07:50:32

118 Views

MySQL MAKE_SET() function will return nothing if there are all NULL at the place of strings. Following example will demonstrate it −Examplemysql> Select MAKE_SET(2, NULL,NULL,NULL); +-----------------------------+ | MAKE_SET(2, NULL,NULL,NULL) | +-----------------------------+ |                             | +-----------------------------+ 1 row in set (0.00 sec)

Geosynchronous and Geostationary Satellites

Samual Sam
Updated on 22-Jun-2020 07:49:50

4K+ Views

Geosynchronous Satellite and Geosynchronous Orbit (GSO)A geosynchronous satellite is a communication satellite that has an orbital period same as the period of rotation of the earth. Hence, it appears to be permanently in the same area of the sky at a particular time each day when viewed by an observer on the earth.The orbit in which a geosynchronous satellite is placed is called geosynchronous orbit (GSO). Its orbital period is the sidereal day, i.e. 23 hours 56 minutes 4 seconds and its orbital altitude is 35, 800 km.Geostationary Satellite and Geostationary Orbit (GEO)A circular geosynchronous satellite which is placed at ... Read More

Advertisements