- 博客(12)
- 收藏
- 关注
原创 1 内存分区模型
1.1 程序运行前/* * @Author: Heweifu * @Date: 2021-09-26 23:06:01 * @LastEditTime: 2021-09-26 23:09:31 * @LastEditors: Heweifu * @Description: 内存分区测试 * @FilePath: \C++核心编程\1内存分区模型\1_1程序运行前.cpp */#include <iostream>using namespace std;//全局变量
2021-09-26 23:20:45
134
原创 C#数组队列操作
static void Main(string[] args) { Queue<byte[]> q = new Queue<byte[]>(); //指定队列为数组类型,这里没报错 byte[] buffer1 = new byte[3] { 0x01, 0x02, 0x03 }; byte[] buffer2 = new byte[3] { 0x04, 0x05, 0x06 ...
2021-09-25 12:12:14
359
原创 C#线程收发数据时,收数据阻塞问题
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;using System.Threading.Tasks;u.
2021-09-24 17:36:29
733
原创 C#跨线程设置控件值
1、定义委托 1 delegatevoidSetTextCallback(stringtext); 2、实现委托 1 2 3 4 5 6 7 8 9 10 11 12 13 privatevoidSetText(stringtext) { //如果调用控件的线程和创建创建...
2021-09-24 17:33:53
242
原创 C#_CRC计算
#region CRC32校验函数 private static UInt16[] CRC16_TABLE = { 0x0000,0x1021,0x2042,0x3063,0x4084,0x50a5,0x60c6,0x70e7, 0x8108,0x9129,0xa14a,0xb16b,0xc18c,0xd1ad,0xe1ce,0xf1ef, 0x1231,0x0210,0x3273,0x2252,0x52b5,0x4294,0...
2021-09-15 14:55:53
401
原创 Python_字符串列表写入txt
1、将字符串列表脱壳成字符串并写入txt def save_data(self, filename, data): # filename为写入txt文件的路径,data为要写入数据列表. file = open(filename, 'w') for i in range(len(data)): s = str(data[i]).replace( '[', '').replace(']', '') # 去除
2021-09-14 21:28:58
2026
原创 PyQT_窗口置顶
1、窗口置顶 def on_inTopCheckBox_clicked(self, checked): if not checked: self.ui.setWindowFlags(Qt.Widget) # 取消置顶 else: self.ui.setWindowFlags(Qt.WindowStaysOnTopHint) # 置顶 self.ui.show()...
2021-09-14 21:19:13
964
原创 PyQT_创建窗体
1、窗体模板from PySide2.QtWidgets import QApplication, QMessageBox, QFileDialogfrom PySide2.QtUiTools import QUiLoaderfrom PySide2.QtCore import Qtclass MainForm: def __init__(self): self.ui = QUiLoader().load(".\mainwindow.ui") # 加载UIif _
2021-09-14 21:14:03
111
原创 PyQT_文件夹及其文件操作
1、打开文件夹self.ui.lineEdit.setEnabled(False) # 设置文件夹路径不可编辑 def openfiledir(self): """ @program:打开源代码文件夹 :return: """ self.dir_path = QFileDialog.getExistingDirectory( self.ui, "choose directory", r"
2021-09-14 13:41:41
652
原创 Python_遍历文件夹及其文件
def walkFile(self): """ @:param: 获取所有.c文件的目录 :return: """ for root, dirs, files in os.walk(self.dir_path): # root 表示当前正在访问的文件夹路径 # dirs 表示该文件夹下的子目录名list # files 表示该文件夹下的文件list...
2021-09-14 11:59:18
75
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人