Articles

  • Libevent

    Introduction

    libevent is a software library that provides asynchronous event notification. The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, libevent also support callbacks due to signals or regular timeouts.

  • Moxile Support

    Help

    Moxile Help

    FAQ

    1. What are the supported math format?

      Moxile use MathJax for built-in math renderer, so all the math expression supported by MathJax should work with Moxile.

    2. How to custom specific element in the document?

      Markdown support embedded HTML element, so you could use style attribute of the HTML element to do that.

    For questions those not listed below, you may send mail to errpro@icloud.com for help.

    What’s New in Version 3.0.0

    New Features

    1. Redesign info panel to statistics panel
    2. Add optional statusbar support (View->show/hide statusbar)
    3. New designed QR Code generator
      1. and add some important functions like configure size and adjusting colors
      2. multiple correction levels select
      3. support save to local disk
      4. builtin share support
    4. New Designed Preferences UI
    5. Add theme compatible ability
      1. add import theme option
      2. import source support XCode themes now
    6. Add support link in the about panel and help menu

    Improvements

    1. editor syntax highlight performance improved by 46%
    2. render performance improved by 79%

    Bug Fixes

    1. cursor jump around sometimes
    2. some other bug fixes
  • Moxile Help

    Moxile, the missing Markdown editor designed for productivity. It comes with Live Preview. It offers full support for regular Markdown Syntax as well as Github flavored markdown extension.

  • C\C++ faux pas

    class Widget {...};	// 假设Widget有默认构造函数
    Widget w();		// 函数声明,而非变量定义
    

    这并没有声明一个叫做 w 的Widget,它声明了一个叫作 w 的没有参数且返回Widget的函数。学会识别这个失言 (faux pas) 是成为C++程序员的一个真正的通过仪式。

  • C++11

    This article describes the new features in the C++11 standards.

  • STL Iterator

    Table of Contents

    反向迭代器 (Reverse Iterator)

    定义

    反向迭代器 (Reverse Iterator) 是一种反向遍历容器的迭代器。也就是,从最后一个元素到第一个元素遍历容器。反向迭代器将自增(和自减)的含义反过来了:对于反向迭代器,++运算将访问前一个元素,而–运算则访问下一个元素。

    作用

    1. 反向迭代器需要使用自减操作符:标准容器上的迭代器 (reverse_iterator) 既支持自增运算,也支持自减运算。 但是,流迭代器由于不能反向遍历流,因此流迭代器不能创建反向迭代器。
    2. 可以通过 reverse_iterator::base() 将反向迭代器转换为普通迭代器使用,从逆序得到普通次序。 这是因为: 有些容器的成员函数只接受 iterator 类型的参数,所以如果你想要在 ri 所指的位置插入一个新元素,你不能直接这么做,因为 vector 的 insert 函数不接受 reverse_iterator。如果你想要删除 ri 所指位置上的元素也会有同样的问题。erase 成员函数会拒绝 reverse_iterator,坚持要求 iterator。 为了完成删除和一些形式的插入操作,你必须先通过 base 函数将 reverse_iterator 转换成 iterator,然后用 iterator 来完成工作。
  • udev persistent name

    Introduction

    This article describes the workflow about udev daemon.

  • MySQL Primer - Up and Running

    Introduction

    This article described the installation and service control of MySQL.

    [High Availability]:

  • Openconnect Used as an Alternative for Cisco Anyconnect

    Introduction

    Open client for Cisco AnyConnect VPN
    OpenConnect is a client for Cisco’s AnyConnect SSL VPN, which is supported by the ASA5500 Series, by IOS 12.4(9)T or later on Cisco SR500, 870, 880, 1800, 2800, 3800, 7200 Series and Cisco 7301 Routers, and probably others.

    Homepage http://www.infradead.org/openconnect/

    Install

    Ubuntu

    [will@ubuntu.vmg ~]$ sudo apt-get install network-manager-openconnect-gnome

    OS X

    homebrew openconnect.rb

    Configure

    Gateway: server address

  • C++ memory management

    因为你所编写的循环语句根本不能正确运行,所以当编译成可执行代码后,也不可能正常运行。语言规范中说通过一个基类指针来删除一个含有派生类对象的数组,结果将是不确定的。这实际意味着执行这样的代码肯定不会有什么好结果。多态和指针算法不能混合在一起来用,所以数组与多态也不能用在一起。

    C++中虚析构函数的作用--这样做是为了当用一个基类的指针删除一个派生类的对象时,派生类的析构函数会被调用。