본문 바로가기

내가 당면한 문제와 해결방안

(81)
데이터마이그레이션 누가 물어보면 나도 이렇게 대답할라고요 기존 프로젝트에 맞게 되어있는 데이터들을 새로운 프로젝트를 만들거나 다른 프로젝트에서 가지고 올때 데이터는 다 가지고 오는데.. 데이터의 구조를 바꾸어서 해당 프로젝트에 맞게 수정하는거
List vs ArrayList in java - ArrayList는 표준 Java의 정적 배열 문제(배열을 만든 후에는 크기를 늘릴 수 없음)를 극복 . - ArrayList를 사용하여 배열을 만들면 필요할 때 크기가 커지거나 줄어들 수있는 동적 배열이 만들어짐 - 표준 Collection 클래스 ArrayList는 List 인터페이스를 확장 - List is an Interface vs ArrayList is a standard Collection Class. https://techdifferences.com/difference-between-list-and-arraylist-in-java.html
@RestController @Controller 차이 @RestController @Controller diff @RestController = @Controller + @ResponseBody RestClient는 보통 프로그램이므로 응답할때는 JSON이나 XML 으로 해줘야하는데 RestController가 이런 응답시 적합한 애노테이션 The @RestController annotation in Spring MVC is nothing but a combination of @Controller and @ResponseBody annotation. It was added into Spring 4.0 to make the development of RESTful Web Services in Spring framework easier. If you are f..
elasticsearch geo queries https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-queries.html
couchbase cons - 1 확장이 용이. 클러스터에 서버 추가또는 삭제가 쉽다. 수평 확장 가능. (우리팀은 이것때매 쓴다) - 2 관리 툴있음(의외로 편한 요소 중 하나. 근데 이게 좀 애매할때가 있다) - 3 카우치베이스 서버 관리 REST API를 통해 클러스터를 관리할 수 있습니다. elasticsearch는 할 수 있고 couchbase로는 못하는걸 보여줘야 되는거아닌가? 물론 그걸 couchbase 공식문서에서 보여주진않겠지만 ㅋㅋ 3의 예시. 내가 쓰던거랑 머 결국 똑같은데 rest api 라는 것만 다를 뿐이네 $ curl -v http://localhost:8093/query/service \ -d 'statement=SELECT text FROM tweets LIMIT 1' 출처 (뷰) : htt..
spring POJO vs Java Bean POJO JAVA BEAN It doesn’t have special restrictions other than those forced by Java language. It is a special POJO which have some restrictions. It doesn’t provide much control on members. It provides complete control on members. It can implement Serializable interface. It should implement serializable interface. Fields can be accessed by their names. Fields are accessed only b..
python for iterate loop check next item https://stackoverflow.com/questions/1011938/python-previous-and-next-values-inside-a-loop Python - Previous and next values inside a loop How can I do thing like this in python? foo = somevalue previous = next = 0 for (i=1; i stackoverflow.com This should do the trick. foo = somevalue previous = next_ = None l = len(objects) for index, obj in enumerate(objects): if obj == foo: if index > 0: prev..
crawling wikipedia https://github.com/goldsmith/Wikipedia 여기서 pywikibot을 추천. https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation https://www.mediawiki.org/wiki/Manual:Pywikibot/BotPasswords /Users/n18016/pywikibot/user-config.py 경로에 생성 파일이 생성되었고 해당경로로 가서 스크립트를 실행해야함. import pywikibot site = pywikibot.Site() page = pywikibot.Page(site, u"List of passenger airlines") list_of_passenger_airlines = page.text p..