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 Vrundesha Joshi
Page 5 of 22
How to create a session only cookies with JavaScript?
To create a session only cookie, you need to set the expiration date of the cookie to be some years ahead. You need to set the expire attribute −current time + 5 yearsThe expire attribute shows the date the cookie will expire. If this is blank, the cookie will expire when the visitor quits the browser.Note − Do not consider removing the expire value to create a session only cookie. This won’t work. Set the expire attribute to the future date.
Read MoreCreate a list group heading in Bootstrap
To create a list group heading, use the .list-group-item-heading class in Bootstrap.You can try to run the following code to implement .list-group-item-heading class −ExampleLive Demo Bootstrap Example Countries Asia India Nepal Europe Germany Italy Spain
Read MoreHow to use Bootstrap Alert Plugins
Alert messages are used to display information such as warning or confirmation messages to the end users. You can try to run the following code to implement alert plugins in Bootstrap −ExampleLive Demo Bootstrap Example × Success! the result is successful. $(function(){ $("#myAlert").bind('closed.bs.alert', function () { alert("Alert message box is closed."); }); });
Read MoreAdd a green background color to an element to set positive action with Bootstrap
Use the .btn-success class in Bootstrap to set a positive action to an element. You can try to run the following code to implement the .btn-success class −ExampleLive Demo Bootstrap Example The following are FMCG companies: ITC Limited Nestle Britannia Industries Limited Click below if the above list is correct: Success
Read MoreAdd HTML paragraphs into Bootstrap thumbnails
With Bootstrap, you can easily add paragraphs to thumbnails.You can try to run the following code to add HTML paragraphs −ExampleLive Demo Bootstrap Example Thumbnail label This is demo paragraph! This is demo paragraph! This is demo paragraph! This is demo paragraph! This is demo paragraph! This is demo paragraph! This is demo paragraph! This is demo paragraph! This is demo paragraph! This is demo paragraph! This is demo paragraph!
Read MoreWhat is the use of JavaScript eval function?
The JavaScript eval() is used to execute an argument. The code gets execute slower when the eval() method is used. It also has security implementations since it has a different scope of execution. In addition, use it to evaluate a string as a JavaScript expression.The eval() method is not suggested to use in JavaScript since it executes slower and improper usage opens your website to injection attacks.ExampleHere’s how you can implement eval() functionLive Demo var a = 30; var b = 12; var res1 = eval("a * b") + ""; var res2 = eval("5 + 10") + ""; document.write(res1); document.write(res2);
Read MoreHow to search and display the pathname part of the href attribute of an area with JavaScript?
To get the pathname part of the href attribute of an area in JavaScript, use the pathname property.ExampleYou can try to run the following code to display the pathname part. var x = document.getElementById("myarea").pathname; document.write("Pathname: "+x);
Read MoreExecute a script when a mouse button is pressed down on an element in HTML?
Use the onmousedown attribute to in HTML to execute a script when a mouse button is pressed down on an element.ExampleYou can try to run the following code to implement onmousedown attribute − This is demo heading. Click above and then release. function mouseDown() { document.getElementById("myid").style.color = "yellow"; } function mouseUp() { document.getElementById("myid").style.color = "blue"; }
Read MoreC++ Standards Support in GCC
GCC supports different dialects of C++, corresponding to the multiple published ISO standards. Which standard it implements can be selected using the -std= command-line option.C++98 − GCC has full support for the 1998 C++ standard as modified in 2003 and renamed to C++03 and some later defect reports.C++11 − GCC 4.8.1 was the first complete implementation of the 2011 C++ standard, previously known as C++0x.C++14 − GCC has full support for the latest revision of the C++ standard, which was published in 2014.C++17 − GCC has experimental support for the next revision of the C++ standard, which is expected to ...
Read MoreHow can I profile C++ code running in Linux?
There are many great profiling tools for profiling C++ programs on Linux. The most widely used tool is Valgrind. It is a programming tool for memory debugging, memory leak detection, and profiling. You can use valgrind by passing the binary to it and setting the tool to callgrind. First generate the binary by compiling the program −$ g++ -o hello.cpp hello Now use valgrind to profile it: $ valgrind --tool=callgrind ./helloThis will generate a file called callgrind.out.x. You can read this file using a tool called kcachegrind.If you're using gcc, you can use the inbuilt profiling tool, gprof. You can ...
Read More