03 2024 档案

摘要: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 阅读(54) 评论(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 阅读(5) 评论(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 阅读(358) 评论(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 阅读(106) 评论(0) 推荐(0) 编辑
摘要:JSX经编译后变成React.createElement调用, 因此必须在使用JSX的每个文件中导入React库, 这样在作用域中才有名为React的变量: import React from 'react' 倘若忘记也不用担心,TypeScript会提醒你的:<ul /> // Error TS2 阅读全文
posted @ 2024-03-27 16:18 txwtech 阅读(7) 评论(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 阅读(55) 评论(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 阅读(24) 评论(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 阅读(10) 评论(0) 推荐(0) 编辑
摘要:在 TypeScript 中,Promise 是用于处理异步操作的对象。它表示一个可能在未来某个时间点完成或失败的操作,并返回操作结果或错误。 Promise 可以有三种状态: pending(进行中):Promise 的初始状态,表示操作正在进行中。 fulfilled(已完成):表示操作成功完成 阅读全文
posted @ 2024-03-27 09:21 txwtech 阅读(1314) 评论(0) 推荐(0) 编辑
摘要:ts reduce用法.……在TypeScript中, reduce.是一种韭常强大而且常用的数组方法, 它可以用来对数组中的元素进行累加操作。 在使用reduce 时,我们需要传递一个函数作为参数,这个函数接收两个参数:第一个参数是累加器(也就是上一次调用函数的返回值),第二个参数是当前遍历到的数 阅读全文
posted @ 2024-03-26 14:47 txwtech 阅读(1022) 评论(0) 推荐(0) 编辑
摘要://元组--需要显式的注解类型,数组 let a:[number] = [1] let b:[string,string,number] = ["a","b",1] //b = ["a","a","a"]错误 let trainFares:[number,number?][]=[ //中括号的问号表 阅读全文
posted @ 2024-03-26 13:59 txwtech 阅读(79) 评论(0) 推荐(0) 编辑
摘要:let message:string ='hello nice day'; console.log(message); console.log("ok,good luck11111111111"); let a = 1+2; let b= a+3; let c={ apple:a, banana:b 阅读全文
posted @ 2024-03-26 11:53 txwtech 阅读(15) 评论(0) 推荐(0) 编辑
摘要:TypeScript 是一种 JavaScript 的超集,它在语法层面上对 JavaScript 进行了扩展,提供了强类型、类、接口等面向对象的特性,并且可以通过编译器将 TypeScript 代码转换成 JavaScript 代码。在开发 TypeScript 项目时,我们通常会使用 webpa 阅读全文
posted @ 2024-03-26 11:49 txwtech 阅读(765) 评论(0) 推荐(0) 编辑
摘要:{ "name": "test1", "version": "1.0.0", "main": "index.html", "dependencies": { "ts-node": "^10.9.2" }, "devDependencies": { "@types/node": "^20.11.30" 阅读全文
posted @ 2024-03-26 11:43 txwtech 阅读(88) 评论(0) 推荐(0) 编辑
摘要:胶囊按钮样式 <?xml version="1.0" encoding="utf-8"?> <shape xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:shape="rectangle"> <corners ohos:radius="100 阅读全文
posted @ 2024-03-25 21:50 txwtech 阅读(40) 评论(0) 推荐(0) 编辑
摘要:VScode启动typescript监视任务自动把TS转换成JS 修改TS文件,保存后,相应的js文件一起改变 翻译 搜索 复制 阅读全文
posted @ 2024-03-25 09:38 txwtech 阅读(60) 评论(4) 推荐(0) 编辑
摘要:config.json声明权限配置方法 阅读全文
posted @ 2024-03-24 22:19 txwtech 阅读(45) 评论(0) 推荐(0) 编辑
摘要:更改UI界面后,保存UI界面; 返回VS中,找到UI界面文件,右击->编译;或者选中编辑的UI,按下ctrl+F7 选择项目,重新扫描解决方案,不行就多执行一次 翻译 搜索 复制 阅读全文
posted @ 2024-03-22 17:31 txwtech 阅读(188) 评论(0) 推荐(0) 编辑
摘要:教程认证考试: https://developer.huawei.com/consumer/cn/training/dev-cert-detail/101665624627448188 https://developer.huawei.com/consumer/cn/ https://develop 阅读全文
posted @ 2024-03-22 14:15 txwtech 阅读(64) 评论(0) 推荐(0) 编辑
摘要:import cv2 import numpy as np from datetime import datetime from scipy import signal #二维离散卷积运算 import math def printWithdate(str): time2 = datetime.no 阅读全文
posted @ 2024-03-22 13:45 txwtech 阅读(17) 评论(1) 推荐(0) 编辑
摘要:opencv python快速均值平滑 翻译 搜索 复制 阅读全文
posted @ 2024-03-22 08:21 txwtech 阅读(2) 评论(0) 推荐(0) 编辑
摘要:ZebraDesigner3 打印到.prn文件乱码--prn文件找不到括号 选择正确的字体 翻译 搜索 复制 阅读全文
posted @ 2024-03-18 14:16 txwtech 阅读(267) 评论(0) 推荐(0) 编辑
摘要:https://www.lulian.cn/download/20-cn.html 阅读全文
posted @ 2024-03-14 11:05 txwtech 阅读(46) 评论(1) 推荐(0) 编辑
摘要:OpenCvSharp.OpenCVException:“could not find a writer for the specified extension” cv2.imwrite报错,记得加扩展名 翻译 搜索 复制 阅读全文
posted @ 2024-03-08 09:45 txwtech 阅读(474) 评论(0) 推荐(0) 编辑
摘要:https://www.donet5.com/Home/Doc?typeId=1182 sqlsugar数据库实体配置 翻译 搜索 复制 阅读全文
posted @ 2024-03-06 14:05 txwtech 阅读(12) 评论(0) 推荐(0) 编辑
摘要:c# using语句的使用: using 语句是一种资源管理机制,自动释放不再需要的资源。它首先创建和初始化资源,然后在作用域内使用资源,最后在离开作用域时自动释放资源。这简化了资源管理,防止了内存泄漏和资源泄漏 C# 中 using 的用法 什么是 using 语句?using 语句是一种资源管理 阅读全文
posted @ 2024-03-06 08:19 txwtech 阅读(102) 评论(0) 推荐(0) 编辑
摘要:屏蔽代码: // if (env.IsDevelopment()) 翻译 搜索 复制 阅读全文
posted @ 2024-03-05 14:15 txwtech 阅读(69) 评论(0) 推荐(0) 编辑
摘要:python opencv 高斯平滑 import cv2 import numpy as np from datetime import datetime from scipy import signal #二维离散卷积运算 import math #full卷积,valid卷积, #same卷积 阅读全文
posted @ 2024-03-04 10:36 txwtech 阅读(83) 评论(0) 推荐(0) 编辑
摘要:x = np.arange(12).reshape((2,3,2)) 使用 numpy.transpose ()进行变换,其实就是交换了坐标轴,如:x.transpose(1, 2, 0),其实就是将x第二维度挪到第一维上,第三维移到第二维上,原本的第一维移动到第三维上,最后的shape为:(3,2 阅读全文
posted @ 2024-03-04 08:56 txwtech 阅读(126) 评论(0) 推荐(0) 编辑
摘要:在Python中,np.round()是NumPy库中的一个函数,用于对数组或单个数值进行四舍五入。该函数返回一个与输入类型相同的数组或数值,并可以通过可选的参数来指定保留的小数位数。 翻译 搜索 复制 阅读全文
posted @ 2024-03-04 08:23 txwtech 阅读(227) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示