classList.add( newClassName );添加新的类名,如已经存在,取消添加 classList.contains( oldClassName );确定元素中是否包含指定的类名,返回值为true 、false; classList.remove( oldClassName );移除 ...
分类:
其他好文 时间:
2020-11-30 16:06:35
阅读次数:
6
一、补充 1. 引入第三方库(bootstrap为例) a. MDN 引入 在index.html中直接引入mdn <link rel="stylesheet" href="..." integrity="..." crossorigin="anonymous"> <script src="..." ...
分类:
其他好文 时间:
2020-11-30 16:05:48
阅读次数:
5
定义几个常用的方法 const utils = { //定义变量是否存在 js有两个表示不存在的值 undefined|null true表示存在 false表示不存在(undefined|null) existy(val) { return val != null //undefined 也是可以 ...
分类:
其他好文 时间:
2020-11-27 11:46:22
阅读次数:
19
link /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NUL ...
分类:
其他好文 时间:
2020-11-27 11:14:59
阅读次数:
5
print("********如何实现switch-case********") local switch = { [1] = function() print ("case1") end, [2] = function() print ("case2") end, [3] = function() ...
分类:
其他好文 时间:
2020-11-27 11:06:56
阅读次数:
4
一、where 1=1 这个条件始终为True,在不定数量查询条件情况下,1=1可以很方便的规范语句,用于拼接条件。 二、where 1=0 这个条件始终为false,结果不会返回任何数据,只有表结构,可用于快速建表。 SELECT * FROM EMP WHERE 1=0; //该select语句 ...
分类:
数据库 时间:
2020-11-27 11:05:15
阅读次数:
12
1、耗时操作(IO)处理 在开发中针对如何处理耗时的操作,不同的语言有不同的处理方式 处理方式一: 多线程,比如Java、C++,我们普遍的做法是开启一个新的线程(Thread),在新的线程中完成这些异步的操作,再通过线程间通信的方式,将拿到的数据传递给主线程。 处理方式二: 单线程+事件循环,比如 ...
分类:
其他好文 时间:
2020-11-27 11:04:51
阅读次数:
4
实验环境:(开始实验之前,请保证防火墙关闭,selinux关闭,时间同步)ansible:192.168.2.7web1:192.168.2.7web2:192.168.2.17OS:centos7OS:centos7OS:centos7实现功能:(自动化部署两台各自主机命名的httpd服务器)1、使用ansible的playbook实现自动化安装httpd2、建立httpd服务器,要求提供各自基
分类:
Web程序 时间:
2020-11-26 14:48:12
阅读次数:
11
# Create your views here.import jsonfrom django.shortcuts import renderfrom django.shortcuts import renderfrom django.http import HttpResponse, HttpRe ...
分类:
其他好文 时间:
2020-11-26 14:35:15
阅读次数:
6
事务是作为单个逻辑工作单元执行的一系列操作,一个逻辑工作单元必须有四个属性,称为原子性、一致性、隔离性和持久性 (ACID) 属性,只有这样才能成为一个事务 。JDBC处理事务有如下操作: conn.setAutoComit(false);设置提交方式为手工提交conn.commit()提交事务 c ...
分类:
数据库 时间:
2020-11-26 14:27:02
阅读次数:
9