예제1) 문자열 : 11111111.2222222.33333333.444444.55555555.666666666.777777.8888888.9999999.0000000 정규식 : ^[^\.]*\. replace 삭제 결과 : 2222222.33333333.444444.55555555.666666666.777777.8888888.9999999.0000000 예제2) 문자열 : 11111111;2222222;33333333;444444;55555555;666666666;777777;8888888;9999999;0000000 정규식 : ^[^;]*; replace 삭제 결과 : 2222222;33333333;444444;55555555;666666666;777777;8888888;9999999;0000000
- (NSString *)timeFormatted:(int)totalSeconds { int seconds = totalSeconds % 60; int minutes = (totalSeconds / 60) % 60; int hours = totalSeconds / 3600; return [NSString stringWithFormat:@"%02d:%02d:%02d",hours, minutes, seconds]; } - (NSString *)stringFromTimeInterval:(NSTimeInterval)interval { NSInteger ti = (NSInteger)interval; NSInteger seconds = ti % 60; NSInteger minutes = (ti / 60) % 60;..
Java 플랫폼의 서버와 IOS&Android 간의 RSA암호화 문자열을 주고받아야 하는 상황이 발생되었다. 구글링과 맥부기 카페의 도움으로 아래의 IOS용 RSA암호화클래스를 작성했다. 인터페이스 RSAEncryptor.h #import #import #import "SecKeyWrapper.h" @interface RSAEncryptor : SecKeyWrapper { SecKeyRef keyref; } + (RSAEncryptor *)sharedSingleton; -(NSString*)encrypt:(NSString *)str; @end 구현클래스 RSAEncryptor.h #import "RSAEncryptor.h" #import "SecKeyWrapper.h" #import "BasicEncod..
#import @interface DESEncryptor : NSObject +(NSString *) encrypt:(NSString *)str; +(NSString *) decrypt:(NSString *)str; @end #import "DESEncryptor.h" #import "NSDataAdditions.h" #import #define ENCRYPT_KEY @"key123" @implementation DESEncryptor //- 암호화 //1. 문자열 입력 //2. DES 암호화 //3. 암호화된 문자열을 base64로 인코딩 + (NSString *) encrypt:(NSString *)str { //NSLog(@"encrypt input string : %@", str); //NSLog..
RSA 암호화 알고리즘 사용하려고 하다 문제가 발생해서 기록을 남겨본다. 일단 테스트 자바 소스는 아래 첨부파일이고, 프로그램을 돌렸는데 Algorithm PBEWithSHAAndTwofish-CBC not available 예외가 발생했다. 이때는 암호화코드를 실행하기전에 Security.addProvider(new BouncyCastleProvider()); 코드를 먼저 실행해주면 된다. 그런후 다시 실행했는데 이번엔 illegal key size 예외가 발생한다. 이때는 자바시큐리티 파일을 변경해야한다. 아래링크에서 jdk버전에 맞는 policy 파일을 다운받아서 local_policy.jar, US_export_policy.jar 파일을 .....\jre\lib\security 폴더에 덮어준다. ..
사전작업 - 테이블에 코멘트를 모두 달아줄것 Settings > Option 에서 Expert Mode 를 체크한뒤 Tools > Script Window 를 실행하여 아래 코드를 붙히고 실행한다. function main() { var app = System.GetInterface('Application'); var Model = app.Models.GetObject(0); //... parameter in GetObject determines with which model the script should work. //0 = first model listed in the Application View, 1 = second model listed in the Application View etc. va..
- Total
- Today
- Yesterday
- 서비스회사
- 이직
- code vision
- 2020.1
- coding
- JBR-2732
- 12FactorApp
- 코딩어레이키트
- 우테캠
- CODINGARRAYKIT
- CONDINGARRAY
- 아두이노스토리
- TMK
- 표준프레임워크 배치
- shortkey
- 아두이노
- JsonPatch
- SI
- IntelliJ
- 우테캠프로
- Arduino
- intellij느려짐
- jeus8
- 코딩
- 코딩입문
- code mining
- 2020.09
- JsonMergePatch
- JBR-526
- 표준프레임워크 배치 jar
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |