11 2017 档案

从一整数数组中找出只重复一次的两个数
摘要:概述 有一整数数组,所有数都重复了两次,只有两个数重复了一次,找出这两个数,要求空间复杂度为O(1),时间复杂度O(n) 代码 阅读全文

posted @ 2017-11-16 10:16 李雷 阅读(245) 评论(0) 推荐(0)

Edit Distance 最小编辑距离
摘要:概述 Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You ha 阅读全文

posted @ 2017-11-16 09:35 李雷 阅读(183) 评论(0) 推荐(0)

求和数组项值,使其等于某个目标值
摘要:描述 Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same rep 阅读全文

posted @ 2017-11-15 17:15 李雷 阅读(758) 评论(0) 推荐(0)

求数组三项之和最接近某个目标数字
摘要:描述 Given an array S of n integers, find three integers in S such that the sum is closest toa given number, target. Return the sum of the three integer 阅读全文

posted @ 2017-11-15 13:57 李雷 阅读(361) 评论(0) 推荐(0)

一步一步本地化部署mapbox-gl
摘要:概述 本文旨在从无到erverything的部署一套在线可视化的矢量地图,当然是依赖于mapbox-gl,物理流程图如下: 条件 js方面: 1、mapbox-gl-dev.js,参考http://www.cnblogs.com/lilei2blog/p/7827110.html 2、字体符号,参考 阅读全文

posted @ 2017-11-15 12:04 李雷 阅读(7976) 评论(0) 推荐(1)

快速排序
摘要:概述 快速的升序排列(注意边界) 代码 阅读全文

posted @ 2017-11-15 09:40 李雷 阅读(174) 评论(0) 推荐(0)

合并排序
摘要:概述 合并的升序排列 代码 阅读全文

posted @ 2017-11-14 15:51 李雷 阅读(143) 评论(0) 推荐(0)

冒泡排序
摘要:概述 冒泡升序排列 代码 阅读全文

posted @ 2017-11-14 15:36 李雷 阅读(158) 评论(0) 推荐(0)

选择排序
摘要:概述 选择的升序排列 代码 阅读全文

posted @ 2017-11-14 15:21 李雷 阅读(109) 评论(0) 推荐(0)

插入排序
摘要:概述 递增方式插入排序 代码 阅读全文

posted @ 2017-11-14 15:12 李雷 阅读(128) 评论(0) 推荐(0)

使用java生成mapbox-gl可读的vector tile
摘要:概述 mapbox-gl主要数据源来自mapbox vector tile,本文就是要阐述怎样把postgresql中的地理空间数据转换成vector tile,流程图如下: 配置 该工程采用spring boot+maven,所以第一步少不了pom.xml配置: 添加墨卡托投影转换工具类: 核心内 阅读全文

posted @ 2017-11-14 09:42 李雷 阅读(7574) 评论(3) 推荐(0)

mapbox-gl象形文字字体glyph生成
摘要:简介 mapbox-gl可以对文字显示各种字体(依赖ttf文件),内部采用的是读取protobuf文件 环境条件 硬件:mac、网络 软件:nodejs、npm 创建mapbox-gl可用的字体protobuf 1、下载node-fontnik:https://github.com/mapbox/n 阅读全文

posted @ 2017-11-13 17:18 李雷 阅读(2115) 评论(0) 推荐(0)

mapbox-gl 开发包dev生成
摘要:mapbox-gl简介 mapbox-gl采用webgl,提供在线地图实时渲染功能,具有以下特点: 1、多图层显示 2、图层元素显示样式在颜色、字体、大小范围等、是否显示等可实时更改 3、定位抓取选择的元素内容 4、由于mapbox-gl采用了webgl矢量实时渲染,在瓦片等级更改时,没有明显的过度 阅读全文

posted @ 2017-11-13 17:05 李雷 阅读(2134) 评论(0) 推荐(0)

postgis几何操作函数集
摘要:管理操作函数 几何构造器 几何属性查看 几何编辑 几何输出 几何操作 地理关系测量 几何处理 http://postgis.net/docs/reference.html 阅读全文

posted @ 2017-11-10 16:21 李雷 阅读(2621) 评论(0) 推荐(0)

postgis常用操作手册
摘要:查询所有函数: SELECT * FROM pg_proc; 更新坐标系st_setsrid,查看坐标系:st_srid 创建空间索引: 如果不使用空间索引执行计划: 两个geometry之间关系:within、disjoint、intersects、union、intersection,diffe 阅读全文

posted @ 2017-11-10 15:32 李雷 阅读(8031) 评论(0) 推荐(0)

wkt转换geojson
摘要:应用配置 程序 阅读全文

posted @ 2017-11-10 10:43 李雷 阅读(9338) 评论(1) 推荐(0)

最大堆排序
摘要:package com.lilei.geotools.app_geotools; import java.util.Random; public class MaxHeapSort { public static void main(String[] args) { int[] array = new int[10000000]; for (int i = 0; i 0; ... 阅读全文

posted @ 2017-11-10 09:15 李雷 阅读(150) 评论(0) 推荐(0)

maven构建geotools应用工程
摘要:前置条件 jdk1.7+eclipse+maven POM配置 程序 阅读全文

posted @ 2017-11-09 15:51 李雷 阅读(1813) 评论(0) 推荐(0)

eclipse构建maven+scala+spark工程
摘要:前提条件 下载安装Scala IDE build of Eclipse SDK 构建工程 1、新建maven工程 2、配置项目信息 3、新建scala对应的Source Folder 4、添加scala对应Archetype 5、配置pom.xml添加依赖包 到此项目部署配置完成。 运行scala程 阅读全文

posted @ 2017-11-09 10:38 李雷 阅读(336) 评论(0) 推荐(0)

mapreduce解析执行sql流程
摘要:样例准备 条件过滤 sql:select * from student where sex='male'; mr:该操作属于比较简单的操作,直接在map阶段对数据进行过滤操作即可。 分组统计 sql:select class_name,count(*) from student group by c 阅读全文

posted @ 2017-11-08 16:15 李雷 阅读(721) 评论(0) 推荐(0)

Container With Most Water 容器最大水容量
摘要:描述 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two en 阅读全文

posted @ 2017-11-08 14:10 李雷 阅读(493) 评论(0) 推荐(0)

socket阻塞IO流程图
摘要:单线程 多线程 阅读全文

posted @ 2017-11-08 13:42 李雷 阅读(290) 评论(1) 推荐(0)

java非阻塞IO(NIO)流程
摘要:单线程 多线程(Netty/Mina) 阅读全文

posted @ 2017-11-08 13:04 李雷 阅读(589) 评论(0) 推荐(0)

依赖注入优缺点分析
摘要:背景 项目开发要求: 1、增加程序重用 2、模块功能单一 3、方便测试 4、需求变更,减少程序开发 实际应用场景 以两种日志记录和数据库使用两种场景来分析 1、日志记录:有时需要调试分析,需要记录日志信息,这时可以采用输出到控制台、文件、数据库、远程服务器等;假设最初采用输出到控制台,直接在程序中实 阅读全文

posted @ 2017-11-08 11:00 李雷 阅读(7471) 评论(0) 推荐(1)

全排列Permutations
摘要:描述 Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3 阅读全文

posted @ 2017-11-08 10:05 李雷 阅读(213) 评论(0) 推荐(0)

Generate Parentheses
摘要:描述 Given n pairs of parentheses, write a function to generate all combinations of wellformed parentheses.For example, given n = 3, a solution set is:" 阅读全文

posted @ 2017-11-07 16:27 李雷 阅读(164) 评论(0) 推荐(0)

elasticsearch地理空间操作简单操作
摘要:创建索引库 录入数据 范围查询 阅读全文

posted @ 2017-11-07 16:02 李雷 阅读(328) 评论(0) 推荐(0)

elastic-search单机部署以及中文分词IKAnalyzer安装
摘要:前提条件 elasticsearch使用版本5.6.3,需要jdk版本1.8,低于该版本不能使用 下载 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.3.zip 启动 1、进入目录C:\test\es\e 阅读全文

posted @ 2017-11-07 15:26 李雷 阅读(299) 评论(0) 推荐(0)

spring boot一个简单用户管理DEMO
摘要:概述 该Demo旨在部署一个简单spring boot工程,包含数据编辑和查看功能 POM配置 属性配置 工程结构图 核心代码 dao层 dao实现层 控制器 阅读全文

posted @ 2017-11-06 16:38 李雷 阅读(1754) 评论(2) 推荐(0)

通过geotools读写shp文件
摘要:依赖jar包 读取shp 写shp 阅读全文

posted @ 2017-11-06 11:12 李雷 阅读(1274) 评论(0) 推荐(0)

spring boot跨域设置
摘要:定义 跨域是指从一个域名的网页去请求另一个域名的资源 跨域背景 限制原因 如果一个网页可以随意地访问另外一个网站的资源,那么就有可能在客户完全不知情的情况下出现安全问题 为什么要跨域 公司内部有多个不同的子域,比如一个是location.company.com ,而应用是放在app.company. 阅读全文

posted @ 2017-11-06 10:51 李雷 阅读(1693) 评论(0) 推荐(0)

导航