mysql -- 问题解决

Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 1 mysql> SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); /etc/mysql/my.cnf 1 2 3 [mysqld] sql_mode = "" # sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" then 1 sudo systemctl restart mysql

鼠标事件判断 单击还是双击

鼠标事件判断 单击还是双击 通过event.detail去判断单双击 1 2 3 4 5 6 7 element.onclick = event => { if (event.detail === 1) { // it was a single click } else if (event.detail === 2) { // it was a double click }

js 获取滚动元素

js 获取滚动父元素 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 const isScrollable = function (ele) { const hasScrollableContent = ele.scrollHeight > ele.clientHeight; const overflowYStyle = window.getComputedStyle(ele).overflowY; const isOverflowHidden = overflowYStyle.indexOf('hidden') !== -1; return hasScrollableContent && !isOverflowHidden; }; const getScrollableParent = function (ele) { return !ele || ele === document.body ? document.body : isScrollable(ele) ? ele

canvas requestAnimationFrame画一个clock

canvas requestAnimationFrame 画一个 clock 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; var h1 = document.getElementsByTagName("h1")[0]; var canvas = document.getElementById("canvas"); var ctx

github coding同步action

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 name: Sync Repo to CODING on: push: schedule: # 每天北京时间0点同步 - cron: "0 16 * * *" jobs: build: runs-on: ubuntu-latest steps: - name: Sync Repo to CODING uses: serverlesslife-cn/sync-repo-to-coding@master env: SSH_PRIVATE_KEY: ${{ secrets.CODING_PRIVATE_KEY }} with: # 注意替换

Benchmark.js 使用

Benchmark.js 安装 npm install benchmark 使用 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 var Benchmark = require("benchmark"); var suite = Benchmark.Suite("string"); suite .add("String#regexp", function () { /o/.test("Hello World!"); }) .add("String#indexOf", function () { "Hello World!".indexOf("o") > -1; }) .add("String#lastIndexOf", function () { "Hello World!".lastIndexOf("o") > -1; }) .add("String#startsWith",

Jest 配置vscode调试

Jest 配置vscode debugger调试 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Jest",

国内开源镜像网站

国内开源镜像网站 阿里云:http://mirrors.aliyun.com/ 网易开源:http://mirrors.163.com/ 搜狐开