Scenario:신입시절 자꾸 엔터랑 esc누르면 프로그램이 꺼져서 암이 걸릴뻔함. 간단하게 오버라이딩으로 해결 할 수 있었음.


해당 클래스 클릭한뒤

PreTranslateMessage 함수 생성.



BOOL LensSpec::PreTranslateMessage(MSG* pMsg)

{

// 아래의 내용을 추가

 if(pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE) return TRUE;


 return CDialog::PreTranslateMessage(pMsg);

}


'To be Developer > C,C++' 카테고리의 다른 글

[C++]상수화 constant  (0) 2017.01.18
[C++]List iter 사용법  (0) 2017.01.18
[MFC] MFC에서 디버깅시 콘솔창 띄우기  (0) 2017.01.18


scenario: 회사에서 mfc 프로그램을 만들던중 몇가지 기능을 확인하고자 system에 print 하고싶었다. 그래서 콘솔창을 띄우고싶엇다


solution:


//stdafx.h


#ifdef _DEBUG

#pragma comment(linker, "/entry:WinMainCRTStartup /subsystem:console")

#endif


'To be Developer > C,C++' 카테고리의 다른 글

[C++]상수화 constant  (0) 2017.01.18
[C++]List iter 사용법  (0) 2017.01.18
[MFC]엔터 또는 ESC입력시 프로그램 꺼짐 방지하는법  (0) 2017.01.18

scenario: 이제 본격적으로 웹으로 프로젝트를 시작하려니 참고할 소스도 많아지고, 기능별로 브랜치를 만들어야 될것 같았다.

그래서 브랜치를 써본적이 없지만 하나하나 브랜치를 추가하고 변경하고자 준비를 시작함.


solution: 아래



Bash 0.60 KB
  1. //리모트 저장소 보기
  2. git remote show
  3. origin
  4.  
  5. //리모트 저장소 이름바꾸기
  6. git remote rename origin remote/projects
  7.  
  8. //전체 브랜치 목록보기
  9. git branch -a
  10. * dev-UsingMyBatis
  11.   master
  12.   remotes/origin/dev-UsingMyBatis
  13.   remotes/origin/master
  14.  
  15. //현재 브랜치는 (dev-UsingMyBatis) 이런식으로 써져있다.
  16. //그리고 전체목록을 보면 별표로 되있는게 현재 브랜치이다.
  17. //다른 브랜치로 전환
  18. git checkout [branch name]                              
  19.  
  20.  
  21. //리모트 저장소에 브랜치 추가
  22. git push origin dev-UsingMyBatis


Scenario: Git hub는 오픈기반이라서 내가 의도하지 않아도 Repo를 공개해야하고 검색이 되는 것이다. 그래서 나는 BitBuckets으로 옮기고 난뒤 remote repo의 내용을 삭제하고 싶엇는데, repo를 단순히 삭제하면 Github위키에서는 검색이 된다는 이야기가 있어서, 저장소의 내용들을 깨끗히 삭제하고싶었다.


Solution:(아래)




git 기본 로컬 폴더 등록부터 


gitHub,bitbucket  같은 리모트 서버의 Repository와 연동까지

 

한 2시간 삽질하면서 해본것같다.


  1. /************* Github 내에 소스코드 삭제방법*********************/
  2. /*문제점: 깃허브에 저장된 폴더나 소스를 삭제할 방법을 몰라**/
  3. /*폴더를삭제하고 commit 했더니 remote와 mach가 안되서 오류가남******/
  4. /*새롭게 로컬에 똑같은 이름폴더를만들고 Merge를 하니까 해결됨****/
  5. /****************************************************************/
  6.  
  7.  
  8. /**************** github 다운받고 초기설정 방법******************/
  9.  
  10. Administrator**** MINGW64 ~/gittemp (master)
  11. git config --global user.name "*******"
  12.  
  13. Administrator**** MINGW64 ~/gittemp (master)
  14. git config --global user.email "******"
  15.  
  16. //글로벌네임 리네임 방법
  17. Administrator**** MINGW64 ~/gittemp (master)
  18. git config --global user.name *******
  19.  
  20. Administrator**** MINGW64 ~/gittemp (master)
  21. git config --list
  22. core.symlinks=false
  23. core.autocrlf=true
  24. core.fscache=true
  25. color.diff=auto
  26. color.status=auto
  27. color.branch=auto
  28. color.interactive=true
  29. help.format=html
  30. http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
  31. diff.astextplain.textconv=astextplain
  32. rebase.autosquash=true
  33. user.name=*****
  34. user.email=*********
  35.  
  36. Administrator**** MINGW64 ~
  37. mkdir gittemp
  38.  
  39. Administrator**** MINGW64 ~
  40. cd gittemp
  41.  
  42. Administrator**** MINGW64 ~/gittemp
  43. git init
  44. Initialized empty Git repository in C:/Users/Administrator/gittemp/.git/
  45.  
  46. Administrator**** MINGW64 ~/gittemp (master)
  47. touch Readme.txt
  48.  
  49. Administrator**** MINGW64 ~/gittemp (master)
  50. git status
  51. On branch master
  52.  
  53. Initial commit
  54.  
  55. Untracked files:
  56.   (use "git add <file>..." to include in what will be committed)
  57.  
  58.         Readme.txt
  59.  
  60. nothing added to commit but untracked files present (use "git add" to track)
  61.  
  62. Administrator**** MINGW64 ~/gittemp (master)
  63. git add Readme.txt
  64.  
  65. Administrator**** MINGW64 ~/gittemp (master)
  66. git commit -m "Add readme.txt"
  67.  
  68. Administrator**** MINGW64 ~/gittemp (master)
  69. git remote add origin https://github.com/****/projects.git
  70.  
  71. Administrator**** MINGW64 ~/gittemp (master)
  72. git remote -v
  73. origin  https://github.com/****/projects.git (fetch)
  74. origin  https://github.com/****/projects.git (push)
  75.  
  76. Administrator**** MINGW64 ~/gittemp (master)
  77. git remote show
  78. origin
  79.  
  80.  
  81.  
  82.  
  83. /**************************여기서부터 GitHub내 파일 삭제 완료******************************/
  84.  
  85.  
  86.  
  87. Administrator**** MINGW64 ~/gittemp (master)
  88. git push -u origin master
  89. Username for 'https://github.com': ****@gmail.com
  90. To https://github.com/****/projects.git
  91.  ! [rejected]        master -> master (non-fast-forward)
  92. error: failed to push some refs to 'https://github.com/****/projects.git'
  93. hint: Updates were rejected because the tip of your current branch is behind
  94. hint: its remote counterpart. Integrate the remote changes (e.g.
  95. hint: 'git pull ...') before pushing again.
  96. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  97.  
  98.  
  99. Administrator**** MINGW64 ~/gittemp (master)
  100. git push origin +some_branch
  101. error: src refspec some_branch does not match any.
  102. error: failed to push some refs to 'https://github.com/****/projects.git'
  103.  
  104. Administrator**** MINGW64 ~/gittemp (master)
  105. git push origin +master
  106. Username for 'https://github.com': ****@gmail.com
  107. Counting objects: 5, done.
  108. Delta compression using up to 4 threads.
  109. Compressing objects: 100% (3/3), done.
  110. Writing objects: 100% (5/5)479 bytes | 0 bytes/s, done.
  111. Total 5 (delta 1), reused 0 (delta 0)
  112. remote: Resolving deltas: 100% (1/1), done.
  113. To https://github.com/****/projects.git
  114.  + 4ebba1a...b180f2e master -> master (forced update)
  115.  



소스코드 공유시 틀 사이트는 : http://pastebin.com/index.php

여기 좋은것 같음



Scenario: Git remote server를 사용하다가 문득 이런 의문이 들었다.


"소스관리시 하나의 Repository 내에 여러프로젝트를 저장하는 것일까? 아니면 여러개의 Repo를 만들까?"


초보적인 질문 일수있으나, 형상관리에 익숙하지 않아 궁금하였다.



Solutions:

okk* 사이트에서 이런 답변을 받을 수 있었다.



dgkim  991
19시간 전

github 사이트에서 repository를 제거할 수 있습니다.

하나의 제품의 여러 모듈로 구성되어 있고, 하나의 레포지토리여야만 유리한 점이 있는 것에 아니라면,

프로젝트 모듈별로 repository를 만드는 것으로 사용해 보십시오.

(일반 웹이라면, web project 하나가 repo하나, 서버+앱이라면, 각각 repo)
-------------------------------------------------------------------------------------------


이렇게 관리하는 거였군, 감사합니다 okk* dgkim



Scenario:Html css를 공부하던중 Eclipse 에서 Open with broswer를 하나하나 클릭하는게 너무 귀찮았다.


Solution:단축키 설정을 통해 해결하였다.






1.Window->preferences->General->Web Browser로 간다.

2. 원하는 브라우저를 선택하시고 Edit를 누르시면 Location에 브라우저가 설치된 주소가 뜬다. 주소를 Ctrl+c로 복사해 놓자.





3. 좌측 그림의 아이콘을 클릭하고 목록 중 Exteranl~~ 을 누른다


4. 다음과 같은 창이 뜨면 처음에는 Program 목록에 아무것도 있지 않으나 더블클릭하시면 새로운 요소가 생성된다.

5.생성된 요소에 원하는 Name을 넣고 Location에 앞서 2번 설명에서 복사해 놓으신 주소를 가져다 붙인다.

6. Arguments 내에 ${selected_resource_loc} 을 다음과 같이 입력하고 Apply를 누르면 준비 완료





7. 이제 단축키를 만들어주자. window->preferences->General->Keys로 들어가시면 단축키를 재설정 할수 있다.

8. 단축키 Command 중 Runs the last launched external Tool을 찾고 Binding에 원하는 단축키를 입력하면 끝이다.
(*주의 할점:단축키가 안겹치게 창조적으로 만들자)

(*패키지 폴더경로가 한글이면 제대로 실행이 안되니 주의할것)


자바스크립트 달력소스 사용법 입니다. 여기저기 많이 돌아다니는 캘린더 소스의 사용법

 


1.사용방법

<script language="javascript" src="../popupcalendar.js"></script>를 삽입.

=> src="popupcalendar.js

파일의 경로를 적어주시면되요.

 

popUpalendar(호출위치,폼네임,포멧방식);으로 호출하시면되요

 

예제)

<input type="button" value="달력" onclick="popUpCalendar(this, txtDate, 'yyyy-mm-dd')">

       <input type="text" name="txtDate">

달력버튼 밑에 달력생성, txtDate 텍스트필드에 날짜값 생성, 'yyyy-mm-dd' 형식으로 날짜 생성

        포맷형식 예)  'yyyy-mm-dd'   'mm-dd-yyyy'    'yyyy/mm/dd'    'yyyymmdd' ...

 

 



Scenario:집에서 예전 롯데면접관련 소스를 수정하다가, Create Table에 관련한 Sql문을 Bitbucket(Remote Repo) 에 저장을 해두었음, 학원에서 DOCS 폴더(로컬에 없음)을 Repo로부터 불러올려고하니 잘안되는 것이었다.


Solution:Overwrite를 통해 해결하였다.



[세부 설명]


1.Git 된 프로젝트를 클릭하고 싱크로나이즈드 워크스페이스 클릭.





2.(1)에서 싱크로나이즈드를 눌렀다면 Repo 저장소의 파일들이 보일것이다. (그냥 프로젝트 전체로 잡고 overwrite 해주자)





3.다시 Spring 뷰어로 돌아와서 프로젝트를 보면 눈꽃모양 (*) 모양이 되어있을 것이다. Commit를 한다.





4.Commit을 해주면 최종적으로 로컬에도 변경내용을 확인 할 수있다.




5.히스토리를 클릭하면 커밋한 내용들 (프로젝트가 변경된 내용들을 Comment와 함께) 확인 할 수있다.







Scenario: 집에서 만든 웹프로젝트를 학원어서 해볼려니 Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver]과 같은 오류가 뜨는 것 이었다.

1.dependency 부분에서 JDBC Template 버젼을 잘못썻나 싶어서 Pome.xml 을 뒤져바도 아무래도 없다...

2.인터넷 검색을 해보니 

<repository>

<id>mesir-repo</id>

<url>http://mesir.googlecode.com/svn/trunk/mavenrepo</url>

</repository>



<dependency>

<groupId>com.oracle</groupId>

<artifactId>ojdbc14</artifactId>

<version>10.2.0.4.0</version>

</dependency>


-------이런식으로 직접 repo를 추가하라고 했지만 안되는 것이었다.----------


Solution:

C:\oraclexe\app\oracle\product\11.2.0\server\jdbc\lib 안에있는 jdbc 파일을 

C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext에 넣어주니 해결 완료.. 환경이 바뀌다보니 기본적인 것 을 안해준 것이었다..








KFC 오코노미 온더치킨 !! 오늘아침에 카톡을 켜보니 하니양이 선전을 하고 있더라고요

평소 kfc도 좋아하고 오코노미야키도 좋아해서

그래서 저도 한번 먹어봤습니다!

오오 특별한 박스에 들어가있네요. 상자가 아주 고급스럽고 두껍습니다.


열기에도 약간 뻑뻑한 느낌이 들었지만...








열어보니 치킨이 조금 많이 작더군요.


조금 당황스러웠습니다.

 

아마도 상자값이 500원 정도 되나요???? 







먹다가 양이 안찰것 같아 피넛 크런치 머핀이 1000원 행사중 이길래 추가로 먹었습니다.

오코노미 온더치킨의 전체적인 맛은 음.....  

오코노미야키를 먹어보신분이라면 딱 상상할수 있는 그맛입니다.

저는 카톡할인을 받아 콜라 + 치킨 5000원에 먹었네요 (콤보는 비스켓을 주지 않습니다 ㅠ ㅠ)  


아무튼 한번쯤은 먹어볼만하네요 ㅎㅎ


참고로 단품은 5000원이고

세트메뉴 (비스킷 치킨 음료)는 6700원 입니다.



+2017.01.18 포스팅내용

오랜만에 점심을 먹으러 KFC에 갔엇는데 오코노미 온더 치킨 세트가 무려 

5000원!!!!!  에 판매중이더군요


하.,.. 저는 콤보 5000원에 먹고 정말 기뻐했는데,, 이럴수가..


아무튼 생각보다 잘 안나가보네요.. KFC에서도 가격을 내린 것보니


그런데말입니다... 치짜가 이런 컨셉 치킨의 원조인걸로 아는데 치짜를 못먹어본게 한이됩니다..


많은 분들 께서 이거 먹느니 치짜 먹겠다고 하시는데... 치짜 맛이 정말 궁금합니당..




+ Recent posts