- Timestamp:
- 02/09/08 23:01:00 (5 years ago)
- Files:
-
- trunk/math/Bignumber.d (modified) (4 diffs)
- trunk/math/bigint/Bigint.d (modified) (2 diffs)
- trunk/readme.txt (modified) (4 diffs)
- trunk/sys/win32/ie/IE.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/math/Bignumber.d
r55 r120 10 10 Version: Initial release: 2007 11 11 12 Authors: yidabu ( D Programming Language China : http:// bbs.yidabu.com/forum-10-1.html)12 Authors: yidabu ( D Programming Language China : http://www.d-programming-language-china.org/ ) 13 13 14 14 *******************************************************************************/ 15 15 16 16 17 … … 26 27 auto b = new Bignumber("12345678901234567890123456789012345678901234567890"); 27 28 auto c = a - b; 28 Trace.formatln("a - b = ")( c.to Utf8() ).newline;29 Trace.formatln("a - b = ")( c.toString() ).newline; 29 30 30 31 c = a + b -b; 31 Trace.formatln("a + b - b = ")( c.to Utf8() ).newline;32 Trace.formatln("a + b - b = ")( c.toString() ).newline; 32 33 33 34 c = a * b / b; 34 Trace.formatln("a * b / b = ")( c.to Utf8() ).newline;35 Trace.formatln("a * b / b = ")( c.toString() ).newline; 35 36 36 37 c = a / b * b; 37 Trace.formatln("a / b * b = ")( c.to Utf8() ).newline;38 Trace.formatln("a / b * b = ")( c.toString() ).newline; 38 39 --- 39 40 */ … … 318 319 319 320 //char[] toString(){ 320 char[] to Utf8(){321 char[] toString(){ 321 322 char[64] tmp; 322 323 char[] ret; … … 345 346 auto b = new Bignumber("12345678901234567890123456789012345678901234567890"); 346 347 auto c = a - b; 347 Trace.formatln("a - b = {}", c.to Utf8() );348 Trace.formatln("a - b = {}", c.toString() ); 348 349 349 350 c = a + b -b; 350 Trace.formatln("a + b - b = {}", c.to Utf8() );351 Trace.formatln("a + b - b = {}", c.toString() ); 351 352 352 353 c = a * b / b; 353 Trace.formatln("a * b / b = {}", c.to Utf8() );354 Trace.formatln("a * b / b = {}", c.toString() ); 354 355 355 356 c = a / b * b; 356 Trace.formatln("a / b * b = {}", c.to Utf8() );357 Trace.formatln("a / b * b = {}", c.toString() ); 357 358 358 359 } trunk/math/bigint/Bigint.d
r94 r120 2 2 module dwin.math.bigint.Bigint; 3 3 4 private import dwin.math.bigint.IntException;5 private import dwin.math.bigint.Multiply; 6 private import dwin.math.bigint.Radix; 7 private importdwin.math.bigint.Lowlevel;4 private import dwin.math.bigint.IntException, 5 dwin.math.bigint.Multiply, 6 dwin.math.bigint.Radix, 7 dwin.math.bigint.Lowlevel; 8 8 9 9 private import tango.stdc.stdlib; … … 230 230 231 231 //enum Round { TOWARD_ZERO, TOWARD_INFINITY, TOWARD_MINUS_INFINITY } 232 static enum Round { TOWARD_ZERO, TOWARD_INFINITY, TOWARD_MINUS_INFINITY } //added static by yidabu .com20071025232 static enum Round { TOWARD_ZERO, TOWARD_INFINITY, TOWARD_MINUS_INFINITY } //added static by yidabu 20071025 233 233 234 234 static trunk/readme.txt
r105 r120 5 5 Anyone is free to suggest or contribute to DWin. 6 6 7 DWin 0.3 0 has been released, tested with DMD 1.023, Tango 0.99.3 Triller.7 DWin 0.35 has been released, tested with DMD 1.024 and Tango 0.99.4 Frank. 8 8 9 9 == Current branches of the DWin include == … … 40 40 41 41 Can use arbitrary size of input number. 42 43 * dwin.math.Scale :44 45 Arbitrary Scale translate.46 42 47 43 * dwin.text.pcre : … … 57 53 * svn : svn co http://svn.dsource.org/projects/dwin/trunk dwin 58 54 59 * stable : [http://www.dsource.org/projects/dwin/changeset/ 85/trunk?old_path=%2F&format=zip dwin-r85.zip]55 * stable : [http://www.dsource.org/projects/dwin/changeset/120/trunk?old_path=%2F&format=zip dwin-r120.zip] 60 56 61 57 … … 87 83 88 84 16 Dec 2007, DWin 0.30 released. 85 86 10 Feb 2008, DWin 0.35 released. 87 89 88 90 89 == Forums == trunk/sys/win32/ie/IE.d
r114 r120 59 59 ie.navigate( "http://www.d-programming-language-china.org/" ); 60 60 Sleep(10000); 61 62 auto url = "http://www.d-programming-language-china.org/"; 63 auto ie = IE(url); 64 auto str = ie.bodyInnerText(); 65 Cout(str); 61 66 --- 62 67 */ … … 64 69 { 65 70 IWebBrowser2 IE_; 71 char[] URL_; 66 72 67 73 bool navigate(char[] URL = "about:blank") … … 110 116 } 111 117 112 bool FullScreen(bool pBool)118 bool fullScreen(bool pBool) 113 119 { 114 120 return IE_.put_FullScreen(pBool == true ? -1 : 0) == S_OK; 115 } 121 } 122 123 char[] bodyInnerText() 124 { 125 if(IE_ && URL_.length) 126 { 127 this.navigate(URL_); 128 waitDocument(IE_, true); 129 auto Body = getBody(IE_); 130 scope(exit) 131 tryRelease(Body); 132 return getInnerText(Body); 133 } 134 return null; 135 } 116 136 117 137 this() … … 119 139 IE_ = InternetExplorer.coCreate!(IWebBrowser2)(ExecutionContext.LocalServer); 120 140 } 141 static IE opCall() 142 { 143 return new IE(); 144 } 145 146 this(char[] url) 147 { 148 this(); 149 this.URL_= url; 150 } 151 static IE opCall(char[] url) 152 { 153 return new IE(url); 154 } 121 155 122 156 this(IWebBrowser2 iwb2) 123 157 { 124 IE_ = iwb2; 125 } 158 this.IE_ = iwb2; 159 } 160 static IE opCall(IWebBrowser2 iwb2) 161 { 162 return new IE(iwb2); 163 } 164 165 this(IWebBrowser2 iwb2, char[] url) 166 { 167 this.IE_ = iwb2; 168 this.URL_ = url; 169 } 170 static IE opCall(IWebBrowser2 iwb2, char[] url) 171 { 172 return new IE(iwb2, url); 173 } 126 174 127 175 ~this()
