본문 바로가기

Java22

tag to another tag for java public class Test { public static String changeTag(String v, String a,String b) { v = v.replaceAll("(?i)(]*)?\\s*>)", "$1" + b + "$2"); return v; } public static void main(String[] args) { String v = ""; System.out.println("step0 : " + v); v = changeTag(v,"script","s.c.r.i.p.t"); System.out.println("step1 : " + v); v = changeTag(v,"img","i.m.g"); System.out.println("step2 : " + v); } } 2019. 9. 23.
java.security.InvalidKeyException: Illegal key size exception "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files for JDK/JRE Download" : Download 압축해제 : extract local_policy.jar, US_export_policy.jar 복사 : copy to %JAVA_HOME%/jre/lib/security 2019. 8. 22.
Lambda에대해서 #### Lambda에대해서 #### Lambda(λ) 란? .각종프로그래밍언어의Lambda function 은논리수리학, 컴퓨터공학의Lambda 대수에서차용해온개념입니다. .흔히Lambda 를표현하는문자λ은그리스문자로,알파벳의L 과같습니다. .Lambda 대수는변수, 추상화, 적용이라는개념이있는데, 주로선언되는양식은(변수..) .{추상화단계} 형태이며, anObject.someFunction(lamdaFunction); 과같이함수의일반적호출형태를통해‘적용’하게됩니다. .함수대신에, 추상화라는개념이들어간다는점에서는Lambda를지원하는언어의공통점입니다. .Java 8 이전에,가장흔히접해보았을Lambda와유사한문법으로는Javascript의anonymous function 이있습니다. #### Lambda 의.. 2019. 7. 25.
JPA DATA TO DTO TO JSON ( Modelmapper & lombock ) #### # 참고 - [http://wonwoo.ml/index.php/post/480](http://wonwoo.ml/index.php/post/480) - [https://docs.spring.io/spring-data/jpa/docs/1.4.1.RELEASE/reference/html/jpa.repositories.html](https://docs.spring.io/spring-data/jpa/docs/1.4.1.RELEASE/reference/html/jpa.repositories.html) - [https://github.com/Heo-Won-Chul/SpringPersonalProject](https://github.com/Heo-Won-Chul/SpringPersonalProject) - [.. 2019. 7. 20.
java for double[] ar = {1.2, 3.0, 0.8}; int sum = 0; for (double d : ar) { // d gets successively each value in ar. sum += d; } And here is the same loop using the basic for. It requires an extra iteration variable. double[] ar = {1.2, 3.0, 0.8}; int sum = 0; for (int i = 0; i < ar.length; i++) { // i indexes each element successively. sum += ar[i]; } 2019. 7. 16.
IntelliJ Shortcut # IntelliJ Shortcut # 가까운 괄호찾기 : Ctrl + Shift + M # 코드 정렬 : Ctrl + Alt + L # Bookmark Creating bookmarks with mnemonics : Ctrl+F11 Toggling bookmarks : F11 Viewing bookmarks : Shift+F11 Changing order of bookmarks : Use Move Up (arrowUp, Ctrl+Up) and Move Down (arrowDown, Ctrl+Down ) # 이전작업위치 Ctrl+Left , Ctrl+Right # 마지막편집위치 Ctrl+Shift+Backspace # 대문자변환 Ctrl-Shift-U # Save Context ( 다른이름으로 저장? ).. 2019. 7. 13.