Ankith Reddy

Ankith Reddy

730 Articles Published

Articles by Ankith Reddy

Page 16 of 73

Collection Initialization in C#

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 939 Views

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 More

Set min-width and max-width of an element using CSS

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 452 Views

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 More

Pollard’s Rho Algorithm for Prime Factorization in java

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 346 Views

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 More

Style the active link with CSS

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 949 Views

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 More

Animate CSS border-top-color property

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 192 Views

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 More

Style links on mouse over with CSS

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 306 Views

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 More

Shorthand property for setting all the column-rule-* properties

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 150 Views

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 More

X-axis 3D transform with CSS3

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 116 Views

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 More

Role of CSS :only-of-type Selector

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 175 Views

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 More

Animate transform-origin property with CSS Animation

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 1K+ Views

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
Showing 151–160 of 730 articles
« Prev 1 14 15 16 17 18 73 Next »
Advertisements