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
-
Economics & Finance
Articles by Priya Pallavi
Page 2 of 5
What is arguments object in JavaScript?
The arguments object in JavaScript is an array-like object that contains all the arguments passed to a function. It allows functions to accept a variable number of parameters and access them dynamically. Syntax arguments[index] arguments.length Properties The arguments object has two main properties: length - Returns the number of arguments passed to the function index - Access individual arguments using bracket notation (0-based) Basic Example ...
Read MoreHow to use labels to control the Flow in JavaScript?
In JavaScript, labels provide precise control over program flow when used with break and continue statements. A label is an identifier followed by a colon (:) that marks a statement or block of code, allowing you to break out of or continue specific loops in nested structures. Syntax labelName: statement Labels are commonly used with nested loops where you need to control which loop to break from or continue. Using Labels with break Statement The break statement with a label allows you to exit a specific loop, not just the innermost one: ...
Read MoreCSS3 Multi-Column rule-style Property
The CSS column-rule-style property is used to specify the style of the rule (line) that appears between columns in a multi-column layout. This property helps create visual separation between columns. Syntax selector { column-rule-style: value; } Possible Values ValueDescription noneNo rule (default) solidA solid line dashedA dashed line dottedA dotted line doubleA double line grooveA 3D grooved line ridgeA 3D ridged line insetA 3D inset line outsetA 3D outset line Example The following example demonstrates the column-rule-style property with a solid line between columns − ...
Read MoreCSS3 Multi-Column rule-width Property
The CSS column-rule-width property is used to specify the width of the rule (line) that appears between columns in a multi-column layout. This property works in conjunction with column-rule-style and column-rule-color to create visual separators between columns. Syntax selector { column-rule-width: value; } Possible Values ValueDescription thinA thin rule (typically 1px) mediumA medium rule (typically 3px) - default value thickA thick rule (typically 5px) lengthA specific width in px, em, rem, etc. Example: Using column-rule-width Property The following example demonstrates the column-rule-width property with a 5px ...
Read MoreTypes of Gradients in CSS
CSS gradients create smooth transitions between two or more specified colors. They are essential for modern web design, allowing you to create beautiful color transitions without using images. Syntax /* Linear Gradient */ background: linear-gradient(direction, color1, color2, ...); /* Radial Gradient */ background: radial-gradient(shape size at position, color1, color2, ...); Types of Gradients CSS provides two main types of gradients − Linear Gradients − Transitions along a straight line (down/up/left/right/diagonally) Radial Gradients − Transitions radiating from a center point in a circular or elliptical pattern Linear Gradient Example ...
Read MoreRotate div with skew x-axis using CSS
The CSS transform: skewX() property allows you to skew an element along the x-axis, creating a slanted or tilted effect. This transformation distorts the element horizontally while keeping the y-axis unchanged. Syntax selector { transform: skewX(angle); } Possible Values ValueDescription degAngle in degrees (positive values skew left, negative values skew right) radAngle in radians turnAngle in turns (1 turn = 360 degrees) Example The following example demonstrates how to apply skew transformation to a div element along the x-axis − ...
Read MoreCSS Box Sizing Property
The CSS box-sizing property controls how the width and height of an element are calculated. By default, padding and border are added to the specified width and height, but this property allows you to change this behavior. Syntax selector { box-sizing: value; } Possible Values ValueDescription content-boxDefault. Width and height apply to content only border-boxWidth and height include content, padding, and border Default Behavior (content-box) By default, CSS follows this calculation − Total width = width + padding + border Total height = height ...
Read MoreWhat is a segmentation fault in C/C++?
A segmentation fault (commonly called "segfault") occurs when your program attempts to access an area of memory that it is not allowed to access. In other words, when your program tries to access memory that is beyond the limits that the operating system allocated for your program. Segmentation faults are one of the most common runtime errors in C programming and cause the program to terminate immediately with an error message. Common Causes Seg faults are mostly caused by pointers that are − Used without being properly initialized. Used after the memory they point to ...
Read MoreHow can we write PHP script to get the list of MySQL database?
We can write PHP scripts to get the list of available MySQL databases using different approaches. Since the legacy MySQL extension is deprecated, we'll show modern methods using MySQLi and PDO. Using MySQLi Extension The MySQLi extension provides a simple way to list databases − Using PDO Extension PDO provides a more secure and flexible approach − Comparison Method Security Status Legacy MySQL Low Deprecated MySQLi High Active PDO High Active (Recommended) Conclusion Use ...
Read MoreHow can we display all the records from MySQL table with the help of PHP script?
To display all records from a MySQL table using PHP, you need to establish a database connection, execute a SELECT query, and fetch the results. Below is an example using modern PHP and MySQLi extension ? Using MySQLi Extension The following example demonstrates fetching all records from a table named tutorials_tbl ? Using PDO Extension Alternatively, you can use PDO (PHP Data Objects) for better security and flexibility ? Key Points When fetching data from MySQL with PHP, remember these important points ? fetch_assoc() ...
Read More