废话不多说,直接上干货! 1. 数组: toString(): 将数组转换成字符串(逗号分割) join(): 将所有数组元素结合为一个字符串(可规定分隔符--将逗号替换为传入的参数变成字符串) pop(): 删除数组最后一个元素, 会改变原数组, 返回值为删除的元素 push(): 向数组内添加一 ...
分类:
编程语言 时间:
2021-06-29 15:15:47
阅读次数:
0
TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接,如下图所示。主机A为客户机,主机B为服务器 说明:(1)第一次握手:建立连接时,客户端A发送SYN包(SYN=j)到服务器B,并进入SYN_SEND状态,等待服务器B确认。(2)第二次握手:服务器B收到SYN包,必须确认客户 ...
分类:
其他好文 时间:
2021-06-28 21:08:26
阅读次数:
0
Js得到选中的文字 (function getSelectionText() { if (window.getSelection) { return window.getSelection().toString(); } else if (document.selection && document ...
分类:
其他好文 时间:
2021-06-28 21:07:38
阅读次数:
0
简介 对cmp的理解能力 常规题 code #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; struct Student{ int idx; int n ...
分类:
其他好文 时间:
2021-06-28 21:01:31
阅读次数:
0
题目链接:用最少数量的箭引爆气球 题目描述: 题解: class Solution { public: static bool cmp(vector<int> &a, vector<int> &b) //按右边界排序 { return a[1] < b[1]; } int findMinArrowS ...
分类:
其他好文 时间:
2021-06-28 20:44:14
阅读次数:
0
前序遍历: result = [] st = [root] while st: node = st.pop(-1) if node.right: st.append(node.right) if node.left: st.append(node.left) result.append(node.v ...
分类:
其他好文 时间:
2021-06-28 20:43:55
阅读次数:
0
一、解释型语言和编译型语言 1、概述 计算机不能直接理解任何除机器语言以外的语言,所以必须要把程序员所写的程序语言翻译成机器语言才能执行程序。程序语言翻译成机器语言的工具,被称为翻译器。 ①翻译器翻译的方式有两种:一个是编译,另一种是解释。两种方式之间的区别在于翻译的时间点不同; ②编译器是在代码执 ...
分类:
其他好文 时间:
2021-06-28 20:36:43
阅读次数:
0
一、简介 二、源代码 clear lam=500e-9;N=2; a=2e-4;D=5;d=5*a; ym=2*lam*D/a;xs=ym; n=1001; ys=linspace(-ym,ym,n); for i=1:n sinphi=ys(i)/D; alpha=pi*a*sinphi/lam; ...
分类:
其他好文 时间:
2021-06-28 20:31:55
阅读次数:
0
编写重载模板 1 #include <iostream> 2 #include <sstream> 3 #include <string> 4 using namespace std; 5 6 template <typename T> 7 string debug_rep(const T &t) ...
分类:
编程语言 时间:
2021-06-28 20:25:45
阅读次数:
0
一、简介 基于matlab二维边界单元法计算腐蚀电位 二、源代码 clear; fid=fopen('input.dat','r'); indat=fscanf(fid,'%g%g%d%g',[4,inf]); indat=indat'; xb=indat(:,1); yb=indat(:,2); ...
分类:
其他好文 时间:
2021-06-28 20:17:15
阅读次数:
0