Page 1 of 2 12>
Topic Options
#3339 - 2000-06-20 04:26 PM Proper procedure for posting code
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Gang:

What is the proper procedure for posting code to this BBS ? I know about the code/slash-code syntax and that, but when one actually copies the code in, what's the proper way of doing it ?

Cutting and pasting straight from notepad or write doesn't seem to work very well ( for me anyway ). When I try to copy/paste the code back into my machine, the crlf's get all screwed up !

Am I missing something here ?

cj/bryce/mca/box:

You guys seem to have a handle on it. How do you post code ?

Shawn.

Top
#3340 - 2000-06-20 06:18 PM Re: Proper procedure for posting code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
and here's my repy !
i posted my code (not to much) yet by simply
pasting it from notepad between code /code...

i think if the lines get over a certain amount of chars the word wrap will screw it
up ....
the first problems i have was shawns leap year snippet , then came cj's tictactoe.scr
[it took me at least 1/2 hour to reformat it]

the best results with 'big' code grabbing from this bb i got by pasting it into 'full-screen' Winword

so far so good

Jochen

_________________________



Top
#3341 - 2000-06-20 06:52 PM Re: Proper procedure for posting code
BoxKite Offline
Da Box
*****

Registered: 2000-05-17
Posts: 282
Loc: Vacaville,CA,USA
Like you and Jochen I use notepad. And like you I cut and paste. My rule of thumb is to maximize the notepad screen and as the code reaches 7/10th the screen I concatenate the code with the next line using "+". This seems to help in readibility when I use the code-slash-code method.

Like you I find when I cut and paste code from the forum topic to notepad there are about 10 spaces added to the left of each line. Don't know why but have learned to live with it.

------------------
BoxKite
FACTA NON VERBA

_________________________
Box
FACTA NON VERBA

Top
#3342 - 2000-06-20 07:41 PM Re: Proper procedure for posting code
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Another way for insertion of line breaks is.


  • use MsWord text.
  • use proper font-size (f.e. size=8) and save as.
  • select as 'save as filetype' TextOnly with Line Breaks.
  • open this file by notepad.
  • check layout and after statisfaction you can do a copy/paste action.

Greetings.

[This message has been edited by MCA (edited 20 June 2000).]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#3343 - 2000-06-20 07:52 PM Re: Proper procedure for posting code
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
MCA:

What would be a`"proper font" ?

Courier, Courier New, Other ?

Shawn.

Top
#3344 - 2000-06-20 08:12 PM Re: Proper procedure for posting code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
just a guess...

NON-TRUE-TYPE ?????????

will try it with 'Fixedsys'

ahhh,stop, by the way gang :

what is the proper 'chr(xxx)' for © ???

Thanx
Jochen

_________________________



Top
#3345 - 2000-06-20 09:57 PM Re: Proper procedure for posting code
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Which font you are using is no problem at all, because during the save action it will be converted to an useful one for notepad.
For example use select:

  • font type: Arial (so you see the effects of a proportional font)
  • font size: 8

Example of a font "Arial" with size "5":

code:

? only encrypted code is located in the common folder (f.e. NETLOGON). code which is very hard to modify. during decryption you can check of code has been
changed or becomes damaged.
? a kixtart script for decryption is very slow. by testing a short script it takes too must time and it is comsuming a great lot of CPU time. a short script
for me is about 250 lines.
by using another program language we get an enormous speed up. a script of 10.000 lines can be decrypted within 2 à 5 sec before starting
running kix32.exe procedure.
? do not use only XOR encryption. we think about many elements:

stripping Kixstart script first.
f.e. delete empty lines, remove comment statements, remove print statements when you are only using WRITE statements, change nice variable names to meaningless
variable names (f.e. $x1, $x2, ..., $x999), combining separate lines to one line. compress kixtart script. calculate CRC value of script. encrypt script by XOR
and/or other encryption techniques with a dynamic password usage.
a dynamic password means: each time you are running the encryption/compression procedure the password will be different, which means the encrypt output file
contains NEVER the same contents. make it possible to run the procedure over and over, so cracking because harder and harder.

Result of a script of 300.000 bytes is 40.000 bytes after using of compression and encryption techniques. Encryption cost about 10 à 20 seconds.
Decryption cost about 2 à 5 seconds. The processor speeds influences these results.


Example of a font "Arial" with size "8":

code:

? only encrypted code is located in the common folder (f.e. NETLOGON). code
which is very hard to modify. during decryption you can check of code has
been changed or becomes damaged.
? a kixtart script for decryption is very slow. by testing a short script it
takes too must time and it is comsuming a great lot of CPU time. a short
script for me is about 250 lines.
by using another program language we get an enormous speed up. a script of
10.000 lines can be decrypted within 2 à 5 sec before starting
running kix32.exe procedure.
? do not use only XOR encryption. we think about many elements:

stripping Kixstart script first.
f.e. delete empty lines, remove comment statements, remove print statements when
you are only using WRITE statements, change nice variable names to meaningless
variable names (f.e. $x1, $x2, ..., $x999), combining separate lines to one
line. compress kixtart script. calculate CRC value of script. encrypt script by
XOR and/or other encryption techniques with a dynamic password usage.
a dynamic password means: each time you are running the encryption/compression
procedure the password will be different, which means the encrypt output file
contains NEVER the same contents. make it possible to run the procedure over and
over, so cracking because harder and harder.

Result of a script of 300.000 bytes is 40.000 bytes after using of compression
and encryption techniques. Encryption cost about 10 à 20 seconds.
Decryption cost about 2 à 5 seconds. The processor speeds influences these
results.


Greetings.

[This message has been edited by MCA (edited 20 June 2000).]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#3346 - 2000-06-20 10:07 PM Re: Proper procedure for posting code
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Jochen,

Your question:

quote:
what is the proper 'chr(xxx)' for ©

The standard ASCII table doesn't contain this symbol. so there is no CHR-code.
Greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#3347 - 2000-06-20 10:12 PM Re: Proper procedure for posting code
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Shawn,

When you are copy/paste the code back to your machine you must it paste it in MsWord.
I get also the problem with Notepad.
Greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#3348 - 2000-06-21 09:07 AM Re: Proper procedure for posting code
Anonymous
Unregistered


Jochen, MCA,

Your question:


quote:
--------------------------------------------------------------------------------
what is the proper 'chr(xxx)' for ©
--------------------------------------------------------------------------------

The standard ASCII table doesn't contain this symbol. so there is no CHR-code.
Greetings.


Chr(169)


Code
_____________________________________________

Cls
$Chr=0
:Start
$Chr=$CHR+1
? $CHR
? CHR($CHR)
goto start
:End
Exit
_____________________________________________


Jos

Top
#3349 - 2000-06-21 10:45 AM Re: Proper procedure for posting code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Jos,

in the first i tried chr(169)
[Yes,lads and lassies ; I got a charmap too ]

but it returns only 'c' and NOT '©' ....

please don't let me look like a 'dummass' ,
i am just a little 'confusiasted'

Jochen

[b.t.w.: Jos : Your code example will loop infinitely until it logs You OFF!!!]

[This message has been edited by jpols (edited 21 June 2000).]

_________________________



Top
#3350 - 2000-06-21 11:01 AM Re: Proper procedure for posting code
Anonymous
Unregistered


Jochen,

Strange in my DOS box I'll get the right caracter. Maybe the Codepage is responsible for that. The code that I posted was to figure out the CHR string with the /d parameter.

Jos

Top
#3351 - 2000-06-21 11:59 AM Re: Proper procedure for posting code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Hi Jos,

nice to hear something from You again,

ehhh my fonts in my DosBox are Rasterfonts,
hmm, codepage is German [IBM] (Yahh, it is a ThinkPad)
NT=4.0;SP=6a (English).

strange: on my 'BigBlue 300gl' i receive for
chr (169) a '®' where NT=4.0 SP=5 (English)
and codepage = German [Standard] ....

¡I think this is getting babylonic!

Yours etc.
Confucius

_________________________



Top
#3352 - 2000-06-22 12:11 AM Re: Proper procedure for posting code
Anonymous
Unregistered


Hi Jochen,

I'll tested it on my Dutch Win95 machine ( Digital )
with dutch codepage 850 ( just typed chcp in the DOS Box ). Once again tested the
1 minute writen schript and i'm sure about CHR(169) on my machine.
I Also Tested it on an Englisch NT 4.0 Server SP4 codepage 850.
The result was the same as on my machine.
My guess is it's the codepage.

Jos

[This message has been edited by Jos (edited 21 June 2000).]

Top
#3353 - 2000-06-21 02:41 PM Re: Proper procedure for posting code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Ok Jos,

as this conversation is getting more and more out of topic
i will use a simple '(c)' .

Greetings

Gen. Custer (Mrs.)
[CONFUSE-A-CAT-LTD.]

_________________________



Top
#3354 - 2000-06-21 03:38 PM Re: Proper procedure for posting code
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Greetings!

Posting/retrieving code from this BB system.

:Posting
I will type my message place the
code

/code
And come back and paste from notepad between the two.

Retrieving:
I will copy all code between code /code, run wordpad(write.exe) and paste it into there. then I do a Ctrl-a, ctrl-x, close Wordpad with out saving, and paste it into notepad.

don't know why it works this way......But it will preserve the formatting.

Bryce

[This message has been edited by Bryce (edited 21 June 2000).]

Top
#3355 - 2000-06-21 03:47 PM Re: Proper procedure for posting code
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
When i try

? chr(169)

i get 2 different outputs based on what my selected font is

Running win2000(us version)
Raster fonts = c
Lucida Console = ©

I only have 2 font choices for some weird reason....

Top
#3356 - 2000-06-21 04:14 PM Re: Proper procedure for posting code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Bryce,

thanx (for both replies)

[*customer is satisfied*]

Jochen

[This message has been edited by jpols (edited 21 June 2000).]

_________________________



Top
#3357 - 2000-06-21 06:31 PM Re: Proper procedure for posting code
BoxKite Offline
Da Box
*****

Registered: 2000-05-17
Posts: 282
Loc: Vacaville,CA,USA
This is fun.

code:
setascii("on")
$a = 1
cls
while $a < 6 ;Change this value to get more or less numbers
$y = 1
while $y <= 80
$z = 1
while $z <= 20
at($z,$y) "$x " + chr($x)
$z = $z + 1
$x = $x + 1
loop
$y = $y + 10
loop
? shell "%comspec% /c pause"
$a = $a + 1
loop
exit


Don't know what you can do with it.

_________________________
Box
FACTA NON VERBA

Top
#3358 - 2000-06-21 08:26 PM Re: Proper procedure for posting code
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Boxkite and other fellows,

A nice script which shows exactly the representation of the ASCII-table. ASCII-table part 0..128 fully standard,
ASCII-table 129..256 language depending (= codepage). Mostly in the last part you found changes between the different
languages.
When you get the © character after installation of a specific operating system or a specific language isn't very
useful in my opinion. First you can think it is standard, but after upgrading to another language or operating system
it can be possible that your script runs in an unexpected way.
Scripts for general purpose must only use the standard capabilities of a system.
As alternative symbol for © everybody is using the '(c)' notation. Everybody understand that it is a
copyright mark.
When the © symbol looks like , nobody understands it.

greetings.

[This message has been edited by MCA (edited 21 June 2000).]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2419 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.079 seconds in which 0.032 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org