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 Ankith Reddy
Page 16 of 73
Collection Initialization in C#
Initialize Collection like class objects using collection initializer syntax.Firstly, set values for the Employee object −var emp1 = new Employee() { EID = 001, EmpName = "Tim", EmpDept = "Finance"}; var emp2 = new Employee() { EID = 002, EmpName = "Tom", EmpDept = "HR"};Now add this under a collection.IList empDetails = new List {emp1, emp2 };Let us see the complete code −Exampleusing System; using System.Collections.Generic; public class Demo { public static void Main() { var emp1 = new Employee() { EID = 001, EmpName = "Tim", EmpDept = "Finance"}; var emp2 = ...
Read MoreSet min-width and max-width of an element using CSS
To set the minimum and maximum width of an element, you can try to run the following codeExample div { max-width: 300px; min-width: 100px; background-color: red; } Below is a div with maximum and minimum width. Resize the web browser to see the effect. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. Output
Read MorePollard’s Rho Algorithm for Prime Factorization in java
It is an algorithm to perform factorization on given integers. Following is the program implementing the Rho Algorithm for Prime Factorization.Programpublic class PollardsRho { int num = 65; public int gcd(int a, int b) { int gcd = 0; for(int i = 1; i
Read MoreStyle the active link with CSS
To style the active links, use the CSS :active selector. You can try to run the following code to style the active linksExample a:active { background-color: green; } Welcome to Qries Click on the above link to see the effect.
Read MoreAnimate CSS border-top-color property
To implement animation on the border-top-color property with CSS, you can try to run the following codeExample table,th,td { border: 2px solid black; } #newTable { width: 500px; height: 300px; background: yellow; border: 15px solid yellow; animation: myanim 3s infinite; background-position: bottom left; background-size: 50px; } @keyframes myanim { 30% { background-color: orange; border-spacing: 50px; border-top-color: red; } } Performing Animation for border top color Subject Student Marks Maths Amit 98 Science Sachin 99
Read MoreStyle links on mouse over with CSS
To style links on mouse over with CSS, use the CSS: hover selector. You can try to run the following code to implement the: hover, selector,Example a:hover { background-color: orange; } Google Keep the mouse cursor on the above link and see the effect.
Read MoreShorthand property for setting all the column-rule-* properties
The shorthand property for column rule is column-rule property. You can try to run the following code to implement the column-rule propertyExample .demo { column-count: 4; column-gap: 50px; column-rule: 2px dotted orange; } This is demo text. This is demo text. This is demo text. This is ...
Read MoreX-axis 3D transform with CSS3
You can try to run the following code to implement X-axis 3D transform with CSS3Example div { width: 200px; height: 100px; background-color: pink; border: 1px solid black; } div#myDiv { -webkit-transform: rotateX(150deg); /* Safari */ transform: rotateX(150deg); /* Standard syntax */ } tutorials point.com Rotate X-axis tutorials point.com.
Read MoreRole of CSS :only-of-type Selector
Use the CSS :only-of-type selector to style every element that is the only element of its parent.ExampleYou can try to run the following code to implement the :only-of-type selector p:only-of-type { background: orange; color: white; } This is demo text 1. This is demo text 2. This is demo text 3. This is demo text 4.
Read MoreAnimate transform-origin property with CSS Animation
To implement animation on the transform-origin property with CSS, you can try to run the following codeExample #demo1 { position: relative; height: 300px; width: 400px; border: 2px solid black; margin: 100px; padding: 5px; } #demo2 { padding: 30px; position: absolute; border: 1px solid black; background-color: orange; transform: rotate(45deg); transform-origin: 30% 10%; animation: mymove 3s infinite; } @keyframes mymove { 30% { transform-origin: 0 0 0; } } CSS transform-origin property Demo
Read More