Steps to try when pip doesn’t work properly Run in Administrative Mode Reinstall pip with py -m ensurepip --upgrade (pip documentation) Alternative command when django-admin doesn’t work From Django Docs command not found: django-admin¶ django-admin should be on your system path if you installed Django via pip. If it’s not in your path, ensure you have your virtual environment activated and you can try running the equivalent command python -m django.
Promise The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.
In simple words, promise is used to process async operation, and when successful it returns a single value. It is mainly used to process data received from a different source and display on the page.
Before promise, async operations were processed with a chain of callback functions, which, in complex cases, made the code very hard to read.
The following themes are newly learned features of Javascript.
Short-Circuit Evaluation and OR Expression While using the logical operators, for instance and, or, and not, there are cases where the assessment of the second value is irrelevant. For example in OR expressions, when the first value is true, the expression is true no matter the second value of the expression. In these cases, Javascript chooses not to evaluate the second value, and this is called “short-circuit evaluation”.
Reference: For general structure - Youtube Channel Get __it Done!
For auto increment id on Google Sheets - Stack Overflow Question
Motivation For my react app, I wanted to create a page where I could ask for the user’s email and name, maybe for future marketing purposes. Although storing these kind of data would conventionally require a backend server and a database connected to it. However, I wanted this project to be as lightweight as possible, preferably a Front End only project.
React - Create React App Creating a react app was… harder than I expected, although Repl.it supported React template and even the Create React App template.
Concept of React With React, front end can be broken down into “Components”, which allows for further uses of the function later on.
Literally, it means that parts of html is written in pieces in javascript form, so that it can be written more efficiently with lots more extensibility.
References:Youtube Tutorial by Telmo Sampaio Create-React-App Documentation
Although I thought the deployment part wouldn’t take that much time. But because of some minor mistakes I made in some stages, which was not explicitly explained by the create react app documentation, I had to start over a multiple times until I figured things out.
Basic Steps as explained by the documentation 1. Add homepage field to package.json The field could be placed in order in the package.
Introduction I was asked to build a small app that takes in user input and create a downloadable image using those inputs. The user inputs their name and three colors (using html color picker) and the result image renders according to those inputs.
SVG After researching for different ways to manipulate images, I came across ‘svg’. Svg stands for ‘scalable vector images’, and put short, instead of saving image pixel by pixel as in other image files, svg saves ‘paths’ of the image and ‘draw’ this paths when called.
Solution Reference:
https://programmers.co.kr/questions/17409
Task https://programmers.co.kr/learn/courses/30/lessons/12973
Given a string of characters, if two of the same alphabet in a row is to be deleted until there is none left, check if this possible with the given string.
Solution function solution(s) { // Split string into array let arr = s.split(''); // Set temporary stack array let temp = []; // If string length is odd number, return 0 if (arr.
Task https://programmers.co.kr/learn/courses/30/lessons/43165
Count how many combinations of adding and subtracting each element of the given array results the given target number.
Solution function solution(numbers, target) { let answer = 0; let nums = [...numbers]; const tar = target; // Recursive function const getTarget = (arr, num, count) => { // Get sum at every loop let sum = arr.reduce((a, c) => a + c, 0); // If sum matches target, increase answer if(sum === num) { answer++; } // For every item in array, change to negative value, recursion for (let i = count; i < arr.
JavaScript - Advanced Loop Along with the for, while, do, and forEach loop, the topic in this section was the usage of for of and for in loop.
The idea is generally similar to the one of forEach loop, but the difference of ‘for in’ loop compared to the other two was that ‘for in’ was enumerating, while the other two were iterating. A more thorough explanation is provided by this link, to be honest, I’m still not 100% sure.