1.MySQL自定义排序函数FIELD() order by FIELD(a.status,3,2,4,1) 按照3,2,4,1 排序 显示 2. FIND_IN_SET(a.name, "a,b,c,d") 判断a.name 是否在 "a,b,c,d" 中 ,判断时 "a,b,c,d" 用逗号分割 ...
分类:
数据库 时间:
2020-12-01 12:11:01
阅读次数:
11
1.查找文件 find / -name filename.txt 根据名称查找/目录下的filename.txt文件。 2.查看一个程序是否运行 ps –ef|grep tomcat 查看所有有关tomcat的进程 3.终止线程 kill -9 19979 终止线程号位19979的线程 4.查看文件 ...
分类:
系统相关 时间:
2020-11-30 16:04:26
阅读次数:
20
Go语言标准库中有两个包和DB操作相关,database/sql和database/sql/driver。 sql包提供了保证SQL或类SQL数据库的泛用接口。 driver包定义了应被数据库驱动实现的接口,这些接口会被sql包使用。 一、SQL操作 1、下载驱动 Go语言标准库提供的两个包都是相关 ...
分类:
数据库 时间:
2020-11-30 15:51:29
阅读次数:
10
包络面绘制程序 function [X,Y,Z]=Enveloping_surface_rendering(x,y,z,a,b,A1) s=A1(:,3); b=[find(diff(s));length(s)]; c=b-[0;b(1:end-1)]; out=mat2cell(A1,c); ct ...
分类:
其他好文 时间:
2020-11-27 11:47:26
阅读次数:
23
###题目 1160. Find Words That Can Be Formed by Characters ###解题方法 先把可使用的所有字符放入字典charscount,以“字符:可出现次数”的形式存放,然后遍历words中的每个单词,初始化tempcount字典为charscount的副本 ...
分类:
其他好文 时间:
2020-11-27 11:39:59
阅读次数:
10
非商业,LeetCode链接附上: https://leetcode-cn.com/problems/find-lucky-integer-in-an-array/ 进入正题。 题目: 在整数数组中,如果一个整数的出现频次和它的数值大小相等,我们就称这个整数为「幸运数」。 给你一个整数数组 arr, ...
分类:
编程语言 时间:
2020-11-26 15:13:13
阅读次数:
5
配置文件 使用properties文件配置相关数据 --driverClassName= com.mysql.cj.jdbc.Driver 驱动加载 --username=root 连接数据库的用户名 --password= 连接数据库的密码 --url=jdbc:mysql://127.0.0.1 ...
分类:
数据库 时间:
2020-11-26 14:34:04
阅读次数:
8
编写单元测试,运行时报下面的错误 haima@haima-PC:/media/haima/34E401CC64DD0E28/site/go/src/haimait/learn/base/cheshi01$ go test go: cannot find main module, but found ...
分类:
其他好文 时间:
2020-11-26 14:24:36
阅读次数:
5
package com.atguigu.etl; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.NullWritable; impo ...
分类:
其他好文 时间:
2020-11-25 13:04:03
阅读次数:
26
1、面试题 17.10. 主要元素 https://leetcode-cn.com/problems/find-majority-element-lcci/ 考点: class Solution: def majorityElement(self, nums: List[int]) -> int: ...
分类:
编程语言 时间:
2020-11-25 12:48:30
阅读次数:
8