为什么Disruptor不使用队列来实现RingBuffer 队列有两个指针,一个指向队头,一个指向队尾。如果有超过一个生产者想要往队列里放东西,尾指针就将成为一个冲突点,因为有多个线程要更新它。如果有多个消费者,那么头指针就会产生竞争,因为元素被消费之后,需要更新指针,所以不仅有读操作还有写操作了 ...
分类:
其他 时间:
2016-08-19 13:16:11
收藏:
0 评论:
0 赞:
0 阅读:
190
For example, I want to install EP prj template: AxWebProject.zip Copy AxWebProject.zip zip file into this folder C:\Program Files\Microsoft Visual Stu... ...
分类:
其他 时间:
2016-08-19 13:16:01
收藏:
0 评论:
0 赞:
0 阅读:
185
...
分类:
移动平台 时间:
2016-08-19 13:15:51
收藏:
0 评论:
0 赞:
0 阅读:
242
在2014年 Google在support Design 包中发布了一些新空间,今天就来学习下TabLayout。 TabLayout 配合ViewPager 和Fragment可以帮组开发者快速打造一个滑动标签页。TabLayout会有2种使用场景,一个顶部标签页,比如新闻类的头条,搜狐新闻,还有 ...
分类:
其他 时间:
2016-08-19 13:15:41
收藏:
0 评论:
0 赞:
0 阅读:
398
一个完整的preparedstatement的例子:package jstarproject;import java.sql.*;public class mypreparedstatement {private final string db_driver="com.microsoft.jdbc. ...
分类:
其他 时间:
2016-08-19 13:15:31
收藏:
0 评论:
0 赞:
0 阅读:
162
STL 一、vector动态数组 1 包含头函数 #include<vector> 2 函数的声明: vector<int> v; vector<int> v[maxn]; vector<int> v(100,1); //100个1 3 操作常用: v.push_back(x); 在最后添加一个元素 ...
分类:
其他 时间:
2016-08-19 13:15:21
收藏:
0 评论:
0 赞:
0 阅读:
133
/*p标签自动换行*/ p{ word-wrap:break-word; word-break:normal; } /*p强制不换行*/ p{ white-space:nowrap; } /*块级元素强制英文单词断行*/ p{ word-break:break-all; } ...
分类:
Web开发 时间:
2016-08-19 13:15:11
收藏:
0 评论:
0 赞:
0 阅读:
189
总结一下这两天学习的Android注入so文件,通过遍历got表hook函数调用 1.注入so文件 2.so文件中遍历got表hook函数 一.注入so文件 分为以下几个步骤 1.每个进程都在/proc目录下,以进程id为文件夹名,所以可以通过/proc/id/cmdline文件中中读取进程名称,和 ...
分类:
移动平台 时间:
2016-08-19 13:15:01
收藏:
0 评论:
0 赞:
0 阅读:
451
1.第一步先按照 Package Control,具体步骤自行百度,Google。 2. view in browser 默认的快捷键应该是这样的,我用的是IE浏览器。所以ctrl+alt+i 即可让html 文件在浏览器上预览。 如果想要自定义快捷键的话,可以在setting 里自己设定ueser ...
分类:
Web开发 时间:
2016-08-19 13:14:51
收藏:
0 评论:
0 赞:
0 阅读:
208
题目链接: http://poj.org/problem?id=3061 Description A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a po ...
分类:
其他 时间:
2016-08-19 13:14:21
收藏:
0 评论:
0 赞:
0 阅读:
209
有时启动应用时会发现端口已经被占用,或者是感觉有些端口自己没有使用却发现是打开的。这时我们希望知道是哪个应用/进程在使用该端口。 CentOS下可以用netstat或者lsof查看,Windows下也可以用netstat查看,不过参数会不同 Linux: netstat -nap #会列出所有正在使 ...
分类:
系统服务 时间:
2016-08-19 13:14:11
收藏:
0 评论:
0 赞:
0 阅读:
284
题目链接: http://codeforces.com/problemset/problem/670/A Description On the planet Mars a year lasts exactly n days (there are no leap years on Mars). But ...
分类:
其他 时间:
2016-08-19 13:13:41
收藏:
0 评论:
0 赞:
0 阅读:
151
从官网下载相对而言比较干净的源码版本http://w1.fi/hostapd/,然后将其移植到openwrt下,方便在源码阅读时候进行调试编译,移植的过程总结如下心得。 1. openwrt编译与clean均会先读取buildroot根目录下的.config文件,以确认哪些软件包与选项需要编译与清除 ...
分类:
其他 时间:
2016-08-19 13:13:31
收藏:
0 评论:
0 赞:
0 阅读:
236
1. console.time('main');//代码计时器//不断循环阻塞了代码的执行for(var i=0;i<10000000;i++){}console.timeEnd('main');console.log("完成执行了"); ...
分类:
Web开发 时间:
2016-08-19 13:13:21
收藏:
0 评论:
0 赞:
0 阅读:
195
昨天项目中,由于要请求token验证,后台给出的方案是采用请求头返回token数据,给出的API文档是这样的 由于之前一直都是采用请求体发送请求,服务器在应答体李返回数据。和这个不一样; 采用jq的$.ajax()函数发送请求,代码如下 这样写正确,能够正确发送请求,也能正常收到response h ...
分类:
Web开发 时间:
2016-08-19 13:13:01
收藏:
0 评论:
0 赞:
0 阅读:
188
1、创建简单应用: from flask import Flaskapp = Flask(__name__) @app.route('/')def hello_world(): return ''' <h1>Home Page<h1> <ul> <li><a href="/music">Music< ...
分类:
其他 时间:
2016-08-19 13:12:51
收藏:
0 评论:
0 赞:
0 阅读:
190
Given a string, find the length of the longest substring T that contains at most 2 distinct characters. For example, Given s = “eceba”, T is "ece" whi ...
分类:
其他 时间:
2016-08-19 13:12:43
收藏:
0 评论:
0 赞:
0 阅读:
127
For this problem we need to sort the array into three parts namely with three numbers standing for three different colors. Currently, the method in mi ...
分类:
其他 时间:
2016-08-19 13:12:31
收藏:
0 评论:
0 赞:
0 阅读:
160
Iptables 是用来设置、维护和检查Linux内核的IP包过滤规则的。 可以定义不同的表,每个表都包含几个内部的链,也能包含用户定义的链。每个链都是一个规则列表,对对应的包进行匹配:每条规则指定应当如何处理与之相匹配的包。这被称作'target'(目标),也可以跳向同一个表内的用户定义的链。 T ...
分类:
系统服务 时间:
2016-08-19 13:12:01
收藏:
0 评论:
0 赞:
0 阅读:
274
题目背景 HNSDFZ的同学们为了庆祝春节,准备排练一场舞会。 题目描述 在越来越讲究合作的时代,人们注意的更多的不是个人物的舞姿,而是集体的排列。 为了配合每年的倒计时,同学们决定排出——“数字舞蹈”。顾名思义就是所有人一起排成若干个数字 -___-|||| 更为创新的是,每个人都是趴在地上,保证 ...
分类:
其他 时间:
2016-08-19 13:11:41
收藏:
0 评论:
0 赞:
0 阅读:
194