Sidenote

Sidenote_21.07.31

Koowoy
This is a really short note that might save loads of time When working with chrome, some things just might not work because the wrong codes that has been fixed might be saved in the cache and prevents the right code from working. Today this problem occurred when working with Redux. Make sure to get in the habit of using hard reload (ctrl + F5) when reloading in development.

Sidenote_21.07.29

Koowoy
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.

[Sidenote/JS] Using Stack for Maximum Efficiency

Koowoy
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.

Sidenote_21.06.24

Koowoy
references: File sprintf Task and Solution Code From a damaged (or deleted) card data, recover original jpeg images. [details] My Solution #include <stdio.h>#include <stdlib.h>#include <stdint.h> typedef uint8_t BYTE; int main(int argc, char *argv[]) { // Check if parameter validity if (argc != 2) { printf("Usage: ./recover image\n"); return 1; } // Open input file char *infile = argv[1]; FILE *inptr = fopen(infile, "r"); if (inptr == NULL) { fprintf(stderr, "Could not open %s.

[Sidenote/JS] Using Recursion to Get All Possible Combinations

Koowoy
The definition of combination in mathematics is as follows: In mathematics, a combination is a selection of items from a collection, such that the order of selection does not matter. (from Wikipedia) In order to get all the possible selections, the following formula is used: image-source The first part refers to all the combination that includes a certain value, and the latter part refers to all the combinations that does not include that value.