본문 바로가기
  • Tried. Failed. Logged.
728x90

분류 전체보기720

Electron - 로드가 다된후에 창 띄우기 let win = new BrowserWindow({ show: false, }); win.once('ready-to-show', () => { win.show() }) 출처: https://www.electronjs.org/docs/latest/api/browser-window BrowserWindow | Electron Create and control browser windows. www.electronjs.org 2022. 3. 27.
Electron - 클립보드 조작 const {clipboard} = require('electron'); clipboard.writeText('클립보드 복사!'); // 클립보드 텍스트 복사 clipboard.readText(); // 클립보드 텍스트 가져오기 출처: https://tinydew4.github.io/electron-ko/docs/api/clipboard/ clipboard 시스템 클립보드에 복사와 붙여넣기를 수행합니다. tinydew4.github.io 2022. 3. 27.
Electron - 초기 설정 및 실행 [설치] npm init npm i electron [package.json] { "main": "main.js", "scripts": { "start": "electron ." } } [main.js] const { app, BrowserWindow, Menu } = require('electron'); Menu.setApplicationMenu(false); // 메뉴 비활성화 function createWindow(){ let win = new BrowserWindow({ frame: true, width: 600, height: 400, minWidth: 400, minHeight: 200, maxWidth: 700, maxHeight: 500, resizable: true, webPreferen.. 2022. 3. 27.
안드로이드 스튜디오 - notification Intent 진행하고 있던 MainActivity로 다시 이동하기 해결 Intent notificationIntent = new Intent(getApplicationContext(), MainActivity.class); notificationIntent.setAction(Intent.ACTION_MAIN); notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER); notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 진행하고 있는 MainActivity로 다시 이동을 하고 싶은 경우. 출처: https://like-tomato.tistory.com/156 [Notification] 안드로이드 앱 중복 실행 문제 완벽 해결 방법 안드로이드 애플리케이션을 개발하다 보면 대부분.. 2022. 3. 22.
html - 개발자 도구 막기(사용하기 힘들게) (function () { (function a() { try { (function b(i) { if (('' + (i / i)).length !== 1 || i % 20 === 0) { (function () { }).constructor('debugger')() } else { debugger } b(++i) } )(0) } catch (e) { setTimeout(a, 700) } } )() } )(); 2022. 2. 24.
크롬 확장 프로그램 - chrome storage 조작 1) 권한 설정 "permissions": ["storage"] 2) 데이터 지정 chrome.storage.sync.set({ userData: user }); 3) 데이터 가져오기 chrome.storage.sync.get(["userData"], result => {}); 사용 예시) async function loadSecNvMids(){ return new Promise( (resolve, reject)=>{ chrome.storage.sync.get(["secNvMids"], result => { resolve( result ); }); } ) } async function main(){ var secNvMids = null; secNvMids = await loadSecNvMids(); se.. 2022. 2. 20.
리액트 - 프로젝트 21 - 3주 동안의 챌린지 https://pr0ject21.web.app/ 21: Challenge 3 weeks pr0ject21.web.app 깃허브: https://github.com/Logic-01001010/21 GitHub - Logic-01001010/21: 프로젝트 21 - 3주 동안의 챌린지 프로젝트 21 - 3주 동안의 챌린지. Contribute to Logic-01001010/21 development by creating an account on GitHub. github.com 2022. 2. 19.
자바스크립트 - localStorage에 클래스 변수 저장하기 localStorage.setItem('Todos', JSON.stringify(todosList)); if( localStorage.getItem('Todos') != null && localStorage.getItem('Todos') != undefined && localStorage.getItem('Todos') != '' && localStorage.getItem('Todos') != '[]' ){ todosList = JSON.parse( localStorage.getItem('Todos') ); } 2022. 2. 10.
셀레니움 - 네이버 로그인 봇 탐지 우회하기 from selenium import webdriver from selenium.webdriver.common.keys import Keys import pyperclip import time uid = '{아이디}' upw = '{비밀번호}' driver = webdriver.Chrome('chromedriver.exe') driver.implicitly_wait(15) driver.get('https://nid.naver.com/nidlogin.login?mode=form&url=https%3A%2F%2Fwww.naver.com') pyperclip.copy(uid) time.sleep(1) driver.find_element_by_xpath('/html/body/div[1]/div[2]/div/di.. 2022. 2. 8.
node.js - 모듈 파일 불러오기(exports) 다음과 같이 모듈 파일을 만들고 export 할 변수, 함수, 클래스들은 위와 같이 exports.{이름} = {변수|함수|클래스}로 지정해준다. require 함수를 통해서 외부의 js 파일을 불러와서 myModule이라는 변수에 대입을 해준다. 실행 결과를 확인하면 myModule 안에는 message라는 변수와 say 함수가 들어있는 것을 확인 가능 이제 각각의 변수와 함수를 사용하기 위해서는 myModule.message myModule.say() 요런식으로 점 뒤에 키워드를 적는다. 실행 결과 요약: [수출하기] var a = 123; exports.a = a; [수입하기] const myModule = require('module.js'); const a = myModule.a; 참고: htt.. 2022. 2. 8.
neovim - nvim 설정 경로: ~/.config/nvim/init.vim 대충 내 설정) :set number " :set relativenumber :set autoindent :set tabstop=4 :set shiftwidth=4 :set smarttab :set softtabstop=4 :set mouse=a call plug#begin() Plug 'http://github.com/tpope/vim-surround' " Surrounding ysw) Plug 'https://github.com/preservim/nerdtree' " NerdTree Plug 'https://github.com/tpope/vim-commentary' " For Commenting gcc & gc Plug 'https://github.c.. 2022. 2. 8.
운영체제별로 EXIT STATUS(종료 상태값) 확인 방법 리눅스: $? 윈도우: %errorlevel% EXIT STATUS 위키: https://zetawiki.com/wiki/%EC%A2%85%EB%A3%8C_%EC%83%81%ED%83%9C%EA%B0%92_EXIT_STATUS 종료 상태값 EXIT STATUS - 제타위키 다음 문자열 포함... zetawiki.com 2022. 2. 7.
728x90