Skip to content

rubywu0604/learningNote

Repository files navigation

My Coding Path

📌01Feb.2023- Hello Github 🎉

Today is my first time to push the file successfully to Github.

After several hours for researching.

Created ssh-key, checked the environment, saw OhMyZsh been updated with pic

which inspires me to keep going. 😄

I edit code in Atom, type command line in terminal, learn how to use MARKDOWN to edit README.

Finally, I know how to update file on Github through git config.

Thanks my mentor @jerome1210

📔 I'll continuously update README to record down my learning...


Learning Note

📌 14.Nov.2023

Python: Django

  • start to learning Django
  • MVT structure

📌 26.Jul.2023 ~ 12.Nov.2023 (4 months+)

AppWorks School training : #21 Data Engineering Class

Project

  • STYLiSH : E-Commerce website with recommendation and bidding system.
  • GoodJob : Analyzed engineering job market trends with web scraping from multiple job search websites.

📌 25.Jul.2023

NGINX (NGINX Guide)

  • check port sudo lsof -i tcp:8080 can find "PID" in the list
    • if run nginx and show issue: Address already in use, can use sudo kill <PID> to stop nginx
  • To start: nginx / To reload: nginx -s reload (hard reload: ⌘⇧R) / To stop: nginx -s quit
  • The NGINX Crash Course

📌 20.Jul.2023

Config

  • How to save config to another file?

    Config data also can save into another file (ex. config.py).

    In that file, create the config class and save secret key as a class instance.

    Then secret key can be accessed by -> app.config.from_object(Class_Name)

  • How to get value of secret key?

    1 > load_dotenv(): SECRET_KEY valid after load_dotenv() = True

    load_dotenv()

    app.config['SECRET_KEY'] = os.getenv('SECRET_KEY')

    2 > config = dotenv_values(".env"): assign all data to config (data is OrderedDict) from .env file

    config = dotenv_values(".env")

    app.config['SECRET_KEY'] = os.getenv('SECRET_KEY')

mySQL/mysqldump

📌 19.Jul.2023

Callbacks, Promises, Async Await

📌 18.Jul.2023

DataBase

  • mySQL
  • Querying Relational Databases

📌 17.Jul.2023

Python

  • Multiple Thread
  • Queue

📌 14.Jul.2023

Algorithms

  • Introduction to Algorithms
    • Time complexity

      Constant Time: O(1)

      Logarithmic Time(Binary): O(log n)

      Linear Time: O(n)

      Quadratic Time: O(n^2)

      Quasilinear Time(Merge Sort): O(n log n)

      Polynomial runtimes: O(n ^ k), ex:O(n^2) or O(n^3)

      Exponential runtime(Brute force): O(k^n), ex:O(10^n) password

      Combinatorial or factorial runtime: O(n!)

📌 13.Jul.2023

Python

  • Cookie

📌 12.Jul.2023

Python

  • Using Databases in Python
  • A Social Network with Flask
  • Flask with SQLAlchemy Basics

📌 11.Jul.2023

LeetCode

  • 1.Two Sum

Python-Flask / JSON / Cookie / API

  • layout HTML
  • make_response()
  • set_cookie()
  • request.cookies()
  • POST request => parse => JSON.loads()
  • GET response => toString => JSON.dumps()

📌 10.Jul.2023

Python-OOP

Install Flack

Install Anaconda

📌 07.Jul.2023

Terminal(Treehouse)

  • Introduction to the Terminal

LeetCode

  • 657.Robot Return to Origin

📌 06.Jul.2023

Python-OOP

  • construsticons (@classmethod / @property)

📌 05.Jul.2023

Python-OOP

  • setattr() / getattr()
  • Inheritance
    • Parent (Super) class: the class that a class inherits from.
    • Child (Sub) class: get all of the attributes and methods of their parents and grandparents and so on.

javascript

LeetCode

📌 04.Jul.2023

Python-OOP

  • Dunder Main
  • Object-Oriented Programming (a way of structuring your code into groups of properties and behaviors)
  • Dates and Times in Python
  • Write Better Python (PEP8/PEP20)

AW School assignment

📌 03.Jul.2023

Python

  • Packing/Unpacking of Tuple and Dict

AW School assignment

  • Create Week-2 folders and files
  • Completed Assignment 1,3,4

📌 29.Jun.2023

CSS(Treehouse)

  • CSS Flexbox Layout
  • align-items
  • align-self
  • justify-content

AW School assignment

📌 28.Jun.2023

CSS(Treehouse)

  • CSS Layout
    • Padding use in '%' unit -> base on Parent element's width

    • Display Value:

      none: often use in hide/show (Read Less/More)

      block: display each content in a single line

      inline: display all content in the same line

      inline-block: display in a single line with other contents With adjustable width/padding/border

📌 27.Jun.2023

CSS/Javascript/DOM (Treehouse)

  • CSS: Pseudo-classes (:link/:visited/:hover/:focus/:nth-child)

  • CSS: length units (px / % / em / rem)

    px an absolute CSS measurement

    % adjust an element relative to the size of the element's parent

    Em considers parent elements when calculating font size.

    Rem is only relative to the root html font-size.

  • CSS: Inheritance / Combinators

  • JavaScript and the DOM

  • HTMLCollection and NodeList

  • textContent and innerHTML

📌 26.Jun.2023

Review HTML/CSS/Git Basic(Treehouse)

  • HTML: Structuring Your Content
  • HTML: Images, Text and Links / Link to Email
  • Git: Managing Committed Files / Remote Repositories

AW School assignment

  • Create new repo: remote-assignments
  • Create GitHub Page

📌 25.Jun.2023

Python (Treehouse)

  • Python: List Iteration
  • Python: Split (String -> List) and Join (List -> String)
  • Python: Multidimensional Lists

📌 24.Jun.2023

HTML/Python (Treehouse)

  • HTML: Creating Lists/Links
  • Python: Types and Branching
  • Python: Expecting Exceptions / Raising Exceptions
  • Python: While Loops / For Loops / project
  • Python: List

📌 22.Jun.2023

HTML/Python (Treehouse)

  • Python: Meet Python
  • HTML: Getting Started with HTML

📌 20.Jun.2023

Python (freeCodeCamp)

  • Python Dictionaries
  • Dictionaries: Common Applications

LeetCode

  • 1.Two Sum
  • 412.Fizz Buzz

📌 19.Jun.2023

Python

  • while loop
  • for loop
  • recursion

📌 17.Jun.2023

Python

📌 16.Jun.2023

Python

📌 15.Jun.2023

Python

📌 14.Jun.2023

LeetCode

  • 500.Keyboard Row
  • 67.Add Binary
  • set

📌 13.Jun.2023

LeetCode

  • 383.Ransom Note

📌 12.Jun.2023

Python

  • Tuple (practice in exercism)
  • Python for Everybody: function / loop / string (Video in freeCodeCamp)

📌 8.Jun.2023

Python

📌 7.Jun.2023

Python

  • List methods
  • Format Strings: {} / format()

📌 6.Jun.2023

Python

  • Lists (practice in exercism)
  • List methods

📌 5.Jun.2023

Python

📌 3.Jun.2023

Python

  • python indentation error example: "IndentationError: expected an indented block" / "IndentationError: unexpected indent"

📌 31.May.2023

Python

  • Basic: Variable / number / Bools
  • Set {} : & | -
  • List [] / Tuple ()
  • Dictionary { 1: a, 2: b, 3: c}

📌 30.May.2023

Python

📌 29.May.2023

Python

📌 26.May.2023

Python

📌 25.May.2023

Python (freeCodeCamp)

  • Variables, Expressions, and Statements
  • power(**) ex. 2**3 = 8 / 3**3 = 27
  • Intermediate Expressions: Parenthesis(Power > Multiplication > Addition > Left to Right)
  • Conditional Execution (if...else / elif)
  • More Conditional Structures (try/except)

📌 24.May.2023

Python

  • install/add Python to zsh
  • variable / input / print
  • converting type: int() / float() / bool() / str()
  • atom switch to VS Code

📌 7.May.2023

javascript (freeCodeCamp)

  • instanceof (Boolean: check the variable is created from Constructor or not)
  • Use Prototype Properties to Reduce Duplicate Code

📌 5.May.2023

javascript (freeCodeCamp)

  • completed Basic Algorithm Scripting
  • OOP: Object-Oriented Programming
  • Create Object and Method/ Use Dot Notation to Access the Properties of an Object
  • Define a Constructor Function and Create Objects

📌 2.May.2023

javascript (freeCodeCamp)

  • Basic Algorithm Scripting
  • Confirm the Ending
  • Repeat a String Repeat a String
  • Truncate a String
  • Finders Keepers (indexOf() => find the FIRST index of element in array)
  • Title Case a Sentence (substring())

📌 28.Apr.2023

javascript (freeCodeCamp)

  • Basic Algorithm Scripting
  • Convert Celsius to Fahrenheit
  • Reverse a String
  • Factorialize a Number
  • Find the Longest Word in a String
  • Return Largest Numbers in Arrays

📌 27.Apr.2023

LeetCode

  • 283.Move Zeroes

📌 25.Apr.2023

javascript (freeCodeCamp)

Project: MoneyList

📌 24.Apr.2023

LeetCode - LeetCode 75: Day 7 Linked List

  • 409.Longest Palindrome
  • 704.Binary Search
  • 278.First Bad Version
  • 412.Fizz Buzz

📌 21.Apr.2023

LeetCode - LeetCode 75: Day 3.4 Linked List

  • 21.Merge Two Sorted Lists
  • 206.Reverse Linked List
  • 876.Middle of the Linked List
  • 142.Linked List Cycle II

📌 19.Apr.2023

LeetCode - LeetCode 75: Day 2 String

  • 205.Isomorphic Strings
  • 392.Is Subsequence

📌 18.Apr.2023

LeetCode - LeetCode 75: Day 1 Prefix Sum

  • 1480.Running Sum of 1d Array
  • 724.Find Pivot Index

📌 17.Apr.2023

Project: MoneyList

  • add specify userId in the route after login or signin
  • add userName in title
  • show specify user data after login successfully
  • insert data with userId key:value
  • delete data when user selected

📌 14.Apr.2023

Project: MoneyList

  • use node sent email
  • check email by using regular expression

📌 13.Apr.2023

Project: MoneyList

  • create login and signup page
  • create mongoDB collection: user
  • completed signup function
  • completed login function

📌 12.Apr.2023

Project: MoneyList

  • still stock in unable connect to mongoDB after deploying (Heroku continuously restart to access database and close...)

  • solution 1: use another application "fly.io" to deploy my code, still failed

  • solution 2: create client.connect() function to connect with MongoDB

  • solution 3: update IP address to allow access from anywhere (0.0.0.0/0) in MongoDB -> Network Access

  • 🎉 deploy success on Heroku! 🎉 MoneyList

📌 11.Apr.2023

Project: MoneyList

  • change server to Heroku: const port = process.env.PORT || 8080
  • stock in TypeError: Cannot read properties of undefined (reading 'startsWith')at new ConnectionString
  • solution: the key:value pair connection string in ".env" file should manually input in Config Vars on Heroku
  • unable connect to mongoDB after deploying (Heroku continuously restart to access database and close...and then shows the restart action timeout)

📌 10.Apr.2023

Project: MoneyList

  • completed CSS design
  • stock in deploy my project on GitHub page
  • I found GitHub page can only host static html files
  • sign in HEROKU website, try to use HEROKU to host my project
  • fail to deploy due to TypeError: Cannot read properties of undefined (reading 'startsWith')

📌 08.Apr.2023

Project: MoneyList

  • copy js and html to income page

📌 07.Apr.2023

LeetCode - Algorithm I

  • 977.Squares of a Sorted Array
  • 189.Rotate Array

📌 06.Apr.2023

Project: MoneyList

  • completed deleteMany function and delete data from mongoDB successfully

javascript (freeCodeCamp)

  • Debugging
  • Basic Data Structures

📌 04.Apr.2023

Project: MoneyList

  • create .env file to hide MongoDB password

📌 31.Mar.2023

Project: MoneyList

*TO DO LIST: Delete function

  • send delete request to server
  • delete data from mongoDB
  • response the updated data to endpoint

* javascript

  • to get value from input tag when click checkbox
  • always get the first <%= expList._id %> value in every checkbox
    • use querySelectorAll to save different value from tag-id
  • identify the checkbox is checked or unchecked

*HTML

  • put <%= expList._id %> in checkboxe
  • unable to read <%= expList._id %> in HTML id Tag
    • should insert <%= expList._id %> as "value" of tag

📌 30.Mar.2023

LeetCode - Algorithm I

  • 704.Binary Search
  • 278.First Bad Version
  • 35.Search Insert Position

📌 29.Mar.2023

javascript (freeCodeCamp)

  • export / import
  • promise (resolve/ reject) (then: result/catch: error)
const myPromise = new Promise((resolve, reject) => {
  if (responseFromServer){
    resolve("We got the data");
  } else {  
    reject("Data not received");
  }
})
       * // if "responseFromServer" = true *
makeServerRequest.then(result => {
  console.log(result);   //=> "We got the data"
});
       * // if "responseFromServer" = false *
makeServerRequest.catch(error => {
  console.log(error);  //=> "Data not received"
});

"Hello, World!".match(/Hello/);

/Hello/.test("Hello, World!");

📌 28.Mar.2023

javascript (freeCodeCamp)

📌 27.Mar.2023

Project: MoneyList

*TO DO LIST: Delete function

  • identify selected data
  • send delete request to server
  • delete data from mongoDB
  • response the updated data to endpoint

*HTML

  • create history list table
  • problem: all data show in one line, unable to separate it by <br>
    • solution: combine tag <tr> into javascript code, so the table will break to the next line.
  • add link to css file
  • add label for delete

* javascript

  • addEventListener: retrieve history data from mongoDB when data updated
  • express.static with css file

*CSS

  • add Bootstrap CDN link

📌 25.Mar.2023

Project: MoneyList * mongoDB- server connect with database

  • server receive history data from mongoDB (use find({}))
    • problem: received {"_events":{},"_eventsCount":0}
      • solution: add toArray() after find({})
  • sort data by date
  • display history data exclude id

*HTML

  • show history data on website page
  • problem: server received data but unable to show on page
    • solution: transform html file type to ejs, import ejs npm package and set the path to access file
  • input data into html table
  • problem: there're too many data that I'm unable to handle each item be placed into correct table position.
    • work-around: Just list down every expense object {date, time, tag, amount} instead insert each data into each column of table. Delete table and create new list by <span> tag.

* javascript- deal with object of an array (data received at server)

  • query each element(object) as one expense list
  • query value of an each element(object) and send value to html file

📌 24.Mar.2023

Project: MoneyList

* javascript- request for insert data (POST)

  • learn about fetch data

* javascript- request for history data (GET)

  • learn about get and render

📌 23.Mar.2023

Project: MoneyList

* mongoDB- server connect with database

  • auto insert data into database by click on save button
    • problem : insert data into mongoDB successfully, but the server console: Promise { <pending> }and endpoint unable to get the response.
      • solution: use async and await function (Note: await is only valid in async functions and the top level bodies of modules)

📌 22.Mar.2023

Project: MoneyList

*HTML

  • get data from input button
  • create table: expense list
  • send data to table
  • problem : can not see data show in table, it seems the "id" in getElementById doesn't work in <td> tag
    • solution: create <span> and add "id" into this tag

* javascript- server connect with API

  • deploy html on GitHub page (display website online)
  • receive data endpoint
    • problem : server unable to get request from endpoint, shows "undefined".
    • solution : need to parse the data as JSON, so the server can identify data coming from endpoint. In order to give the server an ability to parse data as JSON, use express.json function : app.use(express.json({limit: '1mb'}));

* mongoDB- server connect with database

  • create new database : clusterML
  • connect with mongodb successfully
  • insert data into database manually with javascript code

📌 21.Mar.2023

mongoDB

  • lookup: left join
  • send Data API request with mongosh
  • connect to mongoDB with Node.js driver

Project: MoneyList

  • create new repo and connect local branch to GitHub
  • problem : clone by HTTPS but need to input id and password every time when push.
    • solution: clone by ssh-key (make sure ssh-key should matched with the github setting, if not matched, generate it by typing ssh-keygen -t ed25519 -C "[email protected]" in terminal -> open the file and copy new ssh-key -> paste into github setting)
  • problem : unable to push at local branch
    • solution: set the remote to upstream, use git push --set-upstream origin <branch Name>

📌 20.Mar.2023

mongoDB

📌 18.Mar.2023

mongoDB

📌 16.Mar.2023

AJAX and JSON

  • AJAX: Asynchronous JavaScript And XML

  • JSON names require double quotes

  • JSON string => '{"id": 1, "name": "Ruby"}'

  • JSON object literal => {"id": 1, "name": "Ruby"} JSON object literal inside the string

  • object => {id: 1, name; "Ruby"}

  • [server only process string] JSON.parse() / JSON.stringify()

  • Web Storage API: localStorage.setItem("keyName", "keyValue") / localStorage.getItem("keyName")

mongoDB

  • get start and install (document / collections)

📌 15.Mar.2023

javascript (freeCodeCamp)

  • ES6: added many powerful new features, includes Let and Const、Modules、Destructuring Assignment、Arrow Functions、Template Literals、Promise、Class…
  • Object.freeze(objectName): prevent data mutation
  • Arrow Functions

📌 14.Mar.2023

javascript (freeCodeCamp)

  • while loop / do...while loop (ensures that the code inside the loop will run at least once because of the condition fails on the first check)
  • for loop
  • Math.floor() / Math.random()
  • Generate Random Whole Numbers within a Range Math.floor(Math.random() * (max - min + 1)) + min
  • Recursion()
  • Recursion is the concept that a function can be expressed in terms of itself.

LeetCode 509. Fibonacci Number

📌 13.Mar.2023

LeetCode 21. Merge Two Sorted Lists

javascript (freeCodeCamp)

  • switch function (case / break)
  • object (JavaScript will automatically typecast "non-string properties" as strings.)
  • Example of accessing Object Properties with Variables:

const team1 = {
 12: "Alice",
 16: "Betty",
 19: "Cathy"
};
const playerNumber = 16;
const player = team1[playerNumber]; //=> "Betty"
  • .hasOwnProperty(propname) => return true or false
  • object Record Collection

📌 10.Mar.2023

javascript (freeCodeCamp)

  • Number, String, Array, if...else
  • Variable
    • var: can easily overwrite variable declarations
    • let: a variable with the same name can only be declared once
    • const: read-only,once a variable is assigned with const, it cannot be reassigned
    • Note: uppercase variable identifiers for immutable values (ex. const MY_NAME)/ lowercase or camelCase for mutable values like objects and arrays (ex. const firstLine)

📌 09.Mar.2023

mySQL

  • Executing SQL Statements Read from a File
  • $ mysql -u 'user_name' -p 'database' < 'file-name.sql'

The "<" symbol tells MySQL to read the SQL statements from the file named "file_name.sql".

  • stuck in connection of database and server -unsolved
  • stuck in recover database which deleted by the mistake of executing SQL Statements from a File - solved

📌 08.Mar.2023

working with data and API with javaScript

  • create database: NeDB
  • fetch() get data from databases

📌 07.Mar.2023

working with data and API with javaScript

  • server-side: server received data from routing(the end point of the API)
serverReceived.mp4
  • HTTP post request with fetch()
  • JSON parsing: to let the server understand the data by JSON file
  • fs.appendFile and fs.readFile to save the data received by server

📌 06.Mar.2023

working with data and API with javaScript

📌 04.Mar.2023

working with data and API with javaScript

📌 03.Mar.2023

mySQL/Node

📌 01.Mar.2023

javaScript

LeetCode

  • 27.Remove Element

mySQL

  • SQL Database : create / drop / backup
  • SQL table : create / drop / alter
  • SQL Constraint:
    • NOT NULL - Ensures that a column cannot have a NULL value
    • UNIQUE - Ensures that all values in a column are different
    • PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table
    • FOREIGN KEY - Prevents actions that would destroy links between tables
    • CHECK - Ensures that the values in a column satisfies a specific condition
    • DEFAULT - Sets a default value for a column if no value is specified
    • CREATE INDEX - Used to create and retrieve data from the database very quickly

📌 27.28Feb.2023

mySQL

📌 23Feb.2023

mySQL/Node

reading (MySQL Cookbook, 4th Edition)

📌 22Feb.2023

HTML/javaScript/CSS

a. function setTimeout()

title.mp4

b. function sum()

table.mp4

📌 21Feb.2023

HTML

📌 20Feb.2023

Node

Git

📌 17Feb.2023

Node

📌 16Feb.2023

CSS

📌 15Feb.2023

Node

CSS

📌 14Feb.2023

LeetCode

  • 14.Longest Common Prefix

HTML

📌 13Feb.2023

javaScript

📌 10Feb.2023

javaScript

📌 09Feb.2023

javaScript

LeetCode

  • 136.Single Number

📌 07.08Feb.2023

javaScript

reading (JavaScript: The Definitive Guide, 7th Edition)

  • Chapter 1.Introduction to JavaScript
  • Chapter 2.Lexical Structure

LeetCode

  • 7.Reverse Integer

📌 06Feb.2023

javaScript

  • Array Transformations(practice in exercism)

📌 04Feb.2023

javaScript

  • Type Conversion (practice in exercism)
  • Template Strings/Ternary Operator (practice in exercism)
  • Array Destructuring/Rest and Spread (practice in exercism)
  • Array Analysis/Arrow Functions (practice in exercism)

📌 03Feb.2023

javaScript

Git

📌 02Feb.2023

javaScript

Git

  • MARKDOWN
  • branch
  • push / pull
  • fetch
  • merge
  • rebase / reset / amend