- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
George John has Published 1167 Articles
George John
324 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
George John
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
George John
1K+ 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
George John
964 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
George John
305 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
George John
972 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
George John
1K+ 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
George John
84 Views
Use the orphans property in JavaScript to set the minimum number of lines for an element that must be visible at the top of a page. You can try to run the following code to learn how to implement orphans property −document.getElementById("p").style.orphansThis is how you can return the orphans property −var ... Read More
George John
124 Views
The setInterval() method is used evaluate an expression at specified intervals. This function calls function after every duration milliseconds. This goes for unlimited times. Let’s see an example −It triggers alert(‘Hello’) after every 2000 milliseconds, not only once.setInterval(function() { alert('Hello');}, 2000);To clear the usage of setInterval(), use the window.clearInterval() and set ... Read More
George John
247 Views
The GetLongLength method in C# gets a 64-bit integer that represents the number of elements in the specified dimension of the Array.First, set the array.long[, ] arr2= new long[15, 35];For a specified dimension of the array, set the index in the GetLongMethod() method like −long len2 = arr2.GetLongLength(0);Let us see ... Read More