Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/c-sharp/concepts/classes/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ public class BankAccount {

Static classes are defined using the `static` keyword and exclusively contain static members, such as methods, properties, and fields. Unlike regular classes, static classes cannot be instantiated with the `new` keyword. Instead, their members are accessed using the class name itself. These classes are commonly used for utility functions or to group related functionalities.

The `static` keyword forces all fields, methods, and properties to require this keyword. This means that if a user tries to create any of these without the `static` keyword, the code will not run and will produce a compile-time error. The reason behind this is that the user can not create an instance of a static class without using this keyword. Any methods, properties and fields that are not marked as `static` would be unreachable.
The `static` keyword forces all fields, methods, and properties to require this keyword. This means that if a user tries to create any of these without the `static` keyword, the code will not run and will produce a compile-time error. The reason behind this is that the user cannot create an instance of a static class without using this keyword. Any methods, properties and fields that are not marked as `static` would be unreachable.

### Example

In the example below, a static class called `MyStaticClass` is created. The commented out code shows what a user can not do with static classes. If these commented out pieces of code were to be uncommented, the code would not compile. The example also shows how properties and methods in the `MyStaticClass` class are created and used in the `CallingClass` class:
In the example below, a static class called `MyStaticClass` is created. The commented out code shows what a user cannot do with static classes. If these commented out pieces of code were to be uncommented, the code would not compile. The example also shows how properties and methods in the `MyStaticClass` class are created and used in the `CallingClass` class:

```cs
using System;
Expand Down
2 changes: 1 addition & 1 deletion content/c-sharp/concepts/math-functions/terms/tanh/tanh.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The **`Math.Tanh()`** method returns the hyperbolic tangent of a given angle in
## Syntax

```pseudo
Math.Tahn(x);
Math.Tanh(x);
```

This method accepts a single parameter,`x`, which is the angle in radians. It returns the hyperbolic tangent value of `x`.
Expand Down
2 changes: 1 addition & 1 deletion content/c-sharp/concepts/strings/terms/split/split.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class EqualsMethod {
Console.WriteLine($"Substring: {sub}");
}

// To remove spaces alongwith the comma, specify ', ' as the delimiter.
// To remove spaces along with the comma, specify ', ' as the delimiter.
subs = s1.Split(", ");
foreach (var sub in subs)
{
Expand Down
4 changes: 2 additions & 2 deletions content/c/concepts/arrays/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ In the syntax:

- `value1, value2, ..., valueN`: The elements to be stored in the array.

This example declares and intializes the `grades` array with values:
This example declares and initializes the `grades` array with values:

```c
int grades[] = {96, 90, 78, 84, 88, 92};
```

> **Note:** When arrays are initalized during declaration, the length is generally omitted.
> **Note:** When arrays are initialized during declaration, the length is generally omitted.

## Accessing Array Elements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ When the dynamically allocated memory is no longer needed, use [`free()`](https:

The syntax for using `free()` is as follows:

```psuedo
```pseudo
free(arr);
```

Expand Down
4 changes: 2 additions & 2 deletions content/c/concepts/memory-management/memory-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ The memory allocation can be done either before or at the time of program implem

In this type of allocation, the compiler allocates a fixed amount of memory during compile time and the operating system internally uses a data structure known as stack to manage the memory.

Exact memory requirements must be known in advance as once memory is allocated it can not be changed.
Exact memory requirements must be known in advance as once memory is allocated it cannot be changed.

```c
int days; // Needs to be initialized or assigned some value at run time
int snowfall = 0; // Normal variable
const int maxScore = 10; // Constant, can not be changed
const int maxScore = 10; // Constant, cannot be changed
```

## Dynamic Memory Allocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ Address of doublePointer: 0x7ffcbffdcc20
In the example:

- `value` is an integer variable.
- `pointer` is a pointer tha stores the address of `value`.
- `pointer` is a pointer that stores the address of `value`.
- `doublePointer` is a double pointer that stores the address of the pointer.
2 changes: 1 addition & 1 deletion content/cpp/concepts/data-types/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ std::cout << weight2 << std::endl;
// Output: 122
```

Not all types can be converted. The example below shows a type that can not be accepted:
Not all types can be converted. The example below shows a type that cannot be accepted:

```cpp
std::string s = static_cast<std::string>(weight2);
Expand Down
2 changes: 1 addition & 1 deletion content/cpp/concepts/maps/terms/empty/empty.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Title: '.empty()'
Description: 'Checks if a given map is empty.'
Subjects:
- 'Computer Science'
- 'Game Deelopment'
- 'Game Development'
Tags:
- 'Data Structures'
- 'Documentation'
Expand Down
2 changes: 1 addition & 1 deletion content/cpp/concepts/maps/terms/rbegin/rbegin.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The function returns a reverse iterator that points to the last element of the c

## Example

The following exmaple demonstrates the usage of the `.rbegin()` function:
The following example demonstrates the usage of the `.rbegin()` function:

```cpp
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion content/cpp/concepts/maps/terms/swap/swap.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ map1.swap(map2);

## Example

The following example shows how the `swap()` funcrion works:
The following example shows how the `swap()` function works:

```cpp
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion content/cpp/concepts/queues/terms/emplace/emplace.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ queue.emplace(args...)

Since C++17: A reference to the inserted element (the value returned by the underlying container's `emplace_back` method).

## Example 1: Enqueueing log entries into a queue
## Example 1: Enqueuing log entries into a queue

In this example, log messages are constructed in place and enqueued for later processing:

Expand Down
2 changes: 1 addition & 1 deletion content/cpp/concepts/unordered-map/terms/key-eq/key-eq.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Title: '.key_eq()'
Description: 'Returns the key equality comparison function used by the `unordered_map` container.'
Subjects:
- 'Computer Science'
- 'Data Scienec'
- 'Data Science'
Tags:
- 'Classes'
- 'Map'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Raising the load factor allows more elements per bucket, delaying rehashing and

This example sets a lower load factor to prioritize faster lookups in a time-critical application:

```codebye/cpp
```codebyte/cpp
#include <iostream>
#include <unordered_map>

Expand Down
4 changes: 2 additions & 2 deletions content/dart/concepts/map/terms/forEach/forEach.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ map.forEach((key, value) => expression);

## Example 1

The the following example, the `.forEach()` is used to print each key-value pair:
The following example, the `.forEach()` is used to print each key-value pair:

```dart
void main() {
Expand All @@ -66,7 +66,7 @@ Charlie is 35 years old.

## Example 2

The the following example, The `.forEach()` method uses an arrow function to print each product and its price in a formatted string:
The following example, The `.forEach()` method uses an arrow function to print each product and its price in a formatted string:

```dart
void main() {
Expand Down
2 changes: 1 addition & 1 deletion content/dart/concepts/methods/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ void main() {
}
```

> Note: In the case of a short-hand method, a `return` keyword is not used in it's expression and will thus return the specified result by default.
> Note: In the case of a short-hand method, a `return` keyword is not used in its expression and will thus return the specified result by default.

The output is following:

Expand Down
2 changes: 1 addition & 1 deletion content/dart/concepts/strings/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A **`String`** is a sequence of characters (such as letters, numbers, and symbol

Here is the syntax for single, double, and triple quoted strings in Dart:

```psuedo
```pseudo
String singleQuoteString = 'This is a Dart string with a single quote.';
String doubleQuoteString = "This is a Dart string with double quotes.";
String multiLineString = '''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CatalogContent:
- 'paths/data-science'
---

The **normal distribution**, otherwise known as the Gaussian distribution, is one of the most signifcant probability distributions used for continuous data. It is defined by two parameters:
The **normal distribution**, otherwise known as the Gaussian distribution, is one of the most significant probability distributions used for continuous data. It is defined by two parameters:

- **Mean (μ)**: The central value of the distribution.
- **Standard Deviation (σ)**: Computes the amount of variation or dispersion in the data.
Expand Down
2 changes: 1 addition & 1 deletion content/html/concepts/comments/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ This renders properly, but the following example would cause errors:

## Nested comments

Nested cooments are not recommended because they may cause unexpected behavior. An HTML comment ends at the first occurrence of a closing tag (`-->`), so anything written after that may be rendered on the page—even if it's intended to be hidden. Example:
Nested comments are not recommended because they may cause unexpected behavior. An HTML comment ends at the first occurrence of a closing tag (`-->`), so anything written after that may be rendered on the page—even if it's intended to be hidden. Example:

```html
<!-- Outer comment <!-- Inner comment -->
Expand Down
2 changes: 1 addition & 1 deletion content/javascript/concepts/arrays/terms/reduce/reduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ This example results in the following output:

The callback function adds each `currentValue` to the `accumulator`, starting with an initial value of 0.

## Example 2: Using `array.reduce()` to Calulate Shopping Cart Total
## Example 2: Using `array.reduce()` to Calculate Shopping Cart Total

This example shows how `.reduce()` in JavaScript can calculate the total price of items in a shopping cart, a common real-world scenario:

Expand Down
2 changes: 1 addition & 1 deletion content/javascript/concepts/callbacks/callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var url = 'https://jsonplaceholder.typicode.com/posts/1'; // Sample API endpoint
fetchData(url, handleResponse); // Call the fetch function and pass the callback
```

In the code above, the `fetchData` function takes two arguments `url` and `handleResponse`. `url` is the API url from which we have to get the data. `handleResponse` is the callback funtion that gets executed when the network request returns either data or an error.
In the code above, the `fetchData` function takes two arguments `url` and `handleResponse`. `url` is the API url from which we have to get the data. `handleResponse` is the callback function that gets executed when the network request returns either data or an error.

The output will look like this:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The output generated by this example is as follows:

![A webpage showing a password field with a blue border and a menu with a highlighted 'Home' item, demonstrating complex selectors in querySelector](https://raw.githubusercontent.com/Codecademy/docs/main/media/querySelector_output2.png)

This example demonstrates using descendent selectors and attribute selectors to precisely target specific elements in a more complex DOM structure. The first selector targets an input with `type="password"` within the `#user-panel` element, while the second selector finds an element with class `"active"` within an element with class `"menu"`.
This example demonstrates using descendant selectors and attribute selectors to precisely target specific elements in a more complex DOM structure. The first selector targets an input with `type="password"` within the `#user-panel` element, while the second selector finds an element with class `"active"` within an element with class `"menu"`.

## Example 3: Dynamic Content Manipulation with querySelector

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class TestRest {
this.successInsert = 'Successful insert!'
this.error = 'Error!'
this.errorNotFound = 'Data not found!'
this.errorNotAvaliable = 'Process not avaliable!'
this.errorNotAvaliable = 'Process not available!'
this.errorAction = 'You will be redirected!'
}
}
Expand Down
4 changes: 2 additions & 2 deletions content/javascript/concepts/type-coercion/type-coercion.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ NaN

## Boolean Type Coercion

To explicitly coerce a value into a boolean, the `Boolean()` function is used. A value undergoes implicit coercion when used in a test expression for an `if` statement, `for` loop, `while` loop, or a ternary expression. A value can also undergo implict coercion when used as the left-hand operand to the logical operators (`||`, `&&`, and `!`).
To explicitly coerce a value into a boolean, the `Boolean()` function is used. A value undergoes implicit coercion when used in a test expression for an `if` statement, `for` loop, `while` loop, or a ternary expression. A value can also undergo implicit coercion when used as the left-hand operand to the logical operators (`||`, `&&`, and `!`).

Nearly all possible values will convert into `true`, but only a handlful will convert into `false`. The values that will become false are:
Nearly all possible values will convert into `true`, but only a handful will convert into `false`. The values that will become false are:

- `undefined`
- `null`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The **`.asTimeZone()`** method in Kotlin converts a `UtcOffset` object to a time

## Syntax

```psuedo
```pseudo
fun UtcOffset.asTimeZone(): FixedOffsetTimeZone
```

Expand Down
2 changes: 1 addition & 1 deletion content/mysql/concepts/bit-functions/bit-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Comparison of each bit position:
- If the bits are the same, the resulting bit is 0

- 5 in binary is represented as 101 and 0 in binary is represented as 000.
- Bit Position 2 is is the leftmost bit in a 3-bit binary number
- Bit Position 2 is the leftmost bit in a 3-bit binary number
- Bit Position 1 is the middle bit in a 3-bit binary number
- Bit Position 0 is the rightmost bit in a 3-bit binary number

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CatalogContent:
- 'paths/analyze-data-with-sql'
---

The **`UNHEX()`** [function](https://www.codecademy.com/resources/docs/mysql/built-in-functions) is a build-in function in MySQL that converts a hexadecimal string to its corresponding binary string. Useful when we have data stored in hexadecimal format we can use `UNHEX()` function to convert it to the original binary form making it usable and understandable.
The **`UNHEX()`** [function](https://www.codecademy.com/resources/docs/mysql/built-in-functions) is a built-in function in MySQL that converts a hexadecimal string to its corresponding binary string. Useful when we have data stored in hexadecimal format we can use `UNHEX()` function to convert it to the original binary form making it usable and understandable.

## Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ print(np.argmin(arr, axis=0)) # Minimum indices along columns
print(np.argmin(arr, axis=1)) # Minimum indices along rows
```

The output produced by the exammple code will be:
The output produced by the example code will be:

```shell
4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The **`.nonzero()`** function identifies and returns the indices of the non-zero

## Syntax

```psuedo
```pseudo
numpy.nonzero(a)
```

Expand Down Expand Up @@ -75,7 +75,7 @@ print("Non-zero Indices:", nonzero_indices)
print("Non-zero Values:", no_zero_array2)
```

The outut for this example will be:
The output for this example will be:

```shell
Array: [[1 2]
Expand Down
2 changes: 1 addition & 1 deletion content/numpy/concepts/math-methods/terms/floor/floor.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In the NumPy library, the **`.floor()`** method rounds down a number or an array

## Syntax

```psuedo
```pseudo
numpy.floor(input, out=None)
```

Expand Down
6 changes: 3 additions & 3 deletions content/numpy/concepts/math-methods/terms/round/round.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ In the NumPy library, the **`.round()`** method rounds a number or an array of n

## Syntax

```psuedo
```pseudo
numpy.round(array, decimals=0, out=None)
```

- `array`: Represents either a single number or an array of numbers. Each element, wheather a float or integer, will be rounded.
- `array`: Represents either a single number or an array of numbers. Each element, whether a float or integer, will be rounded.
- `decimal`: Optional parameter that specifies the number of decimal places to which the numbers or elements in the array will be rounded. The default value is 0, and it accepts both positive and negative integers.
- `out`: Optional parameter that allows specifying an output array where the rounded results will be stored. If not provided, a new array will be created to store the rounded values.

Expand All @@ -47,7 +47,7 @@ print("# Case 2")
print(array_rounded)

# Case 3: np.round() accepts an array, float or integer as it's first and only required parameter. It also accepts a second integer to indicate the decimal place.
# Printing with the repr() function will output the result with commas seperating the elements.
# Printing with the repr() function will output the result with commas separating the elements.
unrounded_list = [4.5674, 19.3455, 56.3946]
rounded_list = np.round(unrounded_list, 2)
print("# Case 3")
Expand Down
2 changes: 1 addition & 1 deletion content/numpy/concepts/ndarray/terms/astype/astype.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The **`.astype()`** function in NumPy allows changing the data type of the eleme

## Syntax

```psuedo
```pseudo
ndarray.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)
```

Expand Down
2 changes: 1 addition & 1 deletion content/numpy/concepts/random-module/terms/rand/rand.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fourD_array = np.random.rand(2, 4, 3)
print("This is a 3D array with shape (2, 4, 3):", fourD_array, "\n")
```

The possible ouput for this code can be:
The possible output for this code can be:

```shell
This is a single float: 0.062282333140694646
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ np.random.shuffle(arr)
print("Shuffled Array:", arr)
```

This could could result in the following possible output:
This could result in the following possible output:

```shell
Original Array: [1 2 3 4 5]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Number of invalid dates converted to NaT: 1
Clean data shape: (4, 3)
```

This example demonstrates handling real-world financial data where dates might be in different formats or contain invalid entries. Using `errors='coerce'` converts unparseable dates to NaT (Not a Time), allowing the analysis to continue with valid data.
This example demonstrates handling real-world financial data where dates might be in different formats or contain invalid entries. Using `errors='coerce'` converts unparsable dates to NaT (Not a Time), allowing the analysis to continue with valid data.

## Codebyte Example: Sensor Data Time Series Analysis

Expand Down
2 changes: 1 addition & 1 deletion content/pillow/concepts/image/terms/getbbox/getbbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ This code produces the following output:
(0, 0, 672, 322)
```

The output indicates that the non-zero (non-backround) area of the image starts at (0, 0) and extends to (672, 322).
The output indicates that the non-zero (non-background) area of the image starts at (0, 0) and extends to (672, 322).
2 changes: 1 addition & 1 deletion content/pillow/concepts/image/terms/resize/resize.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ from PIL import Image
# Original image is 2000x2000 pixels.
img = Image.open('pillow-resize-earth.png')

# showccasing the original image
# showcasing the original image
img.show()

img_resized = img.resize((500, 500))
Expand Down
2 changes: 1 addition & 1 deletion content/plotly/concepts/express/terms/box/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plotly.express.box(data_frame=None, x=None, y=None, color=None, labels=None, tit
- `labels`: Key-value pairs with the original column names as the key and the custom column names as the value.
- `title`: The title of the box plot.

Tthe only required parameter is `data_frame`, while all others are optional and used to customize the plot.
The only required parameter is `data_frame`, while all others are optional and used to customize the plot.

> **Note:** The ellipsis (...) indicates that there can be additional optional arguments beyond those listed here.
Expand Down
2 changes: 1 addition & 1 deletion content/plotly/concepts/express/terms/scatter/scatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ plotly.express.scatter(data_frame=None, x=None, y=None, color=None, symbol=None,
- `y`: The column name in `data_frame`, `Series` or array_like object for y-axis data.
- `color`: The column name in `data_frame`, `Series` or array_like object specifying marker colors.
- `symbol`: The column name in `data_frame`, `Series` or array_like object assigning marker symbols.
- `size`: The column name in `data_frame`, `Series` or array_like object assgining marker sizes.
- `size`: The column name in `data_frame`, `Series` or array_like object assigning marker sizes.

Both the `x` and `y` parameters are required and represent either a string, integer, `Series`, or array-like object. Other parameters are optional and can modify plot features such as marker sizes and/or colors. If `data_frame` is missing, a `DataFrame` is constructed using the other arguments.

Expand Down
Loading