George John has Published 1081 Articles

CSS transition-timing-function property

George John

George John

Updated on 24-Jun-2020 05:36:48

91 Views

To set up different speed curves with transition-timing-function, you can try to run the following codeExampleLive Demo                    div {             width: 100px;             height: 100px;         ... Read More

Usage of CSS transition-delay property

George John

George John

Updated on 24-Jun-2020 05:31:57

63 Views

Use the transition-delay property to delay the transition effect with CSS. You can try to run the following code to set a 1 second delay of transitionExampleLive Demo                    div {             width: 150px;     ... Read More

CSS backface-visibility Property

George John

George John

Updated on 23-Jun-2020 16:25:40

96 Views

To determine whether an element should be visible when not facing the screen or not, use the backface-visibility propertyExampleLive Demo                    .demo1 {             position: relative;             width: 150px;   ... Read More

How to swap or exchange objects in Java?

George John

George John

Updated on 23-Jun-2020 15:05:26

440 Views

Java uses call by value while passing parameters to a function. To swap objects, we need to use their wrappers. See the example below −Example Live Demopublic class Tester{    public static void main(String[] args) {       A a = new A();       A b = new ... Read More

How to add link dividers in a Navigation Bar with CSS

George John

George John

Updated on 23-Jun-2020 14:51:27

2K+ Views

To add link dividers in a Navigation Bar, use the border-right property for the element.ExampleLive Demo                    ul {             list-style-type: none;             margin: 0;             padding: 0;          }          li {             float: left;             border-right: 1px solid white;          }          li a {             display: block;             padding: 8px;             background-color: orange;          }          li:last-child {             border-right: none;          }                              Home          News          Contact          About          

How to prevent Cloning to break a Singleton Class Pattern?

George John

George John

Updated on 23-Jun-2020 14:27:50

2K+ Views

A Singleton pattern states that a class can have a single instance and multiple instances are not permitted to be created. For this purpose, we make the constructor of the class a private and return a instance via a static method. But using cloning, we can still create multiple instance ... Read More

How to split a string using regular expressions in C#?

George John

George John

Updated on 23-Jun-2020 14:24:54

1K+ Views

To split a string suing regular expression, use the Regex.split.Let’s say our string is −string str = "Hello\rWorld";Now use Regex.split to split the string as shown below −tring[] res = Regex.Split(str, "\r");The following is the complete code to split a string using Regular Expression in C#.Example Live Demousing System; using System.Text.RegularExpressions; ... Read More

How to use the ToString() method of array in C#?

George John

George John

Updated on 23-Jun-2020 14:15:29

470 Views

The ToString() method returns a string that represents the current object.In the below example, we have used the ToString() method with another Array class method.arr.GetLowerBound(0).ToString()Example Live Demousing System; using System.Collections.Generic; using System.Linq; using System.Text; namespace lower {    class Program {       static void Main(string[] args) {     ... Read More

What are the differences between a pointer variable and a reference variable in C++?

George John

George John

Updated on 23-Jun-2020 13:49:38

1K+ Views

ReferencesWhen a variable is declared as a reference, it becomes an alternative name for an existing variable.Syntax Type &newname = existing name;InitializationType &pointer; pointer = variable name;PointersPointers are used to store the address of a variable.SyntaxType *pointer;InitializationType *pointer; pointer = variable name;The main differences between references and pointers are -References ... Read More

How to deal with Internet Explorer and addEventListener problem "Object doesn't support this property or method" in JavaScript?

George John

George John

Updated on 23-Jun-2020 13:05:00

2K+ Views

To deal with “Object doesn’t support this property or method” issue in JavaScript, while using events and Internet Explorer, update your code with this −Example                      ...     You can also use attachEvent in IE to solve this issue ... Read More

Advertisements