自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(84)
  • 收藏
  • 关注

原创 mysql按月分组并补齐

selecta.month,fromselectunionselectunionselectunionselectunionselectunionselectunionselectunionselectunionselectunionselectunionselectunionselect) aselectfromonwhere。

2023-09-21 09:02:47 300

原创 java 两个不同list<map> 取差集 并相互补全

public static BatchMetric list(BatchMetric metric, List<Map<Object,Object>> list1, List<Map<Object,Object>> list2){ System.out.println("#---------前"+list1); System.out.println("#---------前"+list2); Map<Ob.

2021-07-17 11:04:58 1702 1

原创 java8List集合根据对象的属性去重

@RequiresPermissions("system:statistical:list") @PostMapping("/list") @ResponseBody public TableDataInfo list(AttPrimary attPrimary) { List rs = new ArrayList(); Map mapRs = HkApiPerson.getOrgListByParent("root000000","1...

2021-07-17 11:04:12 346 1

原创 java8多个list对象用lambda求差集

@RequiresPermissions("system:statistical:list")@PostMapping("/getStuListNotClockIn/{orgIndexCode}/{accessTime}")@ResponseBodypublic TableDataInfo getStuListNotClockIn(@PathVariable String orgIndexCode,@PathVariable String accessTime){ AttPrimary a.

2021-07-17 11:03:17 426

原创 JSONObject转换成需要的对象类型

{ "name": "小名", "age":19 "subTradeList": [ { "balance": "2083.63", "money": "0.01", "tradeDesc": "工资", "tradeTime": "2018-12-07 11:51:01", "tradeType": "1", "queryT...

2021-07-17 11:02:31 3803

原创 mysql 按时间分组统计

/*** 每小时统计*/SELECT a.hour hour, ifnull(b.count, 0) count FROM (SELECT 0 hour UNION ALL SELECT 1 hour UNION ALL SELECT 2 hour UNION ALL SELECT 3 hour UNION ALL SELECT 4 hour UNION ALL SELECT 5 hour UNION ALL SELECT 6 hour UNION ALL SELECT 7 hour UNION..

2020-11-13 15:42:00 298

原创 java excel导出

package com.ruoyi.primary.utils;import cn.hutool.core.collection.CollUtil;import java.io.IOException;import java.io.OutputStreamWriter;import java.io.PrintWriter;import java.lang.reflect.Field...

2020-04-24 09:52:27 148

原创 xmlHelper

package com.gszcn.gsrssj.utils;import net.sf.json.JSONObject;import org.dom4j.Document;import org.dom4j.DocumentHelper;import org.dom4j.Element;import java.util.*;public class XMLHelper { ...

2020-04-01 09:33:04 286

原创 java httpclient byxml json

package com.gszcn.gsrssj.utils;import java.io.IOException;import java.net.URI;import java.security.KeyManagementException;import java.security.KeyStoreException;import java.security.NoSuchAlgor...

2020-04-01 09:31:28 144

原创 java excel 导出简单封装

package com.liyankun.api.utils;import cn.hutool.core.collection.CollUtil;import cn.hutool.core.date.DateUtil;import cn.hutool.core.util.RandomUtil;import cn.hutool.poi.excel.BigExcelWriter;impor...

2020-03-16 14:06:36 227

原创 nodejs mysql 操作

const db = require('../config/db')let show = (table) => { return new Promise((resolve, reject) => { db.query(`select * from ${table}`, (err, rows) => { if (err) { ...

2019-10-23 11:08:54 155

原创 golang struct 转 json

package mainimport ( "fmt" "reflect" "time")type Persion struct { Id int Name string}func StructToMapViaReflect() { m := make(map[interface{}]interface{}) t := time.Now() person ...

2019-10-11 09:37:23 273

原创 golang 导出excel封装2

func ExcelExportData360(db *gorm.DB, config config.Config, header []interface{}, data [][]interface{}, sheetName string) string { timeStr := time.Now().Format("2006-01-02 15:04:05") f := excelize....

2019-09-25 09:52:29 466

原创 Golang excel 封装导出功能

package myutilsimport ( "feinail/of_capital/config" "fmt" "github.com/jinzhu/gorm" "github.com/tealeg/xlsx" "strconv" "time")func ExcelExportData(db *gorm.DB, config config.Config, header ...

2019-09-19 14:48:39 1203

原创 golang json 配置文件

//config.go:package configimport ( "reflect")type Config struct { Values map[string]interface{}}func New(fileName string) *Config { return NewJson(fileName, nil)}func config() *...

2019-09-03 11:46:53 195

原创 golang excel 导出功能

package myutilsimport ( "feinail/app/config" "github.com/jinzhu/gorm" "github.com/tealeg/xlsx" "strconv" "time")func ExcelExportData(db *gorm.DB, config config.Config, header []st...

2019-08-29 10:56:41 3018

原创 golang gorm 自定义 json,time.Time 格式

package utilsimport ( "bytes" "errors" "database/sql/driver")//自定义json类型type JSON []bytefunc (j JSON) Value() (driver.Value, error) { if j.IsNull() { return nil, nil } return string(...

2019-08-29 10:52:28 4407

原创 python 级别联动实现

from utils.httputil import Httpfrom utils.dbQry import MyDbUtilhttp = Http()mydb = MyDbUtil()def query_interface(): list = mydb.select_some("systems", "switch", 1) nodes = mydb.select_...

2019-06-10 10:58:23 813

原创 python3 pymysql 常用操做封装

import pymysqlfrom config import DB_CONFIGclass MyDbUtil(object): def __init__(self): self._conn = pymysql.connect(host=DB_CONFIG[0].get("master")["host"], ...

2019-06-03 09:56:56 2926

原创 deepin/ubuntu 系统 安装rtl8821ce 无线驱动

git clonehttps://github.com/tomaspinho/rtl8821cecd rtl8821cemakesudo make installsudo modprobe -a 8821ce

2019-05-28 10:19:07 7902 2

原创 aiohttp python form-data 上传文件

""" @Coding: utf-8 @Product: financial-zbank @Author: rtf @Time: 2019-03-01 11:50 @FileName: test_upload.py @Software: PyCharm Community Edition"""import osimport aiohttp_fetchfrom aiohttp...

2019-03-01 18:14:41 2146

原创 requests python form-data 上传文件

""" @Coding: utf-8 @Product: financial-huanqiu @Author: lyk @Time: 2019-02-28 10:30 @FileName: zb_card_upload.py @Software: PyCharm"""import osimport tracebackimport requestsimport jsonf...

2019-03-01 18:12:26 925

转载 vscode 配置 python3

vscode 配置 python3开发环境2018年07月21日 11:38:46 小兵大将0221 阅读数:11505vscode来写python,配置灵活,界面美观,是个非常好的选择。我这里是在ubuntu系统下配置vscode的python3开发环境,当然也可以参照本文在其它操作系统下配置vscode的python开发环境。 文章目录1 安装插件 2 配置 2.1 建...

2019-02-25 14:53:46 475

转载 deepin jdk安装问题

Deepin Linux在配置环境变量后再使用【java -version】命令得出OPEN-JDK的结果而不是自定义的JDK的版本信息 java version "1.8.0_172" Java(TM) SE Runtime Environment (build 1.8.0_172-b11) Java HotSpot(TM) 64-Bit Server VM (buil...

2019-01-29 16:35:23 413

原创 Python3对excel的操作

import datetimefrom sanic import responseimport xlwtimport xlrdfrom xlrd import xldate_as_tupleasync def export(path, save_name, export_name, head_message, data): today_date = datetime.dat...

2018-12-25 10:07:34 420

原创 Ubuntu 安装java1.8

添加ppasudo add-apt-repository ppa:webupd8team/javasudo apt-get update12安装oracle-java-installersudo apt-get install oracle-java8-installer1设置系统默认jdksudo update-java-alternatives -s java-8-oracl...

2018-11-08 23:42:57 678

转载 Ubuntu美化

1、首先作为一个颜控,如果看着一个丑陋无比的桌面,我估计连折腾的心情都没有了。所以我安装好了一个Ubuntu后,第一件事就是装上自己喜欢的主题、图标。先来看看效果:安装flatabulous-theme主题:sudo add-apt-repository ppa:noobslab/themessudo apt-get updatesudo apt-get install flat...

2018-11-07 16:48:37 1658

转载 python3将list形式的字符串转换为list

mstr = "[\"1838\", \"13735\", \"8285\", \"35386\"]" from ast import literal_eval mlist = literal_eval(mstr) print(type(mlist))print(mlist) 

2018-11-05 14:06:09 2299

转载 Python对list进行排序

sorted(iterable, key=None, reverse=False)iterable为可迭代类型 key 确定要调用的函数以用于对list的每个元素进行比较。通常使用lambda表达式 reverse默认值为False,此时sorted()按从小到大的顺序排序。当reverse=True时,按照从大到小的顺序排序。 key,reverse为可选参数。 ...

2018-10-25 15:26:04 1638

原创 Python导出数据到excel

from trump.query import create_item,modify_item,get_itemsfrom utils.result_process import success,abortedimport xlwtimport datetimefrom utils.data_to_execl_sunge import excel_styleimport config...

2018-10-16 17:49:14 1677

原创 linux 配置java开发环境

官网下载最新的JDK:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html解压压缩包进入下载目录cd ~/Download解压tar.gz包tar -zxvf jdk-8u171-linux-x64.tar.gz安装JDKsudo mv jdk-8u171-l...

2018-10-15 14:56:08 155

原创 python3从数据库导出数据到excel

#coding=utf-8import pymysqlimport xlwtimport importlib,sysimportlib.reload(sys)def export(host,user,password,dbname,table_name,outputpath): conn = pymysql.connect(host,user,password,dbname,...

2018-09-21 14:28:21 2692

原创 Python从数据库导出数据成excel

from trump.db import queryfrom utils.result_process import success,abortedimport xlwtimport datetimeimport config_businessfrom sanic import responsefrom utils.data_to_execl_sunge import excel_s...

2018-09-20 21:25:19 1909 1

原创 Python虚拟环境指定 pip 安装python依赖

windows:可以通过 venv\scripts\python -m pip -V 或 venv\scripts\pip -V 指定pip命令的路径。 最后发现可能是我代码的存放路径文件夹里有中文和空格导致这种情况,不过学到了python -m 即是将一个模块文件作为脚本来运行。以及指定Python 和 pip和命令的指定。linux:可以通过venv\bin\ pip in...

2018-09-07 13:21:52 1283

转载 使用 3.5+ 对应的pip版本

Python报错:Command “python setup.py egg_info” failed with error code 1 in /private/var/folders/0m/7s1flm9j03d35pkr92jcsv3w0000gq/T/pip-build-fK6SMy/aiohttp/这是因为你电脑同时用 Python2.7+ 和3.5+ 版本. 默认pip会使用 2.7...

2018-09-07 10:57:52 2542

原创 windows下 java开发环境的详细配置

JAVA_HOMEC:\Program Files\Java\jdk1.8.0_144CLASSPATH.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;编辑:path%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;maven:MAVEN_HOME,并将变量值设置为安装路径,在这里为D:\apache-ma...

2018-08-31 12:02:38 160

原创 加密排序调取第三方算法

from trumputils.httputils import ClientRequestimport base64import asyncioimport hashlibimport jsonfrom collections import OrderedDictbase_url = "https://dev.zhilesong.com"client = ClientRequ...

2018-08-13 18:47:11 850

转载 jQuery上传图片之前可以预览效果

&lt;!doctype html&gt;&lt;html&gt;&lt;head&gt;&lt;meta charset="utf-8"&gt;&lt;title&gt;jQuery上传图片之前可以预览效果&lt;/title&gt;&lt;script src="http://libs.baidu.com/jquery/1.11.3/jquery.mi

2018-07-31 16:00:27 768

原创 Spring boot 图片上传

package com.hey.liyankun.admin.controller;import com.hey.liyankun.admin.pojo.HeyImage;import com.hey.liyankun.admin.service.ImageService;import org.slf4j.Logger;import org.slf4j.LoggerFactory;...

2018-07-20 08:38:33 274

原创 自己封装的JsonResultUtil(java)

package com.lxt.city.utils;import java.util.List;import cn.hutool.json.JSONObject;import cn.hutool.json.JSONUtil;public class EasyCityJsonResult { protected static final Integer FAIL_CODE =...

2018-07-19 15:25:29 2120 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除