WengQiang's Blog

where there is a will, there is a way!

key binding

  1. go to source: shift + cmd + s(cmd + click) go to declaration: shift + cmd + d

  2. edit history previous item: ctrl + cmd + left-arrow edit history next item: ctrl + cmd + right-arrow

Divide and Conquer(Main Thoery)

if a>=1 and b > 1, T(n) = aT(n/b) + f(n)

  1. case 1 \[ f(n) = O(n^{\log_b{a-\epsilon}}) \longrightarrow T(n) = \Theta(n^{\log_ba}) \]

  2. case 2 \[ f(n) = \Theta(n^{\log_ba}) \longrightarrow T(n) = \Theta(n^{\log_ba}\lg n) \]
    阅读全文 »

variable convention

variables that are internal to makefile are lowercase; variables that might be set from the command line are uppercased.

阅读全文 »

modules makefile(module.mk)

1
2
3
4
5
6
7
8
9
10
   local_dir  := lib/codec
local_lib := $(local_dir)/libcodec.a
local_src := $(addprefix $(local_dir)/,codec.c)
local_objs := $(subst .c,.o,$(local_src))

libraries += $(local_lib)
sources += $(local_src)

$(local_lib): $(local_objs)
$(AR) $(ARFLAGS) $@ $^
阅读全文 »

makefile to include commom.mk

1
2
3
4
 library := libcodec.a
sources := $(wildcard *.c)

include ../../common.mk
阅读全文 »
0%