個人的なメモ

めもめも.

VC++ DLLサンプル

DLL側 #include "pch.h" #include "stdio.h" #include <windows.h> BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETA</windows.h>…

emacs package

init.elに下記を記載 (require 'package) ;; HTTP (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t) (add-to-list 'package-arch…

キーバインドをemacsライクへ 1. ダウンロードした設定ファイルをインポート http://sakura.qp.land.to/?Customize%2F%C5%EA%B9%C6%2F6 設定 => 共通設定 => キー割り当て => インポート => Emacs.key2. Ctrl + Spaceで選択開始を設定 設定 => 共通設定 => …

サクラエディタ設定

* キーバインドをemacsライクへ 1. ダウンロードした設定ファイルをインポート http://sakura.qp.land.to/?Customize%2F%C5%EA%B9%C6%2F6 設定 => 共通設定 => キー割り当て => インポート => Emacs.key 2. Ctrl + Spaceで選択開始を設定 設定 => 共通設定 =…

memo

https://libreproducts.info/apps/qttabbar/

memo

https://os.mbed.com/media/uploads/MACRUM/cortex-m_mbed_deep-dive_20140704a.pdfhttps://developer.arm.com/docs/dui0553/a/the-cortex-m4-processor/exception-model/exception-entry-and-return

fish shellをローカルにインストール

1. 下記からfish-3.1.0.tar.gzをダウンロード https://fishshell.com/2. 解凍しインストールする 例: ~/fishにインストール $ tar xzvf ./fish-3.1.0.tar.gz $ cd ./fish-3.1.0 $ mkdir build $ cd ./build $ cmake -DCMAKE_INSTALL_PREFIX=~/fish/ ../ $ ma…

ブックマーク

https://www.ibm.com/support/knowledgecenter/ja/SSQ2R2_9.5.1/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_exes.htm https://github.com/jitomesky/RPi_Micon_C85book ■ リンカスクリプト、 a.out, COFF, ELF http://kozos.jp/documents/linker_kernelvm5…

emacs + anything

手順 https://github.com/emacs-jp/anything B)の手順に従ってバイトコンパイルする このとき、contrib/anything-startup.elもload-pathディレクトリに追加しバイトコンパイルする。 設定 https://www.hiroom2.com/2015/09/05/emacs%E3%81%AEanything%E3%83%…

ARM上でgdbを使っていい感じにデバッグをする

【環境】 Raspberrypi2【準備】 1. gdbをいい感じに表示 $ git clone https://github.com/cyrus-and/gdb-dashboard.git $ cp gdb-dashboard/.gdbinit ~/.gdbinit【手順】 1. デバッグ情報込みでコンパイルする $ cc -g hoge.c2. debugする $ gdb a.out $ bre…

emacs init.el

emacs_init.el - 個人的なメモ をリファクタリング init.el ;* search lisp directory path (setq load-path (cons "~/.emacs.d/elisp/" load-path)) ;* load init file (load "~/.emacs.d/gtags.el") (load "~/.emacs.d/anything.el") ;* hidden startup-me…

emacs コメントアウト

カーソルでコメントアウトした行を選択(複数行可) M-x comment-region コメントアウトを解除 M-x uncomment-region

例のやつ

data.txt ___xxx__0.0001__xxx_xxxstart1xxx__ ___xxx__0.0002__xxx_xxxxxxxxxxx__ ___xxx__0.0005__xxx_xxxxxxxxxxx__ ___xxx__0.0007__xxx_xxxxxxxxxxx__ ___xxx__0.0010__xxx_xxxxxxend1xx__ ___xxx__0.0011__xxx_xxxstart2xxx__ ___xxx__0.0012__xxx_xxx…

memo

RLogin

screenコマンド

$HOME/.screenrc $ cat ~/.screenrc # Encoding defencodig utf-8 # Prefix Key escape ^Kk # set scrollback defscrollback 1000000 # Delete sartt up screen startup_message off # Enable Auto detach autodetach on # logging log on deflog on logfile…

cat editor

catコマンドでファイルを作成 $ cat > hoge.txt hoge fuga piyo <ctrl + d>$ cat hoge.txt hoge fuga piyo</ctrl>

Linuxタブ補完設定

[1] Ubuntu16.04でccコマンドを入力し、ファイル名をタブ補完しようとするとうまく動作しない。[解決法] ccコマンド実行時に、ファイルを対象に補完を行う $ complete -f cc [2] Ubuntu16.04でlsコマンドでワイルドカードを使うとすべての候補が出ずに、一番…

lessの覚えるべきコマンド

/pattern 現在位置からファイルの末尾方向へpatternを検索し,移動する ?pattern 現在位置からファイルの先頭方向へpatternを検索し,移動する :n 次のファイルを閲覧する :p 前のファイルを閲覧する

解凍シェル_途中

上書き確認の応答待ちとかなるとプログラムが止まってしまう。 リアルタイムで表示するか応答待ち時に標準出力できるのか? #!/usr/bin/python # coding:utf8 import sys import commands def getFilename(st): # st = "./hoge/fuga/piyo_foo.txt" -> "piyo_…

関数ポインタ_途中

#include <stdio.h> void HOGE(){ printf("HOGE\n"); } int FUGA(){ printf("FUGA\n"); return 1; } int main(){ void (*func)() = HOGE; func(); void (*func2)() = NULL; func2 = HOGE; func2(); int (*func3)() = FUGA; func3(); return 0; }#include <stdio.h> void HOGE()</stdio.h></stdio.h>…

emacs 覚えるべきコマンド

領域指定(マーク) C-space領域切り取り C-wシェルモード M-!

Python + Windows + IDE = PyScripter

Windows10 bash

Bash on Ubuntu on Windowsをインストールしてみよう! http://qiita.com/Aruneko/items/c79810b0b015bebf30bb bashのショートカット作成方法 1. コマンドラインプロンプトのショートカットを作成。 2. 右クリック→プロパティ→ショートカット →リンク先「C:\…

Windows10設定やるべきこと

Windowsキー + → などで、ウィンドウを右半分にしたときに、左にそれ以外のウィンドウが出てくるのを防ぐ。(Windows7のような挙動にしたい) 設定→システム→マルチタスク→ウィンドウをスナップしたときに横に配置できるものを表示するのチェックを外す。

Windowsで日本語と半角英数の切り替えをマックライクにする方法

http://vdeep.net/windows-henkan-macfuu Windwos10のやり方 「IMEを右クリック」オプション→詳細設定 「Microsoft IMEの詳細設定」「編集操作」「キー設定」編集 「設定」「無変換」の「入力/変換済み文字なし」「IME-オフ」 「設定」「変換」の「入力/変換…

.bashrc for cygwin

alias ls="ls --color=auto" alias open="cygstart" alias grep="grep --color=auto" alias diff="diff -u"

あふw覚えるべきもの、設定するべきもの

[ctrl + Enter]: 関連付けで開く [Backspace]: 親ディレクトリに移動 [ctrl + →]: ドライブ変更 [ctrl + ↓]: スクロール [f]: カレントディレクトリ内の入力したファイルへ移動 [space]: 選択 [r]: リネーム [k]: ディレクトリ作成 [e]: エディタで開く [v]:…

application install script on Ubuntu 16.04

実行するときはsudoで実行する。 #!/usr/bin/python import commands def command(cmd): check = commands.getoutput(cmd) if( len(check) ): print check ### if __name__=='__main__': lis1 = ["update", "upgrade"] lis2 = ["emacs24", "samba", "openssh…

キャストメモ

キャストとは、「明示的に型を指定して型変換を行う」こと#include <stdio.h> int main(){ signed char c; unsigned char uc; signed char *pc = NULL; unsigned char *puc = NULL; c = -1; uc = (unsigned char)c; printf("%d %d\n", c, uc); // -1 255 c = (signed </stdio.h>…

Dynamically allocate a 2-D arrays in C

正しいのかな? #include <stdio.h> #include <stdlib.h> int main(){ int **x = NULL; int i, j; x = (int**)malloc( sizeof(int*) * 10 ); for(i = 0; i < 10; i++){ x[i+1] = (int*)malloc( sizeof(int) * (i + 1) ); // *(x + i) = (int*)malloc( sizeof(int) * (i + 1) ); </stdlib.h></stdio.h>…