Vrundesha Joshi

Vrundesha Joshi

218 Articles Published

Articles by Vrundesha Joshi

218 articles

How to use JavaScript to set cookies for homepage only?

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 366 Views

To set cookies for a homepage, add the page to the homepage itself.ExampleYou can try to run the following code to set cookies                                                  Enter name:                    

Read More

What is the use of JavaScript eval function?

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 399 Views

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() function                    var a = 30;          var b = 12;          var res1 = eval("a * b") + "";          var res2 = eval("5 + 10") + "";          document.write(res1);          document.write(res2);          

Read More

How can I delete all cookies with JavaScript?

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 1K+ Views

To delete all cookies with JavaScript, you can try to run the following code. Here, we’re using an array and the split() method to get all the cookies and finally delete themExample                    var num = 1;          function addCookie(){             document.cookie = num+" = "+num;             num++;          }          function listCookies(){             var result = document.cookie;             document.getElementById("list").innerHTML = result;          }          function removeCookies() {             var res = document.cookie;             var multiple = res.split(";");             for(var i = 0; i < multiple.length; i++) {                var key = multiple[i].split("=");                document.cookie = key[0]+" =; expires = Thu, 01 Jan 1970 00:00:00 UTC";             }          }                     ADD       LIST COOKIES       REMOVE       Cookies List          

Read More

How do I add two numbers without using ++ or + or any other arithmetic operator in C/C++?

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 413 Views

In this article we will see how to add two numbers without using arithmetic operators like +, ++, -, or --.To solve this problem, we can solve them using binary adder logic. In that case we were designed half adder and full adder. These adders can add one bit binary numbers. By cascading multiple adders, we have can create circuit to add bigger numbers.In that adder, we have performed XOR operation among the numbers, then for the carry we were performing the ANDing logic. These features are implemented here to add two numbers.Example Code#include using namespace std; int add(int ...

Read More

What uses are there for &ldquo;placement new&rdquo; in C++?

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 246 Views

In this section we will see what is the placement new operator in C++. This placement new is another variation of new operator. The normal new operator performs two things. It allocates memory, and then constructs an object in allocated memory.The new operator allocates memory in the heap section and constructs objects there. But for the placement new operator, it constructs object at the given address. To deallocate memory, we can use delete keyword if the memory is allocated using new operator. But for placement new there is no placement delete feature.So in a nutshell, placement new allows you to ...

Read More

Convert a floating point number to string in C

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 10K+ Views

In this section we will see how to convert a number (integer or float or any other numeric type data) to a string.The logic is very simple. Here we will use the sprintf() function. This function is used to print some value or line into a string, but not in the console. This is the only difference between printf() and sprintf(). Here the first argument is the string buffer. where we want to save our data.Input: User will put some numeric value say 42.26 Output: This program will return the string equivalent result of that number like “42.26”AlgorithmStep 1 − ...

Read More

Create a list group heading in Bootstrap

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 3K+ Views

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 −Example           Bootstrap Example                                          Countries                                      Asia                India                Nepal                                        Europe                Germany                Italy                Spain                                

Read More

Add HTML paragraphs into Bootstrap thumbnails

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 205 Views

With Bootstrap, you can easily add paragraphs to thumbnails.You can try to run the following code to add HTML paragraphs −Example           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 More

Add a green background color to an element to set positive action with Bootstrap

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 223 Views

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 −Example           Bootstrap Example                                 The following are FMCG companies:                ITC Limited          Nestle          Britannia Industries Limited             Click below if the above list is correct:       Success    

Read More

Set the color of the rule between columns with CSS

Vrundesha Joshi
Vrundesha Joshi
Updated on 11-Mar-2026 168 Views

To set the color between columns, use the column-rule-color property. You can try to run the following code to implement the column-rule-color property.With that, we will also set the style of the column rule:Example                    .demo {             column-count: 4;             column-gap: 50px;             column-rule-color: orange;             column-rule-style: dashed;          }                              This is ...

Read More
Showing 1–10 of 218 articles
« Prev 1 2 3 4 5 22 Next »
Advertisements