js的赋值与比较运算符
var a=4; var b=5; var c=-3; console.log(a+=5); /*值:9 a=a+5=9*/ console.log(c-=5); /*值:-8 c=c-5=-8*/ console.log(b*c); /*值:-40 c=-8 b*c=-40 */ console. ... 查看全文
Node.js中模块加载机制
1. 模块查找规则-当模块拥有路径但没有后缀时 require(' ./find.js') ; require(' ./find') ; require方法根据模块路径查找模块,如果是完整路径。直接引入模块。 如果模块后缀省略,先找同名JS文件再找同名JS文件夹 如果找到了同名文件夹,找文件夹中的i ... 查看全文
CSS高度坍塌和外边距溢出问题及解决方法
高度坍塌 成因 父元素 div 未设置高度 子元素全部设置浮动(float: left | right;),浮动元素 脱离文档流 且 不占页面空间 由于父元素为设置高度,高度靠内部子元素撑开,而今子元素全部脱离文档流,所以此时父元素的高度为 0,给父元素和子元素设置 边框(border: 1px s ... 查看全文
Cirix Netscaler Link中间证书解决证书错误。
问题如下:证书的证书链如下图,为根证书加中间证书加证书本身。本地的客户端可能因一定的原因没有中间证书,这会导致证书不能被识别。在Netscaler上,进入TrafficManagement/SSL/SSLCertificate/CACertificates点Install,上传CA的中间证书和根证书。接下来点选gateway的证书,在selectaction中选择link。其link的证书会自动选 查看全文
nginx 代理 web socket 报错“WebSocket is already in CLO
WebSocket is already in CLOSING or CLOSED state. 查看全文
在CentOS 8服务器上安装Apache Solr搜索平台
Apache Solr是一个用Java编写的开源搜索平台。Apache Solr建立在Apache Lucene的基础上。使用Solr,你可以创建自定义搜索引擎,对文件、数据库和网站进行索引。Solr具有高度的可靠性、可扩展性和容错性,它将提供许多强大的功能,如分布式索引、复制、负载均衡查询、自动故 ... 查看全文
Windows API 学习
Windows API学习 以下都是我个人一些理解,笔者不太了解windows开发,如有错误请告知,非常感谢,一切以microsoft官方文档为准。 https://docs.microsoft.com/en-us/windows/win32/api/ VirtualAlloc() https:// ... 查看全文
AcWing 797. 差分
AcWing 797. 差分 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int a[N],b[N]; void insert(int l,int r,int c){ b[l]+=c; b[r+1]-=c; } ... 查看全文
AcWing 796. 子矩阵的和
AcWing 796. 子矩阵的和 #include <bits/stdc++.h> using namespace std; const int N=1e3+10; int a[N][N],S[N][N]; int main(){ int n,m,q; scanf("%d%d%d",&n,&m,& ... 查看全文
AcWing 795. 前缀和
AcWing 795. 前缀和 #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int a[N],S[N]; int main(){ int n,m; scanf("%d%d",&n,&m); for(int i=1 ... 查看全文
AcWing 794. 高精度除法
AcWing 794. 高精度除法 #include <bits/stdc++.h> using namespace std; vector<int> div(vector<int> &A,int b,int &r){ vector<int> C; for(int i=A.size()-1;i>=0 ... 查看全文
AcWing 792. 高精度减法
AcWing 792. 高精度减法 #include <bits/stdc++.h> using namespace std; bool cmp(vector<int> &A,vector<int> &B){ if(A.size()!=B.size()) return A.size()>B.size ... 查看全文
AcWing 791. 高精度加法
AcWing 791. 高精度加法 #include <bits/stdc++.h> using namespace std; vector<int> add(vector<int> &A,vector<int> &B){ vector<int> C; int t=0; for(int i=0;i< ... 查看全文
AcWing 790. 数的三次方根
AcWing 790. 数的三次方根 #include <bits/stdc++.h> using namespace std; int main(){ double n,mid; scanf("%lf",&n); double l=-1e6-10,r=1e6+10; while(r-l>1e-8) ... 查看全文
AcWing 788. 逆序对的数量
AcWing 788. 逆序对的数量 #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N=1e6+10; int q[N],tmp[N]; LL merge_sort(int l,int r) ... 查看全文
工作中记录获取Json数组的坑
// json形式的字符串String str = "{'company':'Trump','userInfo':[{'id':1000,'name':'唐纳德·特朗普','age':'78','hobby':'发推特'}]}";// 把String转成JSONObject形式JSONObject ... 查看全文
swift5.x 多线程的应用场景
// // ViewController17.swift // swiftT // // Created by wjwdive on 2020/6/3. // Copyright © 2020 wjwdive. All rights reserved. // import UIKit class V ... 查看全文
c++头文件循环引用
当两个头文件a.h和b.h存在相互引用的状况时,可以在其中一个头文件预先定义类型。如: // A.h class B; class A{ B data; public: void fun(); }; //B.h #include "A.h" class B{ public: int data; } ... 查看全文