카테고리 없음2017. 2. 21. 10:32
카테고리 없음2017. 2. 20. 10:46
반응형
dokuwiki 한글 파일명
한글파일명 다운 받을때 한글이 깨질경우
/lib/exe/fetch.php
$data = array(
'media' => $MEDIA,
'file' => $FILE,
'orig' => $MEDIA,
'mime' => $MIME,
'download' => $DL,
'cache' => $CACHE,
'ext' => $EXT,
'width' => $WIDTH,
'height' => $HEIGHT,
'status' => $STATUS,
'statusmessage' => $STATUSMESSAGE,
'ispublic' => media_ispublic($MEDIA),
);
수정
카테고리 없음2017. 1. 4. 15:13
반응형
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 | <!DOCTYPE html> <html> <head> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.16.1/vis.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.16.1/vis.min.css" /> <style type="text/css"> body { font: 10pt sans; } #network { width: 100%; height: 600px; background: white; border: 1px solid lightgray; } </style> <script type="text/javascript"> function main() { var graph = { nodes: new vis.DataSet([ {"id": "0", "label": "Parent", "level": 0}, {"id": "0.1", "label": "Child", "level": 1}, {"id": "0.2", "label": "Child", "level": 1}, {"id": "0.1.1", "label": "Grand Child", "level": 2}, {"id": "0.2.1", "label": "Grand Child", "level": 2}, {"id": "0.2.2", "label": "Grand Child", "level": 2}, {"id": "0.2.3", "label": "Grand Child", "level": 2}, {"id": "0.2.2.1", "label": "Grand Grand Child", "level": 3}, {"id": "0.2.2.2", "label": "Grand Grand Child", "level": 3}, {"id": "0.2.2.3", "label": "Grand Grand Child", "level": 3} ]), edges: new vis.DataSet([ {"from": "0", "to": "0.1"}, {"from": "0", "to": "0.2"}, {"from": "0.1", "to": "0.1.1"}, {"from": "0.2", "to": "0.2.1"}, {"from": "0.2", "to": "0.2.2"}, {"from": "0.2", "to": "0.2.3"}, {"from": "0.2.2", "to": "0.2.2.1"}, {"from": "0.2.2", "to": "0.2.2.2"}, {"from": "0.2.2", "to": "0.2.2.3"}, ]) }; var options = { nodes: { borderWidth: 1, borderWidthSelected: 1, shape: "box", color: { border: 'lightgray', background: 'white', highlight: { border: 'lightgray', background: 'lightblue' }, hover: { border: 'lightgray', background: 'lightblue' } } }, edges: { smooth: { type: 'cubicBezier', forceDirection: 'vertical', roundness: 1 }, color: 'lightgray' }, layout: { hierarchical: { direction: 'UD', nodeSpacing: 150 } }, interaction: {dragNodes :false}, physics:false }; var network = new vis.Network(document.getElementById("network"), graph, options); } </script> </head> <body onload="main();"> <div id="network"></div> </body> </html> | cs |
카테고리 없음2016. 12. 12. 14:24
카테고리 없음2016. 12. 1. 13:16
카테고리 없음2016. 12. 1. 11:30
반응형
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 | function makePage(page){ if(typeof page == "undefined"){ page = 1; //현재페이지 } var totalConunt = 3846; //전체로우수 var pageRowSize = 20; // 화면에 보여줄 로우수 var pageCount = Math.ceil((totalConunt / pageRowSize )) // 전체페이지수 var listOffset = 10; // 한화면에 보여줄 페이지수 var startPage = Math.ceil(page / listOffset) * listOffset - (listOffset - 1); var endPage = (startPage + listOffset - 1 > pageCount) ? pageCount : startPage + listOffset - 1; var prev2 = "1"; //맨처음페이지 var prev = (startPage > 1 ? startPage - 1 : 1) ; //처음페이지(10개단위) var next = (endPage < pageCount ? endPage + 1 : endPage); //다음페이지(10개단위) var next2 = pageCount; //맨마지막페이지 var AXGridPagingHtml = ''; AXGridPagingHtml += '<div class="paging">'; AXGridPagingHtml += '</div>'; AXGridPagingHtml += '<span class="arrow">'; AXGridPagingHtml += '<a href="javascript:fn_search('+prev2+')"><img src="/style2/images/btn_prev2.gif" alt="처음 페이지"></a>'; AXGridPagingHtml += '<a href="javascript:fn_search('+prev+')"><img src="/style2/images/btn_prev.gif" alt="이전 페이지"></a>'; AXGridPagingHtml += '</span>'; AXGridPagingHtml += '<span class="list">'; for(var i = startPage ; i < endPage ; i++){ if(i == page){ AXGridPagingHtml += '<strong>'+i+'</strong>'; }else{ AXGridPagingHtml += ' <a href="javascript:fn_search('+i+')">'+i+'</a> '; } } AXGridPagingHtml += '</span>'; AXGridPagingHtml += '<span class="arrow">'; AXGridPagingHtml += '<a href="javascript:fn_search('+next+')"><img src="/style2/images/btn_next.gif" alt="다음 페이지"></a>'; AXGridPagingHtml += '<a href="javascript:fn_search('+next2+')"><img src="/style2/images/btn_next2.gif" alt="마지막 페이지"></a>'; AXGridPagingHtml += '</span>'; $("#AXGridPaging").html(AXGridPagingHtml); } $(document).ready(function() { makePage(); }); | cs |
카테고리 없음2016. 11. 7. 15:26
카테고리 없음2016. 10. 19. 13:19
카테고리 없음2016. 10. 7. 16:54
반응형
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 | private static Map<String, Object> EPGS4326_900913(double lon, double lat){ double x = lon * 20037508.34 / 180; double y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180); y = y * 20037508.34 / 180; Map<String, Object> map = new HashMap<String, Object>(); map.put("x", x); map.put("y", y); System.out.println(lon+":"+x); System.out.println(lat+":"+y); return map; } private static Map<String, Object> EPGS900913_4326(double x, double y){ double lon = (x / 20037508.34) * 180; double lat = (y / 20037508.34) * 180; lat = 180/Math.PI * (2 * Math.atan(Math.exp(lat * Math.PI / 180)) - Math.PI / 2); Map<String, Object> map = new HashMap<String, Object>(); map.put("lon", lon); map.put("lat", lat); System.out.println(x+":"+lon); System.out.println(y+":"+lat); return map; } | cs |
카테고리 없음2016. 9. 29. 18:01
반응형
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 | private static String[] makeArrayToString(String manageContentsSub, int mmsTextSize) { if(manageContentsSub == null){ return null; } String[] arrayStr = null; try { byte[] contentsBytes = manageContentsSub.getBytes("UTF-8"); int contentLength = contentsBytes.length; if (contentLength > mmsTextSize){ int aryLength = (contentLength / mmsTextSize) + (contentLength % mmsTextSize != 0 ? 1 : 0); arrayStr = new String[aryLength]; int endCharIndex = 0; String tmp; for(int i = 0; i < aryLength; i++){ if(i == (aryLength - 1)){ tmp = manageContentsSub.substring(endCharIndex); }else{ int useByteLength = 0; int rSize = 0; for (; endCharIndex < manageContentsSub.length(); endCharIndex++) { if(manageContentsSub.charAt(endCharIndex) > 0x007F){ useByteLength += 2; }else{ useByteLength++; } if(useByteLength > mmsTextSize){ break; } rSize++; } tmp = manageContentsSub.substring((endCharIndex - rSize), endCharIndex); } arrayStr[i] = tmp; } }else{ arrayStr = new String[] { manageContentsSub }; } }catch(java.io.UnsupportedEncodingException exception){ System.out.println("UnsupportedEncodingException : "+exception); } return arrayStr; } | cs |