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.
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.
Task https://programmers.co.kr/learn/courses/30/lessons/72412;
My Solution referenced from:
https://velog.io/@alvin/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4-%EB%AC%B8%EC%A0%9C%ED%92%80%EC%9D%B4-%EC%88%9C%EC%9C%84-%EA%B2%80%EC%83%89-Javascript https://12bme.tistory.com/120 function solution(info, query) { let answer = []; // store every possible combination that every info can match to let combinations = {}; const getCombinations = (arr, score, init) => { let spec = arr.join(''); let value = combinations[spec]; // add score to combination object if (value) { combinations[spec].push(score); } else { combinations[spec] = [score]; } // recursive function, to loop through every possibility for (let i = init; i < arr.
For the Summer Vacation, I have decided to regularly upload the TILs I wrote last year on Notion onto the blog, for recap and archiving purposes.
20.10.01 JS - Advanced Arrays and Objects / ES 7, 8, 10 The lessons for today were so wide spread, starting with the advanced functions and new features of ES5 and ES6, but these were rather similar to the one’s that I have done last month.
Until this lesson, the term “data structure” reminded me only of the “data types” that variables can have. But I learned that data structure rather referred to how multiple data is stored and accessed in different methods.
Array Though I’ve used arrays in so many different languages, since there were a lot of simplification applied to the arrays in Javascript and Python, I only came to know of the restrictions that arrays have.
After a long break from mending my Github, I returned and started with setting up my github profile.
Basics In order to set up the profile page add various personal details on the profile page, a new repository is needed, with the name set up as github username. (for instance, in my case, my id is uk960214, therefore I created a repository with the name “uk960214”)
The readme.md file on this repository will be shown in the profile page.
Task Requirements A number between 0 and 1,000,000 and k that is smaller than the first number is given. When k amount of digit is removed, return the highest possible number.
My Attemps for Solution No.1) Using Combination On first thought, I wasn’t aware of how big the number could be, and came up with the idea to find all possiblities and to compare these to find the maximum value.