TIL 시작

|

MySQL 버전확인

|

command

mysql — version 윈도우, 리눅스에서도 확인가능 단, 윈도우에서는 환경변수 설정이 되어있지 않다면 경로이동 후 명령어 실행해야한다.

query

SELECT version();

image

github에 push된 commit 삭제

|

git reset HEAD^

이 명령어는 커밋을 되돌리는 명령어 여기서 그냥 push를 해버리면

$ git push origin master
To https://github.com/2xel/2xel.github.io.git

! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/2xel/2xel.github.io.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. ‘git pull’) before pushing again. See the
‘Note about fast-forwards’ section of ‘git push –help’ for details.

다음과 같은 메시지가 떨어진다.
원격 저장소에 있는 정보가 손실 될 수 있는 작업이라서 리젝트 시킨다.
우리는 이러한 데이터를 손실시키고 싶다.
이럴때 사용할 수 있는게 + 다.
git push origin +master 이렇게 + 를 붙여주면 강제로 덮어 써 준다

Java 01 첫시간 - Hello World 출력해보기

|

hello world 출력해보기

public class Ex01_First {
    public static void main(String[] args) {
        System.out.println("hello world");
    }
}

main 함수

  • 프로그램의 시작점, 진입점
  • main() - java, Main() - c#

주석처리

// 라인주석은 이렇게
/* 블록주석은 이렇게 하면 됩니다 */

/*
만든이:홍길동
생성일:2017
파일명:Test.java
이런식으로 주석해주면 나중에 봤을때 수정하기 용이하다.
/*

단축키

  • Ctrl shift / <-주석
  • Ctrl shift \ <-주석풀기
  • 코드 실행 단축키(컴파일,실행) = Ctrl+F11