20-Hour React Study Plan for those who hate it
- Components and JSX
- Props and state
- Lifecycle methods (not required if you use functional components - hook)
- Hooks (useState, useEffect)
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>blunderfest</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| </head> | |
| <body class="bg-gray-100 font-sans"> | |
| <div class="max-w-3xl mx-auto p-8"> |
A lot of folks asked for it, so here we go:
| import std/[asynchttpserver, asyncdispatch, os, strutils] | |
| proc handleRequest(req: Request) {.async.} = | |
| let path = "." & req.url.path | |
| if fileExists(path): | |
| let content = readFile(path) | |
| let contentType = case path.splitFile.ext | |
| of ".html": "text/html" | |
| of ".css": "text/css" | |
| of ".js": "application/javascript" |
This study plan is designed to help you systematically improve your problem-solving skills and prepare for technical interviews using LeetCode.
Prompt:
convert this to Java; use jbang to include DEPS -- import requestsfrom bs4 import BeautifulSoupurl = 'https://example.com'response = requests.get(url)soup = BeautifulSoup(response.text, 'html.parser')# Extract data from the webpagedata = soup.find('div', class_='content')print(data.text)
Learn how to split a Word document into multiple documents in Python: https://blog.aspose.com/2021/11/18/split-a-word-document-in-python/
| # Recipe from https://unix.stackexchange.com/questions/66931/split-pdf-into-documents-with-several-pages-each | |
| pagesper=2 | |
| file=layout_atlas_multipage.pdf | |
| number=$(pdfinfo -- "$file" 2> /dev/null | awk '$1 == "Pages:" {print $2}') | |
| count=$((number / pagesper)) | |
| filename=${file%.pdf} | |
| counter=0 | |
| while [ "$count" -gt "$counter" ]; do |
| <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> | |
| <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> | |
| <link rel="icon" type="image/png" sizes="36x36" href="/android-chrome-36x36.png"> | |
| <link rel="icon" type="image/png" sizes="48x48" href="/android-chrome-48x48.png"> | |
| <link rel="icon" type="image/png" sizes="72x72" href="/android-chrome-72x72.png"> | |
| <link rel="icon" type="image/png" sizes="96x96" href="/android-chrome-96x96.png"> | |
| <link rel="icon" type="image/png" sizes="144x144" href="/android-chrome-144x144.png"> | |
| <link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png"> | |
| <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"> | |
| <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"> |