### 1 何为持久化 redis 是内存数据库,掉电会丢失,转移数据不便。持久化就是内存数据到硬盘数据的转化。 当然,也可以硬盘到内存(备份的概念,保存,恢复)。 ### 2 怎么实现 两种方法:**快照方式(rdb)+日志...
分类:
其他 时间:
2015-03-30 16:39:51
收藏:
0 评论:
0 赞:
0 阅读:
183
网上看了一些资料但还是遇到不少问题。在这里记录一下 下载地址: https://github.com/sean-lin/protoc-gen-lua.git? 1. ?复制文件?protoc-gen-lua/protobuf/pb.c? 到?frameworks\cocos2d-x\external\lua\pro...
分类:
其他 时间:
2015-03-30 16:39:41
收藏:
0 评论:
0 赞:
0 阅读:
328
首先是一些术语的说明。MapReduce作业(job)是客户端执行的单位:它包括输入数据、MapReduce程序和配置信息。Hadoop通过把作业分成若干个小任务(task)来工作,其包括两种类型的任务:map任务和reduce任务。 有两种...
分类:
其他 时间:
2015-03-30 16:39:31
收藏:
0 评论:
0 赞:
0 阅读:
232
代码特点: 1.分页采集 2.数据限制采集 3.限制页数采集 4.编码自动转换为utf-8 5.相对地址转绝对地址 6.无限“下一页采集” 7.无限子规则采集 8.时间限制采集 9.自定义回调函数处理 详见:http://www.oschin...
分类:
其他 时间:
2015-03-30 16:38:51
收藏:
0 评论:
0 赞:
0 阅读:
233
解决办法:修改Info.plist中的Localization native development region为China,就可以显示中文的 参考: Change language used in copy/paste menu to something other than English...
分类:
其他 时间:
2015-03-30 16:38:31
收藏:
0 评论:
0 赞:
0 阅读:
530
添加"source /etc/profile" 到 ~./zshrc,输入zsh启动zsh就OK了,简单粗暴,my style ~ # User configuration export PATH="/usr/local/php/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:...
分类:
其他 时间:
2015-03-30 16:38:21
收藏:
0 评论:
0 赞:
0 阅读:
284
/** ?* 反射工具类 ?* @author Q470 ?* ?*/ public class ReflectUtil { /**? ? ? ?* 获得超类的参数类型,取第一个参数类型? ? ? ?* @param <T> 类型参数? ? ? ?* @param clazz 超类类型? ? ...
分类:
其他 时间:
2015-03-30 16:38:11
收藏:
0 评论:
0 赞:
0 阅读:
119
当使客户机禁止使用外网的时候:
virsh nwfilter-define drop.xml
drop.xml内容:
fce8ae34-e69e-83bf-262e-30786c1f8072
<ip srcipaddr='192.168.x.0' dstipadd...
分类:
其他 时间:
2015-03-30 16:36:41
收藏:
0 评论:
0 赞:
0 阅读:
360
在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络.
#运行用户
user www-data;
#启动进程,通常设置成和cpu的数量相等
worker_processes 1;
#全局错误日志及PID文件
error_log /var/log/nginx/error.log;
...
分类:
其他 时间:
2015-03-30 16:36:11
收藏:
0 评论:
0 赞:
0 阅读:
289
Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time
complexity should be O(log (m+n)).
解题...
分类:
其他 时间:
2015-03-30 16:35:51
收藏:
0 评论:
0 赞:
0 阅读:
203
eclipse 使用一段时间后,有时会因为一些故障自己就莫名奇妙的关闭了,再打开时有时没有问题,有时有会提示错误 Workspace Unavailable:
Workspace in use or cannot be created, choose a different one.
原因:出现这种情况一般是workspace的配置文件中出现了.lock文件(workspace...
分类:
其他 时间:
2015-03-30 16:35:31
收藏:
0 评论:
0 赞:
0 阅读:
217
前几天,有个同事问我怎么计算面图层的面积,我也是好久没做AE的事情了,简单的查了查,告诉他用IArea接口。到了下午,他的这个问题依旧没有解决,继续求助于我。我百度了下,没有找到相应的文章,于是我意识到这个简单的事情,可能对于很多接触AE不深的人,真的是非常难得事情。最难的可能是不知道怎么做,就像我的同事一样。我很快就告诉他用IArea接口,他却惊讶的问我“你怎么知道的?”,并说他也是查到“似乎是...
分类:
其他 时间:
2015-03-30 16:35:21
收藏:
0 评论:
0 赞:
0 阅读:
755
其实最没意思的数据结构就是这两个了,完完全全就是std::map和std::vector上面再加了一层引用计数。当然,这也有好处,就是支持std算法以及支持cocos2d-x的内存管理机制。
看源码可以知道(下均只对Map进行分析,Vector同理)
template
class Map
{
public:
// -----------------------------------...
分类:
其他 时间:
2015-03-30 16:34:51
收藏:
0 评论:
0 赞:
0 阅读:
232
布局非常简单。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="...
分类:
其他 时间:
2015-03-30 16:34:41
收藏:
0 评论:
0 赞:
0 阅读:
134
问题描述:
用eclipse编译程序,然后在android手机上运行,报错如下:
[2014-06-21 12:56:17 - xmobile17] Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE
[2014-06-21 12:56:17 - xmobile17] Please check logcat output fo...
分类:
其他 时间:
2015-03-30 16:34:11
收藏:
0 评论:
0 赞:
0 阅读:
167
EditText在代码中设置最大输入长度并设置为密码输入框...
分类:
其他 时间:
2015-03-30 16:34:01
收藏:
0 评论:
0 赞:
0 阅读:
280
Description
A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal lengt...
分类:
其他 时间:
2015-03-30 16:33:21
收藏:
0 评论:
0 赞:
0 阅读:
273
刚刚结束J2se的学习,在J2se中,提到了java的接口和抽象类,他们的功能类似,那么他们有什么区别呢?如何应用呢?我查询了很多资料,整理知识如下,如有错误,欢迎指正。
在Java语言中, abstract class 和interface 是支持抽象类定义的两种机制。正是由于这两种机制的存在,才赋予了Java强大的面向对象能力。abstract class和interfa...
分类:
其他 时间:
2015-03-30 16:33:01
收藏:
0 评论:
0 赞:
0 阅读:
239
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
题意:大数加法。
class Soluti...
分类:
其他 时间:
2015-03-30 16:32:31
收藏:
0 评论:
0 赞:
0 阅读:
127
Struts2国际化是建立在Java国际化的基础之上,一样也是通过提供不同国家/语言环境的消息资源,然后通过ResourceBundle加载指定Locale对应的资源文件,再取得该资源文件中指定key对应的消息——整个过程与Java程序的国家化完全相同,只是Struts2对Java程序国际化进一步封装,从而简化了应用程序的国际化。
Struts2中加载全局资源文件
通过在struts....
分类:
其他 时间:
2015-03-30 16:32:21
收藏:
0 评论:
0 赞:
0 阅读:
322