Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by radhakrishna
Page 2 of 7
How to set a value to the element at the specified position in the one-dimensional array in C#
Firstly, set the array −int[] p = new int[] {55, 66, 88, 99, 111, 122, 133};Now, let us say you need to set an element at position 1 −p[2] = 77;Let us see the comple code −Exampleusing System; namespace Program { public class Demo { public static void Main(string[] args) { int[] p = new int[] {55, 66, 88, 99, 111, 122, 133}; int j; Console.WriteLine("Initial Array......"); for (j = 0; j < p.Length; j++ ) { ...
Read MoreSet Responsive Font Size using CSS
To set the responsive font size, use the ‘viewport width’ and set it to ‘vw’ unit. You can try to run the following code to use ‘vw’ unit −Example h1 { font-size:8vw; } This is demo heading This is demo text.
Read MoreSet the height and width of an image using percent with CSS
To set the height and width of an image using %, you can try to run the following code −Example img { height: 50%; width: 50%; } Sized image in %
Read MoreAnimate CSS column-gap property
To implement animation on the column-gap property with CSS, you can try to run the following code −Example div { width: 600px; height: 300px; background: white; border: 10px solid red; animation: myanim 3s infinite; bottom: 30px; position: absolute; column-count: 4; ...
Read MoreRole of CSS :checked Selector
Use the CSS :checked selector to style every checked element. You can try to run the following code to implement the :checked selector:Example input:checked { height: 20px; width: 20px; } Fav sports: Football Cricket Tennis Tennis Output
Read MoreUsage of CSS grid-auto-flow property
Use the grid-auto-flow property to include auto-placed items in the grid.ExampleYou can try to run the following code to implement the grid-auto-flow property with CSS − .container { display: grid; grid-auto-columns: 50px; grid-auto-flow: column; grid-gap: 10px; background-color: red; padding: 10px; } .container>div { background-color: yellow; text-align: center; padding:10px 0; font-size: 20px; } 1 2 3 4 5 6
Read MoreStyle all <input> elements with an invalid value with CSS
To style all elements with an invalid value, use the CSS :invalid selector.ExampleYou can try to run the following code to implement the :invalid selector − input:invalid { background: red; } Heading The style (red color background) appears if you type an irrelevant/ invalid email address.
Read MoreRole of CSS :optional Selector
Use the CSS :optional selector to style elements with no "required" attributeExampleYou can try to run the following code to implement the :optional selector: input:optional { background-color: blue; } Subject: Student:
Read MoreCan we overload the main method in Java?
Yes, we can overload the main method in Java, but When we execute the class JVM starts execution with public static void main(String[] args) method. Example public class Sample{ public static void main(){ System.out.println("This is the overloaded main method"); } public static void main(String args[]){ Sample obj = new Sample(); obj.main(); } } Output This is the overloaded main method
Read MoreHow to create fading effect with CSS
To create a fading effect with CSS, use the c You can try to run the following code for fading effect:Example #demo { height: 100px; background: linear-gradient(to right, rgba(255,50,30,0), rgba(255,50,30,1)); } Linear Gradient Fading Effect
Read More