기본 콘텐츠로 건너뛰기

[브라우저, browser] Chrome's DevTools Butt-kicking features.

source: http://stackoverflow.com/questions/3124974/what-features-does-firebug-have-that-chromes-developer-tools-does-not-have I used Firebug from the start and it was a godsend like the invention of fire. But then Chrome came out with its debugger and I tried it. I kept using Firebug, but kept an eye on Chome's dev tools and finally could not longer come up with a reason not to switch after JSON tools were added in v12. Chrome's DevTools kick butt because it has: Built in Profiler and Heap analyzer Built in Audit tool Can access and edit LocalStorage, SessionStorage, Cookies, SqlLite DB's etc... WebSockets network sniffing SHIFT+ESC to get a detailed task manager of all Chrome processes and FPS of each page JSON and XML viewers are build in so you don't need a plugin to inspect responses JS Syntax highlighting is built right in, no need for a plugin JS debugger has many more features (WebWorker/XHR/DOM/Event breakpoints) JS debugger shows an element's...

[javascript, 자바스크립트] 버튼을 a태그처럼, a태그를 버튼처럼

사실 첫번째 submit은 버튼이지만 css style로 hyperlink처럼 바꾼 모습이고, 두번째 submit버튼모양은 사실 hyperlink지만 css style로 버튼마냥 바꾼 모습니다. 적용에 사용된 소스는 아래: <!DOCTYPE html> <html> <head> <style>     a.button {       -webkit-appearance: button;       -moz-appearance: button;       appearance: button;     }     input.submitLink {     background-color: transparent;     text-decoration: underline;     border: none;     cursor: pointer;     } </style> <script>     function formSubmit()     {     document.getElementById("frm1").submit();     } </script> </head> <body> <form action="test1.jsp" method="get"> name: <input type=text name="name"> phone: <input type=text name="phone"> <input type=submit value="subm...

[웹, http] 실시간 웹, real time web

source:  http://thinkr.egloos.com/2488915 리얼타임 웹이란 무엇일까요? 웹의 기본 프로토콜인 HTTP 프로토콜을 기반으로 하여 그 위에 실시간성의 어떤 것들을 가미한 것이 리얼타임 웹이겠죠? 흔히 사용되는 기법 중 하나는 주기적으로 폴링(polling)을 하는 것입니다. 매 시간, 예를 들면 1분 간격으로 서버에 요청을보내고 다시 응답을 받고 하는 과정을 반복하면서 새로운 이벤트가 감지되면 응답에 실어 클라이언트 브라우저로 보내는 방법입니다.주로 Ajax 호출을 사용하기 때문에 흔히 Ajax Polling이라고도 부릅니다.  이 방법이 간단하긴 하지만 몇 가지 문제가 있습니다. 폴링 주기를 어떻게 주느냐에 따라 실시간성이 조금 떨어질 수 있고 또 폴링 주기를 짧게 가져갈수록 서버의 처리 부담이 커지는 문제가 대표적입니다. 그래서 나온 생각들이 웹 상에서 푸시(PUSH)를 구현하자는 것이고, 이렇게 웹 서버가 클라이언트 브라우저로 푸시하는 기법들을 총칭하여 'Comet'이라고 부릅니다. Comet은 그 구현방법이 아주 다양합니다만, 크게 보면 스트리밍(Streaming) 방식과 롱폴링(Long Polling) 방식으로흔히 구별할 수 있습니다. 그 중 스트리밍 방식은 하나의 웹 요청에 대해 웹 접속(connection)을 계속 열어두고서, 새로무언가 이벤트가 발생하면 그 때 마다 부분적인 응답을 브라우저로 보내는 방식입니다. 다른 한 가지는 롱폴링(Long Polling)인데, 이 방식은 앞서 설명한 주기적 폴링과 비슷하지만, 서버 측에서 접속을열어두는 시간이 길다는 차이점이 있습니다. 왼쪽 그림에서 보면 노란색 선으로 표시된 부분이 서버의 접속 시간입니다. 앞서보여드린 주기적 폴링과 비교하면 확실히 접속 시간이 깁니다. 롱폴링에서는 이벤트가 발생하면 바로 응답이 이루어지기 때문에실시간성이 아주 높으며, 스트리밍 방식과 달리 웹 브라우저 환경에 관계없이 사용할 수 있기 때문에 흔히 사용되는 방식입니다....

[푸시 알림, GCM]How does push notification technology work on Android?

source: http://stackoverflow.com/questions/11508613/how-does-push-notification-technology-work-on-android From what I've heard during an Android developers conference in Israel: There is simply a TCP socket waiting in  accept mode  on a cloud Google server. The TCP connection had been initiated by the Goggle Play application. That's why Google Play must be installed on the device for making Google Cloud Messaging (GCM)  (formerly Android Cloud to Device Messaging Service -  C2DM ) work. When this TCP client socket receives some message, the message contains information such as the package name of the application it should be addressed to, and of course - the data itself. This data is parsed and packed into an  intent  that is broadcast and eventually received by the application. The TCP socket stays open even when the device's radio state turns into "idle" mode. Applications don't have to be running to receive the intents. More information at...

[리눅스]Ubuntu Proxy Server, Squid3(우분투 프록시 서버, 스퀴드3)

source:  http://www.withover.com/2012/02/ubuntu-proxy-server-squid3.html Ubuntu Proxy Server, Squid3 간단 설치  접근이 불가능한 사이트를 접근을 하기 위해 우리는 보통 프록시 서버(Proxy Server)를 통한다고 말한다. 프록시 서버를 이용한다는 개념은 내가 원하는 자료를 프록시 서버를 통해서 접근을 한다는 의미다. 일반 개념: 사용자 -----> 웹사이트 프록시 개념: 사용자 ----> 프록시 서버 ----> 웹사이트  사이트 차단의 기본 원리는 사용자가 접근하고 있는 곳의 주소를 가지고 차단을 한다. 그런데 사용자가 프록시 서버를 거치게 되면 사용자가 접근하고 있는 주소가 프록시 서버가 됨으로써 사이트 차단을 회피할 수 있게 된다.  프록시 서버를 이용함에 있어서 사이트를 회피 할 수 있다는 장점은 있지만, 프록시 서버를 통해서 사이트에 자신의 로그인 정보를 넣는 것은 위험하다고 한다. 자신의 행위가 프록시 서버에 다 기록이 남기 때문이다. 신뢰할 수 있는 프록시 서버가 없다면 자신만의 프록시 서버를 만들어 보자.  우분투에서 Squid3를 이용하여 프록시 서버를 구축하는 간단한 방법을 알아보자. 1. Squid3 설치 $ sudo apt-get install squid3 2. 원본 설정파일 보관을 위해서 config 파일 복제 $ sudo cp /etc/squid3/squid.conf /etc/squid3/squid.conf.original $ sudo chmod a-w /etc/squid3/squid.conf.original 3. vi로 설정 변경 $ sudo vi /etc/squid3/squid.conf  4. vi 편집 상태에서 외부 접근 허용하기. 대략 809라인. manager와 localhost만 접근을 허용한다는 의미를 설정 정보(2,3번째라인)에 #을 붙여 주석...

[private method test] Testing Private Methods with JUnit and SuiteRunner

source:http://www.artima.com/suiterunner/privateP.html Testing Private Methods with JUnit and SuiteRunner by Bill Venners May 24, 2004 Summary This article compares four different approaches to testing private methods in Java classes. M y very first use of JUnit was to build a conformance test kit for the ServiceUI API [ 1 ]. The purpose of a conformance test kit is to help ensure that alternate implementations of the same API are compatible with the API's specification. Because an API specification defines only the public interface of the API, not the API's implementation, a conformance test exercises only the public interface. In other words, a conformance test is a "black box" test. It treats the API under test as a black box, whose external interface can be seen, but whose internal implementation cannot. A conformance test of a Java API, therefore, need only access the public members of the packages and classes under test. There is no need to a...

[톰캣7 우분투에서 설정] Configure Tomcat7 in Ubuntu

source: http://stackoverflow.com/questions/13423593/eclipse-4-2-juno-cannot-create-a-server-using-the-selected-type-in-tomcat-7 cd /usr/share/tomcat7 sudo ln -s /var/lib/tomcat7/conf conf sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy sudo ln -s /var/log/tomcat7 log sudo chmod -R 777 /usr/share/tomcat7/conf sudo ln -s /var/lib/tomcat7/common common sudo ln -s /var/lib/tomcat7/server server sudo ln -s /var/lib/tomcat7/shared shared