목록Programming (19)
by Nathan
1. code 123456789101112131415public static void main(String[] args) { String delims = ","; String splitString = "1,2,,3,4,,5"; StringTokenizer st = new StringTokenizer(splitString, delims); while (st.hasMoreElements()) { System.out.println("StringTokenizer Output: " + st.nextElement()); } String[] tokens = splitString.split(delims); int tokenCount = tokens.length; for (int j = 0; j
1. code 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950import java.util.Arrays; public class CrunchifyBubbleSort { public static void main(String[] args) { int crunchifyArry[] = { 15, 3, 9, 7, 19, 8, 1, 5 }; log("============ Ascending Order result:" + Arrays.toString(CrunchifyBubbleSortAsceMethod(crunchifyArry)) + "\n"); log("============ Descending O..
1. for .. in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // Initialize object. a = {"a" : "Athens" , "b" : "Belgrade", "c" : "Cairo"} // Iterate over the properties. var s = "" for (var key in a) { s += key + ": " + a[key]; s += " "; } document.write (s); // Output: // a: Athens // b: Belgrade // c: Cairo Colored by Color Scripter cs 2. for 1 2 3 4 5 var array = ['A', 'B', 'C', 'D']; for(var i=0; i
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 12..
123456789101112131415161718192021222324252627function validation(formName){ var emptyCnt = 0; var obj_name; var obj_data; var obj_essntl; formName = formName != undefined ? '#' + formName + ' ' : ''; $(formName + ' input[essntl],'+ formName +' textarea[essntl],'+ formName +' select[essntl]').each(function(idx) { obj_name = $(this).attr("title"); obj_data = $.trim($(this).val()); obj_essntl = $(t..
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816..
01. 서론request.getRemoteAddr() 를 하였을때, 0:0:0:0:0:0:0:1 일 경우는 ipv6의 주소이며,이를 ipv4 주소로 변경하기 위해선 다음과 같은 작업을 해야한다.위 와 같은 현상은 로컬작업시 발생하는 현상이며, 더불어 특정 운영체제에서는 기본적으로 ipv6를 리턴하기 때문에 발생한다. 02. 해결해결방법은 was의 세팅을 변경해주면 된다. IDE : eclipserun ->Run Configurations -> Arguments -> (제일 끝에) -Djava.net.preferIPv4Stack=true
1. javascript location.href : http://localhost:8080/test/main.do?param=value location.protocol : http: location.host : localhost:8080 location.pathname : /test/main.do location.search : ?param=value 2. jquery $(location).attr('href') : http://localhost:8080/test/main.do?param=value $(location).attr('protocol') : http: $(location).attr('host') : localhost:8080 $(location).attr('pathname') : /test..
1. js (client) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 jQuery(document).ready(function($){ //버튼 $("#btn_test").click(function(){ var bSubmit = true; if(bSubmit){ $.ajax({ url : '/test/testJson', type : 'POST', data : { param1 : "abcd" param2 : $("#param2").val(), param3 : $("#param3").val() }, dataType : "json", success : function(data) { i..