AmitDiwan has Published 10744 Articles

Getting the list of Values of a SortedList object in C#

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:26:14

107 Views

To get the list of values of a SortedList object, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       SortedList list = new SortedList();       list.Add("A", 1);       list.Add("B ", 2); ... Read More

Perform MySQL search between two dates

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:23:04

515 Views

To perform MySQL search between two dates, use BETWEEN keyword. Let us first create a table −mysql> create table DemoTable1456    -> (    -> CustomerName varchar(30),    -> StartOfferDate  date,    -> EndOfferDate date    -> ); Query OK, 0 rows affected (0.54 sec)Insert some records in the table ... Read More

Getting the list of keys of a SortedList object in C#

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:22:04

727 Views

To get the list of keys of a SortedList object, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main(String[] args) {       SortedList list1 = new SortedList();       list1.Add("One", 1);       list1.Add("Two ", 2); ... Read More

Perform MySQL SELECT on fields containing null values?

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:18:58

90 Views

To check for NULL values in SELECT, use MySQL NULL. Let us first create a table −mysql> create table DemoTable1455    -> (    -> Name varchar(20)    -> ); Query OK, 0 rows affected (0.47 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1455 values('John'); ... Read More

Get or set the number of elements in the BitArray in C#

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:17:55

116 Views

To get or set the number of elements in the BitArray, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main() {       BitArray arr1 = new BitArray(2);       BitArray arr2 = new BitArray(2);       ... Read More

MySQL query to get next closest day between two days?

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:15:51

166 Views

Following is the syntax −select * from yourTableName order by ( yourColumnName> now()) desc, (case when yourColumnName > now() then yourColumnName end) ,    yourColumnName  desc limit 1;Let us first create a table −mysql> create table DemoTable1454    -> (    -> ShippingDate date    -> ); Query OK, 0 ... Read More

Union of SortedSet to a collection in C#

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:13:06

137 Views

To compute the Union of SortedSet to a Collection, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main() {       SortedSet set1 = new SortedSet();       set1.Add(50);       set1.Add(100);       set1.Add(150);   ... Read More

Print structured MySQL SELECT at command prompt

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:09:40

222 Views

To print, the syntax is as follows −mysql -uroot -t -e "your Select Query  " -pTo implement the above syntax, let us open the command prompt −Now, reach the MySQL bin −Let us implement the above syntax to easily print structured SQL select. Following is the query −This will produce ... Read More

Bitwise OR operation between the elements of BitArray in C#

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:07:37

90 Views

Let us see how to implement Bitwise OR operation between the elements of BitArray −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main() {       BitArray arr1 = new BitArray(5);       BitArray arr2 = new BitArray(5);       arr1[0] = ... Read More

Count duplicate ids and display the result in a separate column with MySQL

AmitDiwan

AmitDiwan

Updated on 10-Dec-2019 06:06:06

198 Views

Let us first create a table −mysql> create table DemoTable1453    -> (    -> CustomerId int,    -> CustomerReviewNumber int    -> ); Query OK, 0 rows affected (0.58 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1453 values(10, 4); Query OK, 1 row affected ... Read More

Advertisements