Chandu yadav

Chandu yadav

810 Articles Published

Articles by Chandu yadav

Page 79 of 81

What is the difference between initialization and assignment of values in C#?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 1K+ Views

Let us understand the difference between initialization and assignment of values. Declaring an array. int [] n // declaring Initialization Declaring an array does not initialize the array in the memory. When the array variable is initialized, you can assign values to the array. Array is a reference type, so you need to use the new keyword to create an instance of the array. int n= new int[10]; // initialization Let’s assign value. You can assign values to individual array elements, by using the index number − n[0] = 100; n[1] = 200 ...

Read More

MySQL ON vs USING?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 6K+ Views

In general, we use ON in MySQL. In Joins, we use ON in a set of columns. USING is useful when both the tables share a column of the exact same name on which they join. Example of On. Creating our first table. mysql> CREATE table ForeignTableDemo -> ( -> Id int, -> Name varchar(100), - > FK int - > ); Query OK, 0 rows affected (0.47 sec) Creating our second table. mysql> CREATE table PrimaryTableDemo - > ...

Read More

What is the MySQL JDBC driver connection string?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 557 Views

The MySQL JDBC connection string look like this − Class.forName("com.mysql.jdbc.Driver"); Above, Driver is an interface. Whenever your JDBC is running outside an application server, then the class DriverManager establish the connection. The DriverManager class is as follows − conn = (Connection) DriverManager.getConnection("jdbc:mysql://localhost/yourdatabaseName",”yourRootName","yourPassword"); Now, I am applying the above connection string to connect Java to MySQL database. The code is as follows. The following is the output that shows that MySQL connection with Java is successful.

Read More

Count the number of occurrences of a string in a VARCHAR field in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 5K+ Views

To count the number of occurrences of a string in a VARCHAR, we can use the logic of subtraction with length. First, we will create a table with the help of create command. mysql> create table StringOccurrenceDemo -> ( -> Cases varchar(100), -> StringValue varchar(500) -> ); Query OK, 0 rows affected (0.56 sec) After executing the above table, we will insert records into the table. The query is as follows − mysql> insert into StringOccurrenceDemo values('First', 'This is MySQL Demo and MySQL is ...

Read More

How to use a function for default value in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 1K+ Views

We cannot use a function for default value in MySQL, but we can use triggers. Let us see an example. First, we will create a table. The CREATE command is used to create a table. mysql> CREATE table TbLFunctionTrigger - > ( - > id int, - > username varchar(100) - > ); Query OK, 0 rows affected (0.55 sec) The following is the syntax to create a trigger and include a default value. CREATE TRIGGER anyName BEFORE INSERT ON yourTableName FOR EACH ROW ...

Read More

Trunks and Multiplexing

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 3K+ Views

Trunks Definition Trunks are a large-bandwidth communication channels connecting switching centres, forming the core of the telephone network. A trunk comprises of a cluster of broadcast frequencies that are suitable for long haul communication of many voice and data signals simultaneously. Features The characteristic features of a trunk are − They carry digital information as opposed to analog signals carried by local loops. They are designed for both voice and data transmission. They can carry millions of calls simultaneously over long distances. They have very high bandwidth. They generally comprise of a cluster of fiber optic cables bundled together ...

Read More

Pulse Code Modulation

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 1K+ Views

Pulse code modulation (PCM) is a technique of digitally representing analog signals. It takes samples of the amplitude of the analog signal and changes it to binary data. PCM technique is used by codecs in telephone networks to convert analog signals in local loops to digital signals in the trunks, and reverse conversion at the receivers’ end. Operations in Pulse Code Modulation The operations in PCM technique involves operations at the transmitting end and the operations at the receiving end. Transmitting End − In the transmitting end, the analog signals are sampled, quantized and encoded. The codec samples the analog ...

Read More

Enhanced Data rates for GSM Evolution (EDGE)

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 694 Views

Enhanced Data-rates for GSM Evolution (EDGE) is an improved version of GSM providing higher data transmission rate than GSM, while being compatible with the older systems. Features It was standardized by 3GPP as a part of GSM family and was deployed in GSM networks in 2003. The other names for EDGE are Enhanced GPRS (EGPRS) and IMT-Single Carrier (IMT-SC). It is compatible with any packet – switched application. It is also backward – compatible, i.e. compatible with existing or older versions. It enables data to be sent over a GSM TDMA systems at speeds of 384Kbps. GSM uses the ...

Read More

Difference between two timestamps in seconds in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 2K+ Views

Let us now see the following methods to calculate the time difference between two timestamps in seconds. Method The following is the query to calculate the difference between two timestamps. mysql> SELECT TIMESTAMPDIFF(SECOND, '2018-10-17 11:51:55', '2018-10-17 11:51:58'); The following is the output in seconds. +---------------------------------------------------------------------+ | TIMESTAMPDIFF(SECOND, '2018-10-17 11:51:55', '2018-10-17 11:51:58') | +---------------------------------------------------------------------+ | ...

Read More

Rank function in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 832 Views

The rank() function can be used to give a rank for every row within the partition of a result set. First, let us create a table − mysql> create table RankDemo mysql> ( mysql> id int mysql> ); Query OK, 0 rows affected (0.53 sec) Inserting records into table. mysql> insert into RankDemo values(1); Query OK, 1 row affected (0.19 sec) mysql> insert into RankDemo values(3); Query OK, 1 row affected (0.12 sec) mysql> insert into RankDemo values(3); Query OK, 1 row affected (0.11 ...

Read More
Showing 781–790 of 810 articles
Advertisements