- index 생성
- ubuntu node js install
- Python
- tzselect
- 우분투 node js 설치
- npm버전확인
- Ubuntu timezone
- Node.js express install
- raspi-config
- node js 버전확인
- 자바 한줄씩 읽기
- 파이썬 반복문
- 자바 파일 한줄씩 읽기
- 라즈베리파이4
- express install
- 디지털오션 클라우드서버 생성하기
- c file read
- node js express install
- node 버전확인
- 우분투 시간변경
- 디지털오션 드로플릿
- ubuntu node js
- 클라우드서버 생성
- C언어
- mysql index 생성
- 디지털오션 서버생성하기
- 파이썬
- java 숫자를 문자로 변환하기
- c언어 파일 읽기
- 우분투 시간설정
- Today
- Total
목록분류 전체보기 (36)
호그래머
1. 자바 문자열 한글체크 하기 - regex import java.util.regex.Pattern; import java.util.regex.Matcher; public class tistory_java_230614 { public static void main(String[] args) { String text = "가나AA다1234"; String regex = "[\\p{IsHangul}]+"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(text); if (matcher.find()) { System.out.println("문자열에 한글 있음."); } else { System.out.println("문..
1. 자바 문자열 앞,뒤 공백(space) 제거 - trim() String Car_No=" 서울12가1234 "; System.out.println("1.차량번호는"+Car_No+"입니다."); Car_No=Car_No.trim(); System.out.println("2.차량번호는"+Car_No+"입니다."); 결과 1.차량번호는 서울12가1234 입니다. 2.차량번호는서울12가1234입니다. 차량번호 앞뒤 공백(space)가 제거됨 끝 1. 자바에서 쉽게 문자열 앞,뒤 공백(space)을 제거할 수 있습니다.

1. 파이썬 날짜, 시간 표현하기(Date, Time) import time 필요 import time logfilename = time.strftime("%Y%m%d-%H%M%S") date_Y = time.strftime("%Y") print("4자리 년:"+date_Y) date_y = time.strftime("%y") print("2자리 년:"+date_y) date_m = time.strftime("%m") print("2자리 원:"+date_m) date_d = time.strftime("%d") print("2자리 일:"+date_d) date_Ymd = time.strftime("%Y%m%d") print("8자리 년월일:"+date_Ymd) date_H = time.strftime("%..
1. Python 폴더 생성하기 import os 필요 import os def createFolder(basic_path,dir_name): try: if not os.path.exists(basic_path+"/"+dir_name): os.makedirs(basic_path+"/"+dir_name) print("폴더 생성 완료!") else: print("폴더가 이미 존재합니다!") except OSError: print ('폴더생성 에러 발생! ' + basic_path+"/"+dir_name) dir_path="C:/Users/82105/Desktop" dir_name="테스트폴더" createFolder(dir_path, dir_name) 결과 바탕화면에 "테스트폴더" 이름의 폴더가 생성 됩니다..

1. Python 문자열 자르기 문자열[시작인덱스:종료인덱스] 한글자 자르기 지정 인덱스 이후로 자르기 범위로 자르기 뒤에서 자르기 test_string="ABC456DEF789GHI0.TXT" print("01번: "+test_string[0])#A print("02번: "+test_string[1])#B print("03번: "+test_string[2])#C print("04번: "+test_string[5:])#6DEF789GHI0.TXT print("05번: "+test_string[8:])#F789GHI0.TXT print("06번: "+test_string[11:])#9GHI0.TXT print("07번: "+test_string[0:3])#ABC print("08번: "+test_strin..
1. 자바 폴더 만들기 import java.io.File; public class tistory_create_directory { public static void main(String[] args) { String make_dir_path = "C:\\Users\\HO\\Desktop\\new_forder"; File make_dir = new File(make_dir_path); make_dir.mkdir(); if(!make_dir.exists()) { try { make_dir.mkdir(); System.out.println("폴더생성"); }catch(Exception e) { e.printStackTrace(); } }else { System.out.println("폴더가 이미 존재함");..
1. 자바 날짜 구하기 (Date) Date 객체 사용 import java.util.date 필요 import java.util.Date; public class tistory_date_time { public static void main(String[] args) { Date today = new Date(); System.out.println(today); } } 출력 Mon Jan 04 22:58:31 KST 2021 2. 자바 날짜 표현방법(SimpleDateFormat) Date 객체와 SimpleDateFormat 사용으로 표현방법 변경 import java.text.SimpleDateFormat 필요 new SimpleDateFormat("패턴"); 원하는 날짜 시간 패턴으로 설정 imp..

1. 자바 문자열 자르기(substring) 문자열.substring(int beginindex, int endindex); beginindex는 자르는 시작 위치(beginindex에서 시작) endindex는 자르는 끝 위치(endindex까지 자름) beginindex와endindex는 정수 문자열의 시작은 0 부터 String today_datetime = "2020년11월19일15시30분25초"; String today_date = today_datetime.substring(0,11); String today_time = today_datetime.substring(11,20); today_date : 2020년11월19일 today_time : 15시30분25초 2. 자바 문자열 나누기(sp..
1. 자바 문자를 정수로 형변환 (String to int) String number_string = "3355"; int number = Interger.parseInt(number_string); 2. 자바 정수를 문자로 형변환 (int to String) int number = 3355; String number_String = String.valueOf(number); 끝 1. 자바에서 간단하게 문자 -> 정수, 정수 -> 문자로 형변환 할 수 있습니다. 2. 문자에서 정수형으로 형변환 할 경우 숫자인 문자열(number string)만 변환 가능 합니다.

라즈베리파이 root 계정설정 1. root 계정 비밀번호 설정 sudo paaswd root 2. root 계정 원격접속 허용 PermitRootLogin yes 수정후 저장 service ssh restart 3. root 계정 로그인 끝 1. root 계정 비밀번호 변경 2. sshd_config 파일 설정 변경 3. pi 계정이 아닌 root 계정으로 원격 접속이 가능합니다. 4. root 계정에서는 sudo 없이 작업을 진행 할 수 있습니다.