JS之this关键字 JS中this就是执行的主体(谁来执行的this就是谁) 如何确定this呢 this这个 keyword确实非常的让人困惑,但是其实有一个好方法可以理解. 检查 ' . ' 左边是谁invoke 这个函数. 例如 xiaoming.age(); age函数里面有this, 然 ...
分类:
Web程序 时间:
2020-06-17 21:52:53
阅读次数:
76
helloworld 新建文件夹,存放代码 新建Java文件,文件后缀为a.java 编写代码 public class hello{ public static void main(String[] args){ System.out.println("Hello World"); }} 编译 j ...
分类:
编程语言 时间:
2020-06-17 01:10:53
阅读次数:
60
#include <bits/stdc++.h> using namespace std; int main(){ int T = 10000; int tot = 0; system("g++ 1.cpp -o 1; g++ std.cpp -o std; g++ data.cpp -o data ...
分类:
其他好文 时间:
2020-06-15 17:33:26
阅读次数:
81
ubuntu 20.04 设置静态ip方法 1. 前言 本教程将会演示如何设置Ubuntu16.04 Server版和Ubuntu18.04 Server版系统的静态固定IP地址。 2. 确认你要修改的网卡号 先确认你要修改的网卡号,假设你的服务器有多张网卡: 1 ubuntu2004:~$ ip ...
分类:
系统相关 时间:
2020-06-15 15:53:09
阅读次数:
419
原文:RocketMQ系列(四)顺序消费 折腾了好长时间才写这篇文章,顺序消费,看上去挺好理解的,就是消费的时候按照队列中的顺序一个一个消费;而并发消费,则是消费者同时从队列中取消息,同时消费,没有先后顺序。RocketMQ也有这两种方式的实现,但是在实践的过程中,就是不能顺序消费,好不容易能够实现... ...
分类:
其他好文 时间:
2020-06-14 15:07:43
阅读次数:
56
npm install react-wow --save import ReactWOW from 'react-wow' <ReactWOW animation='fadeIn'>嵌套值</ReactWOW> https://www.npmjs.com/package/react-wow ...
分类:
其他好文 时间:
2020-06-14 01:17:04
阅读次数:
72
今天工作遇到个关于Promise的小问题,结果是自己太新手,后来解决了 如 function test() { return new Promise (resolve, reject) { reject('超时') } } 使用了await, 必须catch才能让阻塞放开 async functio ...
分类:
其他好文 时间:
2020-06-13 19:29:17
阅读次数:
68
前言 pymsql是Python中操作MySQL的模块,其使用方法和MySQLdb几乎相同。但目前pymysql支持python3.x而后者不支持3.x版本。 本文测试python版本:2.7.11。mysql版本:5.6.24 一、安装 1 pip3 install pymysql 二、使用操作 ...
分类:
数据库 时间:
2020-06-12 12:59:55
阅读次数:
58
源码中vue入口 function Vue (options) { if (!(this instanceof Vue) ) { warn('Vue is a constructor and should be called with the `new` keyword'); } this._ini ...
分类:
其他好文 时间:
2020-06-12 12:54:46
阅读次数:
147
我平时使用 Git 的时候,很多的 Git 命令我都不是很常用,工作中一般我们会配合一些可视化工具,或者编辑器自带的一些插件去维护 Git 仓库,但是我们也要记得一些常用 Git 命令来应变一些特殊的场景,下面是我收录整理的常用和不常用的一些 Git 命令,希望能帮助到大家更好的掌握 Git 的使用 ...
分类:
其他好文 时间:
2020-06-12 10:57:42
阅读次数:
50