차근차근/PHP

무작정 자료수집4

예쁜꽃이피었으면 2014. 7. 30. 10:23

<%  %>
자바 명령문이 들어갈 수 있다.
웹 브라우저로 전송되는 것이 아닌
웹 서버측에서 실행.

<%=  %>
자바식이 들어갈 수 있다
상수나 변수 이름 하나로 구성될 수도 있고.
연산자를 포함한 리턴값이 있는 메서드 호출식이
될 수도 있다.
웹 브라우저로 전송되는 것이 아닌
웹 서버측에서 실행.


<%! %>
변수 선언이나 메서드 선언.

<%@  %>
웹 브라우저로부터 요청을 처리하기 위해서가 아니라
웹 컨테이너가 jsp페이지를 서블릿 클래스로 변환할때
필요한 여러가지 정보들을 기술하기위해
사용하는 문법

 

 

http://kssong.tistory.com/27

http://atspeed.blogspot.kr/2011/01/javascript-hashmap.html

Map = function(){
 this.map = new Object();
};  
Map.prototype = {  
    put : function(key, value){  
        this.map[key] = value;
    },  

/**
* 데이터 넣는 함수
* @param szKey String Name of key
* @param szValue String (or Object)
* @return void
*/


    get : function(key){  
        return this.map[key];
    },

/**
* 데이터 가져오는 함수
* @param szKey String Name of key
* @return String (or Object)
*/


    containsKey : function(key){   
     return key in this.map;
    },
    containsValue : function(value){   
     for(var prop in this.map){
      if(this.map[prop] == value) return true;
     }

// HashMap에 containsKey 메소드에 키값을 넘겨주면 해당 키값이 HashMap에 있을경우 true를 없을 경우 false를 넘겨 줍니다.http://k.daum.net/qna/openknowledge/view.html?qid=40E4c&l_cid=OCA015&returl=%2Fqna%2Fopenknowledge%2Flist.html%3Fmin%3D20090117140237%26cp%3D30%26max%3D20110416143922%26orderType%3D0%26page%3D3%26category_id%3DOCA015%26mode%3D0%26
     return false;
    },
    isEmpty : function(key){   
     return (this.size() == 0);
    },

//http://coolmsd.tistory.com/100

//http://blog.daum.net/haha25/5387388
    clear : function(){  
     for(var prop in this.map){
      delete this.map[prop];
     }

/**
* 데이터 비우는 함수
* @return void
*/


    },
    remove : function(key){   
     delete this.map[key];
    },
    keys : function(){  
        var keys = new Array();  
        for(var prop in this.map){  
            keys.push(prop);
        }  
        return keys;
    },
    values : function(){  
     var values = new Array();  
        for(var prop in this.map){  
         values.push(this.map[prop]);
        }  
        return values;
    },
    size : function(){
      var count = 0;
      for (var prop in this.map) {
        count++;
      }
      return count;
    }
};

사용법은 간단하다.
var map = new Map();
 map.put("user_id", "atspeed");
 -----------------------
map.get("user_id");

그냥 java Map과 동일하게 사용하면 되는거다.

 

 

 

 

 

http://jabba.tistory.com/132
자바스크립트를 head 태그에 삽입해야할 지 body 태그에 삽입해야할 지는 다음과 같은 규칙을 따라야 한다.

1. 페이지를 로드할 때 동적으로 웹페이지의 컨텐트를 생성하는 경우엔 body.
2. 함수 안에서 정의하고 page 이벤트에 사용되는 자바스크립트 코드는 head. 그래야 body 태그 안의 내용을 읽어들이기 전에 로드 되기 때문

 

 

        HashMap<String, Object> map = new HashMap<String, Object>(5);
        map.put("title", p_keyword);
       
        if (i_gubun == 1)            map.put("author", p_keyword2);  //저자
        //else if (i_gubun == 2)       t_param += "&d_cont=" + keyword2;  //내용
        else if (i_gubun == 3)       map.put("publisher", p_keyword2);  //출판사
        else if (i_gubun == 4)       map.put("isbn_code1", p_keyword2);  //ISBN_CODE

 

 

if(book_cnt == 0){          
          //회원이 등록한 책정보가 존재하는지를 체크한다.
          HashMap<String, Object> map1 = new HashMap<String, Object>(4);
          map1.put("isbn_code1" , isbn);
          if(title == "") map1.put("title" , null);
          else map1.put("title" , title);
          
          if(bookDao.getInstance().getCountByIsbn(map1)>0){           
           //HashMap<String, Object> map1 = new HashMap<String, Object>(2);
           //map1.put("isbn_code1", isbn);
           //map1.put("title", title);
           

 

 

http://ggons.tistory.com/2

 

http://barnabas.kr/index.php/archives/281

 

 

https://wikidocs.net/208

 

 

map안에 map (c이긴하지만 일단 긁어모음)

http://www.devpia.com/Maeul/Contents/Detail.aspx?BoardID=50&MaeulNo=20&no=798841&ref=798838

java용?

http://www.okjsp.net/seq/249230

반응형

'차근차근 > PHP' 카테고리의 다른 글

foreach  (0) 2014.08.28
무작정 자료수집2  (0) 2014.07.30
무작정 자료수집3  (0) 2014.07.30
CXEC(); PHP에서 외부프로그램 실행  (0) 2014.07.30
디렉토리 함수 목록  (0) 2014.07.30