This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
有两个表A和B,均有key和value两个字段,如果B的key在A中也有,就把B的value替换为A中对应的value | |
update B b set b.value=(select max(a.value) from A a where b.key=a.key) | |
where exists(select 1 from A c where b.key=c.key) | |
有A、B两表,表结构都为key和value。当B的key与A的key相同时将B的value赋给A的value | |
UPDATE A a,(select a.`key`,b.`value` from A INNER JOIN B on a.`key`=b.`key`) b | |
SET a.`value` = b.`value` WHERE a.`key` = b.`key` | |
能够一条条进行表数据的相互替换主要是由于where条件是逐条匹配的 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you under the Apache License, Version 2.0 (the | |
"License"); you may not use this file except in compliance | |
with the License. You may obtain a copy of the License at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
该文件夹下的数据可清空: | |
C:\Users\Think\AppData\Local\Temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
可以有两种引入方式: | |
1、原生 | |
<dependency> | |
<groupId>com.alibaba</groupId> | |
<artifactId>druid</artifactId> | |
<version>1.2.6</version> | |
</dependency> | |
2、集成 | |
<dependency> | |
<groupId>com.alibaba</groupId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Date LocalDateTimeToDate(LocalDateTime localDateTime) { | |
Function<Object, Date> objectDateFunction = Function.identity().andThen(time -> Date.from(((LocalDateTime) time).atZone(ZoneId.systemDefault()).toInstant())); | |
return objectDateFunction.apply(localDateTime); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createInput(name, value) { | |
let inputElement = document.createElement("input"); | |
inputElement.type = "hidden"; | |
inputElement.name = name; | |
if (value != null) { | |
inputElement.value = value; | |
} | |
return inputElement; | |
} | |
// 创建表单 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ | |
rm -rf node_modules | |
rm package-lock.json | |
npm cache clear --force | |
npm install | |
最后实在还是不行,则使用cnpm install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
下面是javascript的encode函数: | |
1.escape - 采用ISO Latin字符集对指定的字符串进行编码。不会被此方法编码的字符: @ * / + | |
2.encodeURI - 把URI字符串采用UTF-8编码格式转化成escape格式的字符串不会被此方法编码的字符:! @ # $& * ( ) = : / ; ? + ‘ | |
3.encodeURIComponent - 把URI字符串采用UTF-8编码格式转化成escape格式的字符串。不会被此方法编码的字符:! * ( ) ‘ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql支持的utf-8编码默认的是utf8mb3,但是它很多字符例如表情Emoji是没有编码的,因此会在传输到前台时显示为乱码,因此需要更改为utf8mb4的编码格式,具体原文如下: | |
首先,想要把字符集从utf8mb3转换到utf8mb4,其实是问题不大的: | |
对于BMP字符,utf8mb4和utf8mb3具有相同的存储特征:相同的编码值,相同的编码,相同的长度。 | |
对于补充字符,utf8mb4需要4个字节来存储它,而utf8mb3根本不能存储该字符。当将utf8mb3列转换为utf8mb4时,您不必担心转换补充字符,因为没有补充字符。 | |
假设有一张已知表使用了utf8mb3: | |
CREATE TABLE t1 ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 查看进程; | |
ps -ef | grep emp-client | |
# 查杀进程; | |
kill -9 进程的pid | |
#进webapps目录将服务包删除; | |
rm -rf 文件名称 或者文件夹名称 | |
#上传工程包; | |
rz 回车 | |
#回到bin目录, 启动服务; |
NewerOlder