Auto saved by Logseq

This commit is contained in:
Ryan 2023-06-16 20:34:38 +08:00
parent 295f51515f
commit d502f095aa
11 changed files with 275 additions and 202 deletions

View file

@ -70,4 +70,4 @@
:page 26},
:content {:text "[:span]", :image 1686918811763},
:properties {:color "yellow"}}],
:extra {:page 26}}
:extra {:page 29}}

View file

@ -150,8 +150,8 @@
* State "DONE" from "LATER" [2023-05-21 Sun 20:59]
* State "DONE" from "LATER" [2023-05-23 Tue 20:26]
:END:
- LATER [#B] Solve one #leetcode Problem
SCHEDULED: <2023-05-22 Mon .+1d>
- DONE [#B] Solve one #leetcode Problem
SCHEDULED: <2023-05-22 Mon>
:LOGBOOK:
CLOCK: [2023-03-27 Mon 16:56:53]--[2023-03-28 Tue 14:02:38] => 21:05:45
CLOCK: [2023-03-28 Tue 14:02:43]--[2023-03-28 Tue 14:24:54] => 00:22:11
@ -179,7 +179,6 @@
:END:
- Weekly:
- LATER [#B] Run in the field three times a week 2/3
SCHEDULED: <2023-05-22 Mon .+1d>
:LOGBOOK:
CLOCK: [2023-03-27 Mon 16:58:41]--[2023-03-27 Mon 19:33:31] => 02:34:50
- State "DONE" from "NOW" [2023-03-27 Mon 19:33]
@ -210,8 +209,9 @@
* State "DONE" from "LATER" [2023-05-19 Fri 17:49]
* State "DONE" from "LATER" [2023-05-21 Sun 20:59]
:END:
-
- LATER [#C] Watch movies once a week
SCHEDULED: <2023-05-21 Sun .+2d>
SCHEDULED: <2023-06-10 Sat .+2d>
:LOGBOOK:
CLOCK: [2023-03-27 Mon 16:59:18]--[2023-03-27 Mon 19:34:08] => 02:34:50
- State "DONE" from "NOW" [2023-03-27 Mon 19:34]
@ -227,6 +227,7 @@
* State "DONE" from "LATER" [2023-05-11 Thu 20:08]
* State "DONE" from "LATER" [2023-05-14 Sun 13:15]
* State "DONE" from "LATER" [2023-05-19 Fri 17:35]
* State "DONE" from "LATER" [2023-06-08 Thu 11:29]
:END:
-
-

View file

@ -0,0 +1,140 @@
- DONE Ardour
- 怎么录制
- Ardour vs. audacity
-
- Leetcode - Happy Number
collapsed:: true
- Times:
- Time when completed: 12:36
- Time taken to complete: I forgot, very quick I suppose
- Revisions:
- Tags:
- Algorithms: #Floyd_s_cycle_finding_algorithm
- Difficulty: #difficulty_easy
- Platforms: #leetcode
- Links:
- [link to the problem](https://leetcode.com/problems/happy-number/description/)
- Problem:
- Write an algorithm to determine if a number `n` is happy.
A **happy number** is a number defined by the following process:
- Starting with any positive integer, replace the number by the sum of the squares of its digits.
- Repeat the process until the number equals 1 (where it will stay), or it **loops endlessly in a cycle** which does not include 1.
- Those numbers for which this process **ends in 1** are happy.
Return `true` _if_ `n` _is a happy number, and_ `false` _if not_.
- Examples:
- ```
Example 1:
Input: n = 19
Output: true
Explanation:
12 + 92 = 82
82 + 22 = 68
62 + 82 = 100
12 + 02 + 02 = 1
Example 2:
Input: n = 2
Output: false
```
- Constraints:
- `1 <= n <= 231 - 1`
- Thoughts:
- Intuition:
- It loops endlessly in a cycle, which means we need to use a cycle detection algorithm, which happens to be the [[Floyd's Cycle Finding Algorithm]].
- Approach:
- Use the Floyd's cycle finding algorithm, with two variables
- when fast == slow, cycle is found
- detect if fast is 1, and return values
- Solution:
- Code
- ```java
class Solution {
private int progress(int n) {
int sum = 0;
while (n > 0) {
sum += (n % 10) * (n % 10);
n /= 10;
}
return sum;
}
public boolean isHappy(int n) {
// loop detection
int slow = progress(n);
int fast = progress(slow);
while (slow != fast) {
slow = progress(slow);
fast = progress(progress(fast));
}
return (fast == 1);
}
}
```
-
- Daily reflection [[Daily reflections]]
collapsed:: true
- What I've done
- 写学交论文
- 音乐 improvising
- I met someone, she's gorgeous
- What I've thought #thoughts
- Improvisation is fun :)
- I think I fall in love with someone, I have a strong feeling when she is nearby, and dopamine burst out whenever I talk to her. I don't know if she feel the same (I think to some extent she does. I don't really know, I just follow the flow and enjoy every moment of that). ~~aaand also I erected a lot~~
- Mood
- Generally excited, but sometimes exhausted from these happy feelings, I deserve a good sleep.
-
- Todo
- DONE Edx 写一篇 blues
:LOGBOOK:
CLOCK: [2023-04-07 Fri 14:36:18]--[2023-04-07 Fri 16:50:36] => 02:14:18
:END:
- DONE 概率论作业
:LOGBOOK:
CLOCK: [2023-04-07 Fri 17:31:14]--[2023-04-07 Fri 21:19:06] => 03:47:52
:END:
- DONE 22, 23, 24, 25, 26, 27, 29
- DONE 58, 59
-
- 乐理学习 #music
- LATER 每天学 15 分钟 Open Music Theory [上次学到的地方](https://viva.pressbooks.pub/openmusictheory/chapter/aspn/)
SCHEDULED: <2023-05-16 Tue .+1d>
:LOGBOOK:
- State "DONE" from "LATER" [2023-04-07 Fri 16:50]
- State "DONE" from "LATER" [2023-04-07 Fri 16:52]
* State "DONE" from "LATER" [2023-04-10 Mon 22:49]
* State "DONE" from "LATER" [2023-04-11 Tue 23:35]
CLOCK: [2023-04-12 Wed 09:16:56]--[2023-04-12 Wed 09:44:02] => 00:27:06
* State "DONE" from "LATER" [2023-04-12 Wed 09:44]
* State "DONE" from "LATER" [2023-04-18 Tue 23:31]
* State "DONE" from "LATER" [2023-04-21 Fri 09:30]
CLOCK: [2023-04-23 Sun 15:18:42]--[2023-04-23 Sun 15:18:43] => 00:00:01
* State "DONE" from "NOW" [2023-04-23 Sun 15:18]
* State "DONE" from "LATER" [2023-04-26 Wed 22:31]
* State "DONE" from "LATER" [2023-05-08 Mon 20:47]
CLOCK: [2023-05-09 Tue 09:52:58]--[2023-05-09 Tue 10:01:36] => 00:08:38
* State "DONE" from "NOW" [2023-05-09 Tue 10:01]
CLOCK: [2023-05-09 Tue 10:11:30]--[2023-05-09 Tue 10:11:31] => 00:00:01
CLOCK: [2023-05-11 Thu 10:14:15]--[2023-05-11 Thu 11:16:14] => 01:01:59
* State "DONE" from "NOW" [2023-05-11 Thu 11:16]
* State "DONE" from "LATER" [2023-05-15 Mon 16:23]
:END:
- LATER 每天 5 分钟 Ear training [Teoria](https://www.teoria.com/en/exercises/)
SCHEDULED: <2023-05-12 Fri .+1d>
:LOGBOOK:
- State "DONE" from "LATER" [2023-04-07 Fri 23:31]
* State "DONE" from "LATER" [2023-04-11 Tue 16:41]
* State "DONE" from "LATER" [2023-04-12 Wed 15:07]
CLOCK: [2023-04-21 Fri 14:41:07]--[2023-04-21 Fri 14:41:09] => 00:00:02
* State "DONE" from "LATER" [2023-04-25 Tue 11:33]
* State "DONE" from "LATER" [2023-04-26 Wed 22:31]
* State "DONE" from "LATER" [2023-05-08 Mon 20:48]
CLOCK: [2023-05-09 Tue 10:01:48]--[2023-05-09 Tue 10:10:01] => 00:08:13
* State "DONE" from "LATER" [2023-05-09 Tue 10:10]
* State "DONE" from "LATER" [2023-05-11 Thu 20:06]
:END:

View file

@ -1,21 +0,0 @@
- [[May 15th, 2023]] #健身 #健身记录
- LATER Lateral raise
- LATER 8 reps
- LATER 2 sets
- LATER Squat
- LATER 7.5 kg
- LATER 5 reps
- LATER 5 sets
- LATER Dumbbell Bench Pushup
- LATER 5 kg
- LATER 15 reps
- LATER 3 sets
- LATER Barbell Row
- LATER 5 sets
- LATER 5 reps
- LATER Pull-up
- LATER 2 sets
- LATER 8 reps
- LATER Sit-up
- LATER 2 sets
- LATER 15 reps

View file

@ -0,0 +1,63 @@
- [[May 15th, 2023]] #健身 #健身记录
- DONE Lateral raise
collapsed:: true
- DONE 2kg wired
- DONE 15 reps
- DONE 2.5kg dumbbell
- DONE 15reps
:LOGBOOK:
CLOCK: [2023-05-15 Mon 10:30:47]--[2023-05-15 Mon 10:30:48] => 00:00:01
:END:
- DONE Squat
- DONE 7.5 kg
- DONE 5 reps
:LOGBOOK:
CLOCK: [2023-05-15 Mon 10:05:52]--[2023-05-15 Mon 10:05:53] => 00:00:01
:END:
- DONE 2 sets
- DONE 10 kg
- DONE 5 reps
- DONE 3 sets
- DONE Dumbbell Bench Pushup
- DONE 7.5 kg
:LOGBOOK:
CLOCK: [2023-05-15 Mon 10:19:37]--[2023-05-15 Mon 10:19:38] => 00:00:01
CLOCK: [2023-05-15 Mon 10:19:39]--[2023-05-15 Mon 10:19:40] => 00:00:01
:END:
- DONE 15 reps
- DONE 3 sets
- DONE Barbell Row
:LOGBOOK:
CLOCK: [2023-05-15 Mon 10:12:58]--[2023-05-15 Mon 10:12:59] => 00:00:01
:END:
- DONE 5 kg
- DONE 5 sets
- DONE 5 reps
- DONE Pull-up
- DONE 40.8kg
- DONE 1 set
- DONE 8 reps
- DONE 49.9kg
- DONE 1 set
- DONE 8
- DONE Sit-up
- DONE 5 sets
:LOGBOOK:
CLOCK: [2023-05-15 Mon 10:29:08]--[2023-05-15 Mon 10:29:09] => 00:00:01
CLOCK: [2023-05-15 Mon 10:33:11]--[2023-05-15 Mon 10:33:12] => 00:00:01
CLOCK: [2023-05-15 Mon 10:33:36]--[2023-05-15 Mon 10:33:37] => 00:00:01
:END:
- DONE 6 reps
-
- Daily reflection [[Daily reflections]]
- What I've done
collapsed:: true
- 没睡好,睡了六个小时
- 学概率论,挺恶心的
- What I've thought #thoughts
collapsed:: true
- 鲁有点反复无常,挺烦的,现在先摆烂了
- Mood
- 累
-
-

View file

@ -0,0 +1,10 @@
- [[学习任务]]
- DONE 预习lab
SCHEDULED: <2023-05-30 Tue>
- LATER 背马原
SCHEDULED: <2023-06-01 Thu>
-
- [[New computer 2023]]
- Userland software for asus laptops (gentoo repo)
- https://lab.retarded.farm/zappel/zGentoo
- don't enable global ~amd64, gnome 44 is not stable.

View file

@ -1,165 +0,0 @@
- [[学习任务]]
- DONE 背产开
- DONE 下载课件
- LATER 写思维导图
:LOGBOOK:
CLOCK: [2023-06-01 Thu 17:00:59]--[2023-06-01 Thu 17:01:01] => 00:00:02
:END:
- LATER 看数据库 {{renderer :todomaster}}
id:: 647bf024-fa40-4786-9770-e16da8b57f0f
- DONE 课件
:LOGBOOK:
CLOCK: [2023-06-01 Thu 17:01:28]--[2023-06-01 Thu 17:01:30] => 00:00:02
CLOCK: [2023-06-01 Thu 17:01:41]--[2023-06-01 Thu 17:38:19] => 00:36:38
:END:
- DONE Transactions
- DONE Distributed DMBSs
- DONE XML
- DONE Data Mining
- DONE NoSQL
- LATER Theory
:LOGBOOK:
CLOCK: [2023-06-04 Sun 16:27:23]--[2023-06-04 Sun 16:54:55] => 00:27:32
:END:
- LATER Block 1
- DONE DBMS
- Relational Database: A database that organizes data into tables with rows and columns, maintaining relationships between tables using keys.
- Table: A collection of related data organized into rows (also called records) and columns (also called fields).
- Row/Record: A single set of data in a table, representing a specific instance or entity.
- Column/Field: A specific attribute or data element within a table.
- Primary Key: A unique identifier for each row/record in a table. It ensures the integrity and uniqueness of the data.
- Foreign Key: A field in one table that refers to the primary key in another table, establishing a relationship between the two tables.
- Relationship: The connection between tables based on common data values, such as primary and foreign keys.
- Normalization: The process of organizing and structuring a database design to eliminate redundancy and improve data integrity.
- Index: A data structure that improves the retrieval speed of data from a database table by creating a quick reference to the location of the data.
- Query: A request for data or information from a database, usually written using Structured Query Language (SQL).
- SQL (Structured Query Language): A programming language used to manage and manipulate relational databases. It allows you to create, modify, and retrieve data from databases.
- CRUD Operations: An acronym for Create, Read, Update, and Delete operations, which are the basic operations used to manage data in a database.
- ACID (Atomicity, Consistency, Isolation, Durability): A set of properties that guarantee the reliability and integrity of database transactions.
- Data Integrity: The accuracy, consistency, and reliability of data stored in a database.
- Database Schema: The structure or blueprint of a database, defining the tables, fields, relationships, and constraints.
- Database Management System (DBMS): Software that provides an interface to interact with databases, managing their creation, modification, and retrieval.
- LATER Forming queries
- DONE Review relational algebra https://www.geeksforgeeks.org/introduction-of-relational-algebra-in-dbms/
- LATER review lab2
- LATER SQL join
- LATER Block 2
- LATER designing ER diagram
- DONE Block 3
collapsed:: true
- DONE DB transaction management
- DONE ACID (Atomicity, Consistency, Isolation, Durability): A set of properties that guarantee the reliability and integrity of database transactions.
- Atomicity: The property that ensures a transaction is treated as a single, indivisible unit of work. It either executes all its operations successfully or rolls back to the initial state if any operation fails.
- Consistency: The property that ensures a transaction transforms the database from one consistent state to another consistent state. It maintains data integrity and adheres to defined business rules.
- Isolation: The property that ensures concurrent transactions do not interfere with each other. Each transaction operates in isolation until it completes, preventing interference or conflicts.
- Durability: The property that ensures committed changes made by a transaction are permanently saved and will survive any subsequent system failures or crashes.
- DONE Concurrency control
- DONE Meaning of serialisability.
- DONE How locking can ensure serialisability.
- Locking achieves serializability by using locks to control access to
shared resources (e.g., database objects like tables or rows) and
prevent conflicts between concurrent transactions.
- DONE 2PL
- In the 2PL protocol, transactions acquire and release locks on database
objects (e.g., tables, rows) in two distinct phases: the growing phase
and the shrinking phase.
- DONE Deadlock and how it can be resolved.
- A deadlock is a situation in which two or more transactions are unable
to proceed because each is waiting for a resource held by the other,
resulting in a circular dependency and a system halt. It is a form of
resource contention that can occur in concurrent systems, including
database management systems.
- DONE How timestamping can ensure serialisability.
- By using transaction timestamps and enforcing the read and write
validation checks, concurrency control mechanisms can ensure that
transactions are executed in a way that maintains data consistency and
serializability.
- DONE Recovery Control
- DONE Some causes of database failure.
- System crashes, resulting in loss of main memory.
- Power failures
- Disk crashes, resulting in loss of parts of secondary storage.
- Application software errors.
- Natural physical disasters.
- User mistakes.
- Sabotage.
- DONE Purpose of transaction log file.
- Contains information about all updates to
database:
- Transaction records.
- Checkpoint records.
- Often used for other purposes (for example, auditing).
- For autiding
- DONE Purpose of checkpointing.
- When failure occurs, redo all transactions that
committed since the checkpoint and undo all
transactions active at time of crash.
- DONE Normalization
background-color:: yellow
- DONE Functional dependencies [g4g](https://www.geeksforgeeks.org/types-of-functional-dependencies-in-dbms/)
- In a relational database management, functional dependency is a concept
that specifies the relationship between two sets of attributes where one
attribute determines the value of another attribute. It is denoted as **X → Y**, where the attribute set on the left side of the arrow, **X** is called **Determinant** , and **Y** is called the **Dependent**.
- DONE BCNF vs. 3NF
:LOGBOOK:
CLOCK: [2023-06-01 Thu 17:38:55]--[2023-06-01 Thu 17:38:56] => 00:00:01
:END:
- DONE kinds of NF [tutorial](https://www.geeksforgeeks.org/normal-forms-in-dbms/)
- First Normal Form (1NF): This is the most basic level of
normalization. In 1NF, each table cell should contain _only a single value, and each column should have a unique name_. The first normal form helps to eliminate duplicate data and simplify queries.
- Second Normal Form (2NF): 2NF eliminates redundant data by requiring that each _non-key attribute_ be dependent on the primary key. This means that _each column should be directly related to the primary key_, and not to other
columns.
- Third Normal Form (3NF): 3NF builds on 2NF by requiring
that _all non-key attributes are independent of each other._ This means that each column should be directly related to the primary key, and not to any other columns in the same table.
- Boyce-Codd Normal Form (BCNF): BCNF is a stricter form of 3NF that ensures that each determinant in a table is a candidate key. In other words, BCNF ensures that _each non-key attribute is dependent only on the candidate key._
- Fourth Normal Form (4NF): 4NF is a further refinement of BCNF that ensures that _a table does not contain any multi-valued dependencies._
- Fifth Normal Form (5NF): 5NF is the highest level of normalization and involves decomposing a table into smaller tables to _remove data redundancy and improve data integrity._
- LATER Block 4
- DONE Distributed DBMS
- DONE client server arch
- Computers (client) connected over wired or wireless local area network (LAN)
- The database itself and the DBMS are stored on a central device called the database server, which is also connected to the network.
- Distributed Database
- A logically interrelated collection of shared data (and a description of this data), physically spread over a computer network.
- Distributed DBMS
- Software system that permits the management of the distributed database and makes the distribution transparent to users.
- the key issues
- Fragmentation
- Allocation
- Replication
- importance and different types of fragmentation
- Horizontal
- Vertical
- Mixed
- different types of transparency
- Distribution Transparency: The database feels as a single, logical entity
- Transaction Transparency: Ensures that all distributed transactions maintain distributed databases integrity and consistency.
- Performance Transparency: must perform as if it were a centralized DBMS.
- advantages and disadvantages of distributed databases
- LATER XML
- XML definition and basic concepts
- eXtensible Markup Language
- A meta-language (i.e. a language for describing other languages) that
enables designers to create their own customised tags to provide
functionality not available with HTML.
- Relational model versus XML
- SQL
- is a special-purpose programming language
- You can: manage data in a relational databases.
- XML
- is a markup specification language
- You can: design ways of describing information (text or data), usually for storage,
transmission, or processing by a program (you can use it in combination with a
programming language).
• It says nothing about what you should do with the data (although your choice of
element names may hint at what they are for).
- Well-formed XML, Valid XML
- DTD, XSD
- LATER Data Mining
- LATER NoSQL
- LATER Terms in: [chatGPT](https://chat.openai.com/c/db2ea8df-3bd0-4404-98ae-266afdd8fec1)
- LATER Exercises
- LATER past year exercise 1
- LATER past year exercise 2
- LATER past year exercise 3
- Exercises

View file

@ -0,0 +1,31 @@
- [[学习任务]]
- LATER 背产开
- DONE 下载课件
- LATER 写思维导图
:LOGBOOK:
CLOCK: [2023-06-01 Thu 17:00:59]--[2023-06-01 Thu 17:01:01] => 00:00:02
:END:
- LATER 看数据库
- DONE 课件
:LOGBOOK:
CLOCK: [2023-06-01 Thu 17:01:28]--[2023-06-01 Thu 17:01:30] => 00:00:02
CLOCK: [2023-06-01 Thu 17:01:41]--[2023-06-01 Thu 17:38:19] => 00:36:38
:END:
- DONE Normalization
- LATER BCNF vs. 3NF
:LOGBOOK:
CLOCK: [2023-06-01 Thu 17:38:55]--[2023-06-01 Thu 17:38:56] => 00:00:01
:END:
- DONE Transactions
- DONE Distributed DMBSs
- DONE XML
- DONE Data Mining
- DONE NoSQL
- LATER 题
:LOGBOOK:
CLOCK: [2023-06-04 Sun 16:27:23]--[2023-06-04 Sun 16:54:55] => 00:27:32
:END:
- LATER lab
- LATER lab3
- LATER lab4
- LATER lab5

View file

@ -1,5 +1,6 @@
- [[学习任务]]
- DONE 概率论
id:: 647bf024-41f1-45e7-afaf-f49026e826d6
:LOGBOOK:
CLOCK: [2023-06-03 Sat 16:47:39]--[2023-06-03 Sat 16:47:40] => 00:00:01
:END:
@ -19,15 +20,21 @@
- LATER 看完网课和串讲
- LATER 写思维导图
- LATER 做题
- LATER 区块链:实验报告
- LATER java,下周小测
SCHEDULED: <2023-06-08 Thu>
- LATER 课件
- LATER lab
- LATER PDP quiz
- DONE 区块链:实验报告
- DONE java,下周小测 [qm website](https://qmplus.qmul.ac.uk/mod/page/view.php?id=2178228)
SCHEDULED: <2023-06-07 Wed>
- DONE 课件
- DONE lab
- DONE lab6
- DONE lab7
- DONE PDP quiz
SCHEDULED: <2023-06-15 Thu>
:LOGBOOK:
CLOCK: [2023-06-04 Sun 16:18:08]--[2023-06-04 Sun 16:27:03] => 00:08:55
:END:
-
- Daily reflection [[Daily reflections]]
collapsed:: true
- What I've done
- 早上看数据库
- 下午看概率论,看了点书
@ -47,4 +54,3 @@
- 唯一的办法是一直憋着不表示不明确拒绝她也不主动接近她先让她急起来主动放弃这些套路然后再跟随着flow来
- 如果一周没有进展的话,我就应该主动放弃,尽量回避不能再这样互相消耗了
- Mood
- 看到1:07:15

View file

@ -1,17 +1,24 @@
- # Stuff in this note
- ### Personal
- ### Task management [[tasks]]
- [[Shopping lists]]
- [[Personal Tasks]]
- [[Shopping lists]]
- [[Learning Logseq]]
- [[学习任务]]
- [[School notes]]
- 2023
- [[概率论]]
- [[产品开发]]
- ### Reflections
- [[Daily reflections]]
- #thoughts
- ### Reviews
- #music
- #books
- #movies
- #food
- ### Cloud collections [[Cloud collections]]
- ### Personal growth
- #music
- [[Habits]]
- [[GPT notes]]
- #健身

View file

@ -2731,7 +2731,8 @@
- ((648c5381-49cd-4701-ba48-31c0e21474a7))
- Properties:
- ((648c568e-c617-4699-b217-fd4e8ea205bc))
-
- Linerarity:
((648c569c-e3d0-445d-acf6-caf0e271f7be))
- LATER 学积分
:LOGBOOK:
CLOCK: [2023-06-03 Sat 17:05:07]--[2023-06-03 Sat 17:05:08] => 00:00:01