上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 96 下一页
摘要: python socket服务端 import socket # 创建 socket 对象 server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # 绑定 IP 地址和端口号 server_socket.bind(('12 阅读全文
posted @ 2024-01-13 18:05 西北逍遥 阅读(57) 评论(0) 推荐(0)
摘要: #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace cv; int main(int argc, cha 阅读全文
posted @ 2024-01-12 22:45 西北逍遥 阅读(233) 评论(0) 推荐(0)
摘要: #include <QTcpSocket> #include <QDataStream> #include <QByteArray> void receiveObjects(QTcpSocket *socket) { QByteArray serializedData; QDataStream in 阅读全文
posted @ 2024-01-11 21:33 西北逍遥 阅读(25) 评论(0) 推荐(0)
摘要: QMap深度拷贝 #include <QMap> #include <QPair> #include <QDebug> QMap<int, QString> deepCopyQMap(const QMap<int, QString>& source) { QMap<int, QString> tar 阅读全文
posted @ 2024-01-10 22:19 西北逍遥 阅读(374) 评论(0) 推荐(0)
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class VCCameraWorkerController : MonoBehaviour { public Vector3 阅读全文
posted @ 2024-01-09 22:22 西北逍遥 阅读(72) 评论(0) 推荐(0)
摘要: osg设置节点材质 #include <osg/Geode> #include <osg/Material> #include <osgDB/ReadFile> int main() { // 创建一个 Geode 对象 osg::ref_ptr<osg::Geode> geode = new os 阅读全文
posted @ 2024-01-08 23:09 西北逍遥 阅读(59) 评论(0) 推荐(0)
摘要: #include <QMap>#include <QString>#include <iostream>int main() { QMap<QString, int> map; map["apple"] = 1; map["banana"] = 2; map["orange"] = 3; QStri 阅读全文
posted @ 2024-01-07 21:38 西北逍遥 阅读(530) 评论(0) 推荐(0)
摘要: QCheckBox* indexCheckBox = new QCheckBox(); connect(indexCheckbox,SIGNAL(stateChanged(int)),this,SLOT(slotStateChangedAction(int))); void slotStateCha 阅读全文
posted @ 2024-01-06 20:59 西北逍遥 阅读(20) 评论(0) 推荐(0)
摘要: wx.request({ url: 'https://example.com/api/data', // 替换为你的目标URL method: 'POST', data: { key1: 'value1', // 提交的数据 key2: 'value2' }, success(res) { cons 阅读全文
posted @ 2024-01-05 21:29 西北逍遥 阅读(158) 评论(0) 推荐(0)
摘要: Qt随机生成颜色 QColor #include <QColor> #include <QRandomGenerator> // 创建一个随机颜色 QColor randomColor() { QRandomGenerator generator; int r = generator.bounded 阅读全文
posted @ 2024-01-04 18:54 西北逍遥 阅读(534) 评论(0) 推荐(0)
摘要: 在三维空间中,给定x轴和z轴的方向,我们可以使用叉乘(Cross Product)来计算y轴的方向。叉乘是向量的运算,表示两个向量垂直的关系。假设有两个向量v1和v2,叉乘的结果是一个向量v3,这个向量v3垂直于v1和v2。以下是一个简单的Java方法,用于根据x轴和z轴的方向计算y轴的方向: pu 阅读全文
posted @ 2024-01-03 10:04 西北逍遥 阅读(91) 评论(0) 推荐(0)
摘要: #include <osg/Geode> #include <osgText/Text3D> int main() { // 创建场景图 osg::ref_ptr<osg::Group> root = new osg::Group(); osg::ref_ptr<osg::Geode> geode 阅读全文
posted @ 2024-01-02 21:40 西北逍遥 阅读(88) 评论(0) 推荐(0)
摘要: #include <osg/Node> #include <osgViewer/Viewer> #include <osgDB/ReadFile> #include <osg/ShapeDrawable> int main() { // 创建Box对象 osg::ref_ptr<osg::Box> 阅读全文
posted @ 2024-01-01 21:34 西北逍遥 阅读(76) 评论(0) 推荐(0)
摘要: osg添加光源 #include <osg/Light>#include <osg/LightSource>#include <osg/Node>#include <osg/Geode>#include <osgDB/ReadFile>#include <osgViewer/Viewer>int m 阅读全文
posted @ 2023-12-31 18:59 西北逍遥 阅读(142) 评论(0) 推荐(0)
摘要: #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> using namespace cv; us 阅读全文
posted @ 2023-12-30 21:11 西北逍遥 阅读(315) 评论(0) 推荐(0)
摘要: 要使用Python和OpenCV将摄像头视频保存为.mp4格式,您需要使用cv2.VideoWriter的fourcc参数指定视频编码器。在大多数情况下,使用cv2.VideoWriter_fourcc(*'mp4v')将视频保存为.mp4格式是一个好选择。以下是一个示例代码: python 复制 阅读全文
posted @ 2023-12-29 16:46 西北逍遥 阅读(606) 评论(0) 推荐(0)
摘要: qt 15有新的库产生随机数了,再也不用担心在for循环中会获取重复的随机数了。 #include <QRandomGenerator> // ... for (int i = 0; i < 10; ++i) { QRandomGenerator generator; generator.seed( 阅读全文
posted @ 2023-12-29 16:43 西北逍遥 阅读(225) 评论(0) 推荐(0)
摘要: import inspect def get_module_path(module_name): module = __import__(module_name) file_path = inspect.getfile(module) return file_path # 示例用法 module_p 阅读全文
posted @ 2023-12-28 22:13 西北逍遥 阅读(56) 评论(0) 推荐(0)
摘要: QImage originalImage("path/to/your/image.jpg"); QImage scaledImage = originalImage.scaled(800, 600, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 阅读全文
posted @ 2023-12-27 19:38 西北逍遥 阅读(88) 评论(0) 推荐(0)
摘要: import cv2 # 0代表的是电脑上的默认摄像头 cap = cv2.VideoCapture(0) # 创建VideoWriter对象,第二个参数是帧率,第三个参数是视频的宽度和高度,第四个参数是输出视频的格式 out = cv2.VideoWriter('output.mp4', cv2. 阅读全文
posted @ 2023-12-26 19:11 西北逍遥 阅读(885) 评论(0) 推荐(0)
摘要: import numpy as np import matplotlib.pyplot as plt from numpy import polynomial as P def get_arc_curve(pts): ''' 获取弧度值 :param pts: :return: ''' # 计算弦长 阅读全文
posted @ 2023-12-25 23:30 西北逍遥 阅读(249) 评论(0) 推荐(0)
摘要: import torch import torch.nn as nn import torch.optim as optim # 定义三层神经网络 class ThreeLayerNN(nn.Module): def __init__(self, input_size, hidden_size1, 阅读全文
posted @ 2023-12-24 21:37 西北逍遥 阅读(265) 评论(0) 推荐(0)
摘要: osg Node节点透明度 osg::ref_ptr<osg::StateSet> stateState = north_wall_geode->getOrCreateStateSet(); stateState->setMode(GL_BLEND, osg::StateAttribute::ON) 阅读全文
posted @ 2023-12-23 00:58 西北逍遥 阅读(82) 评论(0) 推荐(0)
摘要: win10通过.bat文件启动anaconda环境、切换路径 并运行脚本 CALL E:\Anaconda3\install\Scripts\activate.bat E:\Anaconda3\install CALL conda activate byd_2 H: cd H:\PytorchPro 阅读全文
posted @ 2023-12-22 09:14 西北逍遥 阅读(1573) 评论(0) 推荐(0)
摘要: IfcMemberTypeEnum 类型定义 此枚举定义IfcMember或IfcMemberType对象可以实现的不同类型的线性元素。 IFC2x2中的新枚举类型。 IFC2x2添加了附加标识符CHORD、PLATE、STUD。 IFC2x3添加了额外的标识符MULLION。 Enumeratio 阅读全文
posted @ 2023-12-21 22:08 西北逍遥 阅读(22) 评论(0) 推荐(0)
摘要: IfcPlateTypeEnum 类型定义 此枚举定义IfcPlate或IfcPlateType对象可以实现的不同类型的平面元素。 IFC2x2中的新枚举。 IFC2x3添加了额外的标识符CURTAIN_PANEL、SHEET。 Enumeration definition ConstantDesc 阅读全文
posted @ 2023-12-20 23:02 西北逍遥 阅读(19) 评论(0) 推荐(0)
摘要: osg绘制3D字体 osg::ref_ptr<osgText::Text3D> xText3D = new osgText::Text3D(); xText3D->setFont("font/arial.ttf"); xText3D->setCharacterSize(30); xText3D->s 阅读全文
posted @ 2023-12-19 21:36 西北逍遥 阅读(39) 评论(0) 推荐(0)
摘要: QWidget::raise() 将此qwidget提升到父小部件堆栈的顶部。 在这个调用之后,qwidget将在视觉上位于任何重叠的同级widget之前。 注意:使用activateWindow()时,可以调用此函数以确保窗口堆叠在顶部。 另请参见lower()和stackUnder()。 ### 阅读全文
posted @ 2023-12-18 21:13 西北逍遥 阅读(605) 评论(0) 推荐(0)
摘要: Slab openings 本示例说明了基于材质图层集使用定义的具有拉伸实体几何图形的标准案例板。它包括一个圆形开口和一个矩形凹槽。图465显示了生成的形状。 注:开口和凹陷是IfcOpeningStandardcase的实例。 图——带开口和凹槽的标准箱板。 注:文件中没有颜色信息,显示的颜色已由 阅读全文
posted @ 2023-12-17 22:34 西北逍遥 阅读(20) 评论(0) 推荐(0)
摘要: #17140= IFCRECTANGLEPROFILEDEF(.AREA.,'JG-600x600-1',#17139,599.999999999999,600.);#17141= IFCCARTESIANPOINT((-25.,25.,7200.)); #17143= IFCAXIS2PLACEM 阅读全文
posted @ 2023-12-16 19:01 西北逍遥 阅读(23) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 96 下一页