上一页 1 2 3 4 5 6 7 ··· 96 下一页
摘要: unity3d 动态改变物体的位置 using UnityEngine; public class MoveObject : MonoBehaviour { void Start() { // GameObject myObject = GameObject.Find("myObject"); if 阅读全文
posted @ 2024-08-11 16:26 西北逍遥 阅读(120) 评论(0) 推荐(0)
摘要: python 读取文本文件 # 打开文件 with open('myfile.txt', 'r') as file: # 读取文件内容 content = file.read() # 打印文件内容 print(content) ########################## 阅读全文
posted @ 2024-08-10 19:38 西北逍遥 阅读(22) 评论(0) 推荐(0)
摘要: string currentDate = DateTime.Now.ToString("yyyyMMdd"); Console.WriteLine("Current Date: " + currentDate); ############################## 阅读全文
posted @ 2024-08-09 14:18 西北逍遥 阅读(118) 评论(0) 推荐(0)
摘要: SELECT w.company, COUNT(DISTINCT d.RFID_ID) AS total_unique_checkins -- 对每个公司,计算不同RFID_ID的打卡次数 FROM t_worker w JOIN t_rfid r ON w.signNum = r.num1 JOI 阅读全文
posted @ 2024-08-08 20:49 西北逍遥 阅读(9) 评论(0) 推荐(0)
摘要: python 逐行读取文本文件 # 打开文件 with open('myfile.txt', 'r') as file: # 逐行读取文件内容 for line in file: print(line, end='') # 注意,print 函数默认会在每行末尾添加换行符,所以这里使用 end='' 阅读全文
posted @ 2024-08-07 20:22 西北逍遥 阅读(39) 评论(0) 推荐(0)
摘要: python 写入文本文件 # 打开文件,如果文件不存在则创建它 with open('myfile.txt', 'w') as file: # 写入内容 file.write('kkkkkkkkkkkkkkkkkkk!\n') ################################### 阅读全文
posted @ 2024-08-06 18:48 西北逍遥 阅读(31) 评论(0) 推荐(0)
摘要: public class CharCountExample { public static void main(String[] args) { String text = "Hello, world! How are you?"; char targetChar = 'o'; int count 阅读全文
posted @ 2024-08-05 19:05 西北逍遥 阅读(95) 评论(0) 推荐(0)
摘要: #include <QDate> #include <QString> #include <QDebug> int main() { // 创建一个QDate对象 QDate date(2023, 4, 5); // 假设日期是2023年4月5日 // 使用toString()方法将日期格式化为yy 阅读全文
posted @ 2024-08-04 13:49 西北逍遥 阅读(48) 评论(0) 推荐(0)
摘要: python 追加到文本文件 # 打开文件以追加内容 with open('myfile.txt', 'a') as file: # 追加内容 file.write('kkkkkkkkkkkkkkkkkkkkk.\n') ################################# 阅读全文
posted @ 2024-08-03 19:35 西北逍遥 阅读(25) 评论(0) 推荐(0)
摘要: using System.IO; using UnityEngine; using UnityEngine.UI; public class SaveRawImageAsPNG : MonoBehaviour { public RawImage rawImage; public void SaveI 阅读全文
posted @ 2024-08-01 15:25 西北逍遥 阅读(98) 评论(0) 推荐(0)
摘要: using System; namespace DateTimeExample { class Program { static void Main(string[] args) { // 获取当前时间 DateTime now = DateTime.Now; // 格式化日期为 yyyyMMdd 阅读全文
posted @ 2024-07-31 19:26 西北逍遥 阅读(227) 评论(0) 推荐(0)
摘要: python 修改文本文件 # 读取文件内容 with open('myfile.txt', 'r') as file: content = file.read() # 修改内容(这里只是一个简单的替换示例) modified_content = content.replace('old_text' 阅读全文
posted @ 2024-07-30 18:53 西北逍遥 阅读(51) 评论(0) 推荐(0)
摘要: python 读取CSV文件 import csv # 打开CSV文件 with open('example.csv', 'r', newline='') as file: reader = csv.reader(file) # 遍历CSV文件的每一行 for row in reader: prin 阅读全文
posted @ 2024-07-29 16:52 西北逍遥 阅读(33) 评论(0) 推荐(0)
摘要: python 写入CSV文件 import csv # 定义要写入CSV文件的数据 data = [ ['Name', 'Age', 'City'], ['Alice', '25', 'New York'], ['Bob', '30', 'San Francisco'], # ... ] # 打开C 阅读全文
posted @ 2024-07-28 15:56 西北逍遥 阅读(33) 评论(0) 推荐(0)
摘要: python 读取CSV文件 import csv # 打开CSV文件 with open('example.csv', 'r', newline='') as file: reader = csv.DictReader(file) # 遍历CSV文件的每一行(作为字典) for row in re 阅读全文
posted @ 2024-07-27 23:19 西北逍遥 阅读(35) 评论(0) 推荐(0)
摘要: python 使用字典写入CSV文件 import csv # 定义要写入CSV文件的数据(作为字典列表) data = [ {'Name': 'Alice', 'Age': '25', 'City': 'New York'}, {'Name': 'Bob', 'Age': '30', 'City' 阅读全文
posted @ 2024-07-26 23:04 西北逍遥 阅读(219) 评论(0) 推荐(0)
摘要: python两个三阶矩阵相乘 import numpy as np matrix1 = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) matrix2 = np.array([[9, 8, 7], [6, 5, 4], [3, 2, 1]]) result = 阅读全文
posted @ 2024-07-25 23:31 西北逍遥 阅读(29) 评论(0) 推荐(0)
摘要: C++ opencv putText #include <opencv2/opencv.hpp> int main() { // 创建一个空白图像 cv::Mat img(400, 400, CV_8UC3, cv::Scalar(255, 255, 255)); // 设置文本内容 std::st 阅读全文
posted @ 2024-07-24 16:28 西北逍遥 阅读(494) 评论(0) 推荐(0)
摘要: unity3d碰撞 Unity3D提供了多个碰撞事件函数,用于处理不同类型的碰撞情况。常用的碰撞事件函数包括: OnCollisionEnter:当两个物体开始碰撞时触发。这是碰撞的起始点,可以用于执行碰撞开始时的逻辑,如播放碰撞音效、改变游戏状态等。 OnCollisionStay:在两个物体持续 阅读全文
posted @ 2024-07-23 19:38 西北逍遥 阅读(96) 评论(0) 推荐(0)
摘要: unity3d Dictionary 根据key获取value using System; using System.Collections.Generic; using UnityEngine; public class DictionaryExample : MonoBehaviour { pr 阅读全文
posted @ 2024-07-21 22:26 西北逍遥 阅读(171) 评论(0) 推荐(0)
摘要: unity3d缩放物体 using UnityEngine; public class ScaleObject : MonoBehaviour { // 缩放速度,可以根据需要调整 public float scaleSpeed = 0.1f; // 控制缩放的方向,这里以X轴为例 public b 阅读全文
posted @ 2024-07-20 23:05 西北逍遥 阅读(97) 评论(0) 推荐(0)
摘要: InvalidOperationException: Insecure connection not allowed 在Edit -> Project Settings -> Player中找到平台设置(比如“PC, Mac & Linux Standalone”或者你的目标平台),然后滚动到底部找 阅读全文
posted @ 2024-07-19 23:01 西北逍遥 阅读(213) 评论(0) 推荐(0)
摘要: unity3d get post请求 using UnityEngine; using UnityEngine.Networking; public class NetworkRequestExample : MonoBehaviour { IEnumerator Start() { string 阅读全文
posted @ 2024-07-18 18:12 西北逍遥 阅读(161) 评论(0) 推荐(0)
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using Mono.Data.Sqlite; // 注意:这取决于你使用的SQLite库 public class SQLiteExampl 阅读全文
posted @ 2024-07-17 21:15 西北逍遥 阅读(37) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5] y = [2, 3, 2, 4, 2] plt.scatter(x, y) plt.title('Scatter Plot Example') # 添加标题 plt.xlabel('X Axis' 阅读全文
posted @ 2024-07-16 11:32 西北逍遥 阅读(42) 评论(0) 推荐(0)
摘要: python numpy 1x3的矩阵乘3x3的矩阵 import numpy as np # 创建1x3的矩阵A A = np.array([[1, 2, 3]]) # 创建3x3的矩阵B B = np.array([[4, 5, 6], [7, 8, 9], [10, 11, 12]]) # 矩 阅读全文
posted @ 2024-07-15 21:15 西北逍遥 阅读(103) 评论(0) 推荐(0)
摘要: python根据三个点计算平面的法向量 import numpy as np # 定义三个点的坐标 point1 = np.array([1, 2, 1]) point2 = np.array([5, 1, 1]) point3 = np.array([4, 6, 2]) # 计算两个向量 vect 阅读全文
posted @ 2024-07-14 21:39 西北逍遥 阅读(244) 评论(0) 推荐(0)
摘要: import numpy as np # 定义三个点的坐标 point1 = np.array([1, 2, 1]) point2 = np.array([5, 1, 1]) point3 = np.array([4, 6, 2]) # 计算两个向量 vector1 = point2 - point 阅读全文
posted @ 2024-07-13 16:58 西北逍遥 阅读(278) 评论(0) 推荐(0)
摘要: unity3d 读取串口 using System.IO.Ports; using UnityEngine; public class SerialCommunication : MonoBehaviour { SerialPort mySerialPort = new SerialPort("CO 阅读全文
posted @ 2024-07-12 00:27 西北逍遥 阅读(146) 评论(0) 推荐(0)
摘要: python字典的四种遍历方式 使用for循环遍历字典的键: my_dict = {'a': 1, 'b': 2, 'c': 3} for key in my_dict: print(key, my_dict[key]) 使用items()方法遍历字典的键值对: my_dict = {'a': 1, 阅读全文
posted @ 2024-07-11 23:20 西北逍遥 阅读(773) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 96 下一页