码迷,mamicode.com
首页 > 其他好文
Redis源码分析(二十)--- ae事件驱动
事件驱动这个名词出现的越来越频繁了,听起来非常高大上,今天本人把Redis内部的驱动模型研究了一番,感觉收获颇丰啊。一个ae.c主程序,加上4个事件类型的文件,让你彻底弄清楚,Redis是如何处理这些事件的。在Redis的事件处理中,用到了epoll,select,kqueue和evport,evport可能大家会陌生许多。前面3个都是非常常见的事件,在libevent的事件网络库中也都有出现。作...
分类:其他好文   时间:2014-10-26 11:51:15    阅读次数:268
xml解析之----DOM解析
DOM模型(documentobject model) ?DOM解析器在解析XML文档时,会把文档中的所有元素,按照其出现的层次关系,解析成一个个Node对象(节点)。 ?在dom中,节点之间关系如下: ?位于一个节点之上的节点是该节点的父节点(parent) ?一个节点之下的节点是该节点的子节点(children) ?同一层次,具有相同父节点的节点是兄弟节点(sibling) ?一个节点的下一个层次的节点集合是节点后代(descendant)...
分类:其他好文   时间:2014-10-26 11:50:27    阅读次数:215
4.4、Libgdx使用方法查询运行环境相关属性
(原文:http://www.libgdx.cn/topic/46/4-4-libgdx%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95%E6%9F%A5%E8%AF%A2%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83%E7%9B%B8%E5%85%B3%E5%B1%9E%E6%80%A7) Application接口提供了多种方法查询运行环境的...
分类:其他好文   时间:2014-10-26 11:51:35    阅读次数:244
分布式事物的原理图
分布式事物两阶段提交原理图。 blog宗旨:用图说话。...
分类:其他好文   时间:2014-10-26 11:50:51    阅读次数:197
leetcode - Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the longest valid parentheses substring is "()", ...
分类:其他好文   时间:2014-10-26 11:49:43    阅读次数:185
【LeetCode】Longest Substring Without Repeating Characters 解题报告
【题意】 Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is...
分类:其他好文   时间:2014-10-26 11:49:53    阅读次数:203
HDU 5083 Instruction(字符串处理)
Problem Description Nowadays, Jim Green has produced a kind of computer called JG. In his computer, the instruction is represented by binary code. However when we code in this computer, we use some m...
分类:其他好文   时间:2014-10-26 11:49:22    阅读次数:357
桥接模式Bridge
桥接模式   时间...
分类:其他好文   时间:2014-10-26 11:50:04    阅读次数:259
4.5、Libgdx运行日志管理
(原文:http://www.libgdx.cn/topic/47/4-5-libgdx%E8%BF%90%E8%A1%8C%E6%97%A5%E5%BF%97%E7%AE%A1%E7%90%86) Application接口提供了简单的管理日志的方法。 日志的消息可以是info、error和debug。格式如下: Gdx.app.log("MyTag", "my informative ...
分类:其他好文   时间:2014-10-26 11:49:20    阅读次数:242
消息及消息队列
操作系统将每个事件都包装成一个称为消息的结构体MSG来传递给应用程序SG来传递给应用程序 typedef struct tagMSG { HWND hwnd; //句柄(HANDLE),资源的标识。 UINT message; //无符号的整型 WPARAM wParam; //整型,消息的附加信息 LPARAM lPara...
分类:其他好文   时间:2014-10-26 11:46:12    阅读次数:208
leetcode - Search in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value to search. If found in the array retur...
分类:其他好文   时间:2014-10-26 11:47:46    阅读次数:203
站在“巨人”的肩膀上运维
站在巨人的肩膀上运维,使用监控工具(如监控宝,Nagios等等)和通告工具(百度通告平台),实现自动化运维,让运维工程师能够从日常的基础运维中解放出来。...
分类:其他好文   时间:2014-10-26 11:47:57    阅读次数:213
取(2堆)石子游戏(杭电2177)
取(2堆)石子游戏 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1175    Accepted Submission(s): 706 Problem Description 有两堆石子,数量任意,可以不同。游...
分类:其他好文   时间:2014-10-26 11:45:19    阅读次数:206
深圳科陆集团软件开发笔试题
...
分类:其他好文   时间:2014-10-26 11:46:07    阅读次数:95
[leetcode]Pascal's Triangle II
问题描述: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to use only O(k) extra space? 思路: ...
分类:其他好文   时间:2014-10-26 11:46:08    阅读次数:251
SDUT OJ 2862 勾股定理
#include using namespace std; int a[1010]; void qsort(int a[],int l,int r) { int x=a[l],i=l,j=r; if(l>=r) return ; while(i<j) { while(i=x) j--; a[i]=a[j]; while(i<j&&a[i]<=x) i++; a[j]=a[...
分类:其他好文   时间:2014-10-26 11:45:37    阅读次数:282
程序集延迟签名-学习笔记
C# 项目延迟签名设置步骤详解...
分类:其他好文   时间:2014-10-26 11:45:22    阅读次数:227
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!