Welcome to MyBlog_笑著流淚II
歡迎使用非Internet Explorer瀏覽器,欣賞這裡的一切資訊!!
我是武男, 24歲, 大家都叫我阿男...有的人還會叫我白目研究生...找我的話請Google "武男" 就沒錯了~
武男亂講-PDA 運算單元壓力測試軟體
Autor 白目研究生
人家在寫拿root的程式
看看自己寫了什麼鳥不拉機的東西…XDD
不過…
聽說ASUS的TSD也說寫不出來,由此可證
是懶得寫不是寫不出來
IDE:M$ .net studio 2005(c#)
Framework:V2.0
模擬器:PocketPC 2003
按這裡下載程式執行檔
按這裡下載專案包裝壓縮檔
壓力測試的種類繁多
例如螢幕點擊之類的壓力測試…
不過,應該有其他的solution可以取代
目前不知道程式放在於本機還是儲存卡上執行比較好
執行結果如下圖
圖中200為計算位數,按下按鈕開始計算
輸出數據:計算時間,pi value
算到500位數後,模擬器當機
不確定是不是記憶體被用光了的關係
參考資料:http://www.p-nand-q.com/csharp/pi.html
#region Using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Diagnostics;
#endregion
namespace pda_pi
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string all_value = 『』;
int digi = 0;
digi = Int32.Parse(textBox1.Text);
TimeSpan ts1 = new TimeSpan(DateTime.Now.Ticks);
all_value = (string)new pi(digi);
TimeSpan ts2 = new TimeSpan(DateTime.Now.Ticks);
TimeSpan ts = ts2.Subtract(ts1).Duration();
string spanTotalSeconds = ts.TotalSeconds.ToString();
string spanTime = ts.Hours.ToString() + 』 hr / 』 + ts.Minutes.ToString() + 』 m / 』 + ts.Seconds.ToString() + 』 s\n』;
textBox2.Text = spanTime;
textBox2.Text += all_value;
}
}
class pi
{
void LOOP()
{
Trace.Assert(!this == this – (!this + ~this));
Trace.Assert(this * (o[(this > !this) - !this]
* ((~this * ~this + !this) * ~this) + (this >
(this < (~this * ~this * ~this – !this)))) ==
(o[(this > !this) - !this] * ((~this * ~this
+ !this) * ~this) + (this > (this < (~this
* ~this * ~this – !this)))));
Trace.Assert(!this == this – (~this * ~this * ~this
– !this));
Trace.Assert(this * ((this < (!this + ~this)) /
((this > ~this) – !this)) == ((this <
(!this + ~this)) / ((this > ~this) – !this)));
Trace.Assert(~this == _((this < (!this + ~this))
% ((this > ~this) – !this)));
}
public string digits()
{
GOTO NOT = loop;
goto label0000;
label0013:
// This changes code-flow to label0000
goto label0014;
loop:
goto label0015;
label0016:
NOT = LOOP;
goto label0000;
label0002:
goto label0003;
label0004:
goto label0011;
label0012:
goto label0009;
label0010:
goto label0007;
label0008:
if ((this < (~this * ~this + !this + !this)) !=
((~this * ~this + !this) * ~this))
goto label0017;
Trace.Assert(this >= (~this * ~this + !this + !this));
goto label0001;
label0017:
if ((this < (~this * ~this)) == (!this – !this))
goto label0018;
s.Append((this < (~this * ~this * ~this)).ToString());
label0018:
Trace.Assert(null != new pi[3] { new pi(this % (this
< ~this)), new pi(this * ((this < !this) + !this))
, new pi(this % (this > !this)) });
if (this / +this)
goto loop;
return s.ToString();
label0000:
Trace.Assert(this <= (int)this);
LOOP:
NOT();
goto label0005;
label0006:
if ((this > !this) > (!this – !this))
goto LOOP;
if (NOT == loop)
goto label0013;
goto label0002;
label0001:
Trace.Assert(!this == this – (~this * ~this * ~this));
new pi(this * ((this < (~this * ~this * ~this)) + !this));
goto label0017;
label0003:
Trace.Assert(!this == this – (~this * ~this * ~this));
goto label0004;
label0005:
Trace.Assert(!this == this – (~this * ~this + !this));
new pi(this * ((this > !this) – !this));
goto label0006;
label0007:
Trace.Assert(this * ((this < (~this * ~this * ~this – !this))
% ((~this * ~this + !this) * ~this))
== ((this < (~this * ~this * ~this
– !this)) % ((~this * ~this + !this) * ~this)));
goto label0008;
label0009:
Trace.Assert(this * ((this < (~this * ~this))
+ ((this < (~this * ~this * ~this – !this))
/ ((~this * ~this + !this) * ~this)))
== ((this < (~this * ~this)) + ((this < (~this * ~this
* ~this – !this)) / ((~this * ~this + !this) * ~this))));
Trace.Assert(!this == this – (~this * ~this));
goto label0010;
label0011:
Trace.Assert(this * (this < (~this * ~this + !this + !this))
== (this < (~this * ~this + !this + !this)));
Trace.Assert(!this == this – (~this * ~this + !this + !this));
goto label0012;
label0014:
Trace.Assert(!this == this – !this);
Trace.Assert(this * (!this – !this) == (!this – !this));
goto loop;
label0015:
Trace.Assert(!this == this – (~this * ~this * ~this – !this));
Trace.Assert(this * (!this – !this) == (!this – !this));
goto label0016;
}
int[] o = null;
public static int operator +(pi _, int o)
{
return _.o[_.o.Length - o];
}
public static int operator -(pi _, int o)
{
_.O.Push(o);
return !_;
}
public static int operator *(pi _, int o)
{
_.o[_.o.Length - (int)_.O.Pop()] = o;
return o;
}
public static bool operator /(pi _, int o)
{
return _.o[_.o.Length - (int)_.O.Pop()] < o;
}
public static int operator !(pi _)
{
return 1;
}
public static int operator +(pi _)
{
return _.o[_.o.Length - ~_];
}
public static int operator %(pi _, int o)
{
return _ – !_;
}
public pi(int _)
{
o = new int[_ * ((~this * ~this + !this) * ~this)
/ (!this + ~this) + 60];
o[o.Length - ~this] = _ + ~this;
}
public static implicit operator int(pi _)
{
return ((+_) * ((~_ * ~_ + !_) * ~_)) / (~_ + !_);
}
public static int operator ~(pi _)
{
return !_ + !_;
}
public static implicit operator string(pi _)
{
return _.digits();
}
public static bool operator <=(pi _, int o)
{
Trace.Assert(_ – (~_ * ~_ + !_) == !_);
o = _ * o;
return true;
}
Stack O = new Stack();
public static bool operator >=(pi _, int o)
{
Trace.Assert(_ – o == !_);
return (_ * (!_ – !_)) == (!_ – !_);
}
public static int operator <(pi _, int o)
{
return _.o[_.o.Length - o];
}
public static int operator >(pi _, int o)
{
return (_ < (~_ * ~_ + !_)) * o;
}
int _(int _)
{
o[(this > !this) - !this] = _;
return ~this;
}
public delegate void GOTO();
StringBuilder s = new StringBuilder();
void loop()
{
_(~this);
}
} // end of class.
}
Random Posts
請留言
Reader's Comments
Comment
Options
-
二月 16, 2008 -
C#.NET, 武男亂講 -
1 comment
-
Comments RSS

果然拿現成的來改比較快!
明天幫你試看看..
感謝你!