Skip to content

Instantly share code, notes, and snippets.

View kninami's full-sized avatar

kyungsuk CHO kninami

View GitHub Profile
const currentSpreadsheet = SpreadsheetApp.getActiveSpreadsheet();
const currentSheet = currentSpreadsheet.getActiveSheet();
const file = DriveApp.getFileById(currentSpreadsheet.getId());
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Sluggish Hackers')
.addItem('개인정보 자동삭제 설정', 'showForm')
.addToUi();
}
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<form id="dataForm">
<label for="columnName">개인정보 컬럼명</label><br/>
<input type="text" style="width:100%" id="columnName" name="columnName"><br>
<span style="color: gray; font-size: 12px;">삭제할 개인정보가 들어있는 컬럼의 제목(예:휴대폰번호)를 입력해주세요. 여러 개를 입력할 경우 <strong>휴대폰번호, 이름</strong>과 같은 형태로 쉼표로 분리해주세요</span><br/><br/>
@kninami
kninami / webtoon_capture.py
Last active December 3, 2022 06:33
일별 웹툰 랭킹 변화 추이 분석 자료 아카이브를 위한 웹툰 랭킹화면 캡쳐
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from datetime import datetime
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('headless')
chrome_options.add_argument("disable-gpu")
function solution(A) {
const sum = (A.length + 1) * (A.length + 1 + 1) / 2;
return A.reduceRight((prev, cur) => prev - cur, sum);
}
class Solution {
public int solution(int[] A) {
long N = A.length +1;
long totalSum = (N*(N+1))/2;
for(int i=0; i<A.length; i++){
totalSum -= A[i];
}
return (int)totalSum;
class Solution {
public int[] solution(int[] A, int K) {
int[] result = new int[A.length];
int length = 0;
if(K!=0 && A.length!=0){ length = K%A.length; }
for(int i=0;i<A.length;i++){
if(i+length<A.length){
result[i+length] = A[i];
}else{
class Solution {
public int[] solution(int[] A, int K) {
int[] B = new int[A.length];
for(int i=0; i<A.length; i++){
B[(i+K)%A.length] = A[i];
}
return B;
}
/*
node로 실행
풀이 방식
시간 복잡도를 O(n)으로 하기 위해 bit연산으로 하여 처리
10진수 값을 1과 AND 연산해서 2진수의 역순으로 하나씩 꺼내서 처리
*/
function solution(N) {
let curNum = N;
let maxZeroCnt = 0;
function solution(A) {
let solver = {
makeCounterHash: (A) => {
let counterMap = {};
const ARR_LEN = A.length;
const HALF_IDX = Math.floor(ARR_LEN / 2);
for (let idx = 0; idx <= HALF_IDX; idx++) {
const prenum = A[idx];
if (counterMap.hasOwnProperty(prenum)) {
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
class Solution {
public int solution(int[] A) {
int result=0;
HashMap<Integer , Integer> map = new HashMap<Integer , Integer>();
for(int i=0;i<A.length;i++){