Nikitha N has Published 53 Articles

Define skew transforms along with x axis using CSS

Nikitha N

Nikitha N

Updated on 29-Jun-2020 11:13:05

203 Views

You can try to run the following code to implement skew transforms along with x-axis using CSS −ExampleLive Demo                    div {             width: 300px;             height: 100px;       ... Read More

Is it correct to use JavaScript Array.sort() method for shuffling?

Nikitha N

Nikitha N

Updated on 24-Jun-2020 06:40:54

115 Views

Yes, you can use the JavaScript Array.sort() method for shuffling. Let’s see howExamplefunction shuffleDisplay(arr) {    var tmp, current;        // calculating length    var top = arr.length;    if(top) while(--top) {       current = Math.floor(Math.random() * (top + 1));       tmp = arr[current];       arr[current] = arr[top];       arr[top] = tmp;    }    return arr; }

Difference between private, public, and protected modifiers in C++

Nikitha N

Nikitha N

Updated on 24-Jun-2020 06:33:56

7K+ Views

Data hiding is one of the important features of Object Oriented Programming which allows preventing the functions of a program to access directly the internal representation of a class type. The access restriction to the class members is specified by the labeled access modifiers − public, private, and protected sections ... Read More

What does the explicit keyword mean in C++?

Nikitha N

Nikitha N

Updated on 24-Jun-2020 06:18:59

3K+ Views

The explicit keyword in C++ is used to mark constructors to not implicitly convert types. For example, if you have a class Foo −class Foo { public:     Foo(int n); // allocates n bytes to the Foo object     Foo(const char *p); // initialize object with char *p ... Read More

How to set the page-break behavior after an element with JavaScript?

Nikitha N

Nikitha N

Updated on 23-Jun-2020 12:36:09

899 Views

Use the pageBreakAfter property in JavaScript to set the page-break behavior after an element. Use the always property for page after an element.Note − The changes would be visible while printing or viewing the print preview.ExampleYou can try to run the following code to return the page-break behavior after an element ... Read More

How to set the decoration of a text with JavaScript?

Nikitha N

Nikitha N

Updated on 23-Jun-2020 11:27:38

1K+ Views

Use the textDecoration property in JavaScript to decorate the text. You can underline a text using this property.ExampleYou can try to run the following code to set the decoration of a text with JavaScript −           This is demo text.       Set Text ... Read More

Which is the JavaScript RegExp to find any alternative text?

Nikitha N

Nikitha N

Updated on 23-Jun-2020 07:32:05

262 Views

To match any of the specified alternatives, follow the below-given pattern −(foo|bar|baz)ExampleYou can try to run the following code to find any alternative text −           JavaScript Regular Expression                        var myStr = "one, one, ... Read More

How to write JavaScript Regular Expression for multiple matches?

Nikitha N

Nikitha N

Updated on 23-Jun-2020 05:37:40

248 Views

To find multiple matches, write a JavaScript regular expression. You can try to run the following code to implement regular expression for multiple matches −Example                    var url = 'https://www.example.com/new.html?ui=7&demo=one&demo=two&demo=three four',          a = document.createElement('a');       ... Read More

How to define a JavaScript function using Function() Constructor?

Nikitha N

Nikitha N

Updated on 22-Jun-2020 14:42:23

234 Views

The Function() constructor expects any number of string arguments. The last argument is the body of the function - it can contain arbitrary JavaScript statements, separated from each other by semicolons.ExampleYou can try to run the following code to invoke a function with new Function Constructor −       ... Read More

Which PHP functions are used in the PHP script to fetch data from an existing MySQL table?

Nikitha N

Nikitha N

Updated on 22-Jun-2020 13:55:09

226 Views

PHP uses following functions to fetch data from an existing MySQL table −mysql_query() functionThis function is used in PHP script to fetch data from an existing MySQL table. This function takes two parameters and returns TRUE on success or FALSE on failure. Its syntax is as follows −Syntaxbool mysql_query( sql, ... Read More

Advertisements