-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin: start project
- Loading branch information
0 parents
commit 71ef5c9
Showing
244 changed files
with
1,170,465 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# Harvard CS50x 2023 Solutions | ||
|
||
This is CS50, Harvard University’s introduction to the intellectual enterprises of computer science and the art of programming, for concentrators and non-concentrators alike, with or without prior programming experience. (Two thirds of CS50 students have never taken CS before.) This course teaches you how to solve problems, both with and without code, with an emphasis on correctness, design, and style. Topics include computational thinking, abstraction, algorithms, data str…a which you’ll learn not only about functions, variables, conditionals, loops, and more, but also about how computers themselves work underneath the hood, memory and all. The course then transitions to Python, a higher-level language that you’ll understand all the more because of C. Toward term’s end, the course introduces SQL, via which you can store data in databases, along with HTML, CSS, and JavaScript, via which you can create web and mobile apps alike. Course culminates in a final project. | ||
|
||
## Screenshots 🖼️ | ||
|
||
![App Screenshot](./assets/1.png) | ||
|
||
## Week 0 - Scratch 😺 | ||
|
||
Computer Science. Computational Thinking. Problem Solving: Inputs, Outputs. Representation: Unary, Binary, Decimal, ASCII, Unicode, RGB. Abstraction. Algorithms. Running Times. Pseudocode. Scratch: Functions, Arguments, Return Values; Variables; Boolean Expressions, Conditionals; Loops; Events; Threads. | ||
|
||
- [Prairie King](https://scratch.mit.edu/projects/917174564/) | ||
|
||
## Week 1 - C 👅 | ||
|
||
C. Source Code. Machine Code. Compiler. Correctness, Design, Style. Visual Studio Code. Syntax Highlighting. Escape Sequences. Header Files. Libraries. Manual Pages. Types. Conditionals. Variables. Loops. Linux. Graphical User Interface (GUI). Command-Line Interface (CLI). Constants. Comments. Pseudocode. Operators. Integer Overflow. Floating-Point Imprecision. | ||
|
||
|
||
- [Credit](./week_1/hello/hello.c) | ||
- [Debug](./week_1/debug/debug.c) | ||
- [Half](./week_1/half/half.c) | ||
- [Hello](./week_1/hello/hello.c) | ||
- [Mario-more](./week_1/mario-more/mario.c) | ||
- [Population](./week_1/population/population.c) | ||
- [Prime](./week_1/prime/prime.c) | ||
|
||
## Week 2 - Arrays 🔑 | ||
|
||
Preprocessing. Compiling. Assembling. Linking. Debugging. Arrays. Strings. Command-Line Arguments. Cryptography. | ||
|
||
- [Caesar](./week_2/caesar/caesar.c) | ||
- [Readability](./week_2/readability/readability.c) | ||
- [Scrabble](./week_2/scrabble/scrabble.c) | ||
|
||
## Week 3 - Algorithms 🧮 | ||
|
||
Searching: Linear Search, Binary Search. Sorting: Bubble Sort, Selection Sort, Merge Sort. Asymptotic Notation. | ||
|
||
- [Plurality](./week_3/plurality/plurality.c) | ||
- [Runoff](./week_3/runoff/runoff.c) | ||
- [Sort](./week_3/sort/) | ||
|
||
## Week 4 - Memory 💾 | ||
|
||
Pointers. Segmentation Faults. Dynamic Memory Allocation. Stack. Heap. Buffer Overflow. File I/O. Images. | ||
|
||
- [Filter-less](./week_4/filter-less/) | ||
- [Recover](./week_4/recover/) | ||
- [Smiley](./week_4/smiley/) | ||
|
||
## eek 5 - Data Structures 🧱 | ||
|
||
Abstract Data Types. Queues, Stacks. Linked Lists. Trees, Binary Search Trees. Hash Tables. Tries. | ||
|
||
- [Inheritance](./week_5/inheritance/) | ||
- [Speller](./week_5/speller/) | ||
|
||
## Week 6 - Python 🐍 | ||
|
||
Python: Functions, Arguments, Return Values; Variables; Boolean Expressions, Conditionals; Loops. Modules, Packages. | ||
|
||
- [DNA](./week_6/dna/) | ||
- [Sentimental Credit](./week_6/sentimental-credit/) | ||
- [Sentimental Hello](./week_6/sentimental-hello/) | ||
- [Sentimental Mario More](./week_6/sentimental-mario-more/) | ||
- [Sentimental Readability](./week_6/sentimental-readability/) | ||
- [World Cup](./week_6/world-cup/) | ||
|
||
## Week 7 - SQL 🏦 | ||
|
||
SQL: Tables; Types; Statements; Constraints; Indexes; Keywords, Functions; Transactions. Race Conditionals. SQL Injection Attacks. | ||
|
||
- [Fiftyville](./week_7/fiftyville/) | ||
- [Movies](./week_7/movies/) | ||
- [Songs](./week_7/songs/) | ||
|
||
## Week 8 - HTML, CSS, JavaScript 💻 | ||
|
||
Internet: Routers; TCP/IP; DNS. HTTP: URLs, GET, POST. HTML: Tags; Attributes. Servers. CSS: Properties; Selectors. Frameworks. JavaScript: Variables; Conditionals; Loops. Events. | ||
|
||
- [Homepage](./week_8/homepage/) | ||
- [Trivia](./week_8/trivia/) | ||
|
||
## Week 9 - Flask 📲 | ||
|
||
Flask. Route. Decorators. Requests, Responses. Sessions. Cookies. | ||
|
||
- [Birthdays](./week_9/birthdays/) | ||
- [Finance](./week_9/finance/) | ||
|
||
## Week 10 - Emoji 😁 | ||
|
||
Precision. Unicode: Emoji, Code Points, ZWJ. | ||
|
||
## Final Project 📃 | ||
|
||
The climax of this course is its final project. The final project is your opportunity to take your newfound savvy with programming out for a spin and develop your very own piece of software. So long as your project draws upon this course’s lessons, the nature of your project is entirely up to you. You may implement your project in any language(s). You are welcome to utilize infrastructure other than the CS50 Codespace. All that we ask is that you build something of interest to you, that you solve an actual problem, that you impact your community, or that you change the world. Strive to create something that outlives this course. | ||
|
||
Inasmuch as software development is rarely a one-person effort, you are allowed an opportunity to collaborate with one or two classmates for this final project. Needless to say, it is expected that every student in any such group contribute equally to the design and implementation of that group’s project. Moreover, it is expected that the scope of a two- or three-person group’s project be, respectively, twice or thrice that of a typical one-person project. A one-person project, mind you, should entail more time and effort than is required by each of the course’s problem sets. | ||
|
||
- [Project](./project/) | ||
- [Deploy](https://shortlinks-vncsmnl.vercel.app/) | ||
|
||
## CS50 Certificate 📑 | ||
|
||
![Certificate](./assets//CS50.png) | ||
|
||
## License 📝 | ||
|
||
[![Licença](https://img.shields.io/github/license/mashape/apistatus?branch=master&label=License&logo=GitHub&logoColor=ffffff&labelColor=282828&color=informational&style=flat)](https://github.com/vncsmnl/CS50X/blob/main/LICENSE) | ||
|
||
A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code. | ||
|
||
<div><img align="right" src="./assets/footer.gif" alt="signature" width="200"></div> | ||
<div><img align="left" src="./assets/rate1_w.png" alt="like" width="80"></div> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>CS50x 2023 Solutions</title> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
} | ||
|
||
h1 { | ||
text-align: center; | ||
margin: 20px 0; | ||
} | ||
|
||
body { | ||
background: #010101; | ||
background: linear-gradient(315deg, #010101, #212529); | ||
color: white; | ||
} | ||
|
||
#mindmap { | ||
display: block; | ||
width: 100vw; | ||
height: 100vh; | ||
} | ||
</style> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/markmap-toolbar@0.15.6/dist/style.css"> | ||
</head> | ||
|
||
<body> | ||
<h1 id="title"></a>Harvard CS50x 2023 Solutions <a href="https://cs50.harvard.edu/x/2023/">GitHub</a></h1> | ||
<svg id="mindmap"></svg> | ||
<script src="https://cdn.jsdelivr.net/npm/d3@7.8.5/dist/d3.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/markmap-view@0.15.6/dist/browser/index.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/markmap-toolbar@0.15.6/dist/index.js"></script> | ||
<script>(r => { | ||
setTimeout(r); | ||
})(() => { | ||
const { | ||
markmap, | ||
mm | ||
} = window; | ||
const { | ||
el | ||
} = | ||
el.setAttribute('style', 'position:absolute;bottom:20px;right:20px'); | ||
document.body.append(el); | ||
})</script> | ||
<script>((getMarkmap, getOptions, root2, jsonOptions) => { | ||
const markmap = getMarkmap(); | ||
window.mm = markmap.Markmap.create( | ||
"svg#mindmap", | ||
(getOptions || markmap.deriveOptions)(jsonOptions), | ||
root2 | ||
); | ||
})(() => window.markmap, null, { "type": "heading", "depth": 0, "payload": { "lines": [0, 1] }, "content": "Harvard CS50x 2023 Solutions", "children": [{ "type": "heading", "depth": 1, "payload": { "lines": [4, 5] }, "content": "Screenshots 🖼️", "children": [] }, { "type": "heading", "depth": 1, "payload": { "lines": [8, 9] }, "content": "Week 0 - Scratch 😺", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [12, 13] }, "content": "<a href=\"https://scratch.mit.edu/projects/917174564/\">Prairie King</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [14, 15] }, "content": "Week 1 - C 👅", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [19, 20] }, "content": "<a href=\"./week_1/hello/hello.c\">Credit</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [20, 21] }, "content": "<a href=\"./week_1/debug/debug.c\">Debug</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [21, 22] }, "content": "<a href=\"./week_1/half/half.c\">Half</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [22, 23] }, "content": "<a href=\"./week_1/hello/hello.c\">Hello</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [23, 24] }, "content": "<a href=\"./week_1/mario-more/mario.c\">Mario-more</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [24, 25] }, "content": "<a href=\"./week_1/population/population.c\">Population</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [25, 26] }, "content": "<a href=\"./week_1/prime/prime.c\">Prime</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [27, 28] }, "content": "Week 2 - Arrays 🔑", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [31, 32] }, "content": "<a href=\"./week_2/caesar/caesar.c\">Caesar</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [32, 33] }, "content": "<a href=\"./week_2/readability/readability.c\">Readability</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [33, 34] }, "content": "<a href=\"./week_2/scrabble/scrabble.c\">Scrabble</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [35, 36] }, "content": "Week 3 - Algorithms 🧮", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [39, 40] }, "content": "<a href=\"./week_3/plurality/plurality.c\">Plurality</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [40, 41] }, "content": "<a href=\"./week_3/runoff/runoff.c\">Runoff</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [41, 42] }, "content": "<a href=\"./week_3/sort/\">Sort</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [43, 44] }, "content": "Week 4 - Memory 💾", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [47, 48] }, "content": "<a href=\"./week_4/filter-less/\">Filter-less</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [48, 49] }, "content": "<a href=\"./week_4/recover/\">Recover</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [49, 50] }, "content": "<a href=\"./week_4/smiley/\">Smiley</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [51, 52] }, "content": "eek 5 - Data Structures 🧱", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [55, 56] }, "content": "<a href=\"./week_5/inheritance/\">Inheritance</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [56, 57] }, "content": "<a href=\"./week_5/speller/\">Speller</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [58, 59] }, "content": "Week 6 - Python 🐍", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [62, 63] }, "content": "<a href=\"./week_6/dna/\">DNA</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [63, 64] }, "content": "<a href=\"./week_6/sentimental-credit/\">Sentimental Credit</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [64, 65] }, "content": "<a href=\"./week_6/sentimental-hello/\">Sentimental Hello</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [65, 66] }, "content": "<a href=\"./week_6/sentimental-mario-more/\">Sentimental Mario More</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [66, 67] }, "content": "<a href=\"./week_6/sentimental-readability/\">Sentimental Readability</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [67, 68] }, "content": "<a href=\"./week_6/world-cup/\">World Cup</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [69, 70] }, "content": "Week 7 - SQL 🏦", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [73, 74] }, "content": "<a href=\"./week_7/fiftyville/\">Fiftyville</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [74, 75] }, "content": "<a href=\"./week_7/movies/\">Movies</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [75, 76] }, "content": "<a href=\"./week_7/songs/\">Songs</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [77, 78] }, "content": "Week 8 - HTML, CSS, JavaScript 💻", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [81, 82] }, "content": "<a href=\"./week_8/homepage/\">Homepage</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [82, 83] }, "content": "<a href=\"./week_8/trivia/\">Trivia</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [84, 85] }, "content": "Week 9 - Flask 📲", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [88, 89] }, "content": "<a href=\"./week_9/birthdays/\">Birthdays</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [89, 90] }, "content": "<a href=\"./week_9/finance/\">Finance</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [91, 92] }, "content": "Week 10 - Emoji 😁", "children": [] }, { "type": "heading", "depth": 1, "payload": { "lines": [95, 96] }, "content": "Final Project 📃", "children": [{ "type": "list_item", "depth": 2, "payload": { "lines": [101, 102] }, "content": "<a href=\"./project/\">Project</a>", "children": [] }, { "type": "list_item", "depth": 2, "payload": { "lines": [102, 103] }, "content": "<a href=\"https://shortlinks-vncsmnl.vercel.app/\">Deploy</a>", "children": [] }] }, { "type": "heading", "depth": 1, "payload": { "lines": [104, 105] }, "content": "CS50 Certificate 📑", "children": [] }, { "type": "heading", "depth": 1, "payload": { "lines": [108, 109] }, "content": "License 📝", "children": [] }] }, {})</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Sample workflow for building and deploying a Next.js site to GitHub Pages | ||
# | ||
# To get started with Next.js see: https://nextjs.org/docs/getting-started | ||
# | ||
name: Deploy Next.js site to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Detect package manager | ||
id: detect-package-manager | ||
run: | | ||
if [ -f "${{ github.workspace }}/yarn.lock" ]; then | ||
echo "manager=yarn" >> $GITHUB_OUTPUT | ||
echo "command=install" >> $GITHUB_OUTPUT | ||
echo "runner=yarn" >> $GITHUB_OUTPUT | ||
exit 0 | ||
elif [ -f "${{ github.workspace }}/package.json" ]; then | ||
echo "manager=npm" >> $GITHUB_OUTPUT | ||
echo "command=ci" >> $GITHUB_OUTPUT | ||
echo "runner=npx --no-install" >> $GITHUB_OUTPUT | ||
exit 0 | ||
else | ||
echo "Unable to determine package manager" | ||
exit 1 | ||
fi | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
cache: ${{ steps.detect-package-manager.outputs.manager }} | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
with: | ||
# Automatically inject basePath in your Next.js configuration file and disable | ||
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). | ||
# | ||
# You may remove this line if you want to manage the configuration yourself. | ||
static_site_generator: next | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.next/cache | ||
# Generate a new cache whenever packages or source files change. | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
# If source files changed but packages didn't, rebuild from a prior cache. | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- | ||
- name: Install dependencies | ||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} | ||
- name: Build with Next.js | ||
run: ${{ steps.detect-package-manager.outputs.runner }} next build | ||
- name: Static HTML export with Next.js | ||
run: ${{ steps.detect-package-manager.outputs.runner }} next export | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./out | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
Oops, something went wrong.