Programming Language

    [C/C++] C++로 2048 구현하기

    #include #include #include #include using namespace std; /* 키보드 값 */ #define UP 0 #define DOWN 1 #define LEFT 2 #define RIGHT 3 #define SUBMIT 4 /* 색상 열거형 정의*/ enum { black, blue, green, cyan, red, purple, brown, lightgray, darkgray, lightblue, lightgreen, lightcyan, lightred, lightpurple, yellow, white, }; /* 함수 선언 */ void init(); void gotoxy(int, int); void DrawTitle(); int DrawMenu(); int key..

    [Electron] require is not defined 해결 방법

    Electron openDevTools 를 이용하여 F12 메뉴를 보는데 require is not defined 경고를 만났다. 이 에러는 main.js의 webPreferences에 아래 두 코드를 입력해주면 해결 가능하다. nodeIntegration:false contextIsolation : false

    [Electron] Electron을 사용하여 Destktop Todo App 만들기( 2 ) - Preferences, Todo CRUD

    Preferences const { app, BrowserWindow, ipcMain } = require('electron') const path = require('path') const createWindow = () => { // Create the browser window. const mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { preload: path.join(__dirname, 'preload.js') }, }) mainWindow.removeMenu(); // remove Menu // and load the index.html of the app. mainWindow.loadFile('index...

    [Electron] Electron을 사용하여 Desktop Todo App 만들기( 1 ) - Setup, Dark mode

    Setup Prerequisites 튜토리얼을 토대로 개발 환경을 설정하였습니다. Electron을 사용하려면 Node.js를 설치해야 합니다. 사용 가능한 최신 LTS 버전을 사용하는 것이 좋습니다. 플랫폼에 대해 사전 구축된 설치 프로그램을 사용하여 Node.js를 설치하십시오. 그렇지 않으면 다른 개발 도구에서 비호환성 문제가 발생할 수 있습니다. Node.js가 올바르게 설치되었는지 확인하려면 터미널 클라이언트에 다음 명령을 입력합니다. $node -v $npm -v 참고: Electronic은 Node.js를 이진 파일에 포함하므로 코드를 실행하는 Node.js 버전은 시스템에서 실행 중인 버전과 관련이 없습니다. Create application Scaffold the project 폴더를 만..