recursal/MDN huggingface dataset:
DOM (Document Object Model)
===========================

The **DOM** (Document Object Model) is an API that represents and interacts with any HTML or XML-based markup language document. The DOM is a document model loaded in the browser and representing the document as a node tree, or **DOM tree**, where each node represents part of the document (e.g. an element, text string, or comment).

The DOM is one of the most-used APIs on the Web because it allows code running in a browser to access and interact with every node in the document. Nodes can be created, moved, and changed. Event listeners can be added to nodes and triggered on the occurrence of a given event.

See also
--------

* The DOM documentation on MDN
* The DOM Standard
* Document Object Model on Wikipedia
Specification
=============

A **specification** is a document that lays out in detail what functionality or attributes a product must include before delivery. In the context of describing the Web, the term "specification" (often shortened to "spec") generally means a document describing a language, technology, or API which makes up the complete set of open Web technologies.

See also
--------

* Specification on Wikipedia
Dynamic typing
==============

**Dynamically-typed languages** are those (like JavaScript) where the interpreter assigns variables a type at runtime based on the variable's value at the time.

See also
--------

* JavaScript data types and data structures
* Type system on Wikipedia
Doctype
=======

In HTML, the doctype is the required "`<!DOCTYPE html>`" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called "quirks mode" when rendering a document; that is, the "`<!DOCTYPE html>`" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.

See also
--------

* Definition of the DOCTYPE in the HTML specification
* Quirks Mode and Standards Mode
* Document.doctype, a JavaScript method that returns the doctype
PHP
===

PHP (a recursive initialism for PHP: Hypertext Preprocessor) is an open-source server-side scripting language that can be embedded into HTML to build web applications and dynamic websites.

Examples
--------

### Basic syntax


```php
// start of PHP code
<?php
 // PHP code goes here
?>
// end of PHP code
```

### Printing data on screen


```php
<?php
 echo "Hello World!";
?>
```

### PHP variables


```php
<?php
 // variables
 $nome='Danilo';
 $sobrenome='Santos';
 $pais='Brasil';
 $email='danilocarsan@gmail.com';

 // printing the variables
 echo $nome;
 echo $sobrenome;
 echo $pais;
 echo $email;
?>
```

See also
--------

* Official website
* PHP on Wikipedia
* PHP programming on Wikibooks
* MDN Web Docs Glossary
    + Java
    + JavaScript
    + Python
    + Ruby
Trident
=======

Trident (or MSHTML) was a layout engine that powered Internet Explorer. A Trident fork called *EdgeHTML* replaced Trident in Internet Explorer's successor, Edge.

See also
--------

* Trident layout engine on Wikipedia
SMTP
====

**SMTP** (Simple Mail Transfer Protocol) is a protocol used to send a new email. Like POP and NNTP, it is a state machine-driven protocol.

The protocol is relatively straightforward. Primary complications include supporting various authentication mechanisms (GSSAPI, CRAM-MD5, NTLM, MSN, AUTH LOGIN, AUTH PLAIN, etc.), handling error responses, and falling back when authentication mechanisms fail (e.g., the server claims to support a mechanism, but doesn't).

See also
--------

* SMTP (Wikipedia)
* Glossary
    + NNTP
    + POP
    + protocol
    + state machine
Falsy
=====

A **falsy** (sometimes written **falsey**) value is a value that is considered false when encountered in a Boolean context.

JavaScript uses type conversion to coerce any value to a Boolean in contexts that require it, such as conditionals and loops.

The following table provides a complete list of JavaScript falsy values:

| Value | Type | Description |
| --- | --- | --- |
| null | Null | The keyword `null` — the absence of any value. |
| undefined | Undefined | `undefined` — the primitive value. |
| `false` | Boolean | The keyword `false`. |
| NaN | Number | `NaN` — not a number. |
| `0` | Number | The `Number` zero, also including `0.0`, `0x0`, etc. |
| `-0` | Number | The `Number` negative zero, also including `-0.0`, `-0x0`, etc. |
| `0n` | BigInt | The `BigInt` zero, also including `0x0n`, etc. Note that there is no `BigInt` negative zero — the negation of `0n` is `0n`. |
| `""` | String | Empty string value, also including `''` and ````. |
| `document.all` | Object | The only falsy object in JavaScript is the built-in `document.all`. |

The values `null` and `undefined` are also nullish.

Examples
--------

Examples of *falsy* values in JavaScript (which are coerced to false in Boolean contexts, and thus *bypass* the `if` block):


```js
if (false) {
  // Not reachable
}

if (null) {
  // Not reachable
}

if (undefined) {
  // Not reachable
}

if (0) {
  // Not reachable
}

if (-0) {
  // Not reachable
}

if (0n) {
  // Not reachable
}

if (NaN) {
  // Not reachable
}

if ("") {
  // Not reachable
}
```

### The logical AND operator, &&

If the first object is falsy, it returns that object:


```js
console.log(false && "dog");
// ↪ false

console.log(0 && "dog");
// ↪ 0
```

See also
--------

* Truthy
* Coercion
* Boolean
* Boolean coercion
Buffer
======

A buffer is a storage in physical memory used to temporarily store data while it is being transferred from one place to another.

See also
--------

* Data buffer on Wikipedia
REST
====

**REST** (Representational State Transfer) refers to a group of software architecture design constraints that bring about efficient, reliable and scalable distributed systems.

The basic idea of REST is that a resource, e.g. a document, is transferred via well-recognized, language-agnostic, and reliably standardized client/server interactions. Services are deemed RESTful when they adhere to these constraints.

HTTP APIs in general are sometimes colloquially referred to as RESTful APIs, RESTful services, or REST services, although they don't necessarily adhere to all REST constraints. Beginners can assume a REST API means an HTTP service that can be called using standard web libraries and tools.

See also
--------

* restapitutorial.com
* restcookbook.com
* REST on Wikipedia
* REST Architecture
Decryption
==========

In cryptography, **decryption** is the conversion of ciphertext into Plaintext.

Decryption is a cryptographic primitive: it transforms a ciphertext message into plaintext using a cryptographic algorithm called a cipher. Like encryption, decryption in modern ciphers is performed using a specific algorithm and a secret, called the key. Since the algorithm is often public, the key must stay secret if the encryption stays secure.

![The decryption primitive.](/en-US/docs/Glossary/Decryption/decryption.png)

Decryption is the reverse of encryption and if the key stays secret, decryption without knowing the specific secret, decryption is mathematically hard to perform. How hard depends on the security of the cryptographic algorithm chosen and evolves with the progress of cryptanalysis.

See also
--------

* Encryption and Decryption
Java
====

Java is a compiled, object-oriented, highly portable programming language.

Java is statically typed and features a similar syntax to C. It comes with a large library of readily usable functions, the Java Software Development Kit (SDK).

Programs are compiled only once ahead of time into a proprietary byte code and package format that runs inside the Java Virtual Machine (JVM). The JVM is available across many platforms, which allows Java programs to run almost everywhere without the need to be compiled or packaged again. This makes it a preferred language in many large enterprises with heterogeneous landscapes, but may be perceived "heavy".

See also
--------

* Java on Wikipedia
Blink
=====

Blink is an open-source browser layout engine developed by Google as part of Chromium (and therefore part of Chrome as well). Specifically, Blink began as a fork of the WebCore library in WebKit, which handles layout, rendering, and DOM, but now stands on its own as a separate rendering engine.

See also
--------

* Blink project home page
* Blink on Wikipedia
* FAQ on Blink
* Glossary
    + Google Chrome
    + Gecko
    + Trident
    + WebKit
    + Rendering engine
Middleware
==========

Middleware is a (loosely defined) term for any software or service that enables the parts of a system to communicate and manage data. It is the software that handles communication between components and input/output, so developers can focus on the specific purpose of their application.

In server-side web application frameworks, the term is often more specifically used to refer to pre-built software components that can be added to the framework's request/response processing pipeline, to handle tasks such as database access.

See also
--------

* Middleware\_(distributed\_applications) on Wikipedia
* Middleware on Wikipedia
Idempotent
==========

An HTTP method is **idempotent** if the intended effect on the server of making a single request is the same as the effect of making several identical requests.

This does not necessarily mean that the request does not have *any* unique side effects: for example, the server may log every request with the time it was received. Idempotency only applies to effects intended by the client: for example, a POST request intends to send data to the server, or a DELETE request intends to delete a resource on the server.

All safe methods are idempotent, as well as `PUT` and `DELETE`. The `POST` method is not idempotent.

To be idempotent, only the state of the server is considered. The response returned by each request may differ: for example, the first call of a `DELETE` will likely return a `200`, while successive ones will likely return a `404`. Another implication of `DELETE` being idempotent is that developers should not implement RESTful APIs with a *delete last entry* functionality using the `DELETE` method.

Note that the idempotence of a method is not guaranteed by the server and some applications may incorrectly break the idempotence constraint.

`GET /pageX HTTP/1.1` is idempotent, because it is a safe (read-only) method. Successive calls may return different data to the client, if the data on the server was updated in the meantime.

`POST /add_row HTTP/1.1` is not idempotent; if it is called several times, it adds several rows:


```http
POST /add\_row HTTP/1.1
POST /add\_row HTTP/1.1   -> Adds a 2nd row
POST /add\_row HTTP/1.1   -> Adds a 3rd row
```


`DELETE /idX/delete HTTP/1.1` is idempotent, even if the returned status code may change between requests:


```http
DELETE /idX/delete HTTP/1.1   -> Returns 200 if idX exists
DELETE /idX/delete HTTP/1.1   -> Returns 404 as it just got deleted
DELETE /idX/delete HTTP/1.1   -> Returns 404
```

See also
--------

* Definition of idempotent in the HTTP specification.
* Description of common idempotent methods: `GET`, `HEAD`, `PUT`, `DELETE`, `OPTIONS`, `TRACE`
* Description of common non-idempotent methods: `POST`, `PATCH`, `CONNECT`
Tag
===

In HTML, a **tag** is used for creating an element.

The name of an HTML element is the name that appears at the beginning of the element's start tag and at the end of the element's end tag (if the element has an end tag). For example, the `p` in the `<p>` start tag and `</p>` end tag is the name of the HTML paragraph element. Note that an element name in an end tag is preceded by a slash character: `</p>`, and that for void elements, the end tag is neither required nor allowed.

See also
--------

* HTML element on Wikipedia
* HTML elements syntax on WHATWG
* Introduction to HTML
Array
=====

An *array* is an ordered collection of data (either primitive or object depending upon the language). Arrays are used to store multiple values under a single variable name. A regular variable, on the other hand, can store only one value.

Each item in an array has a number attached to it, called a numeric index, that allows you to access it. In JavaScript, arrays start at index zero and can be manipulated with various methods.

Arrays in JavaScript look like this:


```js
// Arrays in JavaScript can hold different types of data
const myArray = [1, 2, 3, 4];
const barbieDollNamesArray = ["Barbie", "Ken", "Midge", "Allan", "Skipper"];

// Array indexes starts at 0.
console.log(myArray[0]); // output: 1
console.log(barbieDollNamesArray[2]); // output: "Midge"
```

See also
--------

* JavaScript `Array` on MDN
ITU
===

The International Telecommunication Union (ITU) is the organization authorized by the United Nations to establish standards and rules for telecommunication, including telegraph, radio, telephony and the internet.

From defining rules for ensuring transmissions get to where they need to go to and creating the "SOS" alert signal used in Morse code, the ITU has long played a key role in how we use technology to exchange information and ideas.

In the Internet Age, the ITU's role of establishing standards for video and audio data formats used for streaming, teleconferencing, and other purposes. For example, the ITU and the Moving Picture Experts Group (MPEG) worked together to develop and publish, as well as to maintain, the various MPEG specifications, such as MPEG-2 (ITU H.262), AVC (ITU H.264), and HEVC (ITU H.265).

See also
--------

* ITU website
* ITU history portal
Class
=====

In object-oriented programming, a *class* defines an object's characteristics. Class is a template definition of an object's properties and methods, the "blueprint" from which other more specific instances of the object are drawn.

See also
--------

* Classes in JavaScript
* Inheritance and the prototype chain
* Class-based programming on Wikipedia
* Object-oriented programming on Wikipedia
Table Grid Box
==============

The **Table Grid Box** is a block level box which contains all of the table internal boxes, excluding the caption. The box which includes the caption is referred to as the Table Wrapper Box.
Stringifier
===========

An object's stringifier is any attribute or method that is defined to provide a textual representation of the object for use in situations where a string is expected.

See also
--------

* Stringifiers in Information contained in a WebIDL file
UUID
====

A **Universally Unique Identifier** (**UUID**) is a label used to uniquely identify a resource among all other resources of that type.

 Computer systems generate UUIDs locally using very large random numbers.
 In theory the IDs may not be globally unique, but the probability of duplicates is vanishingly small.
 If systems really need absolutely unique IDs then these might be allocated by a central authority.

 UUIDs are 128-bit values that are canonically represented as a 36-character string in the format `123e4567-e89b-12d3-a456-426614174000` (5 hex strings separated by hyphens).
 There are a number of versions that differ slightly in the way they are calculated; for example, the inclusion of temporal information.

The formal definition can be found in: RFC4122: A Universally Unique IDentifier (UUID) URN Namespace.

See also
--------

* UUID on Wikipedia
* `Crypto.randomUUID()`
Hyperlink
=========

Hyperlinks connect webpages or data items to one another. In HTML, `<a>` elements define hyperlinks from a spot on a webpage (like a text string or image) to another spot on some other webpage (or even on the same page).

See also
--------

* Hyperlink on Wikipedia
* The Hyperlink guide on MDN
* Links in HTML Documents - W3C
* HTML a - hyperlink - W3C
* `<a>` on MDN
* `<link>` on MDN
Truthy
======

In JavaScript, a **truthy** value is a value that is considered `true` when encountered in a Boolean context. All values are truthy unless they are defined as falsy. That is, all values are *truthy* except `false`, `0`, `-0`, `0n`, `""`, `null`, `undefined`, `NaN`, and `document.all`.

JavaScript uses type coercion in Boolean contexts.

Examples of *truthy* values in JavaScript (which will be coerced to `true` in boolean contexts, and thus execute the `if` block):


```js
if (true)
if ({})
if ([])
if (42)
if ("0")
if ("false")
if (new Date())
if (-42)
if (12n)
if (3.14)
if (-3.14)
if (Infinity)
if (-Infinity)
```

### The logical AND operator, &&

If the first operand is truthy, the logical AND operator returns the second operand:


```js
true && "dog"
// returns "dog"

[] && "dog"
// returns "dog"
```

See also
--------

* Falsy
* Type coercion
* Boolean
* Boolean coercion
WAI
===

WAI or Web Accessibility Initiative is an effort by the World Wide Web Consortium (W3C) to improve accessibility for people with various challenges, who may need a nonstandard browser or devices.

See also
--------

* WAI website
* Web Accessibility Initiative on Wikipedia
Opera Browser
=============

**Opera** is the fifth most used web browser, publicly released in 1996 and initially running on Windows only. Opera uses Blink as its layout engine since 2013 (before that, Presto). Opera also exists in mobile and tablet versions.

See also
--------

* Opera Browser on Wikipedia
* Opera browser website
XInclude
========

XInclude is a W3C Recommendation defining inclusion tags that enable documents to include other documents or parts of other documents. Content can be included from other XML files or from text files.

The XInclude mechanism is not supported natively by any major browsers.

See also
--------

* XInclude standard
* `XPath`
Real User Monitoring (RUM)
==========================

**Real User Monitoring** or RUM measures the performance of a page from real users' machines. Generally, a third party script injects a script on each page to measure and report page load data for every request made. This technique monitors an application's actual user interactions. In RUM, the third party script collects performance metrics from the real users' browsers. RUM helps identify how an application is being used, including the geographic distribution of users and the impact of that distribution on the end user experience.

See also
--------

* Real User Monitoring (RUM) versus Synthetic Monitoring
* Synthetic Monitoring
* Beacon
First-class Function
====================

A programming language is said to have **First-class functions** when functions in that language are treated like any other variable. For example, in such a language, a function can be passed as an argument to other functions, can be returned by another function and can be assigned as a value to a variable.

Examples
--------

### Assigning a function to a variable


```js
const foo = () => {
  console.log("foobar");
};
foo(); // Invoke it using the variable
// foobar
```


We assigned an *Anonymous Function* in a Variable, then we used that variable to invoke the function by adding parentheses `()` at the end.

**Note:** Even if your function was named, you can use the variable name to invoke it. Naming it will be helpful when debugging your code. *But it won't affect the way we invoke it.*

### Passing a function as an argument


```js
function sayHello() {
  return "Hello, ";
}
function greeting(helloMessage, name) {
  console.log(helloMessage() + name);
}
// Pass `sayHello` as an argument to `greeting` function
greeting(sayHello, "JavaScript!");
// Hello, JavaScript!
```


We are passing our `sayHello()` function as an argument to the `greeting()` function, this explains how we are treating the function as a value.

**Note:** The function that we pass as an argument to another function is called a *callback function*. *`sayHello()` is a callback function.*

### Returning a function


```js
function sayHello() {
  return () => {
    console.log("Hello!");
  };
}
```


In this example, we are returning a function from another function - *We can return a function because functions in JavaScript are treated as values.*

**Note:** A function that returns a function or takes other functions as arguments is called a *higher-order function*.

See also
--------

* First-class functions on Wikipedia
* MDN Web Docs Glossary
    + Callback function
    + Function
    + Variable
Fallback alignment
==================

In CSS Box Alignment, a fallback alignment is specified in order to deal with cases where the requested alignment cannot be fulfilled. For example, if you specify `justify-content: space-between` there must be more than one alignment subject. If there is not, the fallback alignment is used. This is specified per alignment method, as detailed below.

First baseline

`start`

Last baseline

`safe end`

Baseline

`start`

Space-between

`flex-start` (start)

Space-around

`center`

Space-evenly

`center`

Stretch

`flex-start` (start)

See also
--------

* CSS Box Alignment
Cryptographic hash function
===========================

A cryptographic hash function, also sometimes called a *digest function*, is a cryptographic primitive transforming a message of arbitrary size into a message of fixed size, called a digest. Cryptographic hash functions are used for authentication, digital signatures, and message authentication codes.

To be used for cryptography, a hash function must have these qualities:

* quick to compute (because they are generated frequently)
* not invertible (each digest could come from a very large number of messages, and only brute-force can generate a message that leads to a given digest)
* tamper-resistant (any change to a message leads to a different digest)
* collision-resistant (it should be impossible to find two different messages that produce the same digest)

Cryptographic hash functions such as MD5 and SHA-1 are considered broken, as attacks have been found that significantly reduce their collision resistance.

See also
--------

* Cryptographic hash function on Wikipedia
* MDN Web Docs Glossary
    + Symmetric-key cryptography
Literal
=======

**Literals** represent values in JavaScript. These are fixed values—not variables—that you *literally* provide in your script.

* Array literals
* Boolean literals
* Floating-point literals
* Numeric literals
* Object literals
* RegExp literals
* String literals
Examples
--------

### String literals

A string literal is zero or more characters enclosed in double (`"`) or single quotation marks (`'`). A string must be delimited by quotation marks of the same type (that is, either both single quotation marks, or both double quotation marks).

The following are examples of string literals:


```js
"foo";
"bar";
"1234";
"one line \n new line";
"Joyo's cat";
```

### Object literals

An object literal is a list of zero or more pairs of property names and associated values of an object, enclosed in curly braces (`{}`).

The following is an example of an object literal. The first element of the `car` object defines a property, `myCar`, and assigns to it a new string, "`Toyota`"; the second element, the `getCar` property, is immediately assigned the result of invoking the function `carTypes('Honda')`; the third element, the `special` property, uses an existing variable (`sales`).


```js
const sales = "BMW";

function carTypes(name) {
  return name === "Honda" ? name : `Sorry, we don't sell ${name}.`;
}

const car = {
  myCar: "Toyota",
  getCar: carTypes("Honda"),
  special: sales,
};

console.log(car.myCar); // Toyota
console.log(car.getCar); // Honda
console.log(car.special); // BMW
```

See also
--------

* Literal on Wikipedia