package main import ( "fmt" "math/rand" "sync" ) type SkipTable struct { maxHeight int head *Node comparator Comparator mu sync.RWMutex } type Node st Read More
posted @ 2020-02-26 16:58 梦醒心晴 Views(351) Comments(0) Diggs(0) Edit
1 问题:ERROR: bootstrap checks failed max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536] max number of t Read More
posted @ 2019-06-18 21:40 梦醒心晴 Views(1407) Comments(0) Diggs(0) Edit
package main import ( "errors" "fmt" "reflect" ) type State interface { Name() string EnableSameTransit() bool OnBegin() OnEnd() CanTransitTo(name string) bool } func StateName(s State) st... Read More
posted @ 2019-05-28 19:58 梦醒心晴 Views(814) Comments(0) Diggs(0) Edit
package util import ( "fmt" "reflect" "regexp" "strconv" "strings" ) func floatToString(f float64) string { return strconv.FormatFloat(f, 'E', -1, 64) } func intToString(i int64) string { re... Read More
posted @ 2019-05-28 19:13 梦醒心晴 Views(2912) Comments(0) Diggs(0) Edit
package com.test001.threadpool; import java.util.LinkedList; import java.util.List; import java.util.Random; import java.util.Vector; import java.util.concurrent.Callable; import java.util.concurren... Read More
posted @ 2019-04-12 17:13 梦醒心晴 Views(553) Comments(0) Diggs(1) Edit
最近有个需求,从一个api拿数据,但是api时间参数又有范围限制,因此需要自己将时间分成多段,多次请求api,并且最终返回的数据需要保持原有的顺序 代码如下: 使用java自带线程池实现 Read More
posted @ 2019-04-11 19:43 梦醒心晴 Views(5574) Comments(0) Diggs(0) Edit
history.pushState(null,"testname", window.location.href); window.addEventListener('popstate', function(evt){ window.location.replace('http://www.baidu.com') }, false); Read More
posted @ 2018-05-16 15:59 梦醒心晴 Views(397) Comments(0) Diggs(0) Edit
# coding:utf-8 # 将文本分词处理 import jieba stoplist = {}.fromkeys([ line.strip() for line in open('/Test/orgindata/stopwords.txt') ]) input = open('/Test/orgindata/corpus.txt','r') output = open('/Test/... Read More
posted @ 2017-12-12 11:31 梦醒心晴 Views(1172) Comments(0) Diggs(0) Edit
自动更新插件通常需要三部分 1.配合需要升级的程序的一个dll 2.自动升级程序 3.打包程序 第一部分 配合主程序的dll 在这个升级程序中我将配合主程序用来校验版本号的代码封装在AutoUpdateHelper中,主要包括两个函数,一个是检查版本并自动更新CheckAndUpdate,一个是用来 Read More
posted @ 2017-03-07 23:19 梦醒心晴 Views(5465) Comments(0) Diggs(1) Edit
最近遇到一个需求,在网页上面编辑多边形的区域,并且需要能够判断一个点是否在这个多边形区域里面。 看了一下高德地图的jsapi,简单的做了一个demo。 1.你需要一个高德地图的账号,注册地址点击这里 2.登陆进去创建一个应用,这个时候就会给你一个对应的Key 3.查看高德地图的的demo,进入示例中 Read More
posted @ 2016-11-21 22:32 梦醒心晴 Views(29795) Comments(0) Diggs(1) Edit