├── .DS_Store ├── .gitignore ├── .idea ├── .name ├── encodings.xml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── README.md ├── Untitled Diagram.xml └── note ├── .DS_Store ├── BST.md ├── README.md ├── android ├── add_action_bar.md ├── android-l-recyclerview-and-cardview-tutorial.md ├── android_app_integrate_avos_push.md ├── android_component.md ├── build_first_app.md ├── build_ui.md ├── command.md ├── component.md ├── layout.md ├── material_design.md ├── notification.md ├── readme.md ├── start_anthor_activity.md ├── toast.md └── xx.md ├── data-structures ├── Fibonacci.md └── tag_cloud.md ├── english └── adj.md ├── general ├── .DS_Store ├── arch.xml ├── blog.md ├── bootstrap3.md ├── chrome_extension.md ├── how_to_startup.md ├── https_lets_encrypt.md ├── i_use_pycharm.md ├── importnew_app.md ├── interview-tips.md ├── mactalk.md ├── phabricator_install.md ├── pycharm-shortcut.md ├── shabi-lead.md └── temp.md ├── git ├── git-common-command.md ├── git.md ├── hg.md └── new.md ├── ir └── IR.md ├── java ├── Batching Select Statements in JDBC.md ├── Generic.md ├── How main Method works in Java.md ├── JDBC Performance Tips.md ├── Java Object Memory Structure.md ├── Java 最佳实践---Vector、ArrayList、HashSet.md ├── README.md ├── Why W Need Lambda Expressions in Java Part2.md ├── Why use PreparedStatement in Java JDBC .md ├── busting java.lang.String.intern myth.md ├── classloading and initialization.md ├── finnaly.md ├── generics-listParent.gif ├── gradle.md ├── java_source.md ├── monitor.png ├── oxs-env.md ├── shiro.md ├── singleton.md ├── solr │ ├── README.md │ ├── solr10.md │ ├── solr11.md │ ├── solr12.md │ ├── solr13.md │ ├── solr14.md │ ├── solr15.md │ ├── solr16.md │ ├── solr17.md │ ├── solr18.md │ ├── solr19.md │ ├── solr2.md │ ├── solr20.md │ ├── solr21.md │ ├── solr22.md │ ├── solr23.md │ ├── solr24.md │ ├── solr25.md │ ├── solr26.md │ ├── solr27.md │ ├── solr28.md │ ├── solr29.md │ ├── solr3.md │ ├── solr30.md │ ├── solr31.md │ ├── solr32.md │ ├── solr33.md │ ├── solr34.md │ ├── solr35.md │ ├── solr36.md │ ├── solr4.md │ ├── solr5.md │ ├── solr5_0_instroduce.md │ ├── solr6.md │ ├── solr7.md │ ├── solr8.md │ ├── solr9.md │ └── solr_tutorial.md ├── springmvc.md ├── springmvc_mybatis_shiro.md ├── test.md ├── why_main_method_is_public_static.md └── 深入Java虚拟机读书笔记.docx ├── libvirt └── 网络管理.md ├── linux ├── du.md ├── filesystem.md ├── io.md ├── replace_str.md ├── urllib.md └── vpn.md ├── memcached ├── four.md ├── introduce_install.md ├── memcached-memory-allocation.md ├── telnet_command.md └── three.md ├── mongodb ├── mongodb_practice.md └── replset.md ├── mysql ├── index.md ├── index.py ├── mysql_start_error.md ├── mysqldump.md ├── slow_query.md ├── transation.md └── tree.md ├── nginx ├── nginx.md ├── nginx故障分析.md ├── try_file.md └── try_files.md ├── python ├── Django_admin_site.md ├── Python_Decorators.md ├── Python_str_implement.md ├── Python面试指南.md ├── README.md ├── a_guide_to_testing_in_django.md ├── application.py ├── arch.md ├── autologin.py ├── bar.py ├── captcha.md ├── celery.md ├── celery1.md ├── code_style.md ├── collections.md ├── coroutine.md ├── datetime-timestamp.md ├── decorators.md ├── deploy_django_with_nginx.md ├── descriptor.md ├── dir_vars.md ├── django-compressor.md ├── django_custom_user.md ├── django_form.md ├── django_many_to_many_optimizer.md ├── django_qa.md ├── django_static_resource.md ├── django_template.md ├── django_url.md ├── enum.md ├── exception.md ├── flask.md ├── foo.py ├── function_programming_2.md ├── function_programming_of_function_processing_functions.md ├── generator.md ├── gevent.md ├── gevent0.md ├── gevent2.md ├── guide-python-static-class-abstract-methods.md ├── guide-python-static-class-abstract-methods2.md ├── iterator_generator.md ├── json.md ├── legb.md ├── log.md ├── mako.md ├── middleware.md ├── mock.md ├── module.md ├── mongo-connetor.md ├── paste.md ├── pillow.md ├── pip.md ├── pycharm.md ├── pyramid.md ├── python-ebook.md ├── python3.md ├── python_dict_implement.md ├── python_gc.md ├── python_int_implements.md ├── python_list_implements.md ├── python_mock.md ├── python_network0.md ├── python_singleton.md ├── python_tdd.md ├── resource.md ├── sentry.md ├── signals.md ├── sitemap.md ├── socket.md ├── sphinx │ └── introduce.md ├── sqlalchemy.md ├── stringio.md ├── testing.md ├── tornado │ └── ioloop.md ├── unit_test.md ├── useful_features.md ├── virtualenv.md ├── what-does-the-yield-keyword-do-in-python.md ├── write-2x-3x-compatible-code.md ├── wsgi.md ├── 安装virtualenvwrapper遇到一个坑.md └── 电子书.md ├── recommendation └── 0.md ├── redis ├── codis.md ├── data-struct.md ├── introduce.md ├── memory.md ├── persistence.md ├── redis-slave.conf ├── redis.conf ├── redis2.md ├── twemproxy.md └── untitled.txt ├── resource ├── _vimrc └── image │ ├── Binary_tree.png │ ├── android │ ├── QQ截图20140921080706.png │ ├── avd.png │ ├── emulator.png │ ├── layout.png │ ├── layout1.png │ ├── notication_elements.png │ ├── notification.png │ └── viewgroup.png │ ├── c_branch.png │ ├── dataflow.png │ ├── exceptions0.png │ ├── exceptions1.png │ ├── ff.png │ ├── filetype.png │ ├── git.jpg │ ├── grammer_tree.jpg │ ├── html_search0.png │ ├── html_search1.png │ ├── index_analysis.png │ ├── interaction.png │ ├── inverted_index_thumb.jpg │ ├── io │ ├── bio.png │ └── nbio.png │ ├── json2python.png │ ├── m_branch.png │ ├── map.png │ ├── memcached-item.png │ ├── nff.png │ ├── nginx-alias.png │ ├── nginx-root.png │ ├── pinghengtree.png │ ├── postinglist.jpg │ ├── python2json.png │ ├── python_int_block.jpg │ ├── pythonblock_small_int.png │ ├── rebase1.png │ ├── rebase2.png │ ├── recode.jpg │ ├── s_branch.png │ ├── slab.png │ ├── solr.png │ ├── tlist.png │ ├── tokenizer.png │ ├── vi-vim-cheat-sheet.png │ ├── vim17_1.png │ ├── vim17_2.png │ ├── vsm.jpg │ ├── weight.png │ ├── wordform.png │ └── yiyuan0.png ├── rq ├── mq.md ├── my_module.py ├── rq.md ├── rq_getting_start.md └── rq_worker.md ├── system └── notification.md ├── test.py └── vim ├── 10.md ├── 11.md ├── 12.md ├── 13.md ├── 14.md ├── 15折叠.md ├── 16.md ├── 17.md ├── 18.md ├── 19.md ├── 20.md ├── 21.md ├── 22.md ├── 23.md ├── 24.md ├── 25.md ├── 26.md ├── 27.md ├── 28.md ├── 29.md ├── 30.md ├── 31.md ├── 32.md ├── readme.md └── vimrc.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzjun567/note/918da4fbb512cd284b921cd0eebbad69911f8fd7/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | */tags 3 | *.pyc 4 | *.rdb 5 | *.iml 6 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | note -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Untitled Diagram.xml: -------------------------------------------------------------------------------- 1 | UzV2zq1wL0osyPDNT0nNUTV2VTV2LsrPL4GwciucU3NyVI0MMlNUjV1UjYwMgFjVyA2HrCFY1qAgsSg1rwSLBiADYTaQg2Y1AA== -------------------------------------------------------------------------------- /note/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzjun567/note/918da4fbb512cd284b921cd0eebbad69911f8fd7/note/.DS_Store -------------------------------------------------------------------------------- /note/BST.md: -------------------------------------------------------------------------------- 1 | ####Tree 2 | 对于大量的数据,线性表的访问速度太慢, 3 | 4 | A 5 | / \ 6 | / \ 7 | B C 8 | / \ / \ 9 | D E F G 10 | 中序遍历:它首先遍历左子树,然后访问根节点,最后遍历右子树(左根右),上图按中序遍历的结果是:**DBEAFCG** 11 | 12 | 后序遍历:首先遍历左子树,然后遍历右子树,最后遍历根节点(左右根),上图按后序遍历的结果是:**DEBFGCA** 13 | 14 | 前序遍历:首先访问根节点,然后遍历左子树,最后遍历右子树(根左右),上图按前序遍历的结果是:**ABDECFG** 15 | 16 | 前中后主要看根节点,根节点在中间就是中序遍历,依此类推。 17 | 18 | ####术语 19 | 节点的度:一个节点含有的子树的个数称为该节点的度,例如A节点的度为:2 20 | 树的度:一颗树中,最大节点的度称为树的度,最大节点的度为2,所以上图树的度为2 21 | 树的深度/高度:树的层数称为树的高度,根节点的层次为1,上图树的高度为3 22 | 23 | #####二叉树 24 | 二叉树的每个节点至多有两颗子树,(即二叉树中不存在度大于2的节点)。因此二叉树有如下几种型情。 25 | + 空二叉树 26 | + 仅有根节点的二叉树 27 | + 右子树为空的二叉树 28 | + 左子树为空的二叉树 29 | + 左右子树均非空的二叉树 30 | #####二叉树的性质 31 | 1. 在二叉树的第i层,至多有2的(i-1)次方个节点 32 | 2. 深度为k的二叉树至多有2的k次方-1个节点 33 | 3. 任意一颗二叉树T,如果终端节点数为n,度为2的节点数为m,那么n = m+1 34 | 35 | 深度为k且有2的k次方-1个节点的二叉树称为**满二叉树**,它的特点是每一层上的非叶子节点都有2个节点 36 | **完全二叉树**:深度为k的,有n个节点的二叉树,当且仅当每一个节点都与深度为k的满二叉树中编号从1至n的节点一一对应时,称之为完全二叉树 37 | 38 | 39 | -------------------------------------------------------------------------------- /note/android/add_action_bar.md: -------------------------------------------------------------------------------- 1 | Action Bar 2 | ========= 3 | anction bar是几乎每个App都有东西,大概样子就是: 4 | ![action_bar](http://foofish.qiniudn.com/actionbar-actions.png) 5 | 6 | 这个ActionBar仅支持Android3.0(API level11)以上的版本。因此你设置`AndroidManifest.xml`: 7 | 8 | 9 | 10 | ... 11 | 12 | 13 | 所有action按钮和items定义在res/menu目录下面, 14 | 15 | -------------------------------------------------------------------------------- /note/android/android_component.md: -------------------------------------------------------------------------------- 1 | Android应用的组成部分 2 | ============== 3 | **Activities**:应用的展示层,应用的UI由一个或多个Activity类构建而成,Activities使用Fragements和Views来布局和显示信息,响应用户的动作,和桌面应用开发对比,Activities等效于窗体。 4 | **Services**:应用中不可见的worker,这个组件不需要UI就能运行,用于更新数据源和Activities,触发通知和广播Intents。通常用在执行长期运行的任务场景中。 5 | **Content Providers**:这是一个可共享的持久化数据存储,它管理和持久化应用的数据,通常是与SQL数据库交互。 6 | **Intents**:一个强大的消息传递框架,可以使用Intents开启或者停止Acitivities和Services,或者是请求一个动作。 7 | **Broadcast Receivers**:Intent监听器。 8 | **Widgets**:可视化的应用组件,通常是放在设备的主屏幕上。 9 | **Notification**:Notification可以在不打断当前Activity的同时提醒用户。 10 | ###Android应用的生命周期 11 | 默认情况下,Android应用运行在自己的进程中,每个进程是一个独立的Dalvik实例。 12 | 13 | -------------------------------------------------------------------------------- /note/android/build_first_app.md: -------------------------------------------------------------------------------- 1 | 第一个Android App 2 | ============= 3 | 1. 下载Android SDK 4 | 2. 安装ADT插件(Eclipse) 5 | 3. 下载最新的SDK工具和平台用于SDK管理 6 | 7 | 直接下载[SDK ADT Bundle](https://dl.google.com/android/adt/22.6.2/adt-bundle-windows-x86_64-20140321.zip),这是一个工具包含有了所有开发所需要的工具,包括(Android SDK组件,Eclipse IDE和内建的ADT(android developer tools) 8 | 9 | 下载解压完成后,创建第一个Android应用,直接点下一步直到最后完成就可以了。 10 | 11 | 创建完成后,项目的目录结构如下: 12 | 13 | ![](http://foofish.qiniudn.com/layout1.png) 14 | ####AndroidManifest.xml 15 | 每个Android project都会有一个manifest文件,AdnroidManifest.xml,位于工程的根目录下面,manifest文件定义了app的结构和元数据以及所需组件和一些requirements。包括了组成应用的每个Activities,Services,Content Providers和Broacast Receivers节点,使用Intent Filter和Permission来决定如何与其它应用交互。 元数据如icon,版本号,主题。 16 | 17 | 其中``元素用来兼容Android的版本信息的。你应该这样设置: 18 | 19 | 20 | 21 | ... 22 | 23 | 24 | ####在模拟器上运行 25 | 在模拟器上运行app,首先需要创建一个AVD(Android Virtual Device),这是一个Android模拟器的设备配置,他能模仿不同的设备。 26 | ![](http://foofish.qiniudn.com/avd.png) 27 | 28 | 设置好AVD参数后,点击 Start--〉Launch,然后就能看到一个虚拟的Android设备了,看到下面的图要等很久。 29 | ![](http://foofish.qiniudn.com/emulator.png) 30 | 31 | 接下来打开AndroidManifest.xml,然后选择Eclipse工具栏中的Run---〉Run As---〉Android Application,这样你的app就安装到了模拟器中去了。 32 | 33 | 在真机上运行的话只要把手机调为DEBUG模式就可以了。 34 | 35 | 36 | ###构建一个简单的UI 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | Download the Android SDK. 47 | Install the ADT plugin for Eclipse (if you’ll use the Eclipse IDE). 48 | Download the latest SDK tools and platforms using the SDK Manager. 49 | 50 | -------------------------------------------------------------------------------- /note/android/build_ui.md: -------------------------------------------------------------------------------- 1 | Android:构建一个简单的UI 2 | =========== 3 | Android的GUI由View和ViewGroup对象构成,View指的就是那些Button,Textfield等等。ViewGroup就是指view容器。 4 | 5 | Android可以直接通过XML配置文件来定义UI。 6 | 7 | ![viewgroup](http://foofish.qiniudn.com/viewgroup.png) 8 | 9 | ####创建一个Linear布局 10 | 打开res/layout/framgment_main.xml,删掉``换成``: 11 | 12 | 17 | 18 | 19 | LinearLayout 就是一个view group,在添加一个View: 20 | 21 | 25 | 26 | android:id 是这个view的唯一标识符,可以在代码中通过这个id来操作这个对象。 27 | 28 | `wrap_content` 就是指view的宽度和高度根据view的内容填充大小。 如果是用"match_parent"就是跟父对象的大小一样。 29 | 30 | android:hint 指view的内容为空的时候的指,此时你的edit_message还没定义,因此会报错 31 | 32 | ####添加String Resources 33 | String resources可以在一个单独的地方管理所有UI文本,这样更易查找和更新文本。默认情况下project的string resource文件在res/values/strings.xml下面。现在添加一个新的字符串"edit_message"设置为"输入消息". 34 | 35 | 36 | 37 | 38 | defish 39 | Dummy Button 40 | DUMMY\nCONTENT 41 | 输入消息 42 | 43 | 44 | 45 | 46 | 格式更好的布局 47 | 48 | 54 |