The most significant difference between procedures and functions is that they are invoked differently and for different purposes. Other than that following are the differences between procedure and functions −A procedure does not return a value. Instead, it is invoked with a CALL statement to perform an operation such as modifying a table or processing retrieved records.On the other hand, a function is invoked within an expression and returns a single value directly to the caller to be used in the expression. That is, a function is used in expressions the same way as a constant, a built-in function, or ... Read More
VSATs (Very Small Aperture Terminals) is a two way, lost cost, ground micro station for transmitting data to and from communication satellites. A VSAT has a dish antenna with diameters between 75 cm to 1 m, which is very small in comparison with 10 m diameter of a standard GEO antenna. It accesses satellites in geosynchronous orbits or geostationary orbits. Data rates in VSATs ranges from 4 Kbps to 16 Mbps.Configurations of VSATsStar Topology − This has a central uplink site which transmits data from and to each VSAT through the satellite.Mesh Topology − Each VSAT transmits data via the ... Read More
Most computer systems are single processor systems but multiprocessor systems are increasing in importance nowadays. These systems have multiple processors working in parallel that share the computer clock, memory, bus, peripheral devices etc.There are mainly two types of multiprocessor systems. These are −Symmetric Multiprocessor SystemAsymmetric Multiprocessor SystemIn symmetric multiprocessing, multiple processors share a common memory and operating system. All of these processors work in tandem to execute processes. The operating system treats all the processors equally, and no processor is reserved for special purposes.Features of Symmetric Multiprocessing (SMP)Some of the key points about symmetric multiprocessing are explained with the help ... Read More
Asymmetric multiprocessor systems are a part of multiprocessor systems along with symmetric multiprocessor systems. Multiprocessor systems have multiple processors working in parallel that share the computer clock, memory, bus, peripheral devices etc.Features of Asymmetric MultiprocessingSome of the key points about asymmetric multiprocessing are explained with the help of the following diagram −Here are the points −All the processors are not treated equally in asymmetric multiprogramming. For example, a processor may handle only I/O related operations and another may handle only operating system code. This is in direct contrast to symmetric multiprocessing systems because there all processors are treated equally and ... Read More
With the help of MySQL MAKE_SET() function, we can return the values of columns from MySQL table as a set of values. To understand it, we are taking the example of Student_Name table which has the following data −mysql> Select * from Student_Name; +---------+-------+---------+ | FName | Mname | Lname | +---------+-------+---------+ | Rahul | NULL | Singh | | Gaurav | Kumar | NULL | | Harshit | NULL | Khurana | | Yash | Pal | Sharma | +---------+-------+---------+ 4 rows in set (0.00 sec)Now, suppose if we want to make ... Read More
Just like LENGTH() function, MySQL BIT_LENGTH() function is not a multi-byte safe function. As we know that the difference of the result between multi-byte safe functions, like CHAR_LENGTH() or CHARACTER_LENGTH(), and BIT_LENGTH() function especially relevant for Unicode, in which most of the characters are encoded in two bytes or relevant for UTF-8 where the number of bytes varies. It is demonstrated in the example below −Examplemysql> Select BIT_LENGTH('tutorialspoint'); +------------------------------+ | BIT_LENGTH('tutorialspoint') | +------------------------------+ | 112 | +------------------------------+ 1 row in set (0.00 sec)The above result set shows that ... Read More
Read()The Read() reads the next characters from the standard input stream. If a key is pressed on the console, then it would close.int az = Console.Read() Console.WriteLine(z);ReadKey()It reads only a single charactare from the standard input stream.ReadLine()Reads the next line of characters from the standard input stream.Example Live Demousing System; class Program { static void Main() { int x = 10; Console.WriteLine(x); Console.Write("Press any key to continue... "); Console.ReadLine(); } }Output10 Press any key to continue...
We can update MySQL table after padding a string with the values of a column by using LPAD() or RPAD() function along with UPDATE clause. Following the example from ‘examination_btech’ table will make it clearer −ExampleSuppose if we want to append the values, in last, of column course with the string ‘(CSE)’ and want to update the table too then it can be done with the help of the following query −mysql> Update examination_btech set course = RPAD(Course, 11, '(CSE)'); Query OK, 10 rows affected (0.16 sec) mysql> Select * from examination_btech; +-----------+----------+-------------+ | RollNo | Name ... Read More
Divide by zero is the System.DivideByZeroException, which is a class that handles errors generated from dividing a dividend with zero.Let us see an example.Example Live Demousing System; namespace ErrorHandlingApplication { class DivNumbers { int result; DivNumbers() { result = 0; } public void division(int num1, int num2) { try { result = num1 / num2; } catch (DivideByZeroException e) { Console.WriteLine("Exception caught: ... Read More
If we want to use prepared statements in a stored procedure then it must be written inside the BEGIN and END block. To understand it, we are creating an example with the help of which we can get all the records from a table by passing the name of the table as a parameter of the stored procedure.Examplemysql> DELIMITER // mysql> Create procedure tbl_detail(tab_name Varchar(40)) -> BEGIN -> SET @A:= CONCAT('Select * from', ' ', tab_name); -> Prepare stmt FROM @A; -> EXECUTE stmt; -> END // Query OK, 0 ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP