본문 바로가기

develop

oracle 날짜 관련 함수 select /* 오늘날짜 시분초 포함*/ to_char(sysdate,'yyyy/mm/dd hh24:mi:ss') from dual select /* 오늘날짜 00시 00분 00초 */ to_char(trunc(sysdate),'yyyy/mm/dd hh24:mi:ss') from dual select /* 오늘날짜 00시 00분 00초 위와 동일*/ to_char(trunc(sysdate,'dd'),'yyyy/mm/dd hh24:mi:ss') from dual select /* 이번달 1일 00시 00분 00초 */ to_char(trunc(sysdate,'mon'),'yyyy/mm/dd hh24:mi:ss') from dual select /* 올해 1월 1일 00시 00분 00초 */ to_char.. 더보기
EPSG:4326 to EPSG:900913 transform //*Google Mercator, 구글지도/빙지도/야후지도/OSM 등 에서 사용중인 좌표계//EPSG:900913(통칭), EPSG:3857(공식)Proj4js.defs["EPSG:900913"] = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs';Proj4js.defs['EPSG:4326'] = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'; var EPSG_900913 = new OpenLayers.Projection("EPSG:900913");var EPSG_4326 = new OpenLayers... 더보기
형변환 Java – comparing stringsUse == for primitive data types like intIf (mystring == null) Use the equals() method to compare objectsUse .equals for strings : if (a.equals(“cat”)) Java - Converting int to stringString myString = Integer.toString(my int value) orString str = "" + i Java - Converting String to intint i = Integer.parseInt(str); orint i = Integer.valueOf(str).intValue(); double to String.. 더보기
OpenLayers addfeatures(json) 에서 json형식 java에서 만들기 public class IndexControl {IndexCode indexCode ;SbbDBMapper sbbMapper;public List getIndexCode(HttpServletResponse response) throws Exception {DBUtils dbUtils = new DBUtils();List getIndex = dbUtils.selectList(DB.SBB_DB, "getIndexCode"); JSONObject jsonObj= new JSONObject();JSONObject jsonObj1= new JSONObject();JSONObject jsonObj2= new JSONObject();JSONObject jsonObj3= new JSONObject();JSONArray.. 더보기
ORA-01017 ORACLE 11g에서는 ID/PASSWORD의 대소문사를 구별한다구별하지 않게 하려면 SQL> alter system set sec_case_sensitive_logon=false; true : 대소문자 구별false: 대소문자 구별 X 더보기
레이어 클릭시 이벤트 발생 map = new OpenLayers.Map('map',{ projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", tileSize : new OpenLayers.Size(256,256), numZoomLevels:19, allOverlays : true, eventListeners: { featureclick: function(e) { layerData(e); } }, maxResolution: 156543.0339, tileOrigin : new OpenLayers.LonLat(-20037508.34, -20037508.34), rest.. 더보기
마커 생성 및 라벨 수정 sprintersLayer = new OpenLayers.Layer.Vector('해양기후', { styleMap: new OpenLayers.StyleMap({ externalGraphic: '../js/OpenLayers/img/marker.png', graphicOpacity: 1.0, graphicWith: 16, graphicHeight: 26, graphicYOffset: -26, fontColor: "red", fontSize: "12px", fontFamily: "Courier New, monospace", fontWeight: "bold" }) });sprintersLayer.addFeatures(getSprintersFeatures());sprintersLayer.id="sprinter.. 더보기
좌표로 폴리곤 표현 var points = [ new OpenLayers.Geometry.Point(14362056.075118,4235599.8183829), new OpenLayers.Geometry.Point(14112565.61484,4324266.7711779), new OpenLayers.Geometry.Point(14147420.899732,4354230.0862603),];var ring = new OpenLayers.Geometry.LinearRing(points);var polygon = new OpenLayers.Geometry.Polygon([ring]); // create some attributes for the featurevar attributes = {name: "my name", bar: ".. 더보기