原创 Assertion failed: Assertion failed on expression: 'pred(* previous, *i)'

Assertion failed: Assertion failed on expression: 'pred(* previous, *i)' UnityEngine.Object:Instantiate(GameObject) Idl

原创 索引器(封裝一個數組集合)

索引器必須以this關鍵字定義 public string this[int index]{ get { retur arr[index];} set { arr[index] = value;} } class Program  

原创 Queue(隊列) Stack(堆棧)

Queue(隊列)是先進先出的集合; Stack(堆棧)是後進先出的集合.             Queue drr = new Queue();             Queue<int> frr = new Queue<int>(

原创 封裝一個數組類

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespa

原创 解決 使用VisualStudioCode無法跳轉到定義 F12不起作用

錯誤日誌中可能有此段內容 [fail]: OmniSharp.MSBuild.ProjectLoader         The reference assemblies for .NETFramework,Version=v4.6 we

原创 Jupyter notebook中用cv2.imshow()不能顯示圖片的問題

import cv2 as cv from matplotlib import pyplot as plt img = cv.imread('1.jpg') cv.imshow('hello',img) #cv.waitKey(0)

原创 unity編輯器中 一個文件在哪些Prefab或場景中被引用

有時候需要知道一個文件例如一個腳本,一個圖片,或者一個動畫被哪些Prefab引用,或者出現在哪些場景中 可以用以下工具進行查找 存在的問題 1.遍歷了所有的prefab所以會卡,效率不高(可以分文件夾再遍歷) 2.沒有仔細測試過只是提供

原创 C# 獲取系統時間及時間格式

--DateTime 數字型 System.DateTime currentTime=new System.DateTime(); 取當前年月日時分秒      currentTime=System.DateTime.Now; 取當前年 

原创 遍歷Dictionary和HashTable的方法

class Program     {         static void Main(string[] args)         {             Hashtable ht = new Hashtable();      

原创 索引器(封裝一個數組類)改params關鍵字

對上一篇文章的修改 public void Splice(int IOindex,int IOcount,params T[] a) 任意位置刪,除任意個數,添加任意個數的元素 params只能使用一次 參數數組必需是形參類表中的最後一個

原创 基於unity Azure Kinect VFX粒子互動環境搭建

環境準備 1.導入Azure Kinect Examples for Unity.unitypackage 2.package Manager中下載兩個插件 Visual Effect Graph High Definition RP

原创 簡單的商品操作

namespace 簡單的商品操作 {     class Program     {         static void Main(strin

原创 vscode Processing 插件安裝調試過程

1.安裝Processing模塊   2.打開Processing文件所在的文件夾   3.編輯好程序後 運行任務               配置的內容 下面的路徑改成你自己的程序的路徑 "command": "H:\\

原创 c#容器在使用過程中的選擇

如何選用容器

原创 泛型

class Program     {         static void Main(string[] args)         {             B<int> s = new B<int>();