Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10740 Articles
AmitDiwan
393 Views
To insert an element into Collection at the specified index, the code is as follows −Example Live Demousing System; using System.Collections.ObjectModel; public class Demo { public static void Main(){ Collection col = new Collection(); col.Add("Laptop"); col.Add("Desktop"); col.Add("Notebook"); ... Read More
AmitDiwan
143 Views
To insert a new entry in OrderedDictionary with specified key and value, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo { public static void Main(){ OrderedDictionary dict = new OrderedDictionary(); dict.Add("1", "One"); dict.Add("2", ... Read More
AmitDiwan
738 Views
To get last value in group concat, use SUBSTRING_INDEX(). Let us first create a table −mysql> create table DemoTable1525 -> ( -> ListOfSubjects text -> ); Query OK, 0 rows affected (1.13 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1525 values('MongoDB, C'); ... Read More
AmitDiwan
217 Views
To check whether an element is contained in the ArrayList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo { public static void Main(){ ArrayList list = new ArrayList(); list.Add("One"); list.Add("Two"); list.Add("Three"); ... Read More
AmitDiwan
184 Views
To check whether a Hashtable contains a specific key or not, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo { public static void Main(){ Hashtable hash = new Hashtable(); hash.Add("One", "Katie"); hash.Add("Two", "John"); ... Read More
AmitDiwan
2K+ Views
Let us first create a table table −mysql> create table DemoTable1523 -> ( -> Id int, -> Value int -> ); Query OK, 0 rows affected (0.76 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1523 values(1, 56); Query OK, 1 row ... Read More
AmitDiwan
137 Views
To check the HybridDictionary for a specified key, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo { public static void Main(){ HybridDictionary dict = new HybridDictionary(5); dict.Add("A", "AB"); dict.Add("B", "BC"); ... Read More
AmitDiwan
237 Views
For this, use aggregate function SUM() along with GROUP BY. Let us first create a table −mysql> create table DemoTable1522 -> ( -> ProductPurchaseDate date, -> NumberOfProduct int -> ); Query OK, 0 rows affected (1.51 sec)Insert some records in the table using insert command −mysql> ... Read More
AmitDiwan
750 Views
The Convert Class has methods to convert a base data type to another base data type. Let us see some examples −The Convert.ToBoolean() method in C# is used to convert a specified value to an equivalent Boolean value.SyntaxFollowing is the syntax −public static bool ToBoolean (string val, IFormatProvider provider);Above, Val ... Read More
AmitDiwan
573 Views
To remove the trailing values, use TRIM() as in the below update syntax −update yourTableName set yourColumnName=trim(trailing '_' from yourColumnName);Let us first create a table −mysql> create table DemoTable1521 -> ( -> StudentCode varchar(20) -> ); Query OK, 0 rows affected (1.33 sec)Insert some records in the ... Read More