AmitDiwan has Published 10744 Articles

Math.Truncate() Method in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:05:05

595 Views

The Math.Truncate() method in C# is used to compute an integral part of a number, which is Double or Decimal.Syntaxpublic static decimal Truncate(decimal val1) public static double Truncate(double val2)Above, there are two syntaxes. The value val1 is the decimal number to truncate, whereas val2 is the double number to truncate.ExampleLet ... Read More

jQuery :contains() Selector

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:03:51

505 Views

The :contain() selector in jQuery is used to select elements containing the specified text.SyntaxThe syntax is as follows −$(":contains(text)")Here, the parameter text is the text to find. The same elements are selected with the specified text.ExampleLet us now see an example to implement the :contains() selector − ... Read More

Select different fields in MySQL even if a field is set to null?

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:01:32

177 Views

For this, you can use COALESCE(). Let us first create a table −mysql> create table DemoTable1336    -> (    -> FirstName varchar(20)    -> ,    -> SecondName varchar(20)    -> ); Query OK, 0 rows affected (0.64 sec)Insert some records in the table using insert command −mysql> insert ... Read More

Math.Tanh() Method in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:01:26

112 Views

The Math.Tanh() method in C# is used to return the hyperbolic tangent of the specified angle.Syntaxpublic static double Tanh (double val);Above, Val is the angle.ExampleLet us now see an example to implement Math.Tanh() method −using System; public class Demo {    public static void Main(){       double val1 ... Read More

jQuery :checked Selector

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:00:05

337 Views

The :checked selector in jQuery is used to look for all the checked radio button or checkboxes and selects them.SyntaxThe syntax is as follows −$(":checked")ExampleLet us now implement the :checked selector in jQuery − Favourite Subject Maths: English ... Read More

Select entries with timestamp after X time in MySQL

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 06:59:01

441 Views

Let us first create a table −mysql> create table DemoTable1335    -> (    -> ArrivalTime datetime    -> ); Query OK, 0 rows affected (0.49 sec)Insert some records in the table using insert command. We have inserted date time records here −mysql> insert into DemoTable1335 values('2019-09-19 22:54:00'); Query OK, ... Read More

CharEnumerator.Reset() Method in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 06:58:50

107 Views

The CharEnumerator.Reset() method in C# initializes the index to a position logically before the first character of the enumerated string.Syntaxpublic void Reset ();ExampleLet us now see an example to implement the CharEnumerator.Reset() method −using System; public class Demo {    public static void Main(){       string strNum = ... Read More

Insert values in two tables with a single stored procedure call in MySQL

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 06:56:13

2K+ Views

Following is the syntax to insert values in two tables with a stored procedure −DELIMITER // CREATE PROCEDURE yourProcedureName(anyVariableName int)    BEGIN    insert into yourTableName1(yourColumnName1) values(yourVariableName);    insert into yourTableName2(yourColumnName2) values(yourVariableName);    END //Let us first create a table −mysql> create table DemoTable1    -> (    -> StudentScore ... Read More

jQuery :checkbox Selector

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 06:56:05

440 Views

The jQuery :checkbox selector is used to select input elements with type checkbox.SyntaxThe syntax is as follows −$(":checkbox")ExampleLet us see an example to implement the :checkbox selector in jQuery −    $(document).ready(function(){       $(":checkbox").wrap("");    }); Fill the form ID: ... Read More

jQuery :button Selector

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 06:54:51

497 Views

The jQuery :button selector is used to select button and input elements with type button.ExampleLet us now see an example to implement the :button selector −    $(document).ready(function(){       $(":button").css("border-width", "5px");    }); Username: Password: Demo Button ... Read More

Advertisements