12 2023 档案

摘要:pycharm2023增加前进后退到主界面快捷按钮 阅读全文
posted @ 2023-12-30 21:15 txwtech 阅读(291) 评论(0) 推荐(0) 编辑
摘要:python,pycharm显示前进后退按钮 阅读全文
posted @ 2023-12-29 22:03 txwtech 阅读(447) 评论(0) 推荐(0) 编辑
摘要:python记录时间 python读写文件与全局变量的使用,创建日志文件,记录时间 # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Doub 阅读全文
posted @ 2023-12-29 16:58 txwtech 阅读(40) 评论(0) 推荐(0) 编辑
摘要:File "D:/PycharmProjects/pythonProject_file_operation/main_file_op.py", line 14, in add_to_log time2 = time.strftime('%Y-%m-%d %H:%M:%s', time.localti 阅读全文
posted @ 2023-12-29 14:52 txwtech 阅读(67) 评论(0) 推荐(0) 编辑
摘要:main.spec 添加: icon='txw_ico128x128.ico'文件放在py文件的相同目录 翻译 搜索 复制 阅读全文
posted @ 2023-12-29 11:20 txwtech 阅读(377) 评论(0) 推荐(0) 编辑
摘要:安装方法:pip install PyInstaller pyinstaller -D -c xxx.py # 常用参数说明 -F :生成结果是一个exe文件,所有的第三方依赖、资源和代码均被打包进该exe内 -D :生成结果是一个目录,各种第三方依赖、资源和exe同时存储在该目录 -w :不显示命 阅读全文
posted @ 2023-12-29 11:03 txwtech 阅读(214) 评论(0) 推荐(0) 编辑
摘要:python pyinstaller打包exe实现控制台窗体关闭按钮启用与禁用 pycharm直接点run是会报错的: # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your 阅读全文
posted @ 2023-12-29 09:27 txwtech 阅读(306) 评论(0) 推荐(0) 编辑
摘要:切换到了一个不同的模块pywinauto,它是由pyinstaller官方支持的,并使用: import pywinauto pywinauto.mouse.double_click(button='left', coords=(0, 0)) 复制 翻译 搜索 复制 阅读全文
posted @ 2023-12-29 09:16 txwtech 阅读(127) 评论(0) 推荐(0) 编辑
摘要:pyinstaller打包python程序报错报错信息如下: option(s) not allowed: --onedir/--onefilemakespec options not valid when a .spec file is given 解决:不使用 -F 参数 pyinstaller 阅读全文
posted @ 2023-12-28 15:51 txwtech 阅读(465) 评论(0) 推荐(0) 编辑
摘要:ModuleNotFoundError: No module named 'win32gui' 管理员方式CMD打开命令提示符,以管理员权限运行pip install pypiwin32,重新安装 确保main.spec的路径正确: 重新打包: 其它参考:https://www.cnblogs.co 阅读全文
posted @ 2023-12-28 14:41 txwtech 阅读(235) 评论(0) 推荐(0) 编辑
摘要:python pycharm设置断点快捷键 CTRL+F8 翻译 搜索 复制 阅读全文
posted @ 2023-12-28 13:28 txwtech 阅读(32) 评论(0) 推荐(0) 编辑
摘要:安装 pypiwin32 执行: pip install pypiwin32 翻译 搜索 复制 阅读全文
posted @ 2023-12-28 12:00 txwtech 阅读(10) 评论(0) 推荐(0) 编辑
摘要:python pyinstaller同时打包多个py文件 1.运行pyinstaller main.py生成main.spec 2.修改main.spec,打包的文件需要放在main.py的相同目录 3.添加打包的文件 4.执行pyinstaller main.spec 5.找到exe文件目录并测试 阅读全文
posted @ 2023-12-28 11:29 txwtech 阅读(682) 评论(0) 推荐(0) 编辑
摘要:pyinstaller main.py生成main.exe后,进入main.exe目录后,按如下方式运行,查看错误 翻译 搜索 复制 阅读全文
posted @ 2023-12-28 11:02 txwtech 阅读(29) 评论(0) 推荐(0) 编辑
摘要:python如何调用另外一个py文件中的函数与类 mian.py calc.py mian.py 中导入import calc 函数与类对象调用方法程序启动位置:if __name__ == '__main__': print('add:', calc.func_add(6,3))print('mi 阅读全文
posted @ 2023-12-28 10:28 txwtech 阅读(314) 评论(0) 推荐(0) 编辑
摘要:python调用类创建类 并行迭代 names = ['a1', 'a2', 'a3'] ages = [11, 22, 66] for i in range(len(ages)): print(names[i], 'is', ages[i], 'years old') list_conbine = 阅读全文
posted @ 2023-12-28 10:08 txwtech 阅读(21) 评论(0) 推荐(0) 编辑
摘要:python tkinter 简单编辑器demo打开与保存文件 def load_file(): with open(filename.get()) as file: contents.delete('1.0', END) contents.insert(INSERT, file.read()) d 阅读全文
posted @ 2023-12-28 08:31 txwtech 阅读(75) 评论(0) 推荐(0) 编辑
摘要:显示pycharm 前进后退的快捷按钮到工具栏 view>Appearance>Toolbar打钩 错误删除的恢复方法: 翻译 搜索 复制 阅读全文
posted @ 2023-12-27 17:00 txwtech 阅读(712) 评论(0) 推荐(0) 编辑
摘要:python 没有switch/case,替代方法: def func_switch_case(product_name): """ switch case 示范 :param product_name: :return: """ switcher = { "book": 1, "pencil": 阅读全文
posted @ 2023-12-27 13:16 txwtech 阅读(71) 评论(0) 推荐(0) 编辑
摘要:python脚本传递args参数传递方法 import sys def main(): args = sys.argv[1:] if(len(args)==2): print("传递的参数:", args, len(args)) print(args[0]) print(args[1]) if(ar 阅读全文
posted @ 2023-12-27 11:40 txwtech 阅读(172) 评论(0) 推荐(0) 编辑
摘要:打印报错的行列数与位置 def by2by2(num): """ :param num: """ try: num2 = int(num) for bb in range(1, num2 + 1): yy2 = bb for bb2 in range(1, bb + 1): result2 = yy 阅读全文
posted @ 2023-12-27 09:34 txwtech 阅读(109) 评论(0) 推荐(0) 编辑
摘要:输入9,开始打印;0:退出 key_msg = input("please key in Number(0:exit):"),调用乘法表函数键盘输入的是字符型数据字符串比较与数字比较是否相等注意区分 # This is a sample Python script. # Press Shift+F1 阅读全文
posted @ 2023-12-27 09:07 txwtech 阅读(36) 评论(0) 推荐(0) 编辑
摘要:btn_state_container.xml p115 <?xml version="1.0" encoding="utf-8"?> <state-container xmlns:ohos="http://schemas.huawei.com/res/ohos"> <item ohos:state 阅读全文
posted @ 2023-12-26 21:31 txwtech 阅读(30) 评论(0) 推荐(0) 编辑
摘要:1.安装 PyInstaller pip install pyinstaller 2.创建python文件 3. 转换成exe pyinstaller aa2.py 完成后,我们将在当前文件夹中看到两个文件夹 “Build” 和 “Dist” 。在 “Dist” 文件夹中有一个与脚本文件名称相同的文 阅读全文
posted @ 2023-12-26 13:58 txwtech 阅读(94) 评论(0) 推荐(0) 编辑
摘要:Set-ExecutionPolicy : 无法绑定参数“ExecutionPolicy”。无法将值“RomoteSigned”转换为类型“Microsoft.PowerShell.ExecutionPolicy”。错误:“无法将标识符名称 RomoteSigned 与有效的枚举器名称相匹配。请指定 阅读全文
posted @ 2023-12-26 13:55 txwtech 阅读(703) 评论(0) 推荐(0) 编辑
摘要:cp .-r /aa1 ./aa2 ./点和斜杠表示当前目录,-r表示拷贝目录 把当前目录的aa1复制到aa2 复制文件到指定文件夹 cp test2.txt ../ttx ../两个点和斜杠,表示上一级目录 复制test2.txt 到上一级目录的ttx里面 mv移动命令 mv ./aa1 ./aa 阅读全文
posted @ 2023-12-26 13:21 txwtech 阅读(75) 评论(0) 推荐(0) 编辑
摘要:一、多进程--实现TCP并发通信 实现TCP服务器并发处理任务,可以使用多线程或多进程解决。 父(进)线程负责等待并接受客户端链接。 子(进)线程完成通信。 服务端: #include <stdio.h> #include <arpa/inet.h> #include <unistd.h> #inc 阅读全文
posted @ 2023-12-21 08:21 txwtech 阅读(182) 评论(0) 推荐(0) 编辑
摘要:鸿蒙app java代码构建用户界面 background_ability_main.xml <?xml version="1.0" encoding="UTF-8" ?> <shape xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:sha 阅读全文
posted @ 2023-12-16 21:54 txwtech 阅读(125) 评论(3) 推荐(0) 编辑
摘要:DevEco studio 本地模拟器Haxm安装失败 解决参考文档: https://developer.harmonyos.com/cn/docs/documentation/doc-guides/faq-local-emulator-0000001116085454#section870872 阅读全文
posted @ 2023-12-16 15:30 txwtech 阅读(511) 评论(0) 推荐(0) 编辑
摘要:int nRet = MyCamera.MV_CC_EnumDevices_NET(MyCamera.MV_GIGE_DEVICE | MyCamera.MV_USB_DEVICE, ref m_stDeviceList); if (0 != nRet) { ShowErrorMsg("Enumer 阅读全文
posted @ 2023-12-14 17:07 txwtech 阅读(264) 评论(0) 推荐(0) 编辑
摘要:严重性 代码 说明 项目 文件 行 禁止显示状态错误 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 ..\package 阅读全文
posted @ 2023-12-13 08:52 txwtech 阅读(177) 评论(0) 推荐(0) 编辑
摘要:c# float 取小数点后两位保留位数 print((0.123456789).ToString("F2") + "保留2位小数"); print((0.123456789).ToString("F3") + "保留3位小数"); print((0.123456789).ToString("F4" 阅读全文
posted @ 2023-12-12 14:37 txwtech 阅读(703) 评论(0) 推荐(0) 编辑
摘要:华为AI计算框架昇思MindSpore零基础快速入门 (上) https://developer.huaweicloud.com/develop/aigallery/home.html AI专家一席谈:复用算法、模型、案例,AI Gallery带你快速上手应用开发 盘古大模型 学习课程 翻译 搜索 阅读全文
posted @ 2023-12-11 10:17 txwtech 阅读(38) 评论(3) 推荐(0) 编辑
摘要:The type of the target device does not match the deviceType configured in the config.json file of the selected module. 在entry->src->main->config.json, 阅读全文
posted @ 2023-12-10 09:35 txwtech 阅读(606) 评论(0) 推荐(0) 编辑
摘要:鸿蒙app获取文本控件按钮控件_修改控件名称_按钮触发事件_提示信息显示 package com.example.myapplication.slice; import com.example.myapplication.ResourceTable; import ohos.aafwk.abilit 阅读全文
posted @ 2023-12-09 21:55 txwtech 阅读(104) 评论(0) 推荐(0) 编辑
摘要:预览中显示屏幕坐标系设置 阅读全文
posted @ 2023-12-09 20:03 txwtech 阅读(39) 评论(0) 推荐(0) 编辑
摘要:转载:https://www.cnblogs.com/zytlk/p/16812928.html 使用C++ 来调用C#DLL 并且调试程序环境:使用VS studio 2019 C#项目的设置1、C# -> 属性 -> 应用程序 -> 目标框架 ->.NET Framework 4 2、C# -> 阅读全文
posted @ 2023-12-08 10:43 txwtech 阅读(368) 评论(0) 推荐(0) 编辑
摘要:删除试试 <dependentAssembly> // <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <bindingRedirect oldVersion= 阅读全文
posted @ 2023-12-06 16:13 txwtech 阅读(355) 评论(0) 推荐(0) 编辑
摘要:托管调试助手 "CallbackOnCollectedDelegate":“对“OpenCvSharp!OpenCvSharp.MouseCallback::Invoke”类型的已垃圾回收委托进行了回调。这可能会导致应用程序崩溃、损坏和数据丢失。向非托管代码传递委托时,托管应用程序必须让这些委托保持 阅读全文
posted @ 2023-12-06 15:45 txwtech 阅读(229) 评论(0) 推荐(0) 编辑
摘要:分别安装: OpenCvSharp4.4.8.0.20230708 OpenCvSharp4.Extensions.4.8.0.20230708 OpenCvSharp4.Windows.4.8.0.20230708 安装OpenCvSharp4.Extensions.4.8.0.20230708 阅读全文
posted @ 2023-12-05 13:32 txwtech 阅读(1075) 评论(7) 推荐(0) 编辑
摘要:鸿蒙app开发在线课程 https://developer.huawei.com/consumer/cn/training/ 学习文档: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V2/arkts-get-starte 阅读全文
posted @ 2023-12-04 09:57 txwtech 阅读(51) 评论(1) 推荐(0) 编辑
摘要:deveco studio代码向前向后按钮 阅读全文
posted @ 2023-12-03 22:06 txwtech 阅读(131) 评论(0) 推荐(0) 编辑
摘要:js_javascripts语法参考 https://developer.harmonyos.com/cn/docs/documentation/doc-guides/js-framework-syntax-js-0000001281361178 阅读全文
posted @ 2023-12-03 21:24 txwtech 阅读(7) 评论(0) 推荐(0) 编辑
摘要:DevEco项目默认创建目录修改路径方法 右上角 settings->appearance&behavior->system settings->project,default project directory进行修改 阅读全文
posted @ 2023-12-03 21:13 txwtech 阅读(1517) 评论(0) 推荐(0) 编辑
摘要:按钮创建 鸿蒙app代码开发文档 https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ide-low-code-overview-0000001480179573-V3 使用低代码开发应用: https://deve 阅读全文
posted @ 2023-12-03 20:07 txwtech 阅读(125) 评论(0) 推荐(0) 编辑
摘要:TypeScript编程 中文PDF完整版 https://pan.baidu.com/s/1gQvH_iny9AxpbL6y90BJUQ code:2ikb 阅读全文
posted @ 2023-12-02 21:27 txwtech 阅读(313) 评论(0) 推荐(2) 编辑
摘要:鸿蒙app开发ets是什么含义呢? 其中.ets结尾的eTS(extended TypeScript)文件 阅读全文
posted @ 2023-12-02 21:18 txwtech 阅读(132) 评论(0) 推荐(0) 编辑
摘要:鸿蒙系统app开发文档ArkTS语言 3.1/4.0文档 https://developer.harmonyos.com/cn/docs/documentation/doc-guides/fa-pageability-0000001281001030 构建第一个ArkTS应用 https://dev 阅读全文
posted @ 2023-12-02 20:43 txwtech 阅读(198) 评论(0) 推荐(0) 编辑
摘要:Harmony OSHarmony SDK API Harmony 4.0 9 Harmony 3.1 9 Harmony 3.0 8 Harmony 3.0 pre 7 Harmony 2.2.0 6 Harmony 2.1.0 5 Harmony 2.0 4 https://blog.csdn. 阅读全文
posted @ 2023-12-02 19:34 txwtech 阅读(2736) 评论(0) 推荐(0) 编辑
摘要:AppGallery Connect AppGallery Connect通过AGC申请证书 阅读全文
posted @ 2023-12-01 22:17 txwtech 阅读(15) 评论(0) 推荐(0) 编辑
摘要:INSTALL_PARSE_FAILED_USESDK_ERROR处理指导 compileSdkVersion and releaseType of the app do not match the apiVersion and releaseType on the device. build.gr 阅读全文
posted @ 2023-12-01 21:00 txwtech 阅读(2843) 评论(0) 推荐(0) 编辑
摘要:DevEco Studio API6,7支持java语言,8,9不支持 API9不支持java语言 阅读全文
posted @ 2023-12-01 19:56 txwtech 阅读(244) 评论(0) 推荐(0) 编辑

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