Skip to content

Instantly share code, notes, and snippets.

View fanfeilong's full-sized avatar
🎯
Focusing

Fan Feilong fanfeilong

🎯
Focusing
View GitHub Profile
@fanfeilong
fanfeilong / datastruct and algorithm.md
Last active October 28, 2017 14:31
datastruct and algorithm

基本算法

  • 排序
    • 穩定的
      • 冒泡排序(bubble sort)-O(n^2)
      • 鸡尾酒排序(cocktail sort, 雙向的冒泡排序)-O(n^2)
      • 插入排序(insertion sort)-O(n^2)
      • 桶排序(bucket sort)-O(n);需要O(k)額外空間
      • 计数排序(counting sort)-O(n+k);需要O(n+k)額外空間
      • 归并排序(merge sort)-O(n*\log_{n});需要O(n)額外空間
  • 原地归并排序- O(n^2)
@fanfeilong
fanfeilong / 工程.md
Last active August 29, 2015 14:04
工程

编程中的工程问题


  • 库项目的预编译头文件和单一对外头文件

    • 使用XXXPreHeader.h/XXXPreHeader.cs统一管理对外依赖
    • 使用XXX.h/XXX.cs统一提供对外头文件
  • 使用宏定义切换Debug/Release/ProductRelease

    • 使用XXX_DEBUG宏设置调试版本配置
    • 使用XXX_LOG宏设置日志版本配置
  • 使用XXX_NLOG宏设置无日志版本配置

@fanfeilong
fanfeilong / Mathematics.md
Last active August 29, 2015 14:04
Mathematics

数学(Mathematics)

书籍


  • <<什么是数学>>

分支


  • 代数学
  • 高等代数
@fanfeilong
fanfeilong / 编码.md
Last active August 29, 2015 14:05
编码

字符编码


  • ASCII
  • EASCII
  • ISO 8859
    • ISO 8859-n(n=1,2,3,...,11,13,...,16)
    • Latin-1==ISO8859-1
  • GB2312
  • GBK > GB2312
  • BIG5 (small conflict with GB2312)
@fanfeilong
fanfeilong / 历史.md
Last active August 29, 2015 14:05
history

过去、现在、将来


    • <<上下五千年>>,虽然5k是一个胡说八道的YY,不过这书还是得看下吧
    • <<全球通史>>
    • <<世界历史>>
    • <<世界历史地图集>>
    • <<文明之光>>,吴军博士著,延伸阅读...
  • &lt;&lt;工科先驱-国学大师唐文治&gt;&gt;,属于中国著名大学校长书系
@fanfeilong
fanfeilong / 物理.md
Last active August 29, 2015 14:05
物理
  • 物理学家
    • 经典力学
      • 牛顿
    • 电磁学
      • 赫兹
      • 富兰克林
      • 安倍
      • 法拉第
      • 亨利
  • 戴维
@fanfeilong
fanfeilong / lua.md
Last active August 29, 2015 14:07
Lua Source Code annotation

源码阅读顺序


Recommended reading order

  • lmathlib.c, lstrlib.c: get familiar with the external C API. Don't bother with the pattern matcher though. Just the easy functions.
  • lapi.c: Check how the API is implemented internally. Only skim this to get a feeling for the code. Cross-reference to lua.h and luaconf.h as needed.
  • lobject.h: tagged values and object representation. skim through this first. you'll want to keep a window with this file open all the time.
  • lstate.h: state objects. ditto.
  • lopcodes.h: bytecode instruction format and opcode definitions. easy.
  • lvm.c: scroll down to luaV_execute, the main interpreter loop. see how all of the instructions are implemented. skip the details for now. reread later.
  • ldo.c: calls, stacks, exceptions, coroutines. tough read.
@fanfeilong
fanfeilong / 化学.md
Last active August 29, 2015 14:08
化学