View previous topic :: View next topic |
Author |
Message |
Lynn
Joined: 27 Aug 2004 Posts: 89
|
Posted: Fri Aug 27, 2004 6:15 am Post subject: zlib sample code for tutorial |
|
|
I attempted to post sample code to the "Standard Library" section of the tutorial, but was unsuccesful. Is this disabled except for certain people (which certainly makes sense.)
If appropriate, would you post the zlib example below? It is a simplified version of the zip example that Walter B. posted. It only has zlib's compress and uncompress calls to minimize 'distractions' from using zlib.
TIA,
Lynn Allan
import std.zlib;
int main(char[][] args)
{
ubyte[] beforeCompression = cast(ubyte[])
"the quick brown fox jumps over the lazy dog\r
the quick brown fox jumps over the lazy dog\r
";
ubyte[] compressed;
ubyte[] afterDecompression;
compressed = cast(ubyte[])std.zlib.compress(cast(void[])beforeCompression);
afterDecompression = cast(ubyte[])std.zlib.uncompress(cast(void[])compressed);
assert(beforeCompression == afterDecompression);
printf("Success! Uncompressed Size: ?d Compressed Size: ?d\n",
beforeCompression.length, compressed.length);
return 0;
} |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
|
Back to top |
|
|
Lynn
Joined: 27 Aug 2004 Posts: 89
|
Posted: Fri Aug 27, 2004 10:10 am Post subject: |
|
|
Hi jcc7,
Thanks for the prompt reply!
When I attempted to add an example, I got a page that looked appropriate, but there were a series of [] that I couldn't figure out how to change to enter anything.
Example Name:
[] <--- Couldn't enter text here
Category:
[] <--- or here
Description:
[] <--- or here
Type your example here (watch out for word-wrap):
[] <--- or here
Also, is there a way to have the long paragraphs (like the above) to wrap in the forum thread viewer? For me, long paragraphs scroll to the right in the browser window, and are difficult to view.
Baffled,
Lynn |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Fri Aug 27, 2004 11:54 am Post subject: |
|
|
Lynn wrote: | When I attempted to add an example, I got a page that looked appropriate, but there were a series of [] that I couldn't figure out how to change to enter anything.
Example Name:
[] <--- Couldn't enter text here
...
Also, is there a way to have the long paragraphs (like the above) to wrap in the forum thread viewer? For me, long paragraphs scroll to the right in the browser window, and are difficult to view.
Baffled,
Lynn | I'm baffled, too. Which browser are you using and what's the resolution of your monitor? The phpBB forum is should be pretty solid, but I won't make any guarantees about the tutorial section. I haven't really tested the tutorial on different browers and resolutions like I probably should. I usually use Mozilla Firefox at around 1280 x 1024 resolution, but I don't know of any reason why it shouldn't work with other browsers and resolutions.
Those are my guesses at why the problems may occur, but I could be completely wrong. |
|
Back to top |
|
|
Lynn
Joined: 27 Aug 2004 Posts: 89
|
Posted: Fri Aug 27, 2004 12:45 pm Post subject: |
|
|
Hi jcc7,
I'm using IE 6 with the latest updates on a monitor at 1280*1024. That should be more than adequate.
This is a really long line which may or may not 'wrap' on my computer. It looks ok during preview but let's see how is shows up in the forum. ... aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq rrr sss ttt uuu vvv www xxx yyy zzz AAA BBB CCC DDD EEE FFF GGG HHH III JJJ KKK LLL MMM NNN OOO PPP QQQ RRR SSS TTT UUU VVV WWW XXX YYY ZZZ
Lynn A. |
|
Back to top |
|
|
Lynn
Joined: 27 Aug 2004 Posts: 89
|
Posted: Sat Aug 28, 2004 6:26 am Post subject: |
|
|
Word wrap seems ok now .... ??? It seemed like it wasn't on one computer, but perhaps they had a discussion among themselves and resolved to behave themselves |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sat Aug 28, 2004 11:57 am Post subject: |
|
|
Lynn wrote: | I'm using IE 6 with the latest updates on a monitor at 1280*1024. That should be more than adequate. | IE seems to be the culprit. I tried to post an example using IE, and I saw the same thing that you described. Now that I can reproduce it, I should be able to fix it. Hopefully, I can get the form to be functional and pretty in all browsers.
Update:
Okay, I think I found the changes needed to make the "add an example" form look decent in IE and Firefox. I'm sure Brad (the admin) will apply the changes when he gets a chance (I sent him a Private Message). |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sat Aug 28, 2004 6:48 pm Post subject: |
|
|
Okay, Brad updated the site, and it now works for me. Let me know if you try to add an example using Internet Explorer (or any other browser) and it fails. |
|
Back to top |
|
|
|