Skip to content

Commit 7d76626

Browse files
committed
Refactor weight for the posts
1 parent 506c83c commit 7d76626

9 files changed

Lines changed: 94 additions & 10 deletions

File tree

content/posts/cicd-learn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 1 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 10 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414
## 1. Introduce
1515

content/posts/cpp-gtk4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 1 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 1000 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414
Gtk4 with Cpp.
1515

content/posts/cpp-learn.md

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 11 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 1 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414
See plus plus :) .
1515

@@ -3885,8 +3885,68 @@ If we do not intend our class to be inherited from, mark our class as final.
38853885

38863886
### 21.5. Early binding and late binding
38873887
- `early binding (static binding)`: when a direct call is made to a non-member function or a non-virtual member function, the compiler can determine which function definition should be matched to the call.
3888+
- e.g.
3889+
```cpp
3890+
#include <iostream>
3891+
using namespace std;
3892+
3893+
class Animal {
3894+
public:
3895+
void speak() { // NOT virtual
3896+
cout << "Animal speaks\n";
3897+
}
3898+
};
3899+
3900+
class Dog : public Animal {
3901+
public:
3902+
void speak() { // Hides Animal::speak()
3903+
cout << "Dog barks\n";
3904+
}
3905+
};
3906+
3907+
void print(int x) {
3908+
cout << "int\n";
3909+
}
3910+
3911+
void print(double x) {
3912+
cout << "double\n";
3913+
}
3914+
3915+
int main() {
3916+
Animal* a = new Dog();
3917+
a->speak(); // Early binding: Non-virtual member function
3918+
3919+
print(5); // Early binding: int version chosen at compile time
3920+
}
3921+
```
3922+
3923+
38883924
- `late binding (or in the case of virtual function resolution, dynamic dispatch)`: when a function call can’t be resolved until runtime.
3925+
```cpp
3926+
#include <iostream>
3927+
using namespace std;
3928+
3929+
class Animal {
3930+
public:
3931+
virtual void speak() { // Virtual!
3932+
cout << "Animal speaks\n";
3933+
}
3934+
};
3935+
3936+
class Dog : public Animal {
3937+
public:
3938+
void speak() override {
3939+
cout << "Dog barks\n";
3940+
}
3941+
};
3942+
3943+
int main() {
3944+
Animal* a = new Dog();
3945+
a->speak(); // Late binding
3946+
}
3947+
```
38893948
- `virtual table` is a lookup table of functions used to resolve function calls in a dynamic/late binding manner.
3949+
38903950
> Early binding/static dispatch = direct function call overload resolution
38913951
Late binding = indirect function call resolution
38923952
Dynamic dispatch = virtual function override resolution
@@ -4194,6 +4254,16 @@ int main()
41944254
}
41954255
```
41964256

4257+
### 22.1. Arithmetic Using Friend Functions ( + - * /)
4258+
- All of the arithmetic operators are binary operators, so they take two operands.
4259+
- There are 2 common ways to overide the operators
4260+
- Member function: The assignment (=), subscript ([]), function call (()), and member selection (->) operators must be overloaded as member functions, because the language requires them to be.
4261+
- Nonmember function (friend): we won’t be able to use a member overload if the left operand is either not a class (e.g. int), or it is a class that we can’t modify (e.g. std::ostream).
4262+
- A member operator only works if the left side is an object of the class.
4263+
- e.g.
4264+
```cpp
4265+
4266+
```
41974267
## 23. I/O
41984268
### 23.1. I/O Streams
41994269
- It is a part of the STL.

content/posts/cs-complexity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 13 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 10 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414

1515
References:

content/posts/markdown-syntax-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 1 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 10 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414
## Introduction
1515

content/posts/maven-tycho.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 1 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 100 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414

1515
Introducing about Maven and how to use Maven Tycho plugin to build plugins into the SNAPSHOT

content/posts/mcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 15 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 1000 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414
## 1. Introduce
1515
- Modern applications are integrating with Large Language Models (LLMs) to build AI solution.

content/posts/uml-syntax-guide.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,27 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 18 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 10 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414
[Refer1](https://pages.cs.wisc.edu/~hasti/cs302/examples/UMLdiagram.html)
1515
[Refer1](https://www.uml-diagrams.org/class.html#abstract-class)
1616
<br>
17-
## Introduction
1817

18+
## 1. Class Diagram
19+
- Class Diagram is **UML structure diagram** which shows structures of the designed system at the level of classes and interfaces, shows their features, constraints
20+
and relationship (associations, generalizations, dependencies,..)
21+
22+
### 1.1.
23+
- Composition -> composed classes
24+
- Inheritance -> derived class
25+
- Embedded classes (Inner or Nested Classes)
26+
- association
27+
- dependency
28+
- aggregation
29+
-
30+
31+
32+
###
1933
- Abstract Class: The name of an abstract class, method is shown in *italics*. An abstract classifier can also be shown using the keyword {abstract} or <<abstract>> after or below the name.
2034
- Static: Class (i.e. static) methods and fields are indicated by underlining
2135
Constant (i.e. final) fields are indicated via naming convention: constants should be in ALL_CAPS

content/posts/vim-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
99
aliases: ["migrate-from-jekyl"] #Alternative URLs or paths that can be used to access this post, useful for redirects from old posts or similar content.
1010
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
1111
TocOpen: true # Controls whether the TOC is expanded when the post is loaded.
12-
weight: 0 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
12+
weight: 10 # The order in which the post appears in a list of posts. Lower numbers make the post appear earlier.
1313
---
1414

1515
## 1. Modes

0 commit comments

Comments
 (0)