Skip to content

Instantly share code, notes, and snippets.

Avatar
🕶️
For Freedom!

wangxc vector4wang

🕶️
For Freedom!
View GitHub Profile
View opencvUtil.java
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 Jun 24, 2020
[Centos下 mysql服务端的安装] #Linux #Mysql
View 安装步骤.md

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 Jun 24, 2020
[nginx笔记] #nginx
View keepalived.conf
! 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
[jetty 部署服务] #jetty
View bash.sh
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 Apr 1, 2020
[hive udf map] 'a','b','c' -> {"key1":"a","key2":"b","key3":"c"}
View stir_map.java
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 Mar 30, 2020
[hive sql汇总] 用到的功能 #sql #hive
View hive.sql
-- 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 Jan 3, 2020
[es] 查询nested不为空情况
View only-search-notnull.json
{
"query": {
"nested": {
"path": "areaJSon",
"query": {
"bool": {
"must": {
"exists": {
"field": "areaJSon"
}
@vector4wang
vector4wang / monitor.py
Created Sep 24, 2019
[钉钉机器人 python调用] #python #钉钉
View monitor.py
import requests
import json
_header = {
'Content-Type': 'application/json',
'charset': 'utf-8'
}
_data = {
@vector4wang
vector4wang / Tip.md
Created Aug 15, 2019
[Mysql 不可忽略的细节] #Mysql
View Tip.md

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
View docker-install-mysql.md
docker pull mysql:5.7

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