<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>肖汉松 - 技术笔记</title><description>工程实践、系统设计、编程语言和技术原理的长期笔记。</description><link>https://blog.xiaohansong.com/</link><item><title>编写高质量代码的思考</title><link>https://blog.xiaohansong.com/posts/tech-notes/high-quality-code/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/high-quality-code/</guid><description>前言 最近在看《代码大全》，可以说是一本软件开发的百科全书，特别厚，但是干货也很多。平时写代码，代码规范是一个最低的要求（很多老代码连最低要求都达不到），为什么要这样规定代码要这么写，而不是那么写？这是一个值得深究的问题。而不是说我照着代码规范写代码就算完了，高质量的代码是一个专业工程师的追求。要知...</description><pubDate>Wed, 09 Aug 2017 15:56:52 GMT</pubDate><category>技术笔记</category><category>编程实践</category></item><item><title>代码生成利器：IDEA 强大的 Live Templates</title><link>https://blog.xiaohansong.com/posts/tech-notes/idea-live-templates/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/idea-live-templates/</guid><description>前言 Java 开发过程经常需要编写有固定格式的代码，例如说声明一个私有变量，logger或者bean等等。对于这种小范围的代码生成，我们可以利用 IDEA 提供的 Live Templates功能。刚开始觉得它只是一个简单的Code Snippet，后来发现它支持变量函数配置，可以支持很复杂的代码...</description><pubDate>Fri, 17 Mar 2017 15:08:30 GMT</pubDate><category>技术笔记</category><category>idea</category></item><item><title>IDEA代码生成插件CodeMaker</title><link>https://blog.xiaohansong.com/posts/tech-notes/codemaker/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/codemaker/</guid><description>前言 Java 开发过程中经常会遇到编写重复代码的事情，例如说：编写领域类和持久类的时候，大部分时候它们的变量名称，类型是一样的，在编写领域类的时候常常要重复写类似的代码。类似的问题太多，却没找到可以支持自定义代码模板的插件，只能自己动手，丰衣足食，开发了一个 IDEA 的代码生成插件，通过 Vel...</description><pubDate>Fri, 03 Feb 2017 12:11:34 GMT</pubDate><category>技术笔记</category><category>idea-plugin</category></item><item><title>图解 Paxos 一致性协议</title><link>https://blog.xiaohansong.com/posts/tech-notes/paxos/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/paxos/</guid><description>前言 Paxos 一致性协议可以说是一致性协议研究的起点，也以难以理解闻名。其实协议本身并没有多难理解，它的难理解性主要体现在：为何如此设计协议以及如何证明其正确性。本文尝试通过流程图来说明协议的内容以及基本应用过程，不涉及如何证明其正确性。 基本概念 Paxos 可以分为两种： Single De...</description><pubDate>Fri, 30 Sep 2016 02:17:52 GMT</pubDate><category>技术笔记</category><category>Paxos</category><category>一致性协议</category></item><item><title>Zookeeper ZAB 协议分析</title><link>https://blog.xiaohansong.com/posts/tech-notes/zab/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/zab/</guid><description>前言 ZAB 协议是为分布式协调服务 ZooKeeper 专门设计的一种支持崩溃恢复的原子广播协议。在 ZooKeeper 中，主要依赖 ZAB 协议来实现分布式数据一致性，基于该协议，ZooKeeper 实现了一种主备模式的系统架构来保持集群中各个副本之间的数据一致性。 Atomic broadc...</description><pubDate>Thu, 25 Aug 2016 15:53:11 GMT</pubDate><category>技术笔记</category><category>Zookeeper</category><category>ZAB</category><category>分布式</category><category>一致性协议</category></item><item><title>ZooKeeper Watcher 和 AsyncCallback 的区别与实现</title><link>https://blog.xiaohansong.com/posts/tech-notes/zookeeper-watch-async/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/zookeeper-watch-async/</guid><description>前言 初学 Zookeeper 会发现客户端有两种回调方式： Watcher 和 AsyncCallback，而 Zookeeper 的使用是离不开这两种方式的，搞清楚它们之间的区别与实现显得尤为重要。本文将围绕下面几个方面展开 Watcher 和 AsyncCallback 的区别 Watcher...</description><pubDate>Mon, 22 Aug 2016 14:15:08 GMT</pubDate><category>技术笔记</category><category>Zookeeper</category><category>分布式</category></item><item><title>ThreadLocal 内存泄露的实例分析</title><link>https://blog.xiaohansong.com/posts/tech-notes/threadlocal-leak-analyze/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/threadlocal-leak-analyze/</guid><description>前言 之前写了一篇[深入分析 ThreadLocal 内存泄漏问题][1]是从理论上分析ThreadLocal的内存泄漏问题，这一篇文章我们来分析一下实际的内存泄漏案例。分析问题的过程比结果更重要，理论结合实际才能彻底分析出内存泄漏的原因。 案例与分析 问题背景 在 Tomcat 中，下面的代码都在...</description><pubDate>Tue, 09 Aug 2016 14:10:04 GMT</pubDate><category>技术笔记</category><category>Java</category><category>ThreadLocal</category><category>并发</category></item><item><title>深入分析 ThreadLocal 内存泄漏问题</title><link>https://blog.xiaohansong.com/posts/tech-notes/threadlocal-memory-leak/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/threadlocal-memory-leak/</guid><description>前言 ThreadLocal 的作用是提供线程内的局部变量，这种变量在线程的生命周期内起作用，减少同一个线程内多个函数或者组件之间一些公共变量的传递的复杂度。但是如果滥用 ThreadLocal，就可能会导致内存泄漏。下面，我们将围绕三个方面来分析 ThreadLocal 内存泄漏的问题 Threa...</description><pubDate>Sat, 06 Aug 2016 12:12:16 GMT</pubDate><category>技术笔记</category><category>Java</category><category>ThreadLocal</category><category>并发</category></item><item><title>【Getty】Java NIO框架设计与实现</title><link>https://blog.xiaohansong.com/posts/tech-notes/getty/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/getty/</guid><description>前言 [Getty][1]是我为了学习 Java NIO 所写的一个 NIO 框架，实现过程中参考了 Netty 的设计，同时使用 Groovy 来实现。虽然只是玩具，但是麻雀虽小，五脏俱全，在实现过程中，不仅熟悉了 NIO 的使用，还借鉴了很多 Netty 的设计思想，提升了自己的编码和设计能力。...</description><pubDate>Sat, 30 Jul 2016 02:42:23 GMT</pubDate><category>技术笔记</category><category>Java</category><category>NIO</category></item><item><title>Java 线程池框架核心代码分析</title><link>https://blog.xiaohansong.com/posts/tech-notes/java-executor/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/java-executor/</guid><description>前言 多线程编程中，为每个任务分配一个线程是不现实的，线程创建的开销和资源消耗都是很高的。线程池应运而生，成为我们管理线程的利器。Java 通过Executor接口，提供了一种标准的方法将任务的提交过程和执行过程解耦开来，并用Runnable表示任务。 下面，我们来分析一下 Java 线程池框架的实...</description><pubDate>Mon, 11 Jul 2016 16:13:44 GMT</pubDate><category>技术笔记</category><category>Java</category><category>Executor</category><category>并发</category></item><item><title>RedisHttpSession 的设计与实现</title><link>https://blog.xiaohansong.com/posts/tech-notes/redishttpsession/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/redishttpsession/</guid><description>前言 [RedisHttpSession][1] 是我的一个 Java 开源项目，通过将 Session 存储在 Redis 中实现多服务器间共享 Session，同时这一过程是完全透明的。主要用于支持 RESTfuls API。下面我将对其核心类进行分析，阐述它的设计以及实现细节。 RedisHt...</description><pubDate>Sun, 15 May 2016 02:49:39 GMT</pubDate><category>技术笔记</category><category>Java</category><category>Session</category></item><item><title>三言两语：JVM 字节码执行实例分析</title><link>https://blog.xiaohansong.com/posts/tech-notes/java-bytecode/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/java-bytecode/</guid><description>前言 最近在看《Java 虚拟机规范》和《深入理解JVM虚拟机》，对于字节码的执行有了进一步的了解。字节码就像是汇编语言，是 JVM 的指令集。下面我们先对 JVM 执行引擎做一下简单介绍，然后根据实例分析 JVM 字节码的执行过程。包括： 1. for 循环字节码分析 2. try catch f...</description><pubDate>Tue, 26 Apr 2016 03:11:29 GMT</pubDate><category>技术笔记</category><category>Java</category><category>JVM</category></item><item><title>【译】JVM 进行线程同步背后的原理</title><link>https://blog.xiaohansong.com/posts/tech-notes/jvm-synchronized/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/jvm-synchronized/</guid><description>本文翻译自[How the Java virtual machine performs thread synchronization][1]，内容略有删改 前言 所有的 Java 程序都会被翻译为包含字节码的 class 文件，字节码是 JVM 的机器语言。这篇文章将阐述 JVM 是如何处理线程同步...</description><pubDate>Sat, 23 Apr 2016 02:50:37 GMT</pubDate><category>技术笔记</category><category>synchronized</category><category>并发</category></item><item><title>三言两语：SQL 连接（join）</title><link>https://blog.xiaohansong.com/posts/tech-notes/sql-join/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/sql-join/</guid><description>前言 本文将从连接的理论和语法讲起，结合具体的例子，详细分析 SQL 连接。 之前对数据库的连接操作似懂非懂，大概知道是什么东西，但是面试笔试的时候被虐成渣，讲不清连接到底是什么。吃一堑，长一智。这就是所谓的似懂非懂， 只是单纯的看书是没用的，只有亲自动手做实验才能彻底理解什么是连接。 连接类型与条...</description><pubDate>Thu, 14 Apr 2016 13:52:59 GMT</pubDate><category>技术笔记</category><category>MySQL</category><category>join</category></item><item><title>Hiho 1289 403 Forbidden（微软编程题）</title><link>https://blog.xiaohansong.com/posts/tech-notes/forbidden/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/forbidden/</guid><description>题意 allow 1.2.3.4/30 deny 1.1.1.1 allow 127.0.0.1 allow 123.234.12.23/3 deny 0.0.0.0/0 输入 ip 按顺序匹配规则，优先匹配前面的规则，如果没有规则可以匹配则视为合法。注意：掩码为 0 的时候表示匹配所有 ip。 思...</description><pubDate>Sat, 09 Apr 2016 08:10:40 GMT</pubDate><category>技术笔记</category><category>字典树</category><category>Trie</category></item><item><title>Java String 对 null 对象的容错处理</title><link>https://blog.xiaohansong.com/posts/tech-notes/null-in-java-string/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/null-in-java-string/</guid><description>前言 最近在读《Thinking in Java》，看到这样一段话： Primitives that are fields in a class are automatically initialized to zero, as noted in the Everything Is an Objec...</description><pubDate>Sun, 13 Mar 2016 09:10:24 GMT</pubDate><category>技术笔记</category><category>Java</category><category>String</category></item><item><title>访问 NULL 指针错误背后的原理</title><link>https://blog.xiaohansong.com/posts/tech-notes/dereference-null/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/dereference-null/</guid><description>前言 说到 NULL 指针大家都是谈之色变，第一印象就是 NullPointerException, Segmentation fault 之类的错误。NULL 指针大部分情况下会导致程序被终止。但是其实严格来说，访问空指针会产生不可预料的结果。只不过大部分情况是程序被终止。为什么呢？接下来让我们来...</description><pubDate>Thu, 18 Feb 2016 14:50:43 GMT</pubDate><category>技术笔记</category><category>Linux</category></item><item><title>对抽象类与接口的一点思考</title><link>https://blog.xiaohansong.com/posts/tech-notes/abstract-class-and-interface/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/abstract-class-and-interface/</guid><description>前言 之前写了一篇文章 [简洁代码之道（1）：用多态替代条件语句][1]，有人问实现多态的时候为什么用抽象类而不是接口。当时写文章的时候并没有想到这个问题。后来仔细想想，这的确是个值得探讨的问题。多态可以用抽象类或者接口实现，重点是应该用哪个？更大问题是，接口和抽象类有什么本质的区别？下面我们将讨论...</description><pubDate>Wed, 02 Dec 2015 13:55:47 GMT</pubDate><category>技术笔记</category><category>编程实践</category></item><item><title>简洁代码之道（2）：避免全局可变状态</title><link>https://blog.xiaohansong.com/posts/tech-notes/avoid-global-state/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/avoid-global-state/</guid><description>前言 本文是我看了 [谷歌简洁代码演讲系列][1] 中的 [全局状态与单例模式][2] 之后的总结。本文的主题是：避免全局可变状态。下面我们将围绕几个问题开展讨论： 什么是全局状态 如何设计好的单例模式 如何设计好的 API 全局状态 什么是全局状态 Talk is cheap, show me t...</description><pubDate>Mon, 30 Nov 2015 07:42:41 GMT</pubDate><category>技术笔记</category><category>编程实践</category><category>设计</category></item><item><title>简洁代码之道（1）：用多态替代条件语句</title><link>https://blog.xiaohansong.com/posts/tech-notes/clean-code-polymorphism/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/clean-code-polymorphism/</guid><description>前言 本文是我看了 [谷歌简洁代码演讲系列][1] 中的 [多态和条件语句][2] 的总结。大部分的条件语句是可以用多态代替的，本文将围绕以下问题开展： 为什么要用多态替代条件语句 多态和条件语句的使用场景 如何用多态代替条件语句 在哪里决定要创建什么子类 什么情况下使用多态 为什么要用多态替代条件...</description><pubDate>Tue, 24 Nov 2015 07:54:43 GMT</pubDate><category>技术笔记</category><category>设计</category><category>编程实践</category></item><item><title>控制反转（IoC）与依赖注入（DI）</title><link>https://blog.xiaohansong.com/posts/tech-notes/ioc-and-di/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/ioc-and-di/</guid><description>前言 最近在学习Spring框架，它的核心就是IoC容器。要掌握Spring框架，就必须要理解控制反转的思想以及依赖注入的实现方式。下面，我们将围绕下面几个问题来探讨控制反转与依赖注入的关系以及在Spring中如何应用。 什么是控制反转？ 什么是依赖注入？ 它们之间有什么关系？ 如何在Spring框...</description><pubDate>Wed, 21 Oct 2015 13:39:57 GMT</pubDate><category>技术笔记</category><category>IoC</category><category>DI</category><category>Java</category></item><item><title>Linux内存寻址之分页机制</title><link>https://blog.xiaohansong.com/posts/tech-notes/linux%E5%86%85%E5%AD%98%E5%AF%BB%E5%9D%80%E4%B9%8B%E5%88%86%E9%A1%B5%E6%9C%BA%E5%88%B6/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/linux%E5%86%85%E5%AD%98%E5%AF%BB%E5%9D%80%E4%B9%8B%E5%88%86%E9%A1%B5%E6%9C%BA%E5%88%B6/</guid><description>在上一篇文章[Linux内存寻址之分段机制][1]中，我们了解逻辑地址通过分段机制转换为线性地址的过程。下面，我们就来看看更加重要和复杂的分页机制。 分页机制在段机制之后进行，以完成线性—物理地址的转换过程。段机制把逻辑地址转换为线性地址，分页机制进一步把该线性地址再转换为物理地址。 硬件中的分页 ...</description><pubDate>Mon, 05 Oct 2015 04:51:06 GMT</pubDate><category>技术笔记</category><category>Linux</category></item><item><title>Linux内存寻址之分段机制</title><link>https://blog.xiaohansong.com/posts/tech-notes/linux%E5%86%85%E5%AD%98%E5%AF%BB%E5%9D%80%E4%B9%8B%E5%88%86%E6%AE%B5%E6%9C%BA%E5%88%B6/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/linux%E5%86%85%E5%AD%98%E5%AF%BB%E5%9D%80%E4%B9%8B%E5%88%86%E6%AE%B5%E6%9C%BA%E5%88%B6/</guid><description>前言 最近在学习Linux内核，读到《深入理解Linux内核》的内存寻址一章。原本以为自己对分段分页机制已经理解了，结果发现其实是一知半解。于是，查找了很多资料，最终理顺了内存寻址的知识。现在把我的理解记录下来，希望对内核学习者有一定帮助，也希望大家指出错误之处。 分段到底是怎么回事 相信学过操作系...</description><pubDate>Sat, 03 Oct 2015 05:56:31 GMT</pubDate><category>技术笔记</category><category>Linux</category></item><item><title>ucore实验之操作系统启动流程</title><link>https://blog.xiaohansong.com/posts/tech-notes/ucore%E5%AE%9E%E9%AA%8C%E4%B9%8B%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E6%B5%81%E7%A8%8B/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/ucore%E5%AE%9E%E9%AA%8C%E4%B9%8B%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E6%B5%81%E7%A8%8B/</guid><description>前言 本文基于 ucore 操作系统实验,简要分析操作系统的启动流程. ucore 操作系统是清华大学用于操作系统教学实验的OS，参考了 MIT 的 JOS，哈佛的 OS161 以及 Linux 系统。我们可以通过这个迷你操作系统在代码层面上理解操作系统的思想。 [ucore labs][1] wa...</description><pubDate>Fri, 02 Oct 2015 08:02:05 GMT</pubDate><category>技术笔记</category><category>操作系统</category><category>ucore</category></item><item><title>Linux 平台下阅读源码的工具</title><link>https://blog.xiaohansong.com/posts/tech-notes/linux%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%E5%B7%A5%E5%85%B7%E9%93%BE/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/linux%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%E5%B7%A5%E5%85%B7%E9%93%BE/</guid><description>前言 看源代码是一个程序员必须经历的事情,也是可以提升能力的一个捷径.个人认为: 要完全掌握一个软件的方法只有阅读源码 在Windows下有sourceinsight这个源码阅读软件(虽然我没用过,但是网上评价还不错),由于我是个Linuxer,并不喜欢用Windows,所以自然是选择在Linux下...</description><pubDate>Mon, 24 Aug 2015 02:02:11 GMT</pubDate><category>技术笔记</category><category>Linux</category><category>源代码分析</category></item><item><title>spice源码分析之server(1)</title><link>https://blog.xiaohansong.com/posts/tech-notes/spice%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%E4%B9%8Bserver-1/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/spice%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%E4%B9%8Bserver-1/</guid><description>前言:本文是结合我自己阅读代码的心得总结而来,同时会忽略很多细节,只能作为阅读源码时的参考.如有错误,欢迎指正. Spice简介 Spice是一个开源的云计算解决方案，使客户端能显示远程虚拟主机的操作界面并且使用其设备，如键盘，鼠标，声音等。Spice给用户提供了一种如同操作本地机器一样的体验，同时...</description><pubDate>Wed, 19 Aug 2015 07:36:41 GMT</pubDate><category>技术笔记</category><category>spice</category></item><item><title>理解链接之链接的基本概念</title><link>https://blog.xiaohansong.com/posts/tech-notes/%E9%93%BE%E6%8E%A5%E7%9A%84%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/%E9%93%BE%E6%8E%A5%E7%9A%84%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/</guid><description>前言 我们知道，开发程序的基本流程是：设计 代码编写 编译 链接 执行 每一个步骤展开都是一个很大的课题，链接是一个被人忽略的课题，因为它并不是很复杂，相对于编译来说它还是比较简单的，但是并不代表它不重要。 现在编译链接的环节基本上由IDE帮助我们完成了，于是我们很少关注编译链接。虽然说不懂编译链接...</description><pubDate>Sun, 19 Jul 2015 05:29:13 GMT</pubDate><category>技术笔记</category><category>链接</category></item><item><title>桌面虚拟化传输协议之android spice</title><link>https://blog.xiaohansong.com/posts/tech-notes/%E6%A1%8C%E9%9D%A2%E8%99%9A%E6%8B%9F%E5%8C%96%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE%E4%B9%8Bandroid-spice/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/%E6%A1%8C%E9%9D%A2%E8%99%9A%E6%8B%9F%E5%8C%96%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE%E4%B9%8Bandroid-spice/</guid><description>背景 云计算是目前计算机领域的一个热门领域，桌面虚拟化是其中的一个重要应用，即把桌面系统在服务器端虚拟化，然后通过传输协议传输数据到客户端来实现桌面虚拟化，这样的好处就在于不管用什么设备，只要通过客户端都可以访问到云端的系统，随时随地都可以在一个系统上工作。 目前有两大标准的桌面传输协议，分别是RB...</description><pubDate>Thu, 16 Jul 2015 04:46:15 GMT</pubDate><category>技术笔记</category><category>虚拟化</category><category>spice</category></item><item><title>算法学习之减治法(decrease and conquer)</title><link>https://blog.xiaohansong.com/posts/tech-notes/%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E4%B9%8B%E5%87%8F%E6%B2%BB%E6%B3%95-decrease-and-conquer/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E4%B9%8B%E5%87%8F%E6%B2%BB%E6%B3%95-decrease-and-conquer/</guid><description>什么是分治法 减治技术利用了一个问题给定实例的解和同样问题较小实例的解之间的某种关系。一旦建立了这种关系，就可以从顶至下递归的来用该关系，也可以从底至上非递归的来运用该关系： 1. 减去一个常量 2. 减去一个常量因子 3. 减去的规模是可变的 分治法例子 减去一个常量 拓扑排序 定义 定义：将有向...</description><pubDate>Mon, 22 Jun 2015 02:55:13 GMT</pubDate><category>技术笔记</category><category>算法</category><category>减治法</category></item><item><title>算法学习之分治法(divide and conquer)</title><link>https://blog.xiaohansong.com/posts/tech-notes/%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E4%B9%8B%E5%88%86%E6%B2%BB%E6%B3%95-divide-and-conquer/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E4%B9%8B%E5%88%86%E6%B2%BB%E6%B3%95-divide-and-conquer/</guid><description>什么是分治法 字面上的解释是“分而治之”，就是把一个复杂的问题分成两个或更多的相同或相似的子问题，直到最后子问题可以简单的直接求解，原问题的解即子问题的解的合并。 解决问题的流程 分治法适用情况 分治法所能解决的问题一般具有以下几个特征： 1. 该问题的规模缩小到一定的程度就可以容易地解决 2. 该...</description><pubDate>Thu, 18 Jun 2015 10:50:50 GMT</pubDate><category>技术笔记</category><category>分治法</category><category>算法</category></item><item><title>算法学习之暴力求解(brute force)</title><link>https://blog.xiaohansong.com/posts/tech-notes/%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E4%B9%8B%E6%9A%B4%E5%8A%9B%E6%B1%82%E8%A7%A3-brute-force/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E4%B9%8B%E6%9A%B4%E5%8A%9B%E6%B1%82%E8%A7%A3-brute-force/</guid><description>暴力求解(brute force) Brute force is a straightforward approach to solving a problem, usually directly based on the problem statement and definitions of t...</description><pubDate>Thu, 18 Jun 2015 08:53:51 GMT</pubDate><category>技术笔记</category><category>暴力求解</category><category>算法</category></item><item><title>算法学习之算法基本概念</title><link>https://blog.xiaohansong.com/posts/tech-notes/%E7%AE%97%E6%B3%95%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/%E7%AE%97%E6%B3%95%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/</guid><description>算法的定义 An algorithm is a sequence of unambiguous instructions for solving a problem 即算法是解决问题的无二义性的指令序列.简单说就是用来解决问题步骤. 算法设计及实现流程 重要的问题类型 Sorting Searchi...</description><pubDate>Thu, 18 Jun 2015 08:18:24 GMT</pubDate><category>技术笔记</category><category>算法</category></item><item><title>用hexo搭建github博客</title><link>https://blog.xiaohansong.com/posts/tech-notes/%E7%94%A8hexo%E6%90%AD%E5%BB%BAgithub%E5%8D%9A%E5%AE%A2/</link><guid isPermaLink="true">https://blog.xiaohansong.com/posts/tech-notes/%E7%94%A8hexo%E6%90%AD%E5%BB%BAgithub%E5%8D%9A%E5%AE%A2/</guid><description>背景 搭建环境:Linux,nodejs,npm,git 现在网上已经有很多关于搭建hexo github博客的文章,我自己也是参考别人的文章过来的,但是现在hexo已经到了3.0版本,很多教程都过时了,而且感觉他们教程的思路着重于怎么做,并没有说明背后的原因,所以我希望写一篇着重于 为什么 ,而不...</description><pubDate>Wed, 17 Jun 2015 02:14:18 GMT</pubDate><category>技术笔记</category><category>hexo</category><category>github</category></item></channel></rss>