Change a Character in a String using C#

karthikeya Boyini
Updated on 22-Jun-2020 13:35:34

310 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 void Main() {       StringBuilder str = new StringBuilder();       str.Append("pre");       Console.WriteLine("String : "+str);       Console.WriteLine("Change 3rd character");       str[2] = 'o';       Console.WriteLine("New String : "+str);    } }OutputString : pre Change 3rd character New String : pro

Remove Characters Starting at a Particular Index in StringBuilder

Samual Sam
Updated on 22-Jun-2020 13:35:12

135 Views

Set StringBuilder −StringBuilder str = new StringBuilder("Airport");Let’s say you need to remove characters. For that, use the Remove() method, which removes a bunch of characters beginning with a particular index −str.Remove(3, 4);The above removes four characters beginning from 3rd index (i.e. 4th position) −Here is the complete code −Example Live Demousing System; using System.Text; public class Program {    public static void Main() {       StringBuilder str = new StringBuilder("Airport");       Console.WriteLine("String: "+str);       // removing four characters       Console.Write("String after removing characters: ");       str.Remove(3, 4);       Console.WriteLine(str);    } }OutputString: Airport String after removing characters: Air

Create a New Database Using PHP Script

Nancy Den
Updated on 22-Jun-2020 13:34:56

159 Views

As we know that PHP provides us the function named mysql_query to create a new database.ExampleTo illustrate this we are creating a database named ‘Tutorials’ with the help of PHP script in the following example −           Creating MySQL Database                  

Purpose of System Programs

Kristi Castro
Updated on 22-Jun-2020 13:34:43

8K+ Views

System programs provide an environment where programs can be developed and executed. In the simplest sense, system programs also provide a bridge between the user interface and system calls. In reality, they are much more complex. For example, a compiler is a complex system program.System Programs PurposeThe system program serves as a part of the operating system. It traditionally lies between the user interface and the system calls. The user view of the system is actually defined by system programs and not system calls because that is what they interact with and system programs are closer to the user interface.An ... Read More

Select MySQL Database Using PHP Script

Vrundesha Joshi
Updated on 22-Jun-2020 13:33:45

198 Views

As we know that PHP provides us the function named mysql_select_db to select a mysql database.ExampleTo illustrate this we are selecting a database named ‘Tutorials’ with the help of PHP script in the following example −           Selecting MySQL Database                  

Select MySQL Database Using PHP Function

seetha
Updated on 22-Jun-2020 13:33:13

238 Views

PHP uses mysql_select_db function to select a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure. Its syntax is as follows −Syntaxbool mysql_select_db( db_name, connection );Followings are the parameters used in this function:Sr.NoParameter & Description1db_nameRequired - MySQL database name to be selected2connectionOptional - if not specified, then the last opened connection by mysql_connect will be used.

Structure of Unix Operating System

Ricky Barnes
Updated on 22-Jun-2020 13:32:57

17K+ Views

Unix is a multiuser, multitasking operating system that was developed by Bell Laboratories in 1969. In a multiuser system, many users can use the system simultaneously. A multitasking system is capable of doing multiple jobs. Each user interacts with their own shell instance in this type of operating system and can start applications as required.An image that demonstrates the structure of the Unix operating system is −As seen in the image, the main components of the Unix operating system structure are the kernel layer, the shell layer and the application layer.Details about these are given as follows −KernelThe kernel provides ... Read More

Update Values in MySQL View

karthikeya Boyini
Updated on 22-Jun-2020 13:32:30

483 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 provide the name of the view. We are taking the data as follows from a view named ‘Info’ to illustrate the above concept −mysql> Select * from Info; +------+---------+------------+ | Id   | Name    | Subject    | +------+---------+------------+ | 101  | YashPal | History    | | 105 ... Read More

Modify MySQL View Definition Without Dropping It

Kumar Varma
Updated on 22-Jun-2020 13:31:43

200 Views

With the help of ALTER VIEW statement, we can modify the definition of MySQL view. In this case, we do not need to drop it. The syntax would be as follows −SyntaxALTER VIEW view_name AS SELECT column1, column2… FROM table WHERE conditions;ExampleTo illustrate it we are modifying the definition of a view named ‘Info’ which have the following data −mysql> Select * from Info; +------+---------+------------+ | Id   | Name    | Subject    | +------+---------+------------+ | 101  | YashPal | History    | | 105  | Gaurav  | Literature | | 125  | Raman   | Computers  | | ... Read More

Mac OS X Structure

Kristi Castro
Updated on 22-Jun-2020 13:31:17

7K+ Views

The Mac OS is a graphical operating system developed by Apple Inc. The tenth version of the Mac OS is the Mac OS X which was launched in 2001.The structure of the Mac OS X includes multiple layers. The base layer is Darwin which is the Unix core of the system. Next layer is the graphics system which contains Quartz, OpenGL and QuickTime. Then is the application layer which has four components, namely Classic, Carbon, Cocoa and Java. The top layer is Aqua, which is the user interface.A diagram that demonstrates the structure of Mac OS X is as follows ... Read More

Advertisements