Rishi Rathor has Published 149 Articles

What are some good sites for Java interview questions

Rishi Rathor

Rishi Rathor

Updated on 17-Jun-2020 13:23:21

112 Views

There are many sites which are a good resource for java interview questions-answers. Following is the list of most popular websites.Tutorialspoint  - www.tutorialspoint.comStackOverflow - www.stackoverflow.comDZone - www.dzone.comWikipedia - www.wikipedia.orgIBM Developer Works - www.ibm.com/developerworks/java/TechGig - www.techgig.comGitHub - www.github.comJava documentation - docs.oracle.com/javase/Coursera - www.coursera.org/JavaWorld - www.javaworld.com/Read More

What is the difference between new operator and object() constructor in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 17-Jun-2020 06:09:54

935 Views

The new operatorThe new operator is used to create an instance of an object. To create an object, the new operator is followed by the constructor method.In the following example, the constructor methods are Object(), Array(), and Date(). These constructors are built-in JavaScript functions.var department = new Object(); var books ... Read More

What is the shortest function of reading a cookie by name in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 12:11:58

90 Views

Here’s the best way to read cookies by name in JavaScript. The following is the function −function ReadCookie() {    var allcookies = document.cookie;    document.write ("All Cookies : " + allcookies );    // Get all the cookies pairs in an array    cookiearray = allcookies.split(';');   ... Read More

How to create cookies in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 11:51:30

654 Views

Using cookies is the most efficient method of remembering and tracking preferences, purchases, commissions, and other information required for better visitor experience or site statistics.The simplest way to create a cookie is to assign a string value to the document.cookie object, which looks like this.document.cookie = "key1=value1;key2=value2;expires=date";Here the expires attribute ... Read More

Why are parenthesis used to wrap a JavaScript function call?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 11:12:24

4K+ Views

In JavaScript, the functions wrapped with parenthesis are called “Immediately Invoked Function Expressions" or "Self Executing Functions.The purpose of wrapping is to namespace and control the visibility of member functions. It wraps code inside a function scope and decrease clashing with other libraries. This is what we call Immediately Invoked ... Read More

What is the (function() { } )() construct in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 09:15:21

1K+ Views

The (function() { } )() construct is an immediately invoked function expression (IIFE). It is a function, which executes on creation.SyntaxHere’s the syntax −(function() {    // code })();As you can see above, the following pair of parentheses converts the code inside the parentheses into an expression −function(){...}In addition, the ... Read More

Display text inside an element in a smaller font size with Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 22:19:48

142 Views

Use the .initialism class in Bootstrap to show text inside an element. This allows setting smaller font size in Bootstrap −ExampleLive Demo           Bootstrap Example                                 ... Read More

Add a fading effect when closing an alert box in Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 21:41:44

185 Views

Use the .fade class in Bootstrap to add a fading effect when the alert is closed:ExampleLive Demo           Bootstrap Example                                          Eclipse Refactoring                       ×             To refactor code in Eclipse, try the below given steps in the video (You can also close this alert)                                                                

Make a group of buttons span the entire width of the screen with Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 20:27:18

592 Views

To make a group of buttons span entire width of the screen, use the .btn-group-justified.You can try to run the following code to implement the .btn-group-justified class −ExampleLive Demo           Bootstrap Example                       ... Read More

Bootstrap Glyphicons

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 19:34:49

156 Views

Glyphicons are icon fonts that you can use in your web projects.Under the Bootstrap directory structure, go to the fonts folder to get the following glyphicons −glyphicons-halflings-regular.eotglyphicons-halflings-regular.svgglyphicons-halflings-regular.ttfglyphicons-halflings-regular.woffTo use the icons, try the following code snippet:

Previous 1 ... 4 5 6 7 8 ... 15 Next
Advertisements