- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Karthikeya Boyini has Published 2383 Articles
karthikeya Boyini
217 Views
Let's say our string is −StringBuilder str = new StringBuilder(); str.Append("pre");To change a character, set the value at that particular index. The following sets a character at the 3rd position −str[2] = 'o';Here is the complete code −Example Live Demousing System; using System.Text; public class Demo { public static ... Read More
karthikeya Boyini
372 Views
As we know that with the help of UPDATE statement we can update the values in MySQL table and in the similar way we can update the values in MySQL views. The syntax of UPDATE statement would be the same except at the place of table name we have to ... Read More
karthikeya Boyini
6K+ Views
For anagram, another string would have the same characters present in the first string, but the order of characters can be different.Here, we are checking the following two strings −string str1 = "heater"; string str2 = "reheat";Convert both the strings into character array −char[] ch1 = str1.ToLower().ToCharArray(); char[] ch2 = ... Read More
karthikeya Boyini
1K+ Views
Set an array −int[] arr = { 89, 12, 56, 89, };Now, create a new Dictionary −var d = new Dictionary < int, int > ();Using the dictionary method ContainsKey(), find the duplicate elements in the array −foreach(var res in arr) { if (d.ContainsKey(res)) ... Read More
karthikeya Boyini
187 Views
Firstly, set an array with values −int[] myArr = new int[] { 34, 23, 77, 67 };To get the average, firstly get the sum of array elements.Divide the sum with the length of the array and that will give you the average of the elements −int ... Read More
karthikeya Boyini
1K+ Views
Firstly, set the Hex String −string str = "7D";Now, use the Convert.ToSByte() method to convert the Hex string to Hex number −Console.WriteLine(Convert.ToSByte(str, 16));Let us see the complete code −Example Live Demousing System; namespace Demo { public class Program { public static void Main(string[] args) { ... Read More
karthikeya Boyini
297 Views
Heterogram for a string means the string isn’t having duplicate letters. For example −Mobile Cry LaptopLoop through each word of the string until the length of the string −for (int i = 0; i < len; i++) { if (val[str[i] - 'a'] == 0) val[str[i] - 'a'] = ... Read More
karthikeya Boyini
384 Views
To check for all vowels, firstly set the condition to check −string res = str.Where(chk =< "aeiouAEIOU".Contains(chk)).Distinct();Above, we have used the string −string str = "the quick brown fox jumps over the lazy dog";Now, using the Any() method checks whether the string has any vowels or not −if(!res.Any()) Console.WriteLine("No vowels!");Loop ... Read More
karthikeya Boyini
1K+ Views
In spite of various benefits of using views there are following limitations on using MySQL views − Can’t create an index of views − In MySQL, we cannot create an index on views. It is because indexes are not utilized when we query data against the views. MySQL invalidates the view − ... Read More