Skip to content

Commit a71a114

Browse files
authored
chore: add sample dictionary words (#26)
This PR adds the following few words to dictionary for testing purposes.. - Concatenate - Tuple - Singleton - Full Duplex It also confirms a final directory name for the dictionary with `browse`, this directory will be the path where all dictionary word will be added to and read from... it will hereby mean that the path to a dictionary word shall be `/browse/word` ### Changes Made - Added for new `.mdx` files for each added word to the directory `pages/browse` - Modified the path to the dictionary directory at `dictionary` index in `layouts/base.astro`; correcting it to `"../pages/browse/*.mdx"` from `"../pages/word/*.mdx"` 📖
1 parent c734119 commit a71a114

5 files changed

Lines changed: 46 additions & 1 deletion

File tree

src/layouts/base.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import "../base.css";
55
import { $dictionary } from "../stores/dictionary.js";
66
77
const { pageTitle, class:list } = Astro.props;
8-
const dictionary = await Astro.glob("../pages/word/*.mdx");
8+
const dictionary = await Astro.glob("../pages/browse/*.mdx");
99
1010
$dictionary.set(dictionary);
1111
---

src/pages/browse/concatenate.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: 'Concatenate'
4+
---
5+
6+
Concatenate is a process of combining two or more strings into a single larger string. It's an important function in programming and computing because it allows you to store and combine multiple pieces of data when needed.

src/pages/browse/full-duplex.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: 'Full Duplex'
4+
---
5+
6+
Full-duplex data transmission means that data can be transmitted in both directions on a signal carrier at the same time.
7+
8+
For example, on a local area network with a technology that has full-duplex transmission, one workstation can be sending data on the line while another workstation is receiving data.
9+
10+
Full-duplex transmission implies a bidirectional line that can move data in both directions simultaneously.

src/pages/browse/singleton.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: 'Singleton'
4+
---
5+
6+
The Singleton Pattern is a design paradigm in object-oriented programming that restricts the instantiation of a class to a single object. This pattern ensures that only one instance of the class exists and provides a global point of access to it.
7+
8+
## Example

src/pages/browse/tuple.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: 'Tuple'
4+
---
5+
6+
A tuple is a data structure that is an immutable, or unchangeable, ordered sequence of elements. Because tuples are immutable, their values cannot be modified.
7+
8+
As a general rule, tuples use less memory than a list or array.
9+
10+
Tuples allows for slicing and indexing like lists, but do not have methods for deleting or changing any elements.
11+
12+
## Example
13+
14+
```python
15+
# creating a tuple
16+
mySiblings = ('Susan', 'James', 'Bryan')
17+
18+
# accessing an element within a tuple:
19+
20+
mySiblings[2]
21+
```

0 commit comments

Comments
 (0)