본문 바로가기

전체 글

node js mysql 연동 에러 Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client node js mysql 연동시 위와 같은 에러가 발생하였다.이유는 잘 모르겠지만, 검색 끝에 대충 해결하였다. 기존에 설치된 mysql 을 삭제하고 재설치.설치할 때Strong passord~~ 이거 말고legacy 로 시작하는 것을 선택하고 설치하여야 한다. 더보기
JS) call 예제 123456789101112131415161718192021//자바스크립트 함수, callconst rose = {name : "로즈-장미"};const lily = {name : "릴리-백합"};const mugunghwa = {name : "무궁화-무궁화"}; function flower(){ return `flower : ${this.name}`;} console.log(flower.call()); // flower :console.log(flower.call(lily)); // flower : 릴리-백합 function updateFlower(languge, japanese){ this.languge = languge; this.japanese = japanese;} updateFlower.cal.. 더보기
js) object - {}, [] 테스트 1234567891011let obj = { 0 : "a", 1 : "b", 2 : "c", 3 : 4, "4" : 5, test : "test", "num" : 100}; let arr = ['a','b','c',4,5];cs 자바스크립트 오브젝트 테스트 key : value 라고 할 때 key 에는 숫자를 사용해서는 안 된다고 한다 더보기
c) c언어코딩도장 the 갯수 12345678910111213141516171819202122232425262728#define _CRT_SECURE_NO_WARNINGS#include #include int main(void){ char s1[1001] = ""; char *ptr = NULL; int nWordCnt = 0; //워드 카운트 printf("문자열을 입력하세요(알파벳만, 1000자 이하) : "); scanf("%[^\n]s", s1); ptr = strtok(s1, " .,"); while (ptr != NULL) { if (strcmp(ptr, "the") == 0) { nWordCnt++; } ptr = strtok(NULL, " .,"); } printf("the 의 워드 수는 : %d 입니다\n", nWor.. 더보기
C) 공백 문자 갯수 구하기 1234567891011121314151617181920212223242526272829#define _CRT_SECURE_NO_WARNINGS#include #include #include int main(void){ char s1[1001] = {0}; char *ptr = NULL; int nCnt = 0; printf("1000자 이하로 입력하세요(알파벳만): "); scanf("%[^\n]s", s1); ptr = strchr(s1, ' '); while(ptr != NULL) { nCnt++; ptr = strchr(ptr+1, ' '); } printf("공백문자의 갯수: %d\n", nCnt); return 0;} Colored by Color Scriptercs scanf("%[^\n]s.. 더보기