본문 바로가기

반응형

전체 글

(644)
프로그래머스 : 입양 시각 구하기(2) WITH RECURSIVE cte AS ( SELECT 0 AS HOUR UNION ALL SELECT HOUR + 1 FROM cte WHERE HOUR < 23 ) SELECT cte.hour, COUNT(ani.ANIMAL_ID) FROM cte LEFT JOIN ANIMAL_OUTS AS ani ON cte.hour = HOUR(ani.DATETIME) GROUP BY cte.hour RECURSIVE 구문을 사용하여 0~23 까지의 숫자를 가지는 CTE 라는 테이블이 완성된다. 이 테이블을 가지고 LEFTJOIN후 원하는 결과값을 가져오면된다.
CSS : relative 와 absolute 정복 아래와 같은 간단한 예제로 여러가지 실험을 해보자.. 1. relative를 위쪽에만 주었을 경우. .layout1{ position: relative; top: 20px; left: 20px; width: 200px; height: 200px; background-color: tomato; } .layout2{ width: 200px; height: 200px; background-color: skyblue; } layout1에는 top 20px, left 20px를 주었다. 당연히 현재를 기준으로 오른쪽 ,아래쪽으로 20px만큼 이동한다. layout2는 그대로이지만 겹치는 이유는 기준점이 되는 애가 relative인 녀석의 이동하기 전이 기준이 된다. 또한 layout2가 layout1에 먹히는 모..
프로그래머스 : 순위 import java.util.*; class Solution { static int digit[][]; static final int INF = 987654321; public int solution(int n, int[][] results) { int answer = 0; digit = new int [n+1][n+1]; for(int i=1;i
프로그래머스 : 가장먼노드 import java.util.*; class Solution { static List[] Edge; public int solution(int n, int[][] edge) { Edge = new ArrayList[n+1]; for(int i=1;i
프로그래머스 : 징검다리 import java.util.*; class Solution { public int solution(int distance, int[] rocks, int n) { int answer = 0; Arrays.sort(rocks); int front = 1; int rear = distance; while(front n){ rear = mid-1; }else{ // cnt
인터렉티브 디자인 공부 ㄱㄱ 최근에 UI/UX , Front쪽으로 공부를 하게되었다! 공부하게 된 이유는 그동안 백엔드 역할을 맡아오면서 프론트도 간간히 했는데 그때마다 내가원하는 화면을 만드는게 곤욕이였고.. 짧은 지식으로 front쪽의 메커니즘을 이해하기가 수월하지는 않았다..(그래도 의지의 한국인 어떻게서든 하면되더라) 인터렉티브 디자인에 관심을 가지게 된것은 유튜브에 고졸 출신 구글 디자이너가 있었는데.. 제목이 자극적이였는지 보게되었다. 기본적으로 이분은 디자이너에 대한 감각이 있으신분인것같고 의지나 노력도 대단하신분인다. www.youtube.com/watch?v=ke14Bhhdotg&t=3s 일이 즐거움이라는데 이말에 공감한데 하기싫을 할때는 성장성이 느린것 같다. 이분을 보면서 인터렉티브 디자인에 관심을 가지게 되었고..
프로그래머스 : 단속카메라 import java.util.*; class Solution { public int solution(int[][] routes) { int answer =0; Arrays.sort(routes,new NC()); int temp = routes[0][1]; for(int i=1;i
프로그래머스 : 체육복 import java.util.*; class Solution { public int solution(int n, int[] lost, int[] reserve) { int check[] = new int[32]; for(int r : reserve){ check[r]++; } for(int l : lost){ check[l]--; } int answer = 0; for(int i=1;i=0){ answer++; }else if(check[i]==-1){ if(check[i-1]==1){ check[i-1]--; answer++; }else if(check[i+1]==1){ check[i+1]--; answer++; } } } return answer; } }

반응형