2018년 11월 12일 월요일

parser, parsing

http://na27.tistory.com/230

2018년 9월 18일 화요일

삼항 연산자 중첩

http://harrislim.tistory.com/26

A ? B ? C : D : E 


true ? true? 1: 2: 3 ->1 

true ? false? 1: 2: 3 ->2

false ? true? 1: 2: 3  ->3

false ? false? 1: 2: 3 ->3

2018년 7월 25일 수요일

English study Day3(RAPUNZEL 11-15)

11
release: 놓아주다 석방하다 날려보내다

Flynn: But the walls of that tower could not hide everything. 하지만 탑의 벽이 모든 것을 감춰주지는 못했죠. Each year on her birthday the King and Queen released thousands of lanterns into the sky...in hope that one day, their lost Princess would return. 매년 공주의 생일이면, 잃어버린 딸이 돌아오기를 희망하면서 왕과 왕비는 하늘에 수천 개의 등불을 띄웠답니다. 예전에 잃어버린 자신들의 공주가 돌아오길 바라면서요.

12

hide out 숨다
gotcha 미국식 [|gɑ:tʃə]  잡았다 알았다
Hmm... Well, I guess Pascal's not hiding out here... 파스칼이 여기에 숨지는 않은 것 같은데... (Chuckles) Gotcha! 잡았다! That's twenty-two for me. 이번이 스물두 번째야 How about twenty-three out of forty-five? 45판 23선승제는 어때? Okay, well what do you want to do? 좋아, 원하는 게 뭐야?

13
tangled 미국·영국 [|tӕŋgld] 헝클어진
Yeah, I don't think so. 예, 그건 좀 아닌 것 같은데 I like it in here and so do you. 난 이 안에 있고 싶어, 너랑 Oh come on, Pascal, it's not so bad in there. 오~ 파스칼, 여기도 그리 나쁘지는 않아.

14
sweep 미국·영국 [swi:p]쓸다
til until ~까지
by then : 그때까지는, 그러다보면

Sings “When will my life begin” 노래 : 내 인생은 언제 시작될까 7a.m. the usual morning line-up 아침 7시, 보통 아침에 하는 일 Start on the chores and sweep 'til the floor's all clean 허드렛일로 시작해서, 바닥이 깨끗해질 때까지 쓸어 Polish and wax, do laundry and mop and shine up. 빛내고 광내고, 빨래하고 걸레질하고 다시 광내고 Sweep again, and by then it's like seven-fifteen. 다시 바닥을 쓸고. 그러다 보면 7시 15분 정도가 되죠

15
knit 미국·영국 [nɪt] 뜨개질
just wonder 궁금하다
basically 미국·영국 [|beɪsɪkli] 근본적으로

So I'll read a book, or maybe two or three. 그래서 책을 한권 아니면 두세 권을 읽을 거야. I'll add a few new paintings to my gallery. 내 미술품에 그림 몇 개를 추가할 수도 있을 것 같아. I'll play guitar, and knit, and cook and basically. 기타도 치고, 뜨개질을 하고 요리도 할 거야 그리고... 아~ 그런데 (근본적으로...) Just wonder, when will my life begin? 그냥 궁금해, 내 인생이 언제 시작될지.
















2018년 7월 22일 일요일

English study Day2(RAPUNZEL 8-10)

8
라푼젤로 영어 귀뚫기 그 8번째 시간입니다. And then that moment ended. 그 후 그 순간은 끝이 났습니다. *Flower, gleam and glow, let your powers shine* 꽃아 반짝반짝 빛나라, 너의 힘이 빛을 발하게 해 *Make the clock reverse* 시계를 거꾸로 돌려...

9
raise 미국·영국 [reɪz] 들어올리다, 키우다, 일으키다
break into something  친입하다, 억지로 문을 열다
gone 미국식 [gɔ:n;gɑ:n] 다 떨어진, 떠난(가버림)

Gothel broke into the castle, stole the child, and just like that... gone. 가텔은 이렇게 성 안으로 몰래 들어와서, 아기를 훔쳐 그냥 그렇게 달아나버린 거죠. The Kingdom searched and searched but they could not find the Princess. 왕국에서는 잃어버린 공주를 찾으려고 노력했지만 찾을 수가 없었죠. For deep within the forest, in a hidden tower, 숲속 깊이 숨겨진 탑안에서 Gothel raised the child as her own. 가텔은 그 소녀를 자신의 아이처럼 키웠죠.

10

be determined to do: ~ 하기로 결정하다


..save what has been lost, 내가 잃은 것을 돌려줘, bring back what once was mine, 한때 내 것이었던 것들을 다시 돌려줘, what once was mine. 한때 내 것이었던 것을. Gothel had found her new magic flower, 가텔은 새로운 마법의 꽃을 발견했지만, But this time she was determined to keep it hidden. 이번에는 꽃을 숨기기로 결정했습니다. Why can't I go outside? 왜 나는 밖에 못나가죠? The outside world is a dangerous place, 바깥세상은 아주 위험한 곳이기 때문이야. filled with horrible, selfish people. 무섭고 이기적인 사람들로 가득 찬 곳이지. You must stay here, where you're safe. 넌 안전한 이곳에 있어야 한단다. Do you understand, flower? 알겠니 꽃님아? Yes, Mommy. 네, 엄마.

2018년 7월 19일 목요일

English study Day1(RAPUNZEL 1-7)

라푼젤1-
sunlight 미국·영국 [|sʌnlaɪt] 햇빛 일상

2
Now, once upon a time, a single drop of sunlight fell from the heavens. 옛날 옛적에 한줄기의 빛이 하늘에서 내려왔습니다. And from this small drop of sun, grew a magic, golden, flower. 태양에서 온 이 작은 한 방울의 빛에서, 마법의 금빛 꽃이 자라났답니다. It had the ability to heal the sick, and injured. 이 꽃은 병들고 다친 사람들을 치유하는 능력을 가지고 있었어요. Oh, you see that old woman, over there? 오! 저기 할머니 보이시죠? You might want to remember her. 이 할머니를 기억해 두시는 게 좋을 거예요. She's kind of important. 아주 중요한 사람이거든요.

3

hop 미국식 [hɑ:p] 껑충 뛰다
hop-skip 건너뛰어서

RULE: 규칙, 통치하다(다스리다)
run out of 다써버리다


Well, centuries passed and a hop-skip-and-a-boat ride away, there grew a kingdom. 세월은 흘러, 저만치 배를 타고 갈 수 있는 곳에 왕국이 생겨나게 되었죠. The kingdom was ruled by a beloved King and Queen. 그 왕국은 국민들에게 총애 받는 왕과 왕비가 다스리고 있었죠. And the Queen, well she was about to have a baby. 그 왕비는 곧 있으면 아기를 낳게 될 것이었죠. but she got sick, really, sick. 그런데 왕비는 몸이 안 좋아졌어요. 아주 심각하게요. She was running out of time. 왕비에게 남은 시간은 얼마 없었습니다. And that's when people usually start to look for a miracle. 사람들은 보통 이럴 때 기적을 찾기 시작하죠. Or in this case, a magic golden flower. 이런 경우엔 '마법의 금빛 꽃'을요.

4
hoard :비축하다

Ahhh, I told you she'd be important. 아아, 제가 이 할머니가 중요하다고 말했었죠. You see, instead of sharing the sun's gift, this woman, Mother Gothel, hoarded its healing power 보세요. 태양이 보내준 선물을 나누는 대신에 이 여자, 마더 가텔은 이 꽃의 치유능력을 따로 숨기고 있다가 and used it to keep herself young for hundreds of years. 수백 년 동안 자신을 젊게 유지하는데 사용했죠. And all she had to do was sing a special song. 그녀는 특별한 노래만 하면 되었어요.
5
creepy 미국·영국 [|kri:pi] 오싹하다
gist 미국·영국 [dƷɪst] 요지
glow : 빛나다
gleam 미국·영국 [gli:m]  반짝반짝, 환하다

*Flower gleam and glow, let your power shine* 꽃아 반짝반짝 빛나라, 너의 힘이 빛을 발하게 해 *Make the clock reverse, bring back what once was mine* 시계를 거꾸로 돌려, 내 것이었던 것을 되돌려줘 *What once was mine* 한때 내 것이었던 것을 Alright, you get the gist: She sings to it, she turns young, creepy, right? 자, 이제 감 잡으셨죠? 그녀가 노래를 하면 젊어지고... 오싹하지 않나요?

6

Flynn: The magic of the golden flower healed the queen. 그 '마법의 금빛 꽃'은 여왕님의 병을 치료했습니다. A healthy baby girl, a princess was born with beautiful golden hair. 그리고 아름다운 금발머리의 건강한 아기 공주님이 태어났죠.

7
celebrate 미국·영국 [|selɪbreɪt]  축하하다 기념하다

I'll give you a hint. 힌트를 드리죠. That's Rapunzel. 이 아이가 라푼젤이에요. To celebrate her birth, 라푼젤의 탄생을 축하하기 위해 the King and Queen launched a flying lantern into the sky. 왕과 왕비는 하늘을 떠다니는 등을 올렸죠. For that one moment, everything was perfect. 그 순간만큼은 모든 것이 완벽했죠.


2018년 7월 18일 수요일

mac intellij svn certificate 오류


mac intellij 에서 svn 을 가져올 경우

svn url이 https:// 로 시작할 경우 인증을 받아야 사용한다
(message: intellij svn server ssl certificate verification failed)

이 경우 터미널을 사용하는게 가장 쉽고 빠르다.

stack overflow 에서 찾은 결과

1 svn checkout

2 svn list https://your.repository.url
which will ask you to do the authentication as well.
If this is needed to get authorization to a user that can't login, run:

3 sudo -u username svn list https://your.repository.url

이렇게 하면 간단히 해결 된다

참조사이트
https://stackoverflow.com/questions/3147660/server-certificate-verification-failed-issuer-is-not-trusted

2018년 6월 4일 월요일

spring security 흐름

1. 로그인 클릭시 아래파일의 loadUserByUsername 함수 실행
<!-- 세션 셋팅 프로세서 서비스 -->
<bean id="memberDetailService" class="com.cjenm.open.security.MemberDetailService"/>

2. 성공시 onAuthenticationSuccess
   실패시 onAuthenticationFailure 

실행됨

2018년 6월 1일 금요일

spring security url pattern 주의 사항

spring security url pattern 주의 사항

web.xml 에 작성되는
SpringSecurityFilterChanin에서의 url pattern은.
/*를 하면 하위 디렉토리까지 모두 적용됩니다.

하지만 intercept-url에서의 패턴은 /*는 해당 레벨의 디렉토리만 의미합니다. 하위디렉토리까지 하려면 아래와 같이 하면(/**) 모두 적용됩니다..
<http auto-config="true>
 <intercept-url pattern="/**" access="ROLE_USER"/>
</http>
스프링 시큐리티 책에 나온건데.... 저는 스프링 시큐리티 3.1로 했는데 하위 URL에 적용시키려니 안먹어서 웹을 좀 뒤져 봤더니 2개를 붙여서 쓰길래 직접 해보니 2개를 넣어야 모두 적용

출처
https://m.blog.naver.com/PostView.nhn?blogId=jw43834&logNo=120192934495&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

2018년 5월 29일 화요일

spring security 관련 자료

spring security 관련 사이트

http://preludeb.egloos.com/v/4738521


로그인 강제 주입(수동처리)

Object principal = memberDetailService.loadUserByUsername("");
SecurityContextHolder.getContext().setAuthentication(new UsernamePasswordAuthenticationToken(principal, null, ((UserDetails) principal).getAuthorities()));


http://memo.polypia.net/archives/1593

2018년 5월 15일 화요일

@RequestBody , @ResponseBody 역할

웹 서비스와 REST 방식이 시스템을 구성하는 주요 요소로 자리 잡으면서 웹 시스템간에 XML이나 JSON 등의 형식으로 데이터를 주고 받는 경우가 증가하고 있다.
이에 따라 스프링 MVC도 클라이언트에서 전송한 XML 데이터나 JSON 또는 기타 데이터를 컨트롤러에서 DOM 객체나 자바 객체로 변환해서 받을 수있는 기능(수신)을 제공하고 있으며,
비슷하게 자바 객체를 XML이나 JSON 또는 기타 형식으로 변환해서 전송할 수 있는 기능(송신)을 제공하고 있다.

@RequestBody 어노테이션과 @ResponseBody 어노테이션은 각각 HTTP 요청 몸체를 자바 객체로 변환하고 자바 객체를 HTTP 응답 몸체로 변환하는 데 사용된다.
@RequestBody 어노테이션을 이용하면 HTTP 요청 몸체를 자바 객체로 전달받을 수 있다. 비슷하게 @ResponseBody 어노테이션을 이용하면 자바 객체를 HTTP 응답 몸체로 전송할 수 있다.


출처: https://devbox.tistory.com/entry/Spring-RequestBody-어노테이션과-ReponseBody-어노테이션의-


http://devbox.tistory.com/entry/Spring-RequestBody-%EC%96%B4%EB%85%B8%ED%85%8C%EC%9D%B4%EC%85%98%EA%B3%BC-ReponseBody-%EC%96%B4%EB%85%B8%ED%85%8C%EC%9D%B4%EC%85%98%EC%9D%98-%EC%82%AC%EC%9A%A9

2018년 5월 4일 금요일

javascript object data do push or get

1. 배열 선언시 대괄호[] 사용
var array = [];

2. OBJECT 선언시 중괄호 {} 사용

var person = {
  name : "neko",
  gender : "male"
};
 
console.log( person.name, person.gender );
// 결과 : neko male
 
var key1 = 'name', key2 = 'gender';
 
console.log( person[key1], person[key2] );
// 결과 : neko male
// 위와 동일한 결과를 얻을 수 있습니다.

2018년 3월 21일 수요일

rmate resort

   //정렬 초기화  function resetSort() {
   gridRoot = gridApp.getRoot();   // collection 개체를 가지고 옵니다.   var acoll = gridRoot.getCollection();   // 정렬할 컬럼 정보를 instance로 지정합니다.      var sortField = gridRoot.newClassInstance("SortField");      // 정렬 함수를 instance로 지정합니다.      var sot = gridRoot.newClassInstance("Sort");   // sort Field를 초기화 합니다.
   sot.setFields([]);   if((acoll != null) &&(acoll != "") &&(typeof acoll !="undefined")){
       acoll.setSort(sot);       // collection 정보를 새로고침합니다.       acoll.refresh();      }
}

2018년 3월 15일 목요일

JAVA DB Data-> to change JSON -> convey to javascript

import net.sf.json.JSONArray;

java

List<HashMap<String, Object>> list = testService.selectInfo(searchVO);

JSONArray jsonArray = JSONArray.fromObject(list);


model.addAttribute("jsonArray", jsonArray);

javascript
console.log("jsonArray %o2 ", '${jsonArray}');


description

list JSONArray.formObject before parse Data

  console.log Data->value "[{DT=20180312, M50=4.44, M30=9.19}]"
  
list JSONArray.formObject after parse Data ->double quotation marks are added to the string
  console.log Data->value "[{"BRD_DT":"20180312","M_50":4.44,"M_30":9.19}]"
    
if json value dont' have double quotation marks , they are not recognized as json data

----
Problem 

if results have some special letters, Javascript dose not work properly.
ex) 'test''tt'
  ->In this case, All column remove some special letter.
ex)
    <c:forEach items="${list}" var="item" varStatus="status">
         var data = {};
         data.RANKNUM = "${item.title}";  //Included quotation ->error
         data.BRD_STD_DT = "${item.BRD_STD_DT}";
    </c:forEach>
SO it is not a good solution.
I recommend to use ajax json .


var result = JSON.parse(data.responseText);
-->This will solve atll the special characters.


Java source Example

JSONObject rv = new JSONObject();
rv.put("paging", pageVO);rv.put("info", service.getInfo(pageVO));
return new ResponseVO(rv, new ResultVO("success", "성공"));
ResponeVO.java


public class ResponseVO {

   private ResultVO resultInfo;   private Object resultContent;      public ResponseVO() {
      //Constructor   }
   
   public ResponseVO(ResultVO resultInfo) {
      this.resultInfo = resultInfo;   }
   
   public ResponseVO(Object resultContent, ResultVO resultInfo) {
      this.resultInfo = resultInfo;      this.resultContent = resultContent;   }
   
   public ResultVO getResultInfo() {
      return resultInfo;   }

   public void setResultInfo(ResultVO resultInfo) {
      this.resultInfo = resultInfo;   }

   public Object getResultContent() {
      return resultContent;   }

   public void setResultContent(Object resultContent) {
      this.resultContent = resultContent;   }

}