spring project
-
spring, php, jsp 액티브 엘리먼트를 추출 할 수 있다.spring project/jsp 2020. 10. 8. 11:10
액티브 엘리먼트를 추출 할 수 있다. 신기한 웹의 세계ㅋㅋ var monitor = null; function getIframeDetect(){ var elem = document.activeElement; if(elem != null && elem && elem.tagName == 'IFRAME'){ console.log("iframe src : " + elem.src); console.log("iframe id : " + elem.id); console.log("iframe selected..."); getRefreshEvent(); clearTimeout(monitor); monitor = null; elem = null; monitor = setTimeout("iframeTest()", 1000)..
-
태그로 엘리먼트들 배열로 가져오기spring project/jsp 2020. 10. 5. 10:26
$(document).ready(function() { var links = document.getElementsByTagName( 'img' ); alert("이미지갯수 : " + links.length); for( var index = 0; index < links.length; index++ ) { links[index].removeAttribute( 'title' ); var asd = links[index].getAttribute('src'); alert(asd); }; }); 해당 페이지에 존재하는 이미지의 title을 제거해야하는 것이 있었는데, 이렇게 하면되긴하는데, 안되서 보니까 그 이미지는 또 다른 iframe에 들어있어서 안되었던 ㅠ 그 iframe에서 뿌려주는 페이지에서 아래와 같이..
-
google translate api (advanced)spring project/Google api 2020. 7. 15. 09:58
구글번역 고급에 관한 포스팅이 별로없습니다...ㅠ 그 만큼 사용을 많이 안한다는거 같습니다. 해당 정보는 구글 문서를 보고 참고 하여서 작성하였습니다. 구글번역 기본(basic)은 간단.... 아래 링크 참고 하면되구요 https://cloud.google.com/translate/docs/basic/translating-text?hl=ko 텍스트 번역(Basic) | Cloud Translation | Google Cloud 이 문서에서는 Cloud Translation - Basic(v2)을 사용하여 텍스트를 번역하는 방법을 설명합니다. 입력 텍스트는 일반 텍스트 또는 HTML일 수 있습니다. Cloud Translation - Basic은 입력된 HTML 태그를 번역하지 cloud.google.co..
-
Mongodb java insert geolocation queryspring project/mongodb 2020. 6. 5. 09:13
mongod cmd 에서는 이렇게 간단하다. db.userinfo.insert({"name":"cafe3","location":{"type":"Point","coordinates":[127.0478308, 37.5237227]}}) 자바에서할려면 저걸 콤마는 Document와 append로 연결해서 변환?해줘야한다... MongoOperations mo = (MongoOperations)mongoTemplate; MongoCollection coll = mo.getCollectioon("collectionName"); String lonb = ServletRequestUtils.getStringParameter(request, "lon", "0"); String latb = ServletRequestUt..
-
Mongodb find query with javaspring project/mongodb 2020. 6. 5. 08:57
MongoOperation mo = (MongoOperations)mongoTemplate; MongoCollection coll = mo.getCollection("collectioName"); BasicDBObject findquery = new BasicDBObject(); findquery.put("name", "someoneName"); FindIterable ret = coll.find(findquery); for(Document dbObject:ret){ System.out.println(dbObject.toJson()); } 여기서 콜렉션을 가져올때 를 빼고 find해서 가져오면 can not cast to bson object인가 exception이 뜨던데... Document를 빼게되면..
-
Mongodb geolocation 위도 경도 javaspring project/mongodb 2020. 6. 4. 10:05
몽고db에 위도경도 정보를 넣고 인덱스 설정 2dsphere 하고 cmd에서 삽입 cmd에서 수정 java에서 수정하는 코드를 알아본다. db.xx.insert({"name":"cafe2","location":{"type":"Point","coordinates":[127.0451548,37.5234878]}}) db.xx.createIndex( {"location": "2dsphere"} ) db.xx.updateOne({"name":"cafe2"},{$set:{"location.coordinates":[127,57]}}) String lonb = ServletRequestUtils.getStringParameter(request, "lon", "0"); String latb = ServletReques..
-
mongodb 필드 값이 배열일때 접근spring project/mongodb 2020. 5. 4. 23:29
배열이 값인 필드는 다음과 같이 꺼내서 썻다... List detailimglist = new ArrayList(); Document dd = (Document) coll_footprints.find(Filters.eq("footprintidx",footprintidx+1)).first(); detailimglist = (List) dd.get("footprintimgs"); String d = detailimglist.get(0).toJson(); Iterator itr6 = detailimglist.iterator(); while(itr6.hasNext()){ Document b = (Document)itr6.next(); Object aa = b.get("footprintsimgidx"); Syst..