The position: static; property sets the position of an element static, which is the default.ExampleThe top, bottom, left, and right properties does not affect the the static positioned elements. You can try to run the following code to implement the CSS position: static; propertyLive Demo div.static { position: static; border: 3px solid blue; } Positioning Element div element with position: static; Output
Increment operator increases integer value by one i.e.int a = 10; a++; ++a;Decrement operator decreases integer value by one i.e.int a = 20; a--; --a;The following is an example demonstrating increment operator −Example Live Demousing System; class Program { static void Main() { int a, b; a = 10; Console.WriteLine(++a); Console.WriteLine(a++); b = a; Console.WriteLine(a); Console.WriteLine(b); } }Output11 11 12 12The following is an example demonstrating decrement operator −int a, b; a = 10; // displaying decrement operator result Console.WriteLine(--a); Console.WriteLine(a--); b = a; Console.WriteLine(a); Console.WriteLine(b);
The break statement terminates the loop and transfers execution to the statement immediately following the loop.The continue statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.When the break statement is encountered inside a loop, the loop is immediately terminated and program control resumes at the next statement following the loop.The continue statement in C# works somewhat like the break statement. Instead of forcing termination, however, continue forces the next iteration of the loop to take place, skipping any code in between.The following is the complete code to use continue statement in a ... Read More
As we know that CONCAT() function returns NULL if any of the arguments is NULL but CONCAT_WS() function returns NULL only if the first argument i.e. the separator is NULL and it ignores any other NULL. We can say this is the advantage of CONCAT_WS() function over CONCAT() function when we want to concatenate the values from the column and any of the columns have NULL as its value. To understand it, we consider the example from the table ‘Student_name; which have the following data −mysql> Select * from Student_Name; +---------+-------+---------+ | FName | Mname | Lname | ... Read More
To generate first 100 odd numbers, set a for loop from 1 to 100.for(val = 1; val
We must have to declare NOT FOUND handler while working with MySQL cursor because it handles the situation when cursor could not find any row. It also handles the situation when the cursor reaches the end of the row because every time we call FETCH statement the cursor finds to attempt the next row in the result set. Following is the syntax to declare NOT FOUND handler −DECLARE CONTINUE HANDLER FOR NOT FOUND SET var_name = value;Here var_name is the name of any variable and value would be the value of that variable. For example, we can declare it as ... Read More
MySQL FORMAT() function, converts a number to a format like #, ###, ###.### which is rounded up to the number of decimal places specified and returns the result as a string, can be used to retrieve the output having decimal values of a column in a specified format. To understand it, we are taking an example of table ‘estimated_cost’ which have the following data −mysql> Select * from estimated_cost; +----+-----------------+-----------+---------------+ | Id | Name_Company | Tender_id | Tender_value | +----+-----------------+-----------+---------------+ | 1 | ABC Ltd. | 110 | 256.3256879 | | 2 ... Read More
The System.Console class in C# represents the standard input, output, and error streams for console applications.The following are some of the methods of the System.Console class −Refer: MSDN System Class methodsSr.NoMethod & Description1Beep()Plays the sound of a beep through the console speaker.2Beep(Int32, Int32)Plays the sound of a beep of a specified frequency and duration through the console speaker.3Clear()Clears the console buffer and corresponding console window of display information.4MoveBufferArea(Int32, Int32, Int32, Int32, Int32, Int32)Copies a specified source area of the screen buffer to a specified destination area.5MoveBufferArea(Int32, Int32, Int32, Int32, Int32, Int32, Char, ConsoleColor, ConsoleColor)Copies a specified source area of the ... Read More
Use the CSS :nth-last-child(n) selector to style every element that is the child of its parent, counting from the last child.You can try to run the following code to implement the :nth-last-child(n) selector −ExampleLive Demo p:nth-last-child(4) { background: blue; color: white; } This is demo text 1. This is demo text 2. This is demo text 3. This is demo text 4. This is demo text 5. This is demo text 6. Output
The difference between Write() and WriteLine() method is based on new line character.Write() method displays the output but do not provide a new line character.WriteLine() method displays the output and also provides a new line character it the end of the string, This would set a new line for the next output.Let us see an example to learn about the difference between Write() and WriteLine() method −Example Live Demousing System; class Program { static void Main() { Console.Write("One"); Console.Write("Two"); // this will set a new line for the next output ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP