JAVA 랜덤 숫자 문자 생성

참조http://ktko.tistory.com/entry/%EC%9E%90%EB%B0%94-%EB%9E%9C%EB%8D%A4%ED%95%A8%EC%88%98%EB%A5%BC-%EC%9D%B4%EC%9A%A9%ED%95%9C-%EC%9D%B8%EC%A6%9D%EB%B2%88%ED%98%B8-%EC%9D%B8%EC%A6%9D%EB%AC%B8%EC%9E%90-%EB%A7%8C%EB%93%A4%EA%B8%B0 nt certNumLength = 6; //자리수 Random random = new Random(System.currentTimeMillis()); int range = (int)Math.pow(10, certNumLength); int trim = (int)Math.pow(10, certNumLength-1); int result = random.nextInt(range)+trim; if(result>range){ result = result - trim; } System.out.println(String.valueOf(result));

JAVA 날짜/시간 현재, 3분후, 1시간전, 1일전

String today = null; Date date = new Date(); System.out.println(date); //Thu May 13 13:25:57 KST 2021 // 포맷변경 ( 년월일 시분초) SimpleDateFormat sdformat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); // Java 시간 더하기 Calendar cal = Calendar.getInstance(); //지금 cal.setTime(date); today = sdformat.format(cal.getTime()); System.out.println("지금 : " + today); //05/13/2021 13:25:57 // 3분 더하기 cal.add(Calendar.MINUTE, 3); today = sdformat.format(cal.getTime()); … 계속 읽기 JAVA 날짜/시간 현재, 3분후, 1시간전, 1일전

글쓰기 스크린케스트 : Android 기기 원격 디버깅 시작하기

참조 : https://developers.google.com/web/tools/chrome-devtools/remote-debugging/?utm_source=dcc&utm_medium=redirect&utm_campaign=2016q3 Windows, Mac 또는 Linux 컴퓨터에서 Android 기기의 라이브 콘텐츠를 원격으로 디버그합니다. 이 가이드는 다음을 수행하는 방법을 안내합니다. 원격 디버깅용 Android 기기를 설정하고 개발용 컴퓨터에서 검색합니다. 개발용 컴퓨터에서 Android 기기의 라이브 콘텐츠를 검사 및 디버그합니다. 개발용 컴퓨터에서 Android 기기의 콘텐츠를 DevTools 인스턴스로 스크린캐스트합니다. 요구사항 개발용 컴퓨터에 Chrome 32 이상 설치 Windows를 사용 중인 경우 … 계속 읽기 글쓰기 스크린케스트 : Android 기기 원격 디버깅 시작하기

동적 클래스 생성(인자포함) 및 메서드 호출

A 라는 컨트롤러 클래스가 아래와 같다.웹에서 POST로 /a.do 로 접속 했을 때, selectA 의 결과값을 JSON으로 응답해 주는 역할을 한다. @Controller public class A { //지역변수 @Autowired SqlSession sqlSession; @Autowired Gson gson; //생성자 A(){} A(SqlSession session, Gson gson){ if(this.sqlSession==null) this.sqlSession = session; if(this.gson==null) this.gson = son } //메써드 @RequestMapping(value="/selectA.do", method=RequestMethod.POST) @ResponseBody public ResponseEntity<String> selectA(HttpSession ses, … 계속 읽기 동적 클래스 생성(인자포함) 및 메서드 호출