전체 글 썸네일형 리스트형 JSON 구조화된 모양으로 받기 (JSON_PRETTY_PRINT) 뷰타입을 URL에 파라메터로 받아 글로벌로 사용한다.JSON을 구조화된 모양으로 받음.---------------------------------------------------------------------- public $VIEW_TYPE; public function __construct() { parent::__construct(); // JSON VIEW 타입 $this->VIEW_TYPE = (isset($_GET["VIEW_TYPE"])) ? strtoupper($_GET["VIEW_TYPE"]) : "REST"; } public function index() { if ($this->VIEW_TYPE == "REST") { $this->output->set_content_type('appl.. 더보기 데이터 암호화 기법 + 암호화 방법단방향 - 복호화(Decrypt) 불가, 비밀번호 등에 사용쌍방향 - 암호화(Encrypt)와 복호화(Decrypt)가능, 이름, 아이디, 전화번호 등에 사용 + MySQL 지원 함수단방향 - MD5, PASSWORD, SHA1, SHA쌍방향 - AES_ENCRYPT, AES_DECRYPT, DES_ENCRYPT, DES_DECRYPT, DECODE, ENCODE, COMPRESS, UNCOMPRESS + 사용 예단방향 - 암호화 INSERT INTO TABLE_NAME (FIELD_NAME) VALUES (PASSWORD('암호화 내용'));쌍방향 - 암호화 INSERT INTO TABLE_NAME (FIELD_NAME) VALUES (HEX(AES_ENCRYPT('암호화 내용','암호화.. 더보기 프로시저 호출 + 컨트롤 public function getRow() { // 모델 로드하기 $this->load->model('m_member'); // 모델로 데이터 가져오기 $result = $this->m_member->getRow(array( "MEM_SEQ"=>$MEM_SEQ )); // JSON 기본 구조 $json = array("STATUS_CODE"=>"SUCCESS", "NUM_RESULTS"=>$result->num_rows(), 'RESULTS'=>$result->result_array()); // JSON 출력 $this->output->set_content_type('application/json')->set_output(json_encode($json)); } public function .. 더보기 프로시저 예 CREATE TABLE `td_bill_club_table` ( `CLB_SEQ` int(11) NOT NULL COMMENT '당구 클럽 테이블수 - 당구 클럽 일련번호', `CLB_TABLE_TYPE` enum('LT','MT','PT','ST') NOT NULL COMMENT '당구 클럽 테이블수 - 테이블 구분', `CLB_TABLE_COST` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '당구 클럽 테이블수 - 테이블 요금', `CLB_TABLES` int(11) NOT NULL DEFAULT '0' COMMENT '당구 클럽 테이블수 - 테이블수', PRIMARY KEY (`CLB_SEQ`,`CLB_TABLE_TYPE`), CONSTRAINT `fk_TD_BIL.. 더보기 이미지 캡쳐 후 메신저로 전송 경로 예this.getExternalFilesDir(null).getPath();Environment.getExternalStorageDirectory().toString();/storage/emulated/0/Pictures/원하는 폴더명 등 해당 폴더가 없으면 만들고 저장 public void screenShot() { File isPath = new File(Constants.PATH_CAPTURE); if (!isPath.isDirectory()) isPath.mkdirs(); // 파일 지정 String fileName = getCurrentTime("yyyyMMddHHmmss") + ".png"; // 경로 + 파일 File fullName = new File(Constants.PATH_CAP.. 더보기 ArrayList 파일로 저장 및 읽기 경로 예this.getExternalFilesDir(null).getPath();Environment.getExternalStorageDirectory().toString();/storage/emulated/0/Pictures/원하는 폴더명 등 해당 폴더가 없으면 만들고 저장 public void saveCurrentGame() { String pathName = this.getExternalFilesDir(null).getPath(); File isPath = new File(pathName); if (!isPath.isDirectory()) isPath.mkdirs(); File fullName = new File(pathName + File.separator + Constants.FILE_CURRE.. 더보기 Device별 DPI & 리소스 호출 순서 일단 썼던 디바이스들 위주로 정리 size.x(px) size.y(px) size.x(dp) size.y(dp) densityDPI density 갤럭시 S3 1280 720 1280 720 320 2.0 갤럭시 노트4 2560 1440 1280 720 640 4.0 갤럭시 노트 프로 2560 1600 2560 1600 320 2.0 넥서스7 1920 1104 1920 1104 320 2.0 디바이스 상대 크기 720 1600 1104(소프트키) 1200 1 2.222222 1.533333 1.666667 리소스에 Drawable 폴더 상대 크기 ldpi0.75 mdpi 1 tvdpi 1.33 hdpi 1.5 xhdpi 2 xxhdpi 3 xxxhdpi 4 리소스 호출 우선순위현재 sw_dp 하위 sw_.. 더보기 상태바에 알림 생성 상태바에 알림 생성. private static final int NOTIFY_ID = 1234; private void notifyMessage() { String notiTitle = this.getString(R.string.app_name); String notiContent = this.getString(R.string.msg_notify_content); final NotificationManager notiMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); Notification noti = new Notification(R.drawable.ic_main, notiTitle, System.currentTimeMillis().. 더보기 이전 1 2 3 4 다음 목록 더보기