본문 바로가기

전체 글

(36)
텔레그램 봇으로 응답 메세지 보내기 Properties prop = new Properties(); public void getUpdates() throws Exception{ // 프로퍼티에 정보들을 담아놓고 호출하기 위함 S prop = new Properties(); String resource="프로퍼티 이름"; Reader reader = Resources.getResourceAsReader(resource); prop.load(reader); // 프로퍼티에 정보들을 담아놓고 호출하기 위함 E String prefixUrl = prop.getProperty("TELEGRAM_URL"); // properties에 선언된 텔레그램의 고정 URL String token = prop.getProperty("TELEGRAM_TOKEN"..
상대 아이피에게 ping 테스트 1. 윈도우키를 누르고 cmd를 검색 실행 2. ping 상대 아이피 -t ( -t 옵션은 계속 요청을 보내는데 사용, -t 없이 명령어를 쓰면 4번만 보냄) 3. 그만 보내고 싶을때 Ctrl + C 를 누른다
텔레그램 Bot 이용하기 - 봇만들기 1. BotFather 검색 후 /newbot 을 보낸다. 2. 만들 bot 이름을 보낸다. 3. BotFather 가 알려준 봇의 Token값을 기억한다. - 봇에게 보낸 메세지 확인 https://api.telegram.org/bot 토큰값을 적는다 /getUpdates 를 웹 주소란에 치면 내가만든 봇에 썼던 데이터가 json 형태로 보인다. - 봇으로 메세지 보내기 https://api.telegram.org/bot 토큰값을 적는다 /sendMessage?chat_id=챗아이디를 적는다&text=test # 내 챗아이디를 아는 방법 봇에게 메세지를 보내고 https://api.telegram.org/bot 토큰값을 적는다 /getUpdates 로 json데이터중 from 란의 id 를..
Window서버 시스템이 PID:4 포트번호 80번을 선점했을때 처리 - 윈도우서버 시스템이 포트80번을 선점했을때 해제방법 윈도우의 검색 = > cmd (관리자 권한으로 실행) => 명령어 : sc stop w3svc sc config w3svc start= disabled - 윈도우서버 재기동시 80포트 IIS 선점 윈도우의 검색 = >regedit(레지스트리 편집기) ->HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\HTTP\Start 의 단위를 10진수로 변경 / 재부팅후 80포트 선점 막음 (참조 사이트) https://m.blog.naver.com/PostView.nhn?blogId=onlyu&logNo=220557238734&proxyReferer=https%3A%2F%2Fwww.google.com%2F
DB 테이블별 용량 확인 쿼리 SELECT TABLE_NAME AS "tables", Round(((data_length + index_length) / 1024 / 1024), 2) "MB" FROM information_schema.TABLES WHERE table_schema = "onm" ORDER BY (data_length + index_length) DESC;
날짜 포맷 MM/dd/HH 사용시 포맷맞추기 var today = new Date(); var month = setMonthDateFormat( ( today.getMonth()+1 ) ); var day = setMonthDateFormat( today.getDate() ); // 1월/일 부터 9월/일까지 앞에 0을 붙여 두자리를 맞추기 위함 function setMonthDateFormat(num){ var formatNum=0; if(num
새창으로 열기 창이 열려있을경우 Window 재사용하기 // 파라미터 하나만 넘길경우 function getDetail(param){ var siteWin=window.open(contextPath+"/pageName.do?param1="+param , "윈도우 이름", ""); var siteUrl = contextPath+"/pageName.do"; if (!siteWin || siteWin.closed ) { siteWin=window.open(siteUrl+"?param1="+param, "윈도우 이름"); } else{ siteWin.location=siteUrl+"?param1="+param; siteWin.focus(); } }
GragorianCalendar 이용하여 한시간 전 yyyy-MM-dd HH 구하기 public String getYesterDay() throws Exception{ Calendar cal = new GregorianCalendar(); cal.add(Calendar.HOUR_OF_DAY, -1); // 현재 시간에서 한시간을 뺀 시간으로 만들어줌 String year = cal.get(Calendar.YEAR)+""; String month = setDayMonthFormat( ( cal.get( Calendar.MONTH ) + 1 ) ); String day = setDayMonthFormat( cal.get( Calendar.DATE ) ); String hour = setDayMonthFormat( cal.get( Calendar.HOUR_OF_DAY ) ); // HOUR_..