반응형
반응형
반응형
반응형
반응형
반응형

Mybatis 사용시 쿼리문에 문자열 비교연산자나 부등호를 처리할 때가있습니다.
그러면 < 와 같은 기호를 괄호인지 아니면 비교연산자 인지 확인이 되지않아요.
이외에도 특수문자 사용하는데 제한이있습니다.
이럴때 사용한것이 <![CDATA[  입니다.

<select id="findAll" resultMap="MemberResultMap">
 
    select *
 
    from employees
 
    where salary > 100
 
</select>

 

CDATA 안에 들어가는 문장을 문자열로 인식하게 합니다.

<select id="findAll" resultMap="MemberResultMap">
    <![CDATA[
    select *
 
    from employees
 
    where salary > 100
    ]]>
</select>

조건태그에서

<select id="findAll" resultMap="MemberResultMap">
    <![CDATA[
    select *
 
    from employees
 
    where  1=1
    ]]>
    <choose>
        <when test='user_type != null and user_type =="1"'>
            <![CDATA[
                salary > 100
            ]]>
        </when>
 
        <otherwise>
            <![CDATA[
                salary < 100
            ]]>
        </otherwise>
    </choose>
</select>
반응형
반응형
개발자 구인난이 심각한가?

경력자는 비싸고, 다루기 힘들고, 커뮤니케이션이 힘드니 루키를 원하는건지? 숨은 인재를 찾는건지?
결국 운영과 돈의 연결 고리에서 개발자는 인력시장에 나온 인부 수준이것.
#개발자 #구인난 #devops #python #javascript
https://www.welcomekakao.com/competitions/102/2020-kakao-blind-recruitment

반응형
반응형
반응형
반응형

#jQuery #touch #event #document #bind() #touchmove #touchstart #touchend

<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>mobile.html</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no"/>
<script src="/js/comm/jquery-1.11.1.js"></script>
<script>

	$(document).ready(function() {

		$(document).bind('touchstart', function(e) {
			$("#msg").html("터치가 시작되었어요.");
			e.preventDefault();	//	이벤트취소
		});

		$(document).bind('touchmove', function(e) {
			//	jQuery 이벤트 객체를 자바스크립트 표준 이벤트 객체로 바꾸기
			//	이유는 jQuery 에서 자바 스크립트
			var event = e.originalEvent;
			$('#msg').html('touch 이벤트 중입니다.'); 
			//	div에 터치한 좌표값 넣기
			$('#msg').append('<div>' + event.touches[0].screenX + ',' +
					event.touches[0].screenY + '</div>');
			event.preventDefault();
		});

		$(document).bind('touchend', function(e) {
			$("#msg").append("<div>터치이벤트가 종료되었어요</div>"); 
		});
	});

</script>
</head>
<body>
<h2>모바일용 홈페이지 입니다.</h2>
<!-- 
		스마트폰의 브라우저 : 마우스 이벤트와는 별도로 터치 이벤트를 지원함 
		touchstart : 터치가 시작될때
		touchend : 터치가 종료될때 
		touchmove : 터치한 상태로 이동할때 
		touchenter : 터치한 요소의 경계외부에서 내부로 이동할때 
		touchleave : 터치한 요소의 경계내부에서 외부로 이동할때 
 -->
<div id="msg"></div>
</body>
</html>
반응형

+ Recent posts