摘要: 环境前提: centos 6.5 x64 jdk 1.8 elasticsearch 6.1.4 logstash 6.1.4 kibana 6.1.4 mysql 5.x 保证上面软件已经安装,并且正常启动。 1.配置logstash 脚本 表结构如下: 2.启动运行 ./logstash -f 阅读全文
posted @ 2018-04-19 16:34 高峰mobile 阅读(4535) 评论(1) 推荐(0) 编辑
摘要: 插入排序算法插入算法的基本流程假设有n个数,左边是已经排好序的,右边是没进行排序的。设数组有n个元素,下标从第二个元素开始和左边的元素开始比较,后面依次下标递增,最后让左边的元素都排序完成。下面是JAVA代码的实现:public interface Sort { public void sort(i... 阅读全文
posted @ 2016-01-04 21:42 高峰mobile 阅读(194) 评论(0) 推荐(0) 编辑
摘要: Universal imageloader 的代码并不复杂 重点是缓存,线程池任务下面都用UML图进行了绘制基本使用流程就是 初始化配置,设置Options参数,最后Dispaly提交下载 public static void initImageLoader(Context context) ... 阅读全文
posted @ 2015-12-29 22:02 高峰mobile 阅读(546) 评论(0) 推荐(0) 编辑
摘要: https://github.com/nostra13/Android-Universal-Image-Loaderuniversal imageloader 源码研究之Lru算法LRU - Least Recently Used 最近最少使用算法字面意思就是在数据队列里面 最少使用的优先移除,腾出... 阅读全文
posted @ 2015-12-29 15:03 高峰mobile 阅读(324) 评论(0) 推荐(0) 编辑
摘要: LayoutInflater大家很熟悉,简单点说就是布局文件XML解析器,setContentView函数也是调用了LayoutInflater 用法: View view = LayoutInflater.from(this).inflate(R.layout.activity_main, nul... 阅读全文
posted @ 2015-11-13 13:35 高峰mobile 阅读(2237) 评论(0) 推荐(0) 编辑
摘要: 一般情况下数据都是有CPU从RAM取数据 然后传给GPU去处理,相对于GPU速度要慢一些。使用VBO技术 可以把数据存储到GPU的内存空间中,这样GPU可以直接从GPU的内存中取得数据进行处理 速度会提升很多。使用VBO,主要有3个函数glGenBuffers() 申请缓冲对象glBindBuffe... 阅读全文
posted @ 2015-11-07 12:56 高峰mobile 阅读(3137) 评论(0) 推荐(1) 编辑
摘要: OpenGL ES 3.0顶点 -1, 1, 0, -0.5f, 0, 0, 0, -1, 0, -1, 0, 0,0.5f, 0, 0, 1, -1, 0顶点设置成了大小20 public static final String vertex3 = ... 阅读全文
posted @ 2015-11-06 16:27 高峰mobile 阅读(3060) 评论(1) 推荐(0) 编辑
摘要: 打开Document UI 过滤图片 private void startAcitivty() { Intent intent = new Intent(); intent.setAction("android.intent.action.GET_CONTENT")... 阅读全文
posted @ 2015-11-06 13:16 高峰mobile 阅读(1714) 评论(0) 推荐(0) 编辑
摘要: 本文主要演示OpenGL ES 3.0 纹理演示。接口大部分和2.0没什么区别,脚本稍微有了点变化而已。扩展GLSurfaceViewpackage com.example.gles300;import android.app.ActivityManager;import android.conte... 阅读全文
posted @ 2015-11-06 10:10 高峰mobile 阅读(6219) 评论(0) 推荐(1) 编辑