ICode9

精准搜索请尝试: 精确搜索
  • VMware Fusion 自定义虚拟网络2021-11-21 22:34:29

    ➜ vmnet3 pwd /Library/Preferences/VMware Fusion/vmnet3 ➜ vmnet3 cat nat.conf # VMware NAT configuration file # Manual editing of this file is not recommended. Using UI is preferred. [host] # Use MacOS network virtualization API useMacosVmnetVirtApi =

  • JS 函数防抖和节流2021-11-21 21:02:01

    文章目录 防抖节流防抖与节流的比较 <div id="content" style="height:150px;line-height:150px;text-align:center; color: #fff;background-color:#ccc;font-size:80px;"> </div> <script> let num = 1; const content = document.ge

  • elasticsearch入库错误:gc overhead导致数据节点脱离集群2021-11-19 15:33:27

    报错如下:  通过增加ping_timeout的时间,和增加ping_retries的次数来防止节点错误的脱离集群,可以使节点有充足的时间进行full GC 修改es配置,并重启: discovery.zen.fd.ping_timeout: 1000s discovery.zen.fd.ping_retries: 10 参考:https://blog.csdn.net/jojoy_828/article/detai

  • 11-react 过度动画2021-11-18 13:58:32

    在开发中我们通常使用react-transition-group库完成一些过度动画 官网:React Transition Group 安装 yarn add react-transition-group react-transition-group本身非常小,不会为我们应用程序增加过多的负担 使用  CSSTransition的使用  timeout的时间与css里时间作用 time

  • Prometheus之Alertmanager使用帮助2021-11-17 23:04:35

    root@node-02:/usr/local/alertmanager# ./alertmanager --help usage: alertmanager [<flags>] Flags: -h, --help #显示上下文相关的帮助(也可以尝试 --help-long 和 --help-man)。 --config.file="alertmanager.yml" #Alertmanager 配置文件名。 --storage.path=&qu

  • 【JS】Chrome里定时自动刷新代码实现2021-11-15 09:30:20

    timeout=prompt("Set timeout (Second):"); count=0 current=location.href; if(timeout>0) setTimeout('reload()',1000*timeout); else location.replace(current); function reload(){ setTimeout('reload()',1000*timeout); count++; co

  • vue中的防抖与节流2021-11-13 12:00:28

    参考文档: https://www.jb51.net/article/161713.htm   或者   // 防抖 const debounce = (func, wait, immediate) => { let timeOut; return function () { const context = this; const args = arguments;

  • ngnix 项目负载配置2021-11-10 22:03:48

    user nginx; worker_processes 4; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; access_log /var

  • 【nginx】基于域名的nginx虚拟机主机2021-11-06 16:02:02

    一、背景 内网环境有多套系统,都监听80、443 端口 只有一个公网IP出口,无法实现将多个系统的 80 、443同时映射到公网IP上 只能通过加层来解决,通过基于域名的nginx虚拟机主机承载内网多套系统,将nginx虚拟机主机服务器上 80、443映射出去就可以了。 二、配置虚拟主机 在虚拟主

  • 如何实现一个防抖函数?2021-11-05 22:32:41

    在前端开发中会遇到一些频繁的事件触发,比如: window 的 resize、scroll mousedown、mousemove keyup、keydown …… 为此,我们举个示例代码来了解事件如何频繁的触发: <!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8"> <meta http-equiv=&q

  • Dubbo常用功能08--本地存根2021-11-04 13:33:56

    1、提供方配置文件: server: port: 8001 dubbo: application: name: site-service-boot-provider registry: address: zookeeper://ubu:2181 scan: base-packages: com.yas.serviceprovider #指定某一种协议 protocol: name: dubbo port: 20882

  • php nginx 504 Gateway Timeout 网关超时错误2021-11-04 12:04:00

    对于 Nginx + FastCGI上的504网关超时错误(php-fpm),我们可以修改PHP和nginx的执行超时时间。 配置php 修改 php.ini(CentOS路径是/etc/php.ini)最大执行时间为300秒 max_execution_time = 300 修改 php-fpm配置文件(CentOS路径是/etc/php-fpm.d/www.conf) 请求超时时间为300秒 request_

  • Dubbo常用功能05--设置服务的timeout时间2021-11-04 11:31:06

    1、服务提供者配置文件: server: port: 8001 dubbo: application: name: site-service-boot-provider registry: address: zookeeper://ubu:2181 scan: base-packages: com.yas.serviceprovider #指定某一种协议 protocol: name: dubbo port: 208

  • 百度编辑器提示字数超出最大允许值,服务器可能拒绝保存的解决办法2021-11-03 15:00:16

    因为每个人使用的程序不一样,但是道理是一致的,本文记录的方法可以作为参考,基本可以解决遇到的问题。 修改字数限制文件 修改百度编辑器配置文件ueditor.config.js 文件路径:\static\common\user\uedit ,maximumWords:100000000000 //允许的最大字符数  Ps:一般程序只需要修改这一

  • Odoo 部署windows server 20122021-11-03 11:04:10

    需要安装前置补丁 clearcompressionflag.exe、KB2919442、KB2919355、KB2932046、KB2959977、KB2937592、KB2938439、KB2934018。 NSSM运行Nginx 下载新版的nginx-window http://nginx.org/en/download.html 系统找不到nssm则切到odoo安装目录下nssm\x64或\86下运行 注册服务 路径

  • 节流2021-10-31 19:33:49

    1 <!-- 2 * @Author: your TM_cc 3 * @Date: 2021-10-31 19:10:34 4 * @LastEditTime: 2021-10-31 19:15:51 5 * @LastEditors: Please set LastEditors 6 * @Description: In User Settings Edit 7 * @FilePath: \节流.html 8 --> 9 <!DOCTYPE html&g

  • Lock wait timeout exceeded; try restarting transaction-Mysql报错2021-10-30 21:05:11

    一、问题由来 现在在做一个小程序的后台,使用Java写的,数据库使用的Mysql,之前一直调试的时候都好好的,今天在调试的时候突然就报一个错: ### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try res

  • python redis自带门神 lock 方法2021-10-28 11:02:27

    redis 支持的数据结构比较丰富,自制一个锁也很方便,所以极少提到其原生锁的方法。但是在单机版redis的使用时,自带锁的使用还是非常方便的。自己有车还打啥滴滴顺风车是吧,本篇主要介绍redis-py模块中原生锁lock的相关方法。 使用场景: 多线程资源抢占 关键变量锁定 防止重复执行代码

  • vue项目中的防抖、节流2021-10-27 15:01:21

    节流:一段时间内,只执行一次某个操作;过了这段时间,还有操作的话,继续执行新的操作。 一般用于超高触发频率事件,例如鼠标移动事件、滚动条事件 防抖:用户输入完毕才执行 data: { timeout: null, timeout2: null, }, methods:{ change() { if

  • 防抖与节流2021-10-25 10:01:50

    debounce的特点是当事件快速连续不断触发时,动作只会执行一次。 延迟debounce,是在周期结束时执行,前缘debounce,是在周期开始时执行。但当触发有间断,且间断大于我们设定的时间间隔时,动作就会有多次执行。 debounce 的实现: // 非立即执行 function debounce(func, wait) { let

  • 手写节流函数2021-10-23 14:02:49

    节流原理 如果持续的触发事件,每隔一段时间,只执行一次事件 应用场景 DOM元素的拖拽功能实现 射击游戏 计算鼠标移动的距离 监听scroll滚动事件 underscore中的防抖函数_.throttle contant.onmousemove = _.throttle(doSomeThing, 2000, { leading: false, //禁用首次执行,即禁

  • httpClient4请求工具类实现2021-10-22 20:32:56

    package com.http; import java.net.URI; import java.util.ArrayList; import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair;

  • 时间轮机制在Redisson分布式锁中的实际应用以及时间轮源码分析2021-10-22 12:02:52

    本篇文章主要基于Redisson中实现的分布式锁机制继续进行展开,分析Redisson中的时间轮机制。 在前面分析的Redisson的分布式锁实现中,有一个Watch Dog机制来对锁键进行续约,代码如下: private void renewExpiration() { ExpirationEntry ee = EXPIRATION_RENEWAL_MAP.get(getEntry

  • 第 23 章 -《Linux 一学就会》- expect - 正则表达式-sed - cut 的使用2021-10-22 10:03:59

                          expect ([ɪkˈspekt]   期待  )是从它发展出来的。如果你想要写一个能够自动处理输入输出的脚本 (如向用户提问并且验证密码)又不想面对 C 或者 Perl,那么 expect  是你的最好的选择。它可以用来 做一些 linux  下无法做到交互的

  • Ubuntu安装完成后 启动菜单无高级选项和recovery选项2021-10-21 16:02:15

    Ubuntu安装完成后 启动菜单无高级选项和recovery选项 U盘安装完系统后,开机启动,只看到一个ubuntu的启动菜单项,想切换内核或者进入recovery模式都不能选择。 解决方式如下: 如上,把 ”#GRUB_HIDDEN_TIMEOUT=0“ 这行注释掉。 既然涉及到了grub,就简单介绍下参数的含义: 1.GRUB_HID

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有