How to use left and right y-axis together

  1. Assign different “yAxsID” in datasets.

2. Refer values inside options.

In order to check multiple graphs’ y-axis values together through tooltip by

interaction: {
intersect: false,
mode: 'index',
},

How to overwrite tooltip to get the sum of y-axis values

2021.12.29

To prioritize mobile,

/* CSS code for mobile display */@media screen and (min-width: 769px) {
/* CSS code for desktop display */
}

To prioritize desktop,

/* CSS code for desktop display */@media screen and (max-width: 768px) {
/* CSS code for mobile display */
}

day.js

Monday of last week

dayjs().startOf('isoWeek').subtract(7, 'day')

Sunday of last week

dayjs().startOf('week');

Monday of two weeks prior

dayjs().startOf('isoWeek').subtract(14, 'day');

First day of last month

dayjs().subtract(1, 'month').startOf('month');dayjs(
new Date(today.getFullYear(), today.getMonth() - 1, 1).toString()
);

Last day of last month

dayjs().subtract(1, 'month').endOf('month');dayjs(
new Date(today.getFullYear(), today.getMonth(), 0).toString()
);

First day of two months prior

dayjs().subtract(2, 'month').startOf('month');dayjs(
new Date(today.getFullYear(), today.getMonth() - 2, 1).toString()
);

2021.09.13

구글 로그인 등 strapi가 제공하는 로그인을 할 경우, 링크보고 따라하면 됨.

https://strapi.io/documentation/developer-docs/latest/development/plugins/users-permissions.html#providers

Kakao Oauth

https://developers.kakao.com/ 들어가서 어플리케이션 생성

  1. 요약 정보 ⇒ 앱 키 ⇒ REST API 키
  2. 카카오 로그인 ⇒ 보안 ⇒ Client Secret

⇒ 이 두 키를 발급 받아 localhost:1337의 provider 부분에 나중에 넣어줘야 됨!

Redirect url은 http://localhost:1337/connect/kakao/callback 로 등록

Frontend

MySQL 5.6

To create database with specific character-set and collate,

create database [table name] default character set utf8mb4 collate utf8mb4_unicode_ci;

Database

character-set= utf8mb4;

collate=utf8mb4_unicode_ci;

UNIQUE INDEX 생성을 하려고 할 때,
mysql> CREATE UNIQUE INDEX email
-> ON users(email);
ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

TIL 2021.07.02

Strapi

A headless CMS(Content Management System) for Nodejs to build and develop APIs, and its content super-fast and accessible in a friendly UI.

After I try Strapi for my company’s project, this will be the best when you need to get dynamic data and easy to build Database.

GraphQL & Next.js

  • HOC
Quick Startnpx create-next-app next-with-apollo
https://github.com/vercel/next.js/tree/canary/examples/with-apollo
https://github.com/vercel/next.js/tree/canary/examples/with-apollo

Mongoose

startSession: create Sessionsession.startTransaction // start transaction
session.commitTransaction // commit and save changes
session.endSession // end transaction
Even though you are using several models, session can be applied to everything once it is declared. Therefore, it will fail if one of the processes fail.

Joo Hee Kim

Consistency achieves everything https://github.com/paigekim29

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store