一些常用方法的記錄

2021-08-21 19:22:15 字數 757 閱讀 6213

1.建立臨時目錄

//建立臨時目錄

try catch (ioexception e)

結果:2.正規表示式的組

//測試正規表示式

string slippingwindowpointoprand = "\\(\\s*\"([^\"\\s]+)\"\\s*,";

string slippingwindowpointcollectoprand = slippingwindowpointoprand + "\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)";

matcher matcher1 = pattern.compile(slippingwindowpointoprand).matcher("( \"123\" ,");

matcher matcher2 = pattern.compile(slippingwindowpointcollectoprand).matcher("( \"123\" , 123 , 123 )");

system.out.println(slippingwindowpointoprand);

//該方法必須提前呼叫,下面方法依賴該方法的結果

if(matcher1.matches())

if(matcher2.matches())

結果:第0組,( "123" ,

第1組,123

第0組,( "123" , 123 , 123 )

第1組,123

第2組,123

第3組,123

Unity 常用的一些方法記錄

gameobject.find cube 查詢名為cube的遊戲物體 gameobject.find gameobject canvas text 可以指定路徑位置 gameobject.getcomponent 元件名稱 gameobject.find 指令碼所在的物體的名字 sendmessag...

Dotween的一些常用方法記錄

1.dotweeen.to lambda表示式 例 dotween.to myvalue x myvalue x,new vector3 0,0,0 將x的值賦給myvalue 2.object.position 物體世界座標 object.localpositon 相對座標 3.object.do...

一些常用的演算法記錄

1 插入演算法 public static void main string args arr j 1 temp 2 歸併排序 public static void main string args date time1 new date long a1 time1.gettime for int ...