jQuery 테이블 접근

$('#listTable tr').each(function(index){
// 테이블 td,td 사이즈
var tableSize = $('#listTable tr').length ;
// td값
var tdText1 = $(this).children().eq(0).text();
var tdText2 = $(this).children().eq(1).find("input[id=‘abc’]”).val();
//특정문자 여부
var charCheck = text.indexOf(“,”);
//특정문자 전체 변경
text = text.replace(/,/gi,'');
});

​[handlebars] if문 

{{#if category_1}}
{{#util_equal category_1'계'}}
text1
{{else}}
text2
{{/util_equal}}
{{else }}

{{/if}}


​테이블 데이터 접근

$('#listTable tr').each(function(){
var tr = $(this);
var td = tr.children();
var text = td.eq(2).text();
});


1. HTTP 리퀘스트 메세지를 작성한다

웹 브라우저는 URL을 해독하여 리퀘스트 메세지를 만듬 

http:// + 웹 서버명 + 데이터 출저(파일) 경로명

(즉, 어디에 엑세스해야 하는지 판명)

웹 브라우저는 이 리퀘스트 메세지에 따라 웹 서버에 무엇을 하려는지 전달

리퀘스트 메세지 : 무엇을(URI) + 어떻게해서(메소드) 

(리퀘스트 메세지에 쓰는 URL은 하나뿐으로, 복수의 파일을 일을 때는 웹 서버에 별도의 리퀘스트 메세지를 보낸다)

2. 웹 서버의 IP주소를 DNS서버에 조회한다


Sherlock and Array





Watson gives Sherlock an array  of length . Then he asks him to determine if there exists an element in the array such that the sum of the elements on its left is equal to the sum of the elements on its right. If there are no elements to the left/right, then the sum is considered to be zero. 
Formally, find an , such that, .

Input Format

The first line contains , the number of test cases. For each test case, the first line contains , the number of elements in the array . The second line for each test case contains  space-separated integers, denoting the array .

Constraints

 
 
 

Output Format

For each test case print YES if there exists an element in the array, such that the sum of the elements on its left is equal to the sum of the elements on its right; otherwise print NO.

Sample Input 0

2
3
1 2 3
4
1 2 3 3

Sample Output 0

NO
YES

Explanation 0

For the first test case, no such index exists. 
For the second test case, , therefore index  satisfies the given conditions.



+ Recent posts