manywaypark's Blog
개발, 검색, 함수

Qt에서 emacs key binding 사용하기

tips & tricks/Qt 2020. 8. 19. 15:04 by manywaypark
  1. Help > About Plugins... 에서 emacs plugin을 활성화 (이후 Qt Creator 재시작 필요함)
  2. Tools > Options... 에서 Environment > Keyboard 에서 아래 Emacs.kms 다운로드 후 import!
    Emacs.kms

ref: machinekoder.com/running-qt-creator-in-emacs-mode/

갑자기 코드 자동완성이 안되는 경우가 발생했는데, 해결법은 아래와 같다. 좀 이상하게도 플러그인을 disable해야한다.

Help > About Plugins... 에 들어가서 ClangCodeModel을 시작시 로드하지 않게 uncheck한 다음 Qt Creator를 재시작한다.

현재 환경 참고:

Qt Creator 4.11.0
Based on Qt 5.14.0 (MSVC 2017, 32 bit)
Built on Dec 10 2019 12:27:13
From revision 017ed74400

ref: https://forum.qt.io/topic/107498/code-completion-is-not-working-in-qtcreator/3

 

Code completion is not working in QtCreator?

Hi, Great. Works like a charm. :) But what is the problem with ClangCodeModel? Is this BUG?... Regardsi Mucip:)

forum.qt.io

 

happy hackin'

명령행에서 diskpart를 이용하면 된다.

diskpart.exe 실행해서 한번에 해결하기:

diskpart.exe
DISKPART> list disk
......
DISKPART> select disk [disk-number-here]
DISKPART> clean
DISKPART> create partition primary
DISKPART> list partition
......
DISKPART> select partition 1
DISKPART> active
DISKPART> format fs=fat32 quick

 

NOTE: clean 단계 이후에는 그냥 GUI에서 format 해도 될 듯하다.

 

ref: https://miuna3.tistory.com/105

 

happy hackin'

vcpkg는 다 좋은데 특정 버전/이전 버전의 라이브러리를 쓰려면 명시적인 명령어가 없어서 좀 번거롭다.
다음의 과정을 거쳐서 특정버전의 라이브러리를 쓸 수 있다.

  1. 라이브러리의 특정 버전 commit id(sha)를 알아낸다.
  2. ports/ 디렉토리의 파일들을 sha를 사용해서 가져온다(checkout).
  3. 라이브러리를 (재)설치한다

현재 설치된 최신의 protobuf(3.9.1)를 3.8.0로 교체하는 예를 들어보겠다.

C:\libs\vcpkg>git log ports/protobuf
......
commit 1a63672f8fa796b044c839c777f7113ccea6e635
Author: myd7349 <myd7349@gmail.com>
Date:   Wed Jun 19 04:34:43 2019 +0800

    [protobuf] Update to 3.8.0 (#6739)

    * [protobuf] Update to 3.8.0

    * [nlopt] set options off

    * [shogun] should not use CMAKE_SYSTEM_PROCESSOR in port file

    * [protobuf] Add Homepage

    * [protobuf] turn warning flag off
......
C:\libs\vcpkg>git checkout 1a63672f8fa796b044c839c777f7113ccea6e635 -- ports/protobuf
C:\libs\vcpkg>vcpkg remove protobuf:x86-windows
The following packages will be removed:
    protobuf:x86-windows
Removing package protobuf:x86-windows...
Removing package protobuf:x86-windows... done
Purging package protobuf:x86-windows...
Purging package protobuf:x86-windows... done

C:\libs\vcpkg>vcpkg install protobuf:x86-windows
The following packages will be built and installed:
    protobuf[core]:x86-windows
Starting package 1/1: protobuf:x86-windows
Building package protobuf[core]:x86-windows...
-- Downloading https://github.com/google/protobuf/archive/v3.8.0.tar.gz...
-- Extracting source C:/libs/vcpkg/downloads/google-protobuf-v3.8.0.tar.gz
-- Applying patch fix-uwp.patch
-- Applying patch disable-lite.patch
-- Using source at C:/libs/vcpkg/buildtrees/protobuf/src/v3.8.0-f0fa939850
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: C:/libs/vcpkg/packages/protobuf_x86-windows/tools/protobuf/protoc.exe
-- Installing: C:/libs/vcpkg/packages/protobuf_x86-windows/share/protobuf/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package protobuf[core]:x86-windows... done
Installing package protobuf[core]:x86-windows...
Installing package protobuf[core]:x86-windows... done
Elapsed time for package protobuf:x86-windows: 9.415 min

Total elapsed time: 9.415 min

The package protobuf:x86-windows provides CMake targets:

    find_package(protobuf CONFIG REQUIRED)
    target_link_libraries(main PRIVATE protobuf::libprotoc protobuf::libprotobuf)


C:\libs\vcpkg>cat ports/protobuf/CONTROL
Source: protobuf
Version: 3.8.0
Homepage: https://github.com/google/protobuf
Description: Protocol Buffers - Google's data interchange format

Feature: zlib
Description: ZLib based features like Gzip streams
Build-Depends: zlib
C:\libs\vcpkg>

현재 설치되어 있지 않은 라이브러리라면 remove를 할 필요는 없다.

ref: https://github.com/Microsoft/vcpkg/issues/1681

happy hackin'

윈도우즈에서는 뒤에 버전번호가 붙은 DLL은 좀 귀찮은 면이 많다. 아마도 자동으로 symlink를 생성할 수 없어서 기본으로 버전번호가 붙은 DLL만 생성되는 것으로 보인다.

따라서 그냥 없애는 것이 편하다.

간단하게 아래 두 방법 중 하나를 선택하면 되는데...

CONFIG += skip_target_version_ext

또는

VERSION = 0.0.1
win32:TARGET_EXT = .dll

win32에서만 버전번호 없는 dll을 하나 더 생성하게 하는 두번째 방법이 좀더 유용한듯하다.

(즉, 다시말해 완전히 없애는 첫번째 방법을 취한다면 unix 계열에서 우아하게 버전번호 붙이고 버전 번호 없는 대표명으로 링크 생성하는 것이 동작하지 않는다)

refs:

happy hackin'

windows product key 보기

tips & tricks/Win 2019. 8. 1. 22:21 by manywaypark

Single board computer나 embedded device에 미리 설치되어 나오는 윈도우즈의 경우 product key를 따로 제공하지 않는 경우가 있다.

command line에서 아래처럼 하면 볼 수 있다.

wmic path SoftwareLicensingService get OA3xOriginalProductKey

 

ref: https://www.groovypost.com/howto/find-your-windows-10-product-key/

 

How to Find your Windows 10 Product Key

Microsoft has made every effort to make Windows 10 licensing convenient. That said, there are times where product activation might not work according to plan. Whether you want to perform a new install or transfer your Windows 10 license to a new computer;

www.groovypost.com

happy hackin'

Emacs Shell에서 PATH 문제

tips & tricks/Mac 2018. 11. 3. 00:17 by manywaypark

예전에는 이 문제가 안생겼던거같은데, 모하비 업그레이드 후에 생긴것같다.

purcell의 emacs.d를 사용하면 자동으로 exec-path-from-shell을 호출하는 것으로 보이는데 이상하다.


일단 향후 해결을 위해 글을 남김.


TBD


refs: 

https://emacs.stackexchange.com/questions/10722/emacs-and-command-line-path-disagreements-on-osx

https://emacs.stackexchange.com/questions/461/configuration-of-eshell-running-programs-from-directories-in-path-env-variable

http://ergoemacs.org/emacs/emacs_env_var_paths.html

docker에 redmine 설치하기

tips & tricks 2018. 11. 1. 16:35 by manywaypark

기본적으로 container 두 개를 postgresql, redmine으로 실행하면 된다.

두 container를 연결하는 것말고는 뭐 특별한 것은 없다.

아래 참조 링크에서는 backend DB로 MySQL을 사용하는데 나는 Postgresql을 선호하므로 Postgresql을 썼다.


최초 설정:

docker run --name my.postgres -e POSTGRES_PASSWORD=DB_PASSWORD_HERE -d -p 5432:5432 postgres

docker run -d --name my.redmine -p 3000:3000 --link my.postgres:postgres redmine


이제 http://localhost:3000 에 접속하면 redmine을 사용할 수 있다. 최초의 user/password는 admin/admin이다.


이후 실행:

docker start my.postgres my.redmine


NOTE: 여기서 사용한 postgres image는 container를 commit해서 image를 만들어도 data가 보존되지 않는다. (참고 링크 2번 참고)


ref:

http://pseg.or.kr/pseg/infoinstall/6103

https://stackoverflow.com/questions/27377876/docker-postgres-with-initial-data-is-not-persisted-over-commits


happy hackin'

apt-cyg라는 간단한 script를 깔면 된다.


설치:

$ wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg

$ install apt-cyg /bin


사용:

$ apt-cyg install emacs


refs:

https://stackoverflow.com/questions/9260014/how-do-i-install-cygwin-components-from-the-command-line

https://github.com/transcode-open/apt-cyg


happy hackin'


1 2 3 4 ··· 16 
분류 전체보기 (306)
잡담 (20)
함수형 언어 (65)
emacs (16)
java (18)
tips & tricks (154)
사랑 (1)
가사 (0)
독서 (4)
mobile (6)
비함수형 언어 (2)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

03-19 11:02