简单小程序,备份而已
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class GenString {
public static void main(String[] args) throws IOException {
int[] cons = new int[]{1024,1450,4325};
File file = new File("./str.txt");
if(file.exists()){
System.out.println(file.delete());
}
for(int i = 0;i<cons.length;i++){
int len = cons[i];
char[] chars = gen(len);
FileWriter fileWriter = null;
try {
fileWriter = new FileWriter("./str.txt", true);
fileWriter.write(chars);
} catch (IOException e) {
e.printStackTrace();
}finally{
if(fileWriter!=null){
try {
fileWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
public static char[] gen(int length) {
char[] ss = new char[length];
int i=0;
while(i<length) {
int f = (int) (Math.random()*3%3);
if(f==0)
ss[i] = (char) ('A'+Math.random()*26);
else if(f==1)
ss[i] = (char) ('a'+Math.random()*26);
else
ss[i] = (char) ('0'+Math.random()*10);
i++;
}
return ss;
}
}
分享到:
相关推荐
Fingers is your one stop choice for all gesture handling in Unity (and other C# platforms as Fingers has no Unity specific code). Fingers has been tested and runs great on MAC, Windows, iOS and ...
unity Fingers 插件
Fingers - Touch Gestures for Unity 2.9.3
New Input System Compatible Fingers works on all Unity platforms. If you've used native mobile Android or iOS gestures, you will be right at home with Fingers.
Fingers - Touch Gestures for Unity 3.0.8
Unity3d手势触摸插件 Fingers - Touch Gestures for Unity 2.5.6
触摸手势 Fingers - Touch Gestures 2.2.3for Unity ;支持Unity5.6.5及以上版本。
Fingers - Touch Gestures for Unity V2.1.2.unitypackage
Fingers - Touch Gestures for Unity 2.4.3.unbitypackage 手势插件,省去造轮子的时间
Unity3d手势触摸插件 Fingers - Touch Gestures for Unity 2.9.3
Fingers - Touch Gestures for Unity v2.2.4.unitypackage 支持Unity多平台手势交互,单击,双击,拖拽等,方便开发,简单易用 unity触摸控制系统Fingers - Touch Gestures for Unity 2.2.4 所支持的Unity版本:...
Unity3d手势触摸插件 Fingers - Touch Gestures for Unity 2.9.3
Unity3d手势触摸插件 Fingers - Touch Gestures for Unity 2.9.3 亲测unity2020可用!
Fingers - Mobile Touch Input Finger Gestures for Unity v2.6.4支持Unity多平台手势交互,单击,双击,拖拽等,方便开发,简单易用
该插件是unity3d中多点触控和手势插件,里面包含许多Demo。
Fingers-TouchGesturesforUnity2.9.3
Fingers - Touch Gestures for Unity 3.0.12
Unity 手指手势交互 Fingers-Touch Gestures for Unity 3.0.13