Math 对象 Math 对象用于执行数学任务。 使用 Math 的属性和方法的语法: var pi_value=Math.PI; var sqrt_value=Math.sqrt(15); 注释:Math 对象并不像 Date 和 String 那样是对象的类,因此没有构造函数 Math(),像 ...
分类:
编程语言 时间:
2021-04-16 12:16:05
阅读次数:
0
#_*_ encoding: utf-8 _*_ @author: ty heris #项目名称: pycharm_file 会自动替换为当前项目名称 #创建时间: 2018/5/6 会自动替换为当前日期 lst1 = [[0]*5]*5 print(lst1) # [[0, 0, 0, 0, 0] ...
分类:
其他好文 时间:
2021-04-16 12:15:15
阅读次数:
0
flask是轻量级的Web开发框架,核心Werkzeug套件和Jinja模版引擎。 Werkzeug主要是url路由,根据地址不同调用相应函数并返回html。 Jinja主要分析html页面,并实现html和后端代码之间的数据连通,实现动态页面。 ...
分类:
其他好文 时间:
2021-04-16 12:07:27
阅读次数:
0
####1 基本结构 // ES6使用 class 来声明一个类 class Person { // 类中必须要有构造函数,即使不写,js引擎会自动创建一个空的constructor。 // 构造函数的作用:主要是为实例化空对象添加属性 // 构造函数在类的实例化时,会自动运行。因此可以将实例化后需 ...
分类:
其他好文 时间:
2021-04-16 12:05:56
阅读次数:
0
task1 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main(){ int x, n; srand(time(0)); for(n=1 ; n<=N; n++){ x = rand() % 10 ...
分类:
其他好文 时间:
2021-04-16 12:04:07
阅读次数:
0
1. 虚函数中存在默认值时,需要注意其函数调用中默认值: class cbase { public: virtual void func(int a = 10) { cout << "this is cbase func:" << a << endl; } }; class csub : publi ...
分类:
编程语言 时间:
2021-04-16 12:03:44
阅读次数:
0
import org.junit.Test; public class TestMethods { @Test public void test() { System.out.println("hello world"); } } 1:首先需要导入import org.junit.test这个jar ...
分类:
编程语言 时间:
2021-04-16 12:01:06
阅读次数:
0
// 一元二次方程求解(函数实现方式) // 重复执行, 直到按下Ctrl+Z结束 #include <math.h> #include <stdio.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int main() { d ...
分类:
其他好文 时间:
2021-04-16 11:59:33
阅读次数:
0
range() 函数 日常工作中,range() 应该非常熟悉了,它可以生成一个迭代对象,然后可以使用 list() 将它转成一个 list # 判断是不是迭代对象 print(isinstance(range(0, 10), Iterable)) # 生成列表 lists = list(range ...
分类:
编程语言 时间:
2021-04-16 11:49:05
阅读次数:
0
merge函数的作用是:将两个已经排好序的序列合并为一个有序的序列。 函数参数:merge(first1,last1,first2,last2,result,compare); firs1t为第一个容器的首迭代器,last1为第一个容器的末迭代器; first2为第二个容器的首迭代器,last2为容 ...
分类:
其他好文 时间:
2021-04-16 11:46:46
阅读次数:
0