전체 글 255

forfree메모

확인하기: - varStatus="status" 이게뭐야 배운점 : - jsp에서 name값을 여러개하면 해당 매개변수에 ,,,, 찍혀서 여러개 다들어간다? - jsp script에서 반복문으로 에이젝스이용해서 화면에 태그들넣을때 ${} 이런거 다 떼고 변수명만 '+변수명+'해서 넣어야됨 - success에서 [{VO}{VO}{VO}{VO}]이렇게 배열로 담겨있을떈 어떻게해? => result로 넘겨받은 직후에 바로 걍 for문돌려서꺼내 - js에서는 , ${}를 사용하지 못함 - redirect와 forwrad -redirect : 클라이언트 -> url1 -> 클라이언트 -> url2 (*mv.addObject로 전달정보를 넘겨주는 작업을 따로 거쳐야함 url1에 넘겨줬던 내용을 url2에 안줌 이동..

브라우저에 스크롤 만들기

풀캘린더(Fullcalendar)를 넣었더니 늘어남에따라 가득차지만 푸터가 안보이는 문제 있었음. (캘린더를 담은 div태그에 style로 overflow:auto; 를 걸면 캘린더 창에만 스크롤이 생겨서 화면에 추가해야 될 것 같았음) 푸터는 템플릿으로 따로 빼둔상태라서 다 담고있는 바디에 overflow:scroll이랑 heigth를 vh(브라우저기준)을 주니까 스크롤생겼음.

DB_날짜형식 변환하기

DATE_FORMAT(변환시킬값, '변환하고싶은날짜형식의 양식') * 대소문자 예민 MYSQL VER. select DATE_FORMAT(consulting_date,'%Y-%m') as yearMonth, count(consulting_date) as studentCount from consulting join student on student_id=student_consulting_id where consulting_deletion="N" and teacher_student_id="49" and consulting_date like "2021%" group by DATE_FORMAT(consulting_date,'%Y-%m') order by yearMonth asc; MAPPER VER. **map..

DB_ (mysql, mapper)시간차이, 시간합계, 중복제거

timestampdiff(minute, a, b) => minute분으로 시간차이 알려줌, a는 시작시간, b는 끝나는 시간 timediff(b,a) => 00:00:00 와 같은 형식으로 시간차이 알려줌. b가 늦은시간 - a이른시간 sum( ) => 합계 group by ~~ => ~~로 묶어서 중복되는 것들 중복값 제거하고 하나로만 나타냄 (*group by할때 sum과 같은 처리 안해주면, 순서 밀린애가 제거되면서 값이 사라지니까 유의) select sum(timestampdiff(minute,calendar_starttime,calendar_endtime)) as classtime, subject_id, subject_pay as pay, subject_name from calendar join..

형변환시키기

String타입을 Int타입(또는 Integer)로 변환시키기 (String to Int, String to Integer) int monthOnly = Integer.parseInt(dateStr2); String타입을 날짜로 변환 (String to Date) SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date Date타입으로저장할변수명 = format.parse(String타입의변수); 날짜타입을 String타입으로 변환(Date to String) SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); String String타입변수명= format..

HashMap의 value값 +1 씩 증가시키기

ArrayList타입의 delStudentList를 향상된 for문으로 하나씩 꺼낼 때 key값에는 (년-월)을 넣고 value에는 중복되는 횟수를 +1씩 올리기로 할 때 1. map.put(key,value); 를 이용해서 값을 넣는다. 2. value부분에 map.get(key)를 넣으면 해당 key값의 value값을 반환하며 그 값에+1을 넣어주면 됨 for(StudentVO list_ea : delStudentList) { if(!map.containsKey(onlyYearMonth(list_ea.getStudent_deletion_date()))) { map.put(onlyYearMonth(list_ea.getStudent_deletion_date()), 1); }else { map.put(on..