Skip to content

Commit 1349b00

Browse files
authored
chore: add words (#76)
### Description <!-- Please add PR description (don't leave blank) - example: This PR [adds/removes/fixes/replaces] the [feature/bug/etc] --> Adds more entries to the dictionary. ### Related Issue <!-- Please prefix the issue number with Fixes/Resolves - example: Fixes #123 or Resolves #123 --> NA ### Screenshots/Screencasts <!-- Please provide screenshots or video recording that demos your changes (especially if it's a visual change) --> NA ### Notes to Reviewer <!-- Please state here if you added a new npm packages, or any extra information that can help reviewer better review you changes --> NA
1 parent 8a7a86e commit 1349b00

File tree

257 files changed

+6777
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+6777
-129
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: "Abstraction"
4+
---
5+
Abstraction is a concept in programming that refers to the process of hiding complex implementation details and showing only the essential features of an object or system. It allows developers to work at a higher level of understanding without needing to know the intricate details of how things work internally. Abstraction is achieved through the use of abstract classes, interfaces, and other mechanisms that define a clear and simplified interface for interacting with a system or object.
6+
7+
In software development, abstraction is used to manage complexity and improve code readability and maintainability. By abstracting away the unnecessary details, developers can focus on the essential aspects of a system or object, making it easier to understand and work with.
8+
9+
**Example:**
10+
Consider a car. When you drive a car, you don't need to understand how the engine, transmission, and other components work in detail. Instead, you interact with the car through a simple interface, such as the steering wheel, pedals, and dashboard controls. This abstraction allows you to drive the car without needing to know the complexities of its internal mechanisms.
11+
12+
**In JavaScript:**
13+
```javascript
14+
// Example of abstraction using classes
15+
class Shape {
16+
constructor(color) {
17+
this.color = color;
18+
}
19+
20+
// Abstract method that must be implemented by subclasses
21+
draw() {
22+
throw new Error("Method 'draw' must be implemented.");
23+
}
24+
}
25+
26+
// Concrete subclass that implements the draw method
27+
class Circle extends Shape {
28+
constructor(color, radius) {
29+
super(color);
30+
this.radius = radius;
31+
}
32+
33+
draw() {
34+
console.log(`Drawing a ${this.color} circle with radius ${this.radius}`);
35+
}
36+
}
37+
38+
// Usage
39+
let circle = new Circle("red", 10);
40+
circle.draw(); // Output: Drawing a red circle with radius 10
41+
```
42+
43+
In this example, `Shape` is an abstract class that defines the interface for shapes. `Circle` is a concrete subclass of `Shape` that implements the `draw` method. The `draw` method is an abstraction that allows us to draw shapes without needing to know the details of how each shape is drawn.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: "Access Modifiers"
4+
---
5+
Access modifiers are keywords in object-oriented programming languages that are used to control the visibility and accessibility of class members (variables and methods). They specify the level of access that other classes or code modules have to these members.
6+
7+
Access modifiers help enforce encapsulation and data hiding, which are key principles of object-oriented programming. They determine whether a class member can be accessed from within the same class, from a subclass, from classes in the same package, or from classes in different packages.
8+
9+
**Common Access Modifiers:**
10+
1. **Public:** Public members are accessible from any other class or code module. They have the least restrictive access level.
11+
2. **Private:** Private members are accessible only from within the same class. They are not visible to subclasses or classes in the same package.
12+
3. **Protected:** Protected members are accessible from within the same class, subclasses, and classes in the same package. They are not accessible from classes in different packages.
13+
4. **Default (Package-Private):** Default or package-private members are accessible only within the same package. They are not accessible from classes in different packages.
14+
15+
**Example:**
16+
```java
17+
public class MyClass {
18+
private int privateVar;
19+
public int publicVar;
20+
protected int protectedVar;
21+
int defaultVar; // package-private
22+
23+
private void privateMethod() {
24+
// code here
25+
}
26+
27+
public void publicMethod() {
28+
// code here
29+
}
30+
31+
protected void protectedMethod() {
32+
// code here
33+
}
34+
35+
void defaultMethod() {
36+
// code here
37+
}
38+
}
39+
```
40+
41+
In this example, `privateVar` and `privateMethod()` are only accessible within the `MyClass` class. `publicVar` and `publicMethod()` are accessible from any class. `protectedVar` and `protectedMethod()` are accessible within `MyClass`, its subclasses, and classes in the same package. `defaultVar` and `defaultMethod()` are accessible only within classes in the same package.
42+
43+
**Benefits of Using Access Modifiers:**
44+
- **Encapsulation:** Access modifiers help enforce encapsulation by hiding implementation details and exposing only the necessary interface.
45+
- **Security:** By restricting access to certain class members, access modifiers help improve the security and integrity of the code.
46+
- **Code Readability:** Access modifiers make code more readable by clearly indicating the intended visibility and accessibility of class members.
47+
- **Maintainability:** Access modifiers help in maintaining and managing large codebases by controlling how classes interact with each other.
48+
49+
**Use Cases:**
50+
Access modifiers are used in object-oriented programming languages such as Java, C++, C#, and others to control the visibility and accessibility of class members. They are essential for creating well-structured and maintainable code.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: "Accessibility (A11Y)"
4+
---
5+
Accessibility (A11Y) in web development refers to the practice of designing and developing websites and applications that can be used by people of all abilities and disabilities. This includes designing for people with visual, auditory, motor, and cognitive disabilities, as well as those with temporary disabilities or situational limitations.
6+
7+
Accessibility aims to ensure that all users can perceive, understand, navigate, and interact with websites and applications, regardless of their abilities. This involves following standards and guidelines, such as the Web Content Accessibility Guidelines (WCAG), which provide recommendations for making web content more accessible.
8+
9+
**Examples of Accessibility Features:**
10+
- **Text Alternatives:** Providing alternative text for images and non-text content to assist screen readers.
11+
- **Keyboard Accessibility:** Ensuring that all functionality can be operated using a keyboard.
12+
- **Color Contrast:** Using sufficient color contrast to make content readable for users with low vision.
13+
- **Descriptive Links:** Using descriptive text for hyperlinks to provide context for screen reader users.
14+
- **Accessible Forms:** Using labels, placeholders, and error messages to help users understand and complete forms.
15+
16+
**Importance of Accessibility:**
17+
- **Inclusivity:** Accessibility ensures that everyone, including people with disabilities, can access and use the web.
18+
- **Legal Compliance:** Many countries have laws and regulations that require websites to be accessible to people with disabilities.
19+
- **User Experience:** Improving accessibility often leads to a better user experience for all users, not just those with disabilities.
20+
- **SEO Benefits:** Following accessibility best practices can improve search engine optimization (SEO) and make your website more discoverable.
21+
22+
**In JavaScript:**
23+
```javascript
24+
// Example: Adding keyboard accessibility to a button
25+
const button = document.getElementById('myButton');
26+
27+
button.addEventListener('keydown', function(event) {
28+
if (event.key === 'Enter' || event.key === 'Space') {
29+
event.preventDefault();
30+
// Perform button action
31+
console.log('Button clicked');
32+
}
33+
});
34+
```
35+
36+
In this example, the button can be activated using the keyboard by pressing Enter or Space, in addition to being clickable with a mouse. This enhances the accessibility of the button for users who cannot use a mouse.

src/content/dictionary/ai.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: "Artificial Intelligence (AI)"
4+
---
5+
Artificial Intelligence (AI) is the field of computer science focused on creating systems capable of performing tasks that typically require human intelligence. These tasks include learning, reasoning, problem-solving, perception, understanding natural language, and even exhibiting creativity.
6+
7+
AI encompasses a range of technologies and approaches aimed at mimicking cognitive functions. There are various branches of AI, including:
8+
9+
- **Machine Learning (ML):** A subset of AI that enables systems to learn from data and improve their performance over time without being explicitly programmed.
10+
- **Natural Language Processing (NLP):** The ability of machines to understand and generate human language.
11+
- **Computer Vision:** The ability of machines to interpret and make decisions based on visual inputs from the world.
12+
- **Robotics:** The branch of AI focused on designing and operating robots that can perform physical tasks autonomously.
13+
- **Expert Systems:** AI systems that mimic the decision-making abilities of a human expert in specific domains.

src/content/dictionary/ajax.mdx

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: "AJAX (Asynchronous JavaScript and XML)"
4+
---
5+
Asynchronous JavaScript and XML (AJAX) is a technique for creating fast and dynamic web pages. It allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that parts of a web page can be updated without reloading the entire page. Despite its name, AJAX can use various formats, including JSON, HTML, and plain text, not just XML.
6+
7+
**Examples:**
8+
9+
**JavaScript:**
10+
11+
1. **Using XMLHttpRequest:**
12+
```javascript
13+
// Create a new XMLHttpRequest object
14+
let xhr = new XMLHttpRequest();
15+
16+
// Configure it: GET-request for the URL /article/.../load
17+
xhr.open('GET', '/article/.../load', true);
18+
19+
// Send the request over the network
20+
xhr.send();
21+
22+
// This will be called after the response is received
23+
xhr.onload = function() {
24+
if (xhr.status != 200) { // analyze HTTP response status
25+
alert(`Error ${xhr.status}: ${xhr.statusText}`); // e.g. 404: Not Found
26+
} else { // show the result
27+
alert(`Done, got ${xhr.response.length} bytes`); // response is the server
28+
}
29+
};
30+
31+
xhr.onerror = function() {
32+
alert("Request failed");
33+
};
34+
```
35+
36+
2. **Using Fetch API:**
37+
```javascript
38+
// Perform a GET request
39+
fetch('/article/.../load')
40+
.then(response => {
41+
if (!response.ok) {
42+
throw new Error('Network response was not ok ' + response.statusText);
43+
}
44+
return response.json();
45+
})
46+
.then(data => {
47+
console.log(data); // Process the data received from the server
48+
})
49+
.catch(error => {
50+
console.error('There has been a problem with your fetch operation:', error);
51+
});
52+
```
53+
54+
3. **Sending Data with Fetch:**
55+
```javascript
56+
// Data to be sent to the server
57+
let userData = {
58+
name: 'John Doe',
59+
age: 30
60+
};
61+
62+
// Perform a POST request
63+
fetch('/submit', {
64+
method: 'POST',
65+
headers: {
66+
'Content-Type': 'application/json'
67+
},
68+
body: JSON.stringify(userData)
69+
})
70+
.then(response => {
71+
if (!response.ok) {
72+
throw new Error('Network response was not ok ' + response.statusText);
73+
}
74+
return response.json();
75+
})
76+
.then(data => {
77+
console.log(data); // Process the response from the server
78+
})
79+
.catch(error => {
80+
console.error('There has been a problem with your fetch operation:', error);
81+
});
82+
```
83+
84+
AJAX is widely used for creating interactive and dynamic web applications, allowing for a smoother and more responsive user experience by enabling parts of a page to update without requiring a full page reload.

src/content/dictionary/api.mdx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: "API (Application Programming Interface)"
4+
---
5+
An API, or Application Programming Interface, is a set of rules and definitions that allows different software applications to communicate with each other. APIs define the methods and data formats that applications can use to request and exchange information. They can be used for web services, libraries, operating systems, and more, providing a way for developers to interact with and use the functionalities of other software components or services.
6+
7+
**Examples:**
8+
9+
**JavaScript:**
10+
11+
1. **Using a Web API with Fetch:**
12+
```javascript
13+
// Example: Fetching data from a public API
14+
15+
// URL of the API endpoint
16+
let apiUrl = 'https://api.example.com/data';
17+
18+
// Perform a GET request
19+
fetch(apiUrl)
20+
.then(response => {
21+
if (!response.ok) {
22+
throw new Error('Network response was not ok ' + response.statusText);
23+
}
24+
return response.json();
25+
})
26+
.then(data => {
27+
console.log(data); // Process the data received from the API
28+
})
29+
.catch(error => {
30+
console.error('There has been a problem with your fetch operation:', error);
31+
});
32+
```
33+
34+
2. **Using an API to Send Data:**
35+
```javascript
36+
// Example: Sending data to a server API
37+
38+
// URL of the API endpoint
39+
let apiUrl = 'https://api.example.com/submit';
40+
41+
// Data to be sent to the API
42+
let payload = {
43+
name: 'Jane Doe',
44+
email: 'jane.doe@example.com'
45+
};
46+
47+
// Perform a POST request
48+
fetch(apiUrl, {
49+
method: 'POST',
50+
headers: {
51+
'Content-Type': 'application/json'
52+
},
53+
body: JSON.stringify(payload)
54+
})
55+
.then(response => {
56+
if (!response.ok) {
57+
throw new Error('Network response was not ok ' + response.statusText);
58+
}
59+
return response.json();
60+
})
61+
.then(data => {
62+
console.log(data); // Process the response from the API
63+
})
64+
.catch(error => {
65+
console.error('There has been a problem with your fetch operation:', error);
66+
});
67+
```
68+
69+
APIs are essential for modern software development, enabling interoperability between different systems and allowing developers to build on existing technologies without needing to understand their internal workings. They are foundational for web development, cloud computing, mobile apps, and many other areas of technology.
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: "Argument"
4+
---
5+
In programming, an argument is a value that is passed to a function or method when it is called. Arguments are used to provide the function with the data it needs to perform its task. Functions can accept zero or more arguments, depending on their definition.
6+
7+
When a function is called, the values of its arguments are copied into the function's parameters. The function can then use these values to perform calculations, make decisions, or return a result. Arguments can be of any data type, including numbers, strings, arrays, objects, or even other functions.
8+
9+
**Examples:**
10+
```javascript
11+
// Function that takes two arguments and returns their sum
12+
function addNumbers(a, b) {
13+
return a + b;
14+
}
15+
16+
// Calling the function with arguments 5 and 10
17+
let result = addNumbers(5, 10);
18+
console.log(result); // Output: 15
19+
```
20+
21+
In this example, the `addNumbers` function takes two arguments, `a` and `b`, and returns their sum. When the function is called with the arguments `5` and `10`, it returns `15`, which is then assigned to the `result` variable.

src/content/dictionary/aria.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: "ARIA"
4+
---
5+
ARIA, which stands for Accessible Rich Internet Applications, is a set of attributes that can be added to HTML elements to improve the accessibility of web content for users with disabilities. ARIA attributes provide additional information to assistive technologies, such as screen readers, in interpreting and presenting web content more effectively to users.
6+
7+
ARIA is particularly useful for making dynamic web applications, such as those built with JavaScript frameworks like React or Angular, more accessible. It provides a way to enhance the semantics of web content beyond what is possible with standard HTML elements, making it easier for assistive technologies to understand and interact with complex web applications.
8+
9+
**Examples:**
10+
- **aria-label:** Specifies a text label for an element that is not visible on the screen, such as an icon or image button.
11+
- **aria-describedby:** Identifies another element (or elements) on the page that provides a description or additional information about the current element.
12+
- **aria-hidden:** Indicates whether an element should be visible or hidden to assistive technologies.
13+
- **aria-live:** Indicates that an element should be treated as live content and updates to it should be announced to the user.
14+
15+
**Use Case:**
16+
```html
17+
<!-- Example: Adding aria-label to a button -->
18+
<button aria-label="Close">X</button>
19+
```
20+
21+
In this example, the `aria-label` attribute provides a text label ("Close") for a button that contains only an "X" icon. This label is important for users who rely on screen readers, as it allows them to understand the purpose of the button without relying on visual cues.

src/content/dictionary/array.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: ../../layouts/word.astro
3+
title: "Array"
4+
---
5+
An array is a data structure that stores a collection of elements, where each element is identified by an index. Arrays are commonly used in programming to organize and manipulate collections of data. They can hold elements of the same type or of different types, depending on the programming language.
6+
7+
Arrays provide a way to store multiple values in a single variable, making it easier to work with lists of data. Elements in an array are accessed by their index, which represents their position in the array. Arrays can be of fixed size (static array) or resizable (dynamic array), depending on the language and implementation.
8+
9+
**Examples:**
10+
```javascript
11+
// Creating an array of numbers
12+
let numbers = [1, 2, 3, 4, 5];
13+
14+
// Accessing elements in the array
15+
console.log(numbers[0]); // Output: 1
16+
console.log(numbers[2]); // Output: 3
17+
18+
// Modifying elements in the array
19+
numbers[1] = 10;
20+
console.log(numbers); // Output: [1, 10, 3, 4, 5]
21+
22+
// Adding elements to the array
23+
numbers.push(6);
24+
console.log(numbers); // Output: [1, 10, 3, 4, 5, 6]
25+
26+
// Removing elements from the array
27+
let removed = numbers.pop();
28+
console.log(removed); // Output: 6
29+
console.log(numbers); // Output: [1, 10, 3, 4, 5]
30+
```
31+
32+
Arrays are a fundamental concept in programming and are used in many different applications. They provide a flexible and efficient way to store and manipulate collections of data.

0 commit comments

Comments
 (0)