전체 글

전체 글

    IDE 넷빈즈 자주쓰는 단축키

    코드템플릿 : 코드 자동 완성 기능 psvm + space키 -> public static void main(String[] args) sout + space키 -> System.out.println(""); 넷빈즈 5.5 - tab 넷빈즈 6.0 - space --------------------------------------------------- Ctrl + Shift + C = 주석시작 커서가 검은 네모 칸일때는 insert키를 누름 ctrl + / = 해당라인 주석처리 shift + alt + f = 코드 자동 들여쓰기 정렬 --------------------------------------------------- 윈도우 관련 Alt+화살표 좌,우 = 탭윈도우에서 좌 우로 이동 Ctrl + ..

    Enter키 폼 전송 막기

    $(function() { $("input:text").keydown(function(evt) { if (evt.keyCode == 13) return false; }); }); 아래 방법이 익스플로어에서는 동작하지 않는다. 역시 jQuery가 간단하구나;;; 태그 내부에 둘러싸여진 input text 박스에서 포커스가 있을 때 Enter 를 누르게 되면 자동으로 submit 이 된다. 이것은 form 내부에 input 박스가 하나만 존재해서 그렇다. 이 기능을 막고자 한다면 여러가지 방법이 있는데 그에 대한 방법들을 설명하고자 한다. (1) keycode 값을 판단해서 처리 form 이 submit 되었을때 javascript 로 keycode 값을 읽어와 Enter 에 해당하는 것들은 스킵하게 해준다..

    jquery 간단한 정리

    1. jQuery로 선택된 값 읽기 $("#selectBoxoption:selected").val();$("select[name=name]").val(); 2. jQuery로 선택된 내용 읽기 $("#selectBoxoption:selected").text(); 3. 선택된 위치 var index =$("#test option").index($("#test option:selected")); 4. Addoptions to the end of a select $("#selectBox").append("Apples");$("#selectBox").append("After Apples"); 5. Addoptions to the start of a select $("#selectBox").prepend("Bef..

    MySQL Problem ERROR 2005 (HY000): Unknown MySQL server host ‘localhost’ (0)

    The problem occurred after you installed window7:1ERROR 2005 (HY000): Unknown MySQL server host 'localhost' (0)I was able to solve this problem by modifying my list of hostnames:1C:\Windows\System32\drivers\etc\hostsMake sure that you have the following entry:1127.0.0.1 localhostThis ensures that the host “localhost” resolves to the IP address 127.0.0.1.