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 Arushi
Page 2 of 9
How to set or return the number of columns an element should be divided into with JavaScript?
In JavaScript, the columnCount property allows you to divide an element's content into multiple columns. This CSS property can be set and retrieved using JavaScript's style object. Syntax // Set column count element.style.columnCount = "number"; // Get column count let count = element.style.columnCount; Parameters The columnCount property accepts: number - The number of columns (e.g., "2", "3", "4") "auto" - Browser determines column count automatically "initial" - Sets to default value Example: Setting Column Count Click the button to divide the text into 4 columns: ...
Read MoreHow to work with document.images in JavaScript?
The document.images property in JavaScript provides access to all elements in a document. It returns an HTMLCollection containing all image elements, allowing you to count, access, and manipulate images programmatically. Syntax document.images document.images.length document.images[index] document.images.namedItem(name) Properties and Methods The document.images collection provides: length - Returns the number of images in the document [index] - Access image by numeric index (0-based) namedItem() - Access image by name or id attribute Example: Counting Images ...
Read MoreHow to set the style of the outline around an element with JavaScript?
To set the outline style around an element in JavaScript, use the outlineStyle property. This property controls the visual appearance of the outline, which is drawn outside the border and doesn't affect the element's dimensions. Syntax element.style.outlineStyle = "value"; Common Outline Style Values The outlineStyle property accepts these values: solid - A solid line dotted - A series of dots dashed - A series of dashes double - Two solid lines groove - A 3D grooved outline ...
Read MoreHow to get time difference between two timestamps in seconds?
To get the time difference between two timestamps in seconds, you can subtract one Date object from another and divide by 1000. JavaScript Date objects return milliseconds when subtracted, so dividing by 1000 converts to seconds. Basic Time Difference in Seconds The simplest approach is to subtract two Date objects and convert milliseconds to seconds: Time Difference in Seconds var date1 = new Date("Jan 1, 2018 11:10:05"); ...
Read MoreWhat will happen when { } is converted to String in JavaScript?
In JavaScript, when an empty object {} is converted to a string, it becomes "[object Object]". This happens because JavaScript calls the object's toString() method during string conversion. How Object to String Conversion Works JavaScript follows these steps when converting an object to a string: First, it calls the object's toString() method For plain objects, toString() returns "[object Object]" This is the default string representation for all plain objects Example: Converting Empty Object to String Convert {} to String ...
Read MoreWhat is the usage of in operator in JavaScript?
The in operator is used in JavaScript to check whether a property exists in an object or not. It returns true if the property is found, and false otherwise. Syntax propertyName in object Basic Example Here's how to use the in operator to check for properties in objects: var emp = {name: "Amit", subject: "Java"}; document.write("name" in emp); document.write(""); document.write("subject" in emp); document.write(""); document.write("age" in emp); document.write(""); document.write("MAX_VALUE" in Number); true true false true Checking Array Indices The in ...
Read MoreWhat is the difference between "lang" and "type" attributes in a script tag?
The lang and type attributes in script tags serve different purposes, though both relate to specifying the scripting language. Understanding their differences is important for modern web development. The lang Attribute (Deprecated) The language attribute was used in older HTML versions to specify the scripting language. It's now deprecated and should not be used in modern web development. document.write("This is deprecated"); The type Attribute (Current Standard) The type attribute is the modern, recommended way to specify the scripting language using MIME types. For JavaScript, use "text/javascript" or ...
Read MoreHow do I set up C/C++ on Eclipse in Windows?
Setting up C/C++ development environment on Eclipse in Windows requires installing a compiler and the Eclipse CDT plugin. This guide walks you through the complete setup process using MinGW GCC compiler. Prerequisites System Requirements: Windows 7 or later, Java 8 or higher installed on your system. Step 1: Install MinGW GCC Compiler Eclipse requires a C/C++ compiler to build and run programs. MinGW (Minimalist GNU for Windows) is recommended for its simplicity − Visit the MinGW official website at www.mingw.org Download the latest MinGW installation program (MinGW-.exe) Run the installer and select ...
Read MoreUsing SAP BAPI API's to extract information from client system
BAPI is an abbreviation for Business Application Programming Interface. BAPI's are proprietary interfaces of SAP. These provide standard access to SAP solution with all the semantic checks already present. Using BAPI interfaces, we can perform both synchronous and asynchronous processing of data. What are BAPIs? BAPIs are standardized programming interfaces that allow external applications to access SAP business objects and processes. They act as a bridge between SAP systems and external applications, enabling secure and controlled data exchange. Key Features of BAPIs BAPIs offer several important characteristics − Standardized Interface: ...
Read MoreInserting an Array to a table in SAP HANA database
As far as I know, there is no direct way of inserting an Array using SQL query in SAP HANA. You will first have to combine the columns (EMPL_Id + Skill Id) using the code and then do a bulk insert to the database. Array to Table Insert Methods In SAP HANA, when you need to insert array data into a table, you have several approaches to handle this limitation − Method 1: Using UNNEST Function The UNNEST function can convert an array into individual rows, which can then be inserted into a table − ...
Read More