Actually, there is no single function in MySQL to capitalize only first letter of the string. We need to use nesting of functions and for this case, we can use UPPER() and LOWER() with SUBSTRING() functions. To understand it, we are using data, given as below, from ‘emp_tbl’.mysql> Select * from emp_tbl; +----+----------------+ | Id | Name | +----+----------------+ | 1 | rahul singh | | 2 | gaurav kumar | | 3 | yashpal sharma | | 4 | krishan kumar | | 5 | kuldeep rai | | 6 | ... Read More
The End of the File (EOF) indicates the end of input.After we enter the text, if we press CTRL+Z, the text terminates i.e. it indicates the file reached end nothing to read.AlgorithmRefer to the algorithm given below for EOF.Step 1: Open file in write mode. Step 2: Until character reaches end of the file, write each character in filepointer. Step 3: Close file. Step 4: Again open file in read mode. Step 5: Reading the character from file until fp equals to EOF. Step 5: Print character on console. Step 6: Close file.ExampleFollowing is the C program for End of ... Read More
Sometimes, handling events in a Tkinter application can become a daunting task for us. We have to manage the action and events which need to be executed at the time of running the application. The Button widget is useful for handling such events. We can use Button widget to perform a certain task or event by passing the callback in the command.While giving the command to the Button widget, we can have an optional lambda or anonymous functions which interpret to ignore any errors in the program. These are just like a general function but they don't have any function ... Read More
The 8255 is a general purpose programmable IO device. It is designed to interface the CPU with some external devices like ADC, DAC, keyboard etc. We can program the device according to the given condition.There are three 8-bit bi-directional IO ports. The Port-A, Port-B, and Port-C. These ports are assigned as input or output port.The block diagram of 8255 is like this:There are two different modes of 8255. These modes are:Bit Set Reset (BSR) ModeInput/ Output ModeBit Set Reset (BSR) ModeThis mode is used to set or reset the bits of the Port-C only. For BSR mode always D7 will ... Read More
Before working on the difference between all three schedulers, let us recall the concept of process scheduler.Process scheduler is a part of the Operating system which schedules the process. If the process is in ready, waiting and running state it schedules it correctly and is also responsible for the allocation of the CPU processor to a specific task within a time interval.Also, when the task or process is completed it doesn't allow the CPU to sit idle. It will allocate the other task depending on its current state. If the process was in ready state it will allocate it to ... Read More
Ubuntu 22.04 LTS (Focal Fossa) is latest long-term support release of Ubuntu, which means that it will be supported for five years with security updates and bug fixes. If you have just installed Ubuntu 22.04 LTS, congratulations! You are now ready to explore world of Ubuntu and take advantage of its many features and tools. In this article, we will discuss 20 things that you can do after installing Ubuntu 22.04 LTS to make most of your new operating system. These include customizing your desktop, installing new software, configuring your system settings, and more. Update Your System The first thing ... Read More
EOFEOF stands for End of File. The function getc() returns EOF, on success..Here is an example of EOF in C language, Let’s say we have "new.txt" file with the following content.This is demo! This is demo!Now, let us see the example.Example#include int main() { FILE *f = fopen("new.txt", "r"); int c = getc(f); while (c != EOF) { putchar(c); c = getc(f); } fclose(f); getchar(); return 0; }OutputThis is demo! This is demo!In the above program, file is opened by using fopen(). When integer variable c ... Read More
In HTML, both Id and Class are the element selector and are used to identify an element based on the name assign to these parameters. ID and Class selectors are the most widely used element selectors in CSS (HTML). The basic difference between ID and Class is that the ID selector is applied only to one element in a page, whereas the class selector can be applied to several elements on a single page. Read this article to find out more about "id" and "class" in HTML and how they are different from each other. What is ID in ... Read More
Introduction In SQL Server, you may sometimes need to update data in multiple tables at the same time. This can be done using a single UPDATE statement, which allows you to update multiple tables in a single query. To update two tables in one statement, you can use the UPDATE statement with a JOIN clause. The JOIN clause allows you to specify a relationship between the two tables that you want to update, based on a common column or set of columns. Definition The term "update two tables in one statement" refers to the process of using a single UPDATE ... Read More
In JavaScript, there are multiple ways to extract a number from a string. One way is to use the match() method and a regular expression to search for all numeric digits in the string. Another way is to use the replace() method and a regular expression to remove all nonnumeric characters from the string, leaving only the numbers. Let’s understand each of the methods with the help of some examples. Using the match() method and regular expression The regular expression is one kind of search pattern which we can create by combining multiple alphabetic and special characters. We can ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP