You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/posts/cicd-learn.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
Copy file name to clipboardExpand all lines: content/posts/cpp-gtk4.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
Copy file name to clipboardExpand all lines: content/posts/cpp-learn.md
+71-1Lines changed: 71 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
13
13
---
14
14
See plus plus :) .
15
15
@@ -3885,8 +3885,68 @@ If we do not intend our class to be inherited from, mark our class as final.
3885
3885
3886
3886
### 21.5. Early binding and late binding
3887
3887
-`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
+
usingnamespacestd;
3892
+
3893
+
classAnimal {
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
+
3888
3924
-`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
+
usingnamespacestd;
3928
+
3929
+
classAnimal {
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
+
```
3889
3948
-`virtual table` is a lookup table of functions used to resolve function calls in a dynamic/late binding manner.
3949
+
3890
3950
> Early binding/static dispatch = direct function call overload resolution
3891
3951
Late binding = indirect function call resolution
3892
3952
Dynamic dispatch = virtual function override resolution
- 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.
Copy file name to clipboardExpand all lines: content/posts/cs-complexity.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
Copy file name to clipboardExpand all lines: content/posts/markdown-syntax-guide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
Copy file name to clipboardExpand all lines: content/posts/maven-tycho.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
13
13
---
14
14
15
15
Introducing about Maven and how to use Maven Tycho plugin to build plugins into the SNAPSHOT
Copy file name to clipboardExpand all lines: content/posts/mcp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
13
13
---
14
14
## 1. Introduce
15
15
- Modern applications are integrating with Large Language Models (LLMs) to build AI solution.
Copy file name to clipboardExpand all lines: content/posts/uml-syntax-guide.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,27 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
- 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
+
###
19
33
- 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.
20
34
- Static: Class (i.e. static) methods and fields are indicated by underlining
21
35
Constant (i.e. final) fields are indicated via naming convention: constants should be in ALL_CAPS
Copy file name to clipboardExpand all lines: content/posts/vim-syntax.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ FAseries: ["Themes Guide"] #indicates that this post is part of a series of r
9
9
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.
10
10
ShowToc: true # Determines whether to display the Table of Contents (TOC) for the post.
11
11
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.
0 commit comments