Skip to content

Instantly share code, notes, and snippets.

View vector4wang's full-sized avatar
🕶️
For Freedom!

wangxc vector4wang

🕶️
For Freedom!
View GitHub Profile
@vector4wang
vector4wang / opencvUtil.java
Created September 8, 2020 01:45
[opencv 融合图]
public class OpenCVUtils {
private final static List<List<Integer>> SIX_SIZE = new ArrayList<>();
private final static List<List<Integer>> TEN_SIZE = new ArrayList<>();
static {
SIX_SIZE.add(new ArrayList<Integer>() {{
add(0);
add(1);
}});
@vector4wang
vector4wang / 安装步骤.md
Last active June 24, 2020 01:00
[Centos下 mysql服务端的安装] #Linux #Mysql

1、找对应的rpm源 https://dev.mysql.com/downloads/repo/yum/

2、rpm -Uvh platform-and-version-specific-package-name.rpm

3、查看mysql版本

yum repolist enabled | grep "mysql.*-community.*"
@vector4wang
vector4wang / keepalived.conf
Last active June 24, 2020 13:38
[nginx笔记] #nginx
! Configuration File for keepalived
global_defs {
notification_email {
381347268@qq.com
}
smtp_server 192.168.200.1
smtp_connect_timeout 30
router_id LVS_DEVEL
}
@vector4wang
vector4wang / bash.sh
Created May 8, 2020 12:41
[jetty 部署服务] #jetty
rpm -qa | grep jdk
java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64
java-1.7.0-openjdk-headless-1.7.0.75-2.5.4.2.el7_0.x86_64
然后删除该jdk
@vector4wang
vector4wang / stir_map.java
Last active April 1, 2020 13:04
[hive udf map] 'a','b','c' -> {"key1":"a","key2":"b","key3":"c"}
public class MapUdfSample extends GenericUDF {
private final Map<Text, Text> resultMap = new LinkedHashMap<Text, Text>();
private final Map<String, String> config_map = new LinkedHashMap<String, String>();
private transient ObjectInspector[] argumentOIs;
public void initConfigMap(){
config_map.put("a","100");
@vector4wang
vector4wang / hive.sql
Last active March 30, 2020 14:24
[hive sql汇总] 用到的功能 #sql #hive
-- name cost
-- a,b,c 1,2,3
-- 转换得
-- name cost
-- a 1
-- b 2
-- c 3
create table t_split as select 'a,b,c' name,'1,2,3' cost;
@vector4wang
vector4wang / only-search-notnull.json
Created January 3, 2020 09:40
[es] 查询nested不为空情况
{
"query": {
"nested": {
"path": "areaJSon",
"query": {
"bool": {
"must": {
"exists": {
"field": "areaJSon"
}
@vector4wang
vector4wang / monitor.py
Created September 24, 2019 02:43
[钉钉机器人 python调用] #python #钉钉
import requests
import json
_header = {
'Content-Type': 'application/json',
'charset': 'utf-8'
}
_data = {
@vector4wang
vector4wang / Tip.md
Created August 15, 2019 01:51
[Mysql 不可忽略的细节] #Mysql

count()

  • count(1) 针对每一行,不管是否为null;
  • count(*) 针对总数也不管是否为null;
  • count(field) 针对该列,会忽略为null的值(空值会计算在内)
DROP TABLE IF EXISTS `counttest`;
CREATE TABLE `counttest` (
  `name` char(1) DEFAULT NULL,
 `age` char(2) DEFAULT NULL
@vector4wang
vector4wang / docker-install-mysql.md
Created August 11, 2019 02:02
[Docker 安装 Mysql]
docker pull mysql:5.7

docker run --name local-mysql -p 3308:3306  -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7