AmitDiwan has Published 11365 Articles

How to add a column from a select query but the value from the new column will be the row count of the MySQL select query?

AmitDiwan

AmitDiwan

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

254 Views

For this, you can use MySQL row_number(). Let us first create a table −mysql> create table DemoTable1342    -> (    -> Score int    -> ); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1342 values(80); Query OK, 1 ... Read More

jQuery :file Selector

AmitDiwan

AmitDiwan

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

415 Views

The :file selector in jQuery is used to select all input elements with type=”file”.SyntaxThe syntax is as follows −$(":file")ExampleLet us now see an example to implement the :file() selector −    .demo {       background-color: blue;       color: white;       font-size: ... Read More

Convert.FromBase64String(String) Method in C#

AmitDiwan

AmitDiwan

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

3K+ Views

The Convert.FromBase64String(String) method in C# converts the specified string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array.SyntaxFollowing is the syntax −public static byte[] FromBase64String (string str);Above, the parameter str is the string to convert.ExampleLet us now see an example to implement the Convert.FromBase64String(String) method ... Read More

Fetch the substring after last dot in MySQL

AmitDiwan

AmitDiwan

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

1K+ Views

To fetch the substring after last dot, use substring_index(). Let us first create a table −mysql> create table DemoTable1341    -> (    -> Value varchar(60)    -> ); Query OK, 0 rows affected (0.75 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1341 values('John.123.@gmail.com' ); ... Read More

jQuery :even Selector

AmitDiwan

AmitDiwan

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

128 Views

The :even selector in jQuery is used to select even elements i.e. with even index number.Note − The :even selector deprecated in jQuery 3.4SyntaxThe syntax is as follows −$(":even")ExampleLet us now see an example to implement the :even() selector −    .one {       background-color: ... Read More

CharEnumerator.ToString() Method in C#

AmitDiwan

AmitDiwan

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

36 Views

The CharEnumerator.ToString() method in C# gets a string that represents the current object.SyntaxFollowing is the syntax -public virtual string ToString();ExampleLet us now see an example to implement the CharEnumerator.ToString() method −using System; public class Demo {    public static void Main(){       string strNum = "This is it!"; ... Read More

How to check if a date has passed in MySQL?

AmitDiwan

AmitDiwan

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

786 Views

Let us first create a table −mysql> create table DemoTable1340    -> (    -> Deadline date    -> ); Query OK, 0 rows affected (0.43 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1340 values('2019-09-18'); Query OK, 1 row affected (0.52 sec) mysql> insert into ... Read More

jQuery :enabled Selector

AmitDiwan

AmitDiwan

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

148 Views

The :enabled selector in jQuery is used to select all enabled input elements.SyntaxThe syntax is as follows −$(":enabled")ExampleLet us now see an example to implement the :enabled() selector −    .one {       background-color: orange;       font-size: 16px;       border: 2px ... Read More

MySQL random rows sorted by a specific column name?

AmitDiwan

AmitDiwan

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

212 Views

Let us first create a table −mysql> create table DemoTable1339    -> (    -> Name varchar(30),    -> Score int    -> ); Query OK, 0 rows affected (0.76 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1339 values('Chris', 56); Query OK, 1 row affected ... Read More

Tuple Class in C#

AmitDiwan

AmitDiwan

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

73 Views

The Tuple class represents a 3-tuple, which is called triple. A tuple is a data structure that has a sequence of elements.It is used in −Easier access to a data set.Easier manipulation of a data set.To represent a single set of data.To return multiple values from a methodTo pass multiple ... Read More

Advertisements