上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 133 下一页
摘要: numpy.exp():返回e的幂次方,e是 常数,2.71828 np.power(): 计算 x 的 y 次方。 import numpy as np #计算常数e的幂次方 np.exp(2) #计算 x 的 y 次方 np.power(3,2) exp,高等数学里以自然常数e为底的指数函数,它 阅读全文
posted @ 2024-04-02 08:49 txwtech 阅读(347) 评论(0) 推荐(0)
摘要: import random import cv2 import numpy as np from datetime import datetime import math def printWithdate(str): time2 = datetime.now() time2a = time2.st 阅读全文
posted @ 2024-03-29 16:43 txwtech 阅读(90) 评论(0) 推荐(0)
摘要: import { error } from "jquery" function open_door() {console.log('door is opened')} function GetValue():string{ return 'ok' } open_door() let value2 = 阅读全文
posted @ 2024-03-29 10:49 txwtech 阅读(42) 评论(0) 推荐(0)
摘要: TypeScript(ts) worker_threads.Worker类代码示范 TypeScript中worker_threads.Worker类的典型用法示范 1: Promise return new Promise((resolve, reject) => { const worker = 阅读全文
posted @ 2024-03-29 10:45 txwtech 阅读(531) 评论(0) 推荐(0)
摘要: import { extend } from "jquery" //映射类型 type Account ={ id:number isEmployee:boolean notes:string[] } //所有字段都是可选的 type OptionalAccount={ [k in keyof Ac 阅读全文
posted @ 2024-03-28 08:03 txwtech 阅读(158) 评论(0) 推荐(0)
摘要: JSX经编译后变成React.createElement调用, 因此必须在使用JSX的每个文件中导入React库, 这样在作用域中才有名为React的变量: import React from 'react' 倘若忘记也不用担心,TypeScript会提醒你的:<ul /> // Error TS2 阅读全文
posted @ 2024-03-27 16:18 txwtech 阅读(37) 评论(0) 推荐(0)
摘要: //类和继承 type Color2 ='Black'|'White' type File2 ='A'|'B'|'C'|'D'|'E'|'F'|'G'|'H' type Rank2 = 1|2|3|4|5|6|7|8 //1 class Position { constructor( public 阅读全文
posted @ 2024-03-27 14:09 txwtech 阅读(102) 评论(0) 推荐(0)
摘要: //函数 function greet(name:string) { return "hello "+name } let greet2 = function(name:string) { return "hello "+name } //箭头函数表达式 let greet3 = (name:str 阅读全文
posted @ 2024-03-27 13:37 txwtech 阅读(57) 评论(0) 推荐(0)
摘要: typescripts学习 https://geek-docs.com/typescript/typescript-questions/227_typescript_what_is_the_standard_for_use_of_quotes_in_typescript.html 翻译 搜索 复制 阅读全文
posted @ 2024-03-27 10:10 txwtech 阅读(40) 评论(0) 推荐(0)
摘要: 在 TypeScript 中,Promise 是用于处理异步操作的对象。它表示一个可能在未来某个时间点完成或失败的操作,并返回操作结果或错误。 Promise 可以有三种状态: pending(进行中):Promise 的初始状态,表示操作正在进行中。 fulfilled(已完成):表示操作成功完成 阅读全文
posted @ 2024-03-27 09:21 txwtech 阅读(1788) 评论(0) 推荐(0)
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 133 下一页