author: Jon Slaughter

subject: Re: 16 bit natural log algorithm

text:
"Eric L." <[email]> wrote in message
news:ReNTg.1397$uJ2.705@dukeread03...

Heres a simple method I threw together real quick:

The idea is pretty simple. Since log is monotonic and has an "inversion"
formula we can use the inversion to find the answer.

---
Suppose x > 1,

Since log[b](x) = y then x = b^y.

suppose we have y1 and y2 s.t. b^y1 <= x <= b^y2. Now its true that either x
<= b^((y1+y2)/2) <= b^y2 or b^y1 <= b^((y1+y2)/2) <= x.

What this tells you is that you just need to pick two points and then
compute there mean and then then log[b](x) must lie somewhere inbetween your
2 intervals you've created. You just iterate this and you will eventually
have an interval that is very small and contains your answer. Some quick
code I threw together to demonstrate

double Mylog(double x, double b, int N)
{
    if (x == 1) return 0;
    if (x >= 1)
    {
        double y1 = 0;
        double y2 = x;
        double y3 = y1;

        while (N-- > 0)
        {
        y3 = (y1 + y2)/2;
        if (pow(b, y3) > x)
            y2 = y3;
        else
            y1 = y3;
        }
    return y3;
}

Ofcourse it probably could be optimized and you still need to implement the
idea for when x < 1 and the pow funtion but the idea is pretty solid. It may
or may not be good enough for your purposes but I thought I'd just throw it
out there just incase.

Jon


author: [redacted]

subject: Re: 16 bit natural log algorithm

text:
Eric L. wrote:

If you already have a fixed point exp() function, and if {for instance
by table lookup} you can get a decent initial approximation, you can
use this iteration that converges very rapidly.  It is written for long
double, but you could easily change the iteration to used fixed point
type instead:
/*
** x is the current guess of the value for natural log of k
*/
long double A03LogFromE( long double x, long double k )
{
   long double ex = expl( x );
   long double ex2 = ex * ex;
   long double k2 = k * k;
   long double term = 4.0 * ex * k + ex2 + k2;
   return ( x * term - 3.0 * ex2 + 3.0 * k2 ) / term;
}


author: Thad Smith

subject: Re: 16 bit natural log algorithm

text:
Eric L. wrote:

I assume that you want the results in 4.12 value.  Scale the operand to
have the msb set:
   x = y * 2^p,

where x = original operand, y = scaled value 2^15 - 2^16 -1, p = 0 to -15.

You can use a lookup table for the 5 most-significant bits to get
ln (16 * 2^11) through ln (31 * 2^11).  Use linear interpolation
(subtract, two multiples, add, shift) for the low-order 11 bits.  Add
p*ln 2.  Since there are only 16 values, you may want to either use a
table lookup or 0.15 precision for ln 2, then scale after multiply to
maintain accuracy.


author: D. C.

subject: Re: 16 bit natural log algorithm

text:
Eric L. wrote:

http://hyperphysics.phy-astr.gsu.edu/hbase/math/lnseries.html

Take your pick.

Cheers,
DC


subject: Re: 16 bit natural log algorithm

text:
"Jon Slaughter" <[email]> wrote in message
news:[email]...

BTW, note that log[b](1/x) = -log[b](x) so its pretty easy to deal with the
case I mentioned above.


author: CBFalconer

subject: Re: 16 bit natural log algorithm

text:
"Arthur J. O'Dwyer" wrote:
... snip about integral calculation of ln ...

No big tables needed.  The following gives the rounded integral
natural logs of all integers up to 65535.

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv) {
   int  ln;
   long arg;

   if (2 != argc) {
      puts("Usage: ln value\n"
           "prints nearest integral natural log\n"
           "Using only 16 bit integer calculations");
      return EXIT_FAILURE;
   }
   else {
      arg = strtol(argv[1], NULL, 10);
      if ((arg < 1) || (arg > 65535)) {
         puts("argument out of range");
         return EXIT_FAILURE;
      }
      else if (arg > 36315) ln = 11;
      else if (arg > 13360) ln = 10;
      else if (arg >  4914) ln = 9;
      else if (arg >  1808) ln = 8;
      else if (arg >   665) ln = 7;
      else if (arg >   244) ln = 6;
      else if (arg >    90) ln = 5;
      else if (arg >    33) ln = 4;
      else if (arg >    12) ln = 3;
      else if (arg >     4) ln = 2;
      else if (arg >     1) ln = 1;
      else                  ln = 0;
      printf("%d\n", ln);
   }
   return 0;
}


author: Arthur J. O'Dwyer

subject: Re: 16 bit natural log algorithm

text:
On Sun, 1 Oct 2006, CBFalconer wrote:

   [snip]

Yes, I also considered giving the smart-ass answer. But the OP did
/clearly/ state he was looking for a solution for fixed-point numbers,
not integers. And presumably he wants the output in 16-bit fixed-point,
too. Your output only has four significant bits.

-Arthur


subject: Re: 16 bit natural log algorithm

text:
"Arthur J. O'Dwyer" wrote:

It's not smartass.  If needed the approximation can be improved by
linear interpolation.  Look at how companders work.  He did specify
natural logs, but I suspect base2 logs would be more suitable.  But
once you get into any of these things you start to need floating
point.  The OP never did explain his need.


author: Eric L.

subject: Re: 16 bit natural log algorithm

text:
"D. C." <[email]> wrote in message
news:[email]...
Thank you for your reply.

I was looking for something more like C code done with fixed point math.
I'm trying to use this on a microcontroller. I'd like to stay away from
floats if possible. Thanks again.

Eric


subject: Re: 16 bit natural log algorithm

text:
On Sun, 1 Oct 2006, Eric L. wrote:

   (Sorry if this is something Everybody Knows, but...) Where's the point
fixed, then? You have 16 bits in all, but do your numbers range from
0 to 65535, or 0.0 to 32767.5, or what? I imagine it could make a
difference to an efficient ad-hoc algorithm.

   My offhand guess is that there's a way to use a couple of 256-element
lookup tables to get what you want, although the way I was thinking of
initially doesn't actually work.

-Arthur


subject: Re: 16 bit natural log algorithm

text:
On Sun, 1 Oct 2006, Arthur J. O'Dwyer wrote:

   Some possibly useful links:

http://focus.ti.com/lit/an/spra619/spra619.pdf
Texas Instruments' "General Guide to Implement Logarithmic and
Exponential Operations on a Fixed-Point DSP". Gives an implementation
of the Taylor series expansion in C54x assembly language.

http://www.embedded.com/showArticle.jhtml?articleID=14800034
Article by Geoff Probert. Gives a C implementation of a base-10
logarithm algorithm due to Knuth (in TAOCP 1 somewhere).

HTH,
-Arthur


subject: Re: 16 bit natural log algorithm

text:
"L7" <[email]> wrote in message
news:[email]...

Fixed point........


author: Peter J. Holzer

subject: Re: 16 bit natural log algorithm

text:
On 2006-10-01 17:21, Eric L. <[email]> wrote:

How much memory do you have to spare? For 16 bit integer inputs and 4+12
bit fixed point outputs there are only 15453 possible values, so if you
can spare about 30kB, you can precompute all values and use a binary (or
better) search to find the correct value. If you have 128 kB, a single
table lookup will suffice.

A mixed approach (first do a table lookup, then compute a better
approximation) needs less memory and may be faster than searching a
table with 15k entries.

	hp


author: Andreas Beyer

subject: Good Python style?

text:
Hi,

I found the following quite cryptic code, which basically reads the
first column of some_file into a set.
In Python I am used to seeing much more verbose/explicit code. However,
the example below _may_ actually be faster than the usual "for line in ..."
Do you consider this code good Python style? Or would you recommend to
refrain from such complex single-line code??

Thanks!
Andreas

inp = resource(some_file)
# read first entries of all non-empty lines into a set
some_set = frozenset([line.split()[0] for line in \
          filter(None, [ln.strip() for ln in inp])])


author: Steven D'Aprano

subject: Re: Good Python style?

text:
On Thu, 31 May 2007 09:59:07 +0200, Andreas Beyer wrote:

It's a little complex, but not excessively so. Any more, and it would
probably be too complex.

It would probably be easier to read with more readable names and a few
comments:

some_set = frozenset(
           # ... from a list comp of the first word in each line
           [line.split()[0] for line in
           # ... each line has leading and trailing white space
           # filtered out, and blanks are skipped
           filter(None, # strip whitespace and filter out blank lines
           [line.strip() for line in input_lines]
           )])

Splitting it into multiple lines is self-documenting:

blankless_lines = filter(None, [line.strip() for line in input_lines])
first_words = [line.split()[0] for line in blankless_words]
some_set = frozenset(first_words)

As for which is faster, I doubt that there will be much difference, but I
expect the first version will be a smidgen fastest. However, I'm too lazy
to time it myself, so I'll just point you at the timeit module.


author: Virgil Dupras

subject: Re: Good Python style?

text:
On May 31, 3:59 am, Andreas Beyer <[email]> wrote:

I think it would be more readable if you would take the filter out of
the list comprehension, and the list comprehension out of the set.

inp = resource(some_file)
stripped_lines = (ln.strip() for ln in inp)
splitted_lines = (line.split()[0] for line in stripped_lines if line)
some_set = frozenset(splitted_lines)


author: Alex Martelli

subject: Re: Good Python style?

text:
Andreas Beyer <[email]> wrote:

Sparse is better than dense, and this code is far from the fastest one
could write -- it builds useless lists comprehensions where genexps
would do, it splits off all whitespace-separated words (rather than just
the first one) then tosses all but the first away, etc.

frozenset(first_word_of_line
     for line in input_file
     for first_word_of_line in line.split(None, 1)[:1]
     )

does not sacrifice any speed (on the contrary), yet achieves somewhat
better clarity by clearer variable names, reasonable use of whitespace
for formatting, and avoidance of redundant processing.

If this set didn't have to be frozen, building it in a normal for loop
(with a .add call in the nested loop) would no doubt be just as good in
terms of both clarity and performance; however, frozen sets (like
tuples) don't lend themselves to such incremental building "in place"
(you'd have to build the mutable version, then "cast" it at the end; the
alternative of making a new frozenset each time through the loop is
clearly unpleasant), so I can see why one would want to avoid that.

A good, readable, and only slightly slower alternative is to write a
named generator:

def first_words(input_file):
    for line in input_file:
        first_word_if_any = line.split(None, 1)
        if first_word_if_any:
            yield first_word_if_any[0]

ff = frozenset(first_words(input_file))

A full-fledged generator gives you more formatting choices, an extra
name to help, and the possibility of naming intermediate variables.
Whether it's worth it in this case is moot -- personally I find the
"slice then for-loop" idiom (which I used in the genexp) just as clear
as the "test then index" one (which I used in first_words) to express
the underlying notion "give me the first item if any, but just proceed
without giving anything if the list is empty"; but I can imagine
somebody else deciding that the test/index idiom is a more direct
expression of that notion.  You could use it in a genexp, too, of
course:

frozenset(first_word_if_any[0]
    for line in input_file
    for first_word_if_any in [line.split(None, 1)]
    if first_word_if_any
    )

but this requires the "for x in [y]" trick to simulate the "x=y"
assigment of an intermediate variable in a genexp or LC, which is never
an elegant approach, so I wouldn't recommend it.

Alex


author: Michael Hoffman

subject: Re: Good Python style?

text:
Steven D'Aprano wrote:

[...]

Re-writing code so that it is self-documenting is almost always a better
approach. Premature optimization is the root of all evil.


author: Arka

subject: Display File For a Limited Time Period

text:
I want to display a window record format of a display file for some
specified time period on the screen and after that the screen should go
off and the next screen should come. So i don't know how to achieve
this.
eg - I am calling a cobol program and in this i'm calling a display
file which should display
"Processing.........." for some time and after that that screen should
go without pressing any key. then the next screen should come in which
i have the reports.

how to do this?


author: Jonathan Bailey

subject: Re: Display File For a Limited Time Period

text:
Arka wrote:

It seems a bit of an odd thing to do but if you want the screen to
timeout if a user has not entered anything then you will need:Invite in
your dspf & a setting for waitrcd and in RPG maxdev & read/write with
error checking not exfmt. Not sure what the equivalents are for these
in cobol.
Search Google for more details.
However if you want simply to display a message for a short time you
can use frcdta with an indicator to force the display out when you
write then call qcmdexc with the command dlyjob to wait for a bit then
just continue processing as normal.

HTH
Jonathan.


text:
There are a number of ways to go about this. Is the program that
displays "Processing" the same program that creates the reports?

If you have 2 programs:

If you have no user input (not even a Quit / Exit option) on the
"Processing" screen, a simple DLYJOB should do the trick.
If you have user input then you will need do something similar to the
technique outlined in
http://groups.google.com/group/comp.sys.ibm.as400.misc/browse_frm/thread/4f396e6d6f4c3e8e/3e9a3386b228d381?lnk=st&q=as400+screen+auto+refresh&rnum=1#3e9a3386b228d381

If you have 1 program:

If you have no user input (not even a Quit / Exit option) on the
"Processing" screen, simply displaying the screen, creating the
reports, then displaying the reports should do the trick.
If you have user input then the simplest thing might be to split this
into 2 programs.


author: Steve Richter

text:
Arka wrote:

you can write to the display file with dfrwrt(*no). This will put the
screen immediately to terminal.  Your code could then come along in
another minutes time and write another screen.   It is only once you do
a read for keyboard input that the program will block until the user
presses an enter or command key.

also, look at using SETATNPGM. If the user wants to gain control of the
terminal session while your "processing ...." message is displayed they
could press the attention key which would call a program in the
interactive job.  That program could then use a data queue to
communicate with the the program that is writing the "processing"
messages to the display.

-Steve


author: Karl Hanson

text:
Arka wrote:

Not exactly what you are asking, but in addition to what others have
suggested, another way to show ongoing status is using CL SNDPGMMSG ..
TOPGMQ(*EXT) MSGTYPE(*STATUS).  There are things to manage such as the
"status message" setting of the job, but google can find past
discussions in this newsgroup (eg examples) if interested.


text:
Arka wrote:

By default, when you compile a DSPF, the "Maximum record wait time
(WAITRCD)" is *NOMAX, which means when you display the DSPF, it will
wait indefinitely for some input.  You can change this to a finite time
when you compile the DSPF, or issue an override before displaying it.
If no records are received, a CPF0889 message is issued and control
will pass back to your program.


author: Tim M

text:
"Arka" <[email]> wrote in message
news:[email]...

1. You must specify WAITRCD on the display file
2. On those record formats that you want to time out the display you
must specify the INVITE keyword
3. In your Cobol program you must WRITE to the record format then READ
from it. A time out will cause an I/O error in your Cobol program that
you must trap.


author: Pjotr

text:
[email] wrote:

This is how we wait 10 seconds:

       ********
      O        E                SA1
      O                                   K7 '$$TIMER'
      O                                    6 '000010'


author: Danny J.

subject: Application Problem; please Help.

text:
This is an application that is a frame with a button, once clicked, it will display a internal frame. Interpreting and running it is fine, the problem is that it won't display the content of the application(button, the background color) unless I resize the frame with the mouse. I'm using windows 98, Java 2 with Swing 1.1.1 Beta 1. Please help me out via e-mail. Thanks

Danny

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

        public class example1 extends JFrame {

        private JDesktopPane _desktop = new JDesktopPane();
        private JButton _button = new JButton("Add");

        public example1() {
        super("example1");
        getContentPane().setLayout(new BorderLayout());
        getContentPane().add(_button, "North");
        getContentPane().add(_desktop,"Center");

        _button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
        _desktop.add(new intframe(),JLayeredPane.PALETTE_LAYER);
        }} );

        addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
        System.exit(0);
        }} );

        setVisible(true);
        setSize(500,400);
        }
        public static void main(String[] args) {
        new example1();
        }}

        class intframe extends JInternalFrame {
        public intframe() {
        getContentPane().setLayout(new BorderLayout());
        getContentPane().add(new JButton("Internal frame"));
        setSize(200,200);
        setVisible(true);
        }
        }


author: Tommy E. Cole, Jr.

subject: Re: Application Problem; please Help.

text:
You have forgotten to call pack() which instructs the Component tree to set Component size(s) and layout.

pack();
setSize(500, 400);
setVisible(true);
    Danny J. wrote in message <#z1k8FKZ#[email]>...
    This is an application that is a frame with a button, once clicked, it will display a internal frame. Interpreting and running it is fine, the problem is that it won't display the content of the application(button, the background color) unless I resize the frame with the mouse. I'm using windows 98, Java 2 with Swing 1.1.1 Beta 1. Please help me out via e-mail. Thanks

    Danny

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;

            public class example1 extends JFrame {

            private JDesktopPane _desktop = new JDesktopPane();
            private JButton _button = new JButton("Add");

            public example1() {
            super("example1");
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(_button, "North");
            getContentPane().add(_desktop,"Center");

            _button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
            _desktop.add(new intframe(),JLayeredPane.PALETTE_LAYER);
            }} );

            addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
            System.exit(0);
            }} );

            setVisible(true);
            setSize(500,400);
            }
            public static void main(String[] args) {
            new example1();
            }}

            class intframe extends JInternalFrame {
            public intframe() {
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(new JButton("Internal frame"));
            setSize(200,200);
            setVisible(true);
            }
            }


author: Johan Compagner

subject: Re: Application Problem; please Help.

text:
Danny

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;

            public class example1 extends JFrame {

            private JDesktopPane _desktop = new JDesktopPane();
            private JButton _button = new JButton("Add");

            public example1() {
            super("example1");
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(_button, "North");
            getContentPane().add(_desktop,"Center");

            _button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
            _desktop.add(new intframe(),JLayeredPane.PALETTE_LAYER);
            }} );

            addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
            System.exit(0);
            }} );

            setVisible(true);
            setSize(500,400);
switch those 2 lines, like:

setSize(500,400);
setVisible(true);


subject: Starting up oracle listener and database

text:
Which order should this be done in. Anyone experienced problems as a
result of satrting database first, then listener and which were
resolved by doing it the other way around?

Client is saying they have to start listener first with our app or it
doesn't work. Fime if they start listener and then database!

JL


author: Mark Bole

subject: Re: Starting up oracle listener and database

text:
www.loial.co.uk wrote:

Ever since version 8i (if I recall correctly) instances will
automatically register with the listener ("service register" entry in
the log).

If the listener is already running, this registration happens
immediately upon instance start-up.  If you start the listener after the
instance, it can take up to a minute or two for the registration to
happen.  Another option is to explicitly create the service you want in
the listener.ora file.

-Mark Bole


text:
[email] (www.loial.co.uk) wrote in
news:[email]:

If/when you are logged directly onto the DB server itself,
the DB can be started & used WITHOUT ever having an active listener.
The listener exists only to allow REMOTE clients to access the DB.


author: JM

subject: Latest Palm version update for IIIx?

text:
I have a Palm IIIx running OS 3.1.1.  The programs are 3.0.  Are these the
latest free versions available?  Or should I update to higher versions with
more functionality?

I appreciate any advice.


author: Ray

subject: Re: Latest Palm version update for IIIx?

text:
You could also upgrade to OS 4.1. Info at Palm at
http://www.palm.com/software/palmosupgrade_4-1/

hope that helps.

"JM" <[email]> wrote in message
news:6%AI8.3412$[email]...
with


author: Dan Norder

text:
Get OS 3.3 for free.

http://www.palm.com/support/33upgrade/


author: Gordowey

subject: Cool DIV effect...how can this be done?

text:
Where can I find this DIV effect.

go to: http://www.amazon.com
Put mouse over the text "See All 32 Product Categories"
(Top-Middle)..it will open a window with a cool effect...

does anyone know where to find a script with this effect....

thanks

Alberto


author: Randy Webb

subject: Re: Cool DIV effect...how can this be done?

text:
Gordowey said the following on 4/5/2006 6:00 PM:

Go to http://www.amazon.com
Right click>View Source

Imagine that!


author: Thomas 'PointedEars' Lahn

text:
Gordowey wrote:

In the source code.  That was easy.

PointedEars


text:
well...was really easy.....here is....

Thanks

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<TITLE>Amazon.com</TITLE>

<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">

See All
         32
Product Categories

Books

Music

DVD

VHS

Magazines

      & Newspapers

Computer

      & Video Games

Software

Amazon

      Shorts

Electronics

Audio

      & Video

Camera

      & Photo

Cell

      Phones & Service

Computers

Office

      Products

Musical

      Instruments

Home

      & Garden

Bed

      & Bath

Furniture

      & Décor

Gourmet

      Food

Kitchen

      & Housewares

Outdoor

      Living

Pet

      Supplies

Automotive

Tools

      & Hardware

Apparel

      & Accessories

Shoes

Jewelry

      & Watches

Beauty

Health

      & Personal Care

Sports

      & Outdoors

Toys

      & Games

Baby

Wish

      List

Gift

      Ideas

Wedding

      Registry

Baby

      Registry

Free

      e-Cards

In-Store

      Pickup

Your

      Profile

Auctions

Outlet

zShops

Digital

      Locker

Amazon

      Connect

E-mail

      Subscriptions

Photo

      Services

Movie

      Showtimes

Yellow

      Pages

Travel

Amazon

      Fishbowl

Financial

      Services

Sell

      Your Stuff

Associates

      Program

Advantage

      Program

Paid

      Placements

Web

      Services

Corporate

      Accounts


author: Tony

text:
Randy Webb wrote:

I don't have to imagine it - I can see the source...


text:
Tony said the following on 4/5/2006 8:39 PM:

I didn't mean to imagine the source, imagine how easy it was to see it.


author: Paul Harris

subject: Printer's color bars?

text:
Can anyone tell me where I might be able to download the colour
("color" to you Yanks) bars, grey-scale bars, and a selection of
targets and crop marks, which printers use for print proofs, and/or to
calibrate their presses while running? Preferably high-res, but web
graphics would do in a pinch?

I know I can make my own, and probably will have to, if no-one here can
help me, as I've already come up with zip after a fairly extensive
search. If you've got something, you can also e-mail it to me.

Thanks for any help.

Paul Harris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WORD WORKS TYPOGRAPHIC
1013 Pendergast Street Ph: 250-384-3076
Victoria, BC  V8V 2W8  Fax: 250-384-4402
CANADA

E-mail: [email]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


author: Lee Blevins

subject: Re: Printer's color bars?

text:
Most marks today are generated by an application used to output.

Color bars are getting to be a complex issue as printers use scanning
densitometers that require proprietary bars.

You might contact the GATF and get a copy of their color bar.

I don't know of anybody offering a free color bar but they are
relatively easy to make.

Just get a press sheet from a printer and copy it in Illustrator.

Paul Harris <[email]> wrote:


author: J. Costello

subject: Re: Printer's color bars?

text:
Hmmm.

I can put color bars on publication files by simply selecting a check box in
the Pagemaker printer dialog boxes (and I assume Quark does that too).

Even when I send the digital publication pages to press without the bars,
the proofs I get back from the printer have the color bars on them so their
imagesetter must be putting them on the negs.

Out of curiosity, why would you want to manually put them on?


subject: Re: Printer's color bars?

text:
In article <[email]>, J. Costello
<[email]> wrote:

Because colour bars normally print outside the print area, in the area
to be trimmed. I'm working on a web site, which will eventually be
worked into a paper document, which uses the print metaphor (i.e.,
dummied up to look like a printer's proof sheet).

Hope this explains all.

Paul Harris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WORD WORKS TYPOGRAPHIC
1013 Pendergast Street Ph: 250-384-3076
Victoria, BC  V8V 2W8  Fax: 250-384-4402
CANADA

E-mail: [email]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


author: John Doherty

subject: Re: Printer's color bars?

text:
In article <[email]>, Paul Harris <[email]> wrote:

| In article <[email]>, J. Costello
| <[email]> wrote:
|
| > Hmmm.
| >
| > I can put color bars on publication files by simply selecting a check box in
| > the Pagemaker printer dialog boxes (and I assume Quark does that too).
| >
| > Even when I send the digital publication pages to press without the bars,
| > the proofs I get back from the printer have the color bars on them so their
| > imagesetter must be putting them on the negs.
| >
| > Out of curiosity, why would you want to manually put them on?
|
|
|
| Because colour bars normally print outside the print area, in the area
| to be trimmed. I'm working on a web site, which will eventually be
| worked into a paper document, which uses the print metaphor (i.e.,
| dummied up to look like a printer's proof sheet).

You can get that kind of stuff from the GATF (<http://www.gatf.org>),
but it's not free. You're probably better off just making your own.


author: Kate&Rob

subject: Re: Printer's color bars?

text:
PrintColorBar XT
ï¿½1993-2000 Markzware, Inc. All rights reserved.

PrintColorBar XT allows you to print the colored and gray swatches when
printing composites (non-separations). To do so, simply check "Print Color
Bar" under the Utilities menu.

Hope this helps, its free...

Rob


author: Phony-one

subject: Re: Printer's color bars?

text:
You can make a composite postscript-file from XPress, InDesign or PageMaker
- that has the bars on it - open it in Illustrator and you're off.

in article [email], Paul Harris at
[email] wrote on 18.05.2001 22:40:


author: Anh Tu NGUYEN TRONG

subject: Best format for pasting bitmap image

text:
Hello and happy new year,

 I am creating documents with a lot of screen captures.
 The captures are done using [Print Screen] and pasted into
 PhotoEditor (Microsoft) in order to remove unwanted parts.

 What is the best format to choose when pasting the graphics from
 PhotoEditor into the document ?

 - Paste the image or image PhotoEditor Object :
   The image is clear on screen.

 - Paste the DIB :
   I think it's the better way, but the picture is fuzzy/blurred on
   screen.

 The image is always OK on print.
 The document is to be read on screen or printed.
 Pictures have a 24 bits depth.

 I am using Word 2000 (SR-1).

 Thanks.
 Sorry if this question has already been asked. (I didn't find
 the answer in the newsgroups.)

 Anh Tu NGUYEN TRONG.


author: [redacted]

subject: Re: Best format for pasting bitmap image

text:
My suggestion is to save screen shots as bitmaps, then insert the
resulting files as Pictures into Word.  Copying directly from
PhotoEditor and pasting into Word is not economical size-wize (see
details below).

As an experiment, I took a screen shot of my desktop (800x600 pixels)
and saved the result in four formats:  as a 24-bit .bmp (1407 KB), 75%
quality .jpg (37 KB), 8-bit .gif (22 KB), and 8-bit .png (18 KB).

Then I used the Insert menu to insert each one into a Word 2000 document
in four ways:  as an embedded Object (EO), a linked Object (LO), an
embedded Picture (EP), and a linked Picture (LP).  I also copied each
image as displayed in MS PhotoEditor, and pasted it (PA) into Word.
Here's the resulting size of the Word document in each case:

.bmp (1407 KB)     .jpg (37 KB)       .gif (22 KB)       .png (18 KB)

EO 2871 KB         EO 52 KB (icon)    EO 36 KB (icon)    EO 505 KB
LO 2872 KB         LO 19 KB (icon)    LO 19 KB (icon)    LO 982 KB
EP   45 KB         EP 57 KB           EP 40 KB           EP  37 KB
LP   23 KB         LP 19 KB           LP 23 KB           LP  23 KB

PA 1455 KB         PA 1558 KB         PA 505 KB          PA 505 KB

When .jpg and .gif files were inserted as Objects, they appeared as
icons in Word 2000 (even though I have all graphics filters enabled, and
did not check "display as icon").  Only .bmp and .png Objects appeared
full size.  All files were inserted "inline" as opposed to "float over
text".

CONCLUSIONS:  Inserting image files as Objects either makes the Word
document too large or displays the images as icons--both unacceptable.
Copying & Pasting also creates unacceptably large documents.

Inserting .bmp files as Pictures greatly reduces document size, due to
Word's built-in compression capability.  The size of Word documents with
embedded .jpg, .gif, or .png Pictures is not that much different than
with embedded .bmp Pictures - but image quality suffers.

Inserting any kind of image file as a linked Picture saves no overall
disk space (document + original image file) and is not worth the risk of
link breakage UNLESS you want to keep the images updateable.  Just
remember that your 6-year-old son can also "update" your images.

In most cases, the best option is to insert 24-bit .bmp files as
Pictures, and then backup the original bitmaps.  I've had red X's appear
in both Word 97 SR2 and Word 2000 SR1, so I regularly make the original
.bmp files Read-only, zip them (the 1407 KB Desktop screen shot
compressed to 15 KB!), and store on a CD-RW.

Anh Tu NGUYEN TRONG wrote:


author: Karl Burrows

text:
Why don't you use ALT+PRINT SCREEN to just get the active window, the paste
directly into Word?  You can crop and edit the image in Word.  That way it
is the default image format Word likes and you will have no problems.  I use
this option all the time.


text:
[email] wrote:

Thanks a lot for your detailed answer.

I prefer to keep the images within the document (without external
image files).
Using this method, the best way to keep the size of the Word document
is to convert any 24 bit image to a 256 color image, but a
dithering problem may appear.

In my original post, I have talked about a fuzzy/blurred image in
the document on screen when using the paste DIB method, even if
the inserted image is at 100 % scale.
Do you know why ?
I don't know if it is a "palette" problem since my display is in 24 bits
and the image is 24 bits too.

Anh Tu NGUYEN TRONG


text:
Because then you will have no original image file as a backup if the
embedded image ever gets replaced by a "red X", or the document becomes
otherwise corrupted.

I suppose this wouldn't be a problem in single-use situations, but for
teaching purposes I regularly use images multiple times in other
documents and/or applications, and I like to name and catalog the images
for handy retrieval.

Karl Burrows wrote:


text:
I don't work with DIB files, and I don't paste images into Word:  I
insert 24-bit .bmp files as Pictures.  Once the image is embedded into
the Word document, you can delete the original .bmp file if you like,
and chances are the embedded image will remain safely inside the
document indefinitely.  But if a red X ever appears in place of the
embedded image some time down the road, you'll have no original image
file to replace it (which is why I back up mine on a CD).

As I mentioned, after inserting a 24-bit (1,407kb) .bmp file as a
Picture into a Word document, the size of the Word document is only 45kb
-- and the quality of the embedded image is excellent, both on screen
and on paper.  Considering that a blank Word document by itself is 19kb,
these are excellent results.  If anyone can do better than this, I'd
like to hear how.

Anh Tu NGUYEN TRONG wrote:


author: Suzanne S. Barnhill

text:
Not to mention that even the active window may be far more than you want,
and cropping in Word does not reduce the image size because it merely
reduces what is displayed and printed, not what is actually *there.*


text:
You can reduce the size of the image or just about anything else you want to
edit.  I use this method for teaching Word, Excel and Internet classes and
it works very well.  I agree, if you want to make sure you have the image,
paste it in Paint and save, then bring into Word.


text:
I repeat that it does not reduce the size (in KB) of the stored image. Yes,
you can crop parts of it off, and you can scale it any way you like, but
Word is still saving the entire image, which you can see if you "un-crop"
it; the cropped portion is restored.


text:
File size wasn't mentioned as an issue.  I realize the file size remains the
same.  Unless the file is larger than 24MB or you have no space on your hard
drive, that shouldn't be an issue.  Could also save file as .jpg instead of
.bmp and reduce the file size considerably without much loss of color and
clarity.

Even using .bmp, I have a Word doc with 8 screen shots and the 5 page file
is only 450KB including text and 50 drawing objects as well, so shouldn't be
too much of a concern.

I'm not trying to start a flame, just looking at the easiest was to do this.
I agree, copying the file into Paint (or other) would be good to save the
file and edit prior to pasting into Word, but if they jusy want something
simple and quick, then that was what I was trying to offer.

Thanks!


author: amos

subject: 當職場碰到了憂鬱症

text:
嚙踝蕭職嚙踝蕭嚙瘢嚙踝蕭F嚙羯嚙緹嚙篇
嚙賢╱嚙踝蕭嚙踝蕭嚙�
嚙踝蕭v嚙踝蕭嚙範嚙豎伐蕭
嚙緻嚙瞌嚙瑾嚙諉憂嚙緹嚙踝蕭嚙褕代嚙瘠27嚙踝蕭33嚙踝蕭嚙踝蕭嚙糊嚙踝蕭30嚙瑾嚙瞇嚙璀
嚙踝蕭嚙瞌嚙羯嚙緹嚙篇嚙踝蕭嚙緯嚙緻嚙羯嚙誰帶嚙瘠嚙緻嚙踝蕭~嚙緹嚙篇嚙踝蕭嚙瘡嚙踝蕭Q嚙緲嚙諸，
嚙磅嚙踝蕭嚙緩嚙篆嚙踝蕭嚙瘡嚙磅嚙踝蕭嚙踝蕭嚙踝蕭嚙篆嚙瘡嚙踝蕭嚙磕嚙瘠嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙踝蕭嚙瘡嚙璀
嚙緘嚙踟面對蕭u嚙瑾嚙磕嚙踝蕭嚙緯嚙瘩嚙瞑嚙瞑嚙複？嚙踝蕭嚙緬嚙瞑嚙瞑嚙複又嚙緘嚙踝蕭嚙踝蕭P嚙畿嚙緲嚙瘡
嚙褒校沒嚙踝蕭嚙請，職嚙箴嚙碾嚙練嚙稽嚙磅嚙踝蕭嚙談，嚙誹們能為嚙諛己嚙踝蕭嚙褒歹蕭嚙踝蕭H
嚙誹們又嚙踝蕭嚙踝蕭嚙瞌嚙瘡嚙踝蕭嚙褒歹蕭嚙踝蕭H
嚙線嚙褒佗蕭a嚙踝蕭A嚙賠哨蕭嚙瘩嚙璀嚙踝蕭嚙賠剁蕭嚙踝蕭嚙緩嚙踝蕭嚙瞑覺嚙璀嚙瞇嚙緘嚙踝蕭嚙踝蕭@嚙誶穿蕭嚙踝蕭v嚙踝蕭嚙碼嚙篌嚙瘠
嚙誹剁蕭嚙踝蕭嚙論子嚙緣嚙範嚙瘡嚙璀嚙踝蕭嚙論感嚙踝蕭h嚙篌嚙踝蕭嚙踝蕭嚙瞌嚙璀嚙�?嚙磕嚙踝蕭嚙緻嚙瞌嚙踝蕭嚙踝蕭嚙磋嚙璀嚙瘩嚙踝蕭嚙誼討嚙罵議嚙皺嚙皺嚙誼自處嚙緲嚙踝蕭嚙踝蕭茖茠嚙踝蕭\\嚙篁嚙踝蕭嚙瘩嚙瘠
嚙踝蕭O嚙璀嚙踝蕭嚙窯覺嚙緻嚙諛己嚙踝蕭嚙踝蕭l嚙瘠嚙罷嚙締嚙諄歹蕭嚙緯覺嚙璀嚙箱嚙誹連嚙編嚙皺嚙皺嚙踝蕭嚙踝蕭嚙篁嚙緘嚙瞑嚙磊嚙緩嚙踝蕭嚙璀嚙瘠嚙瑾嚙誹荔蕭嚙篇嚙踝蕭嚙箭嚙篁嚙瘠
嚙諒奇嚙磅嚙踝蕭嚙瞌嚙璀嚙誹常嚙踝蕭嚙磕嚙稻嚙踝蕭嚙窮嚙踝蕭_嚙諉…嚙皺嚙緞
嚙緻嚙瞌嚙箴嚙談穿蕭嚙調適嚙磋嚙賠會嚙緲嚙複迎蕭蘋嚙璀嚙箭嚙練嚙踝蕭嚙瞌嚙羯嚙緹嚙璀嚙諉鳴蕭嚙瞑嚙緯嚙踝蕭嚙瘡嚙衝一嚙瘡嚙誶迎蕭嚙質式嚙璀嚙諂述嚙羯嚙緹嚙篇嚙篆嚙談迎蕭嚙緩嚙篆嚙踝蕭{嚙瘠
嚙複對蕭W嚙璀嚙踝蕭嚙諸歹蕭嚙踝蕭嚙緹嚙羯嚙緹嚙畿嚙課迎蕭嚙瘡嚙踝蕭嚙線嚙瞌嚙誰數。嚙瑾嚙褕衛生莎蕭織嚙稽WHO嚙稷嚙踝蕭X嚙璀
嚙羯嚙緹嚙篇嚙瞑嚙踝蕭g嚙畿嚙磋嚙踝蕭嚙篆嚙瞑嚙踝蕭21嚙瑾嚙踝蕭嚙確嚙篌嚙蝓佗蕭嚙篆嚙璀嚙踝蕭嚙踝蕭20嚙羯嚙璀嚙踝蕭嚙瘡嚙複增嚙稼嚙踝蕭嚙談勢，
嚙衛佗蕭嚙緘嚙踝蕭2020嚙羯嚙璀嚙羯嚙緹嚙篇嚙瞇嚙褓佗蕭嚙踝蕭嚙褐佗蕭嚙豬疾嚙篆嚙璀嚙踝蕭嚙踝蕭嚙踝蕭嚙緙嚙箴嚙篆嚙緣嚙踝蕭]burden of disease嚙稷嚙踝蕭嚙衝二嚙踝蕭C
嚙羯嚙緹嚙篇嚙瞇嚙踝蕭b嚙踝蕭嚙踝蕭
嚙趟神嚙踝蕭Й|嚙緲嚙複迎蕭嚙緙嚙踝蕭X嚙璀嚙羯嚙緹嚙篇嚙踝蕭嚙論剁蕭嚙踝蕭嚙踝蕭v嚙稽嚙瑾嚙談歹蕭嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙踝蕭嚙踝蕭嚙緞嚙稷嚙踝蕭嚙瘤15嚙瘡嚙璀
嚙稽嚙瞇嚙瞌嚙踝蕭嚙瘠6嚙踝蕭7嚙瘡嚙踝蕭嚙璀嚙瞇嚙踝蕭1嚙瘡嚙踝蕭嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙踝蕭嚙箠嚙踝蕭C嚙趟神嚙踝蕭嚙範嚙踝蕭嚙踝蕭|嚙踝蕭嚙踝蕭嚙畿
嚙綞嚙篌嚙趟神嚙踝蕭D嚙緞嚙踝蕭v嚙範嚙踝蕭璇佗蕭嚙緘嚙璀嚙綞嚙磕嚙踝蕭3嚙踝蕭6嚙瘡嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭~嚙緹嚙踝蕭嚙磕嚙瘠
嚙誹橘蕭2003嚙羯嚙踝蕭嚙踝蕭嚙踝蕭嚙罵嚙緻嚙�?嚙線嚙踝蕭嚙踝蕭嚙羯嚙緹嚙緹嚙論與嚙瞇嚙踝蕭葴D嚙緞嚙調查嚙踝蕭隉A
11.7嚙瘡嚙踝蕭嚙踝蕭X嚙踝蕭嚙踝蕭嚙踝蕭嚙磐嚙踝蕭嚙羯嚙緹嚙踝蕭嚙踝蕭A嚙豎專嚙羯嚙踝蕭U嚙璀嚙衛佗蕭8.7嚙瘡嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭嚙瞌嚙踝蕭F嚙緹嚙踝蕭嚙瘢嚙稽嚙踝蕭嚙踝蕭1嚙稷嚙瘠
嚙緻嚙瞌嚙綞嚙磕嚙踝蕭~嚙諉佗蕭嚙踝蕭嚙羯嚙緹嚙篇嚙踝蕭嚙篌嚙磕嚙課調查嚙璀嚙稽嚙瞇嚙踝蕭x嚙磕嚙踝蕭嚙賤成嚙踝蕭嚙糊嚙踝蕭嚙踝蕭嚙踝蕭嚙璀嚙踝蕭嚙緝嚙豬在嚙羯嚙緹嚙踝蕭嚙踝蕭嚙緞嚙磊嚙瘠
嚙箭2003嚙羯10嚙踝蕭嚙�2004嚙羯10嚙趟間嚙璀嚙瑾嚙踝蕭41嚙磊3000嚙瘡嚙踝蕭嚙豌賂蕭嚙踝蕭嚙踝蕭嚙罵嚙踝蕭嚙踝蕭嚙踝蕭g嚙羯嚙緹嚙篇嚙緬嚙踝蕭A
嚙諸佗蕭嚙箠嚙踝蕭嚙羯嚙緹嚙篇嚙踝蕭嚙論在嚙赭內嚙羯嚙璀嚙踝蕭嚙踝蕭嚙線嚙瞌嚙誰喉蕭嚙踝蕭嚙瘡嚙踝蕭嚙踝蕭嚙瘩嚙璀
嚙踝蕭嚙瞌嚙踝蕭嚙箠嚙踝蕭o嚙談在嚙璀嚙誹、嚙諄是嚙瞑嚙瘩嚙誼友剁蕭嚙磕嚙踝蕭嚙箴嚙篆嚙瘠
嚙羯嚙緹嚙篇嚙踝蕭嚙蝓橘蕭嚙踝蕭嚙踝蕭v嚙確嚙璀嚙踝蕭Q嚙踝蕭痝狺u嚙踝蕭織嚙稽ILO嚙稷嚙誶穿蕭21嚙瑾嚙踝蕭嚙踝蕭u嚙踝蕭嚙賞的嚙踝蕭嚙緯嚙箴嚙篆嚙踝蕭嚙瑾嚙璀
嚙緘嚙踝蕭?嚙緬嚙緬嚙緬嚙踝蕭嚙踝蕭嚙羯嚙踝蕭嚙踝蕭嚙複業嚙踝蕭嚙窯嚙篇嚙緲嚙綞嚙羯嚙瘠嚙璀嚙瞑嚙踝蕭媔嚙踝蕭a嚙綞嚙磕嚙稽嚙璀嚙踝蕭N嚙踝蕭嚙窯嚙踝蕭~嚙緹嚙篇嚙踝蕭嚙磕嚙瘠
30嚙瑾嚙瞇嚙瞌嚙踝蕭嚙瞎嚙瘢嚙編
嚙羯嚙緹嚙篇嚙踝蕭嚙緞嚙踝蕭|嚙踝蕭嚙諸迎蕭B嚙踝蕭嚙踝蕭嚙踝蕭|嚙瞋嚙緩嚙罵嚙誕精神嚙踝蕭D嚙緞嚙踝蕭v嚙踝蕭嚙諍莎蕭嚙踝蕭X嚙璀嚙羯嚙緹嚙篇嚙踝蕭嚙緯嚙緻嚙羯嚙誰在27嚙踝蕭33嚙踝蕭嚙踝蕭嚙糊嚙璀
嚙誹橘蕭2004嚙羯嚙踝蕭嚙複亞人嚙瞌嚙褓行的嚙踝蕭嚙踝蕭嚙調查嚙踝蕭隉A嚙線嚙瑾嚙篇嚙踝蕭6嚙踝蕭15嚙羯嚙踝蕭嚙磕嚙稿嚙誹，
嚙璀嚙緹職嚙踝蕭嚙羯嚙緹嚙踝蕭く怜嚙踝蕭嚙踝蕭レ嚙�10嚙羯嚙璀嚙稽嚙踝蕭嚙瞌30嚙瑾嚙瞇嚙複業嚙誰速嚙緻嚙箠嚙踝蕭嚙踝蕭嚙踝蕭10嚙羯嚙瘠
嚙羯嚙緹嚙緩嚙諒喉蕭嚙瞌嚙踝蕭嚙踝蕭H嚙瘡
嚙線嚙篌嚙窮嚙線嚙瑾嚙踝蕭嚙瞌嚙踝蕭嚙豌大嚙璀嚙踝蕭嚙踝蕭嚙踝蕭O嚙璀嚙緻嚙踝蕭~嚙緹嚙篇嚙瞌嚙瘡嚙緞職嚙踝蕭嚙磕嚙窯嚙踝蕭嚙瘡嚙緻嚙誼問，嚙踝蕭嚙踝蕭硌嚙箴嚙踝蕭嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙瞌嚙瘡
嚙範嚙踝蕭璇迎蕭隉A嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭ヲ嚙編嚙踝蕭嚙衛無嚙踝蕭菄嚙踝蕭坋嚙緣嚙踝蕭嚙璀嚙踝蕭嚙褒人嚙窮嚙綞嚙踝蕭B嚙線嚙瑾嚙踝蕭嚙瞋嚙璀嚙稽嚙踝蕭嚙踝蕭洁B嚙豌酒嚙璀嚙緻嚙踝蕭嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙瘠
嚙踝蕭i嚙確嚙緩嚙踝蕭嚙瞌嚙諉性潘蕭嚙稼嚙諒，嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙賦的嚙稻嚙趣情嚙緘嚙踝蕭}嚙緯嚙瘠
嚙瞎嚙諉根據耕莎蕭嚙踝蕭|嚙趟神嚙踝蕭D嚙踝蕭嚙踝蕭嚙緻嚙稽嚙篁嚙羯嚙緹嚙踝蕭嚙稼嚙踝蕭A
嚙諛我要嚙瘩嚙踝蕭嚙畿嚙踝蕭嚙踝蕭D嚙緬嚙諒，嚙瘡嚙諄歹蕭嚙稽嚙褊恬蕭猁怓O嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙踝蕭嚙踝蕭嚙瞎嚙瘢嚙編嚙瘠
嚙諉就嚙緬嚙複迎蕭嚙踝蕭~嚙諉看，嚙踝蕭嚙踝蕭嚙踝蕭嚙罵嚙賠理嚙衛生組主嚙踝蕭嚙踝蕭嚙踝蕭嚙褕認嚙踝蕭嚙璀嚙緬嚙窯嚙緬嚙複創意嚙踝蕭嚙璀嚙踝蕭嚙線嚙瑾嚙諒，
嚙緘嚙踝蕭嚙踝蕭瑄q嚙羯嚙瘡嚙踝蕭B嚙編嚙箠嚙瘡嚙畿嚙瞌嚙諒蛛蕭嚙璀嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙踝蕭嚙箠嚙踝蕭妐嚙篌嚙瘤嚙踝蕭嚙羯嚙璀嚙踝蕭~嚙諉銀佗蕭伔犰X嚙誰，
嚙瘡嚙諄九嚙羯嚙瑾嚙箴嚙請育嚙踝蕭I嚙踝蕭A嚙踝蕭嚙衝從嚙羯嚙瘡嚙踝蕭P嚙請師嚙踝蕭嚙踝蕭嚙瞌嚙稽嚙羯嚙踝蕭嚙踝蕭嚙磊嚙璀嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙踝蕭嚙踝蕭狺]嚙磕嚙踝蕭嚙瘠
嚙稽嚙踝蕭嚙調領的職嚙踝蕭嚙緬嚙羯嚙諒，嚙箭嚙畿嚙緲嚙箴嚙篌嚙線嚙瑾嚙踝蕭嚙瞌嚙踝蕭嚙瞑嚙褕，嚙踝蕭n嚙緘嚙賠憂嚙緹嚙踝蕭嚙踝蕭嚙磕嚙踝蕭嚙瘠
嚙踝蕭嚙踝蕭g嚙踝蕭嚙窯嚙瞋嚙羯嚙諸改蕭嚙�
嚙談穿蕭嚙調適嚙磋嚙賠會嚙緲嚙複迎蕭B嚙篆嚙蝓迎蕭隉A嚙箭嚙緻嚙踝蕭職嚙踝蕭嚙踝蕭嚙踝蕭i嚙罵嚙瑾嚙篁嚙踝蕭28嚙羯嚙踝蕭嚙璀
嚙穀\嚙篁嚙篆嚙瘡嚙踝蕭嚙瞌嚙箭嚙踝蕭嚙踝蕭E嚙稻嚙瘤嚙瑾嚙羯嚙箭嚙踝蕭嚙誼查嚙踝蕭嚙碼嚙篆嚙稽嚙璀嚙踝蕭嚙踝蕭嚙踝蕭E嚙踝蕭~嚙緻嚙緹嚙瞌嚙羯嚙緹嚙篇嚙瘠
嚙穀\嚙篁嚙踝蕭嚙羯嚙緹嚙篇嚙踝蕭嚙複了嚙諸迎蕭嚙瘡嚙緹嚙踝蕭嚙璀嚙羯嚙緹嚙篇嚙緩嚙諒只嚙瞌嚙線嚙瞋嚙諉多嚙緞嚙璀
嚙箭職嚙踝蕭嚙磕嚙踝蕭嚙踝蕭獉_嚙線嚙糊嚙論責嚙踝蕭嚙畿嚙箠嚙糊嚙緞嚙璀嚙複至是嚙線嚙踝蕭嚙誹」嚙線嚙瞇嚙踝蕭嚙踝蕭嚙緲嚙緞嚙踝蕭嚙緣嚙踝蕭嚙踝蕭嚙踝蕭P嚙璀
嚙複至帶嚙諛歧嚙踝蕭嚙緹嚙踝蕭嚙盤嚙諒是嚙線嚙踝蕭嚙篇嚙篆嚙緞嚙瞑嚙線嚙踝蕭嚙緩嚙褕穿蕭嚙線嚙緞嚙璀
嚙緻嚙褒誤嚙諸使得嚙綞嚙緹嚙羯嚙緹嚙踝蕭t嚙踝蕭嚙瘡嚙諄是嚙羯嚙緹嚙篇嚙緩嚙諒，
嚙賠理嚙磕嚙諉剁蕭菃嚙篁嚙踝蕭嚙踝蕭嚙瞌嚙諄污名嚙璀嚙誕得嚙盤嚙諒怯抬蕭N嚙踝蕭C
嚙箴嚙綞嚙緯嚙緬嚙羯嚙瞌嚙瘩嚙豬胡嚙褕歹蕭嚙璀嚙箠嚙踝蕭嚙踝蕭嚙碼嚙諉鳴蕭嚙盤嚙瞌嚙諉憂嚙緹嚙篇嚙緩嚙諒恬蕭A
嚙盤嚙箭嚙踝蕭嚙緬嚙磐嚙踝蕭嚙諄搭嚙緬嚙踝蕭氶A嚙窯嚙瞋嚙瞑嚙複拉剁蕭@嚙褒問：
嚙線嚙璀嚙豎我迎蕭嚙篇嚙踝蕭嚙皺嚙皺嚙緻嚙誼是嚙踝蕭嚙瞌嚙緻嚙瘤嚙羯嚙緹嚙篇嚙瘡嚙緞
嚙諸佗蕭嚙箠嚙踝蕭嚙璀嚙穀\嚙篁嚙瘡嚙踝蕭嚙羯嚙緹嚙篇嚙踝蕭嚙窮嚙諛殷蕭嚙賠與嚙踝蕭嚙緩嚙瘠
嚙稽嚙踝蕭嚙璀嚙踝蕭A嚙緻嚙緹嚙諛己嚙踝蕭嚙緞嚙畿嚙瘦嚙篆嚙踝蕭嚙諄、嚙豎悶嚙畿嚙箴嚙踝蕭嚙篁嚙蝓，嚙衛對蕭\\嚙篁嚙複迎蕭嚙踝蕭嚙篁嚙踝蕭嚙踝蕭氶A
嚙璀嚙瞇嚙諉堆蕭嚙磊嚙諉恬蕭牷A嚙緻嚙褒或許\嚙瞌嚙羯嚙緹嚙篇嚙踝蕭嚙踝蕭嚙踝蕭嚙緹嚙篇嚙踝蕭嚙瘠
嚙踝蕭嚙踝蕭嚙踝蕭葀z嚙踝蕭H
嚙踝蕭嚙踝蕭30嚙瑾嚙瞇嚙踝蕭嚙璀嚙璀嚙緯嚙諄歹蕭嚙踝蕭A嚙論哨蕭嚙踝蕭o嚙諉來勢穿蕭嚙踝蕭嚙踝蕭嚙褐色風嚙褕？
嚙踝蕭嚙緻嚙稽嚙踝蕭v嚙緹嚙踝蕭嚙璀嚙盤嚙論是嚙稻嚙線嚙踝蕭嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙璀嚙磐嚙踝蕭嚙瘡嚙踝蕭嚙線嚙誹快得嚙羯嚙緹嚙篇嚙緞嚙線嚙瘡嚙談無嚙瞇嚙緬嚙緞嚙踝蕭嚙豌語嚙褕，
嚙盤嚙罵嚙踝蕭雈嚙踝蕭嚙璀嚙稽嚙踝蕭嚙踝蕭嚙瞌嚙踝蕭嚙瘡嚙諉剁蕭嚙踝蕭嚙瞌嚙課拋出嚙踝蕭嚙確嚙踝蕭嚙瘠嚙複對蕭W嚙璀嚙踝蕭嚙瘤嚙賠理嚙瞑嚙踝蕭嚙踝蕭嚙踝蕭嚙瞌嚙羯嚙璀
嚙羯嚙緹嚙篇嚙緩嚙諒由於腦歹蕭嚙踝蕭嚙篇嚙褒導迎蕭嚙踝蕭嚙瞎嚙踝蕭嚙稽serotonin嚙稷嚙踝蕭嚙踝蕭嚙璀嚙踝蕭珣`嚙踝蕭嚙皚嚙踝蕭嚙諛與嚙緬嚙踝蕭?嚙璀
嚙瞇嚙緘嚙瞑嚙罷嚙踝蕭嚙篆嚙瑾嚙踝蕭A嚙踝蕭嚙賡的嚙諍島嚙踝蕭嚙踝蕭嚙箱嚙踝蕭嚙調，嚙踝蕭嚙衝「嚙箴嚙篆嚙踝蕭嚙踝蕭嚙緞嚙篁嚙豎待。嚙踝蕭嚙踝蕭嚙瑾嚙踝蕭~嚙諉銀行的嚙踝蕭嚙窯嚙璀
嚙箭簽嚙緘嚙羯嚙緹嚙篇嚙踝蕭|嚙瞑嚙瞇嚙諸時，嚙磅嚙豎了6嚙諉小嚙褕，嚙箠嚙踝蕭嚙踝蕭嚙踝蕭嚙蝓橘蕭嚙踝蕭W嚙緩嚙穀\嚙踝蕭嚙踝蕭嚙諒，嚙瑾嚙踝蕭嚙畿嚙踝蕭~嚙緹嚙窯嚙踝蕭嚙褕，嚙稽嚙盤嚙糊嚙瘦嚙瞎嚙踝蕭T嚙窮嚙踝蕭牷C
嚙羯嚙緹嚙篇嚙緩嚙諒會嚙誼害嚙瘡嚙豌？嚙踝蕭\\嚙篁嚙瘠嚙踝蕭`嚙踝蕭冱~嚙緹嚙篇嚙諄是嚙衛佗蕭~嚙緹嚙篇嚙緩嚙諒自梧蕭嚙諄傷人嚙踝蕭嚙編嚙瘩嚙璀
嚙範嚙踝蕭璇迎蕭隉A嚙踝蕭琱W嚙蝓粹的嚙羯嚙緹嚙篇嚙篆嚙緩嚙豌安嚙踝蕭嚙璀嚙罵嚙諛梧蕭嚙諄傷人嚙諒，嚙篌嚙篁嚙瞌嚙稽嚙踝蕭嚙踝蕭嚙瞋嚙踝蕭皏L嚙瘡嚙璀
嚙稽嚙諉選蕭雃菃琱F嚙稻嚙諄堆蕭嚙締嚙諛梧蕭嚙瘤嚙諉哨蕭嚙論憂嚙緹嚙篇嚙緩嚙諒，嚙緬嚙窯嚙編嚙褊喉蕭嚙踝蕭嚙瞋嚙褊。
嚙線嚙誹家嚙踝蕭b11嚙諉，嚙踝蕭嚙踝蕭嚙踝蕭b嚙褕上嚙璀嚙編嚙踝蕭嚙趣窗嚙踝蕭嚙踝蕭嚙踝蕭U嚙篁嚙踝蕭嚙瞌嚙踢都沒嚙踝蕭嚙瘠嚙緞嚙瑾嚙踝蕭ぇ袡嚙踝蕭嚙羯嚙緹嚙篇嚙踝蕭嚙磕嚙踝蕭嚙盤嚙諉人嚙踝蕭嚙瘠
嚙踝蕭職嚙踝蕭嚙碼嚙緹嚙瘤嚙羯嚙緹
嚙踝蕭嚙畿嚙踝蕭職嚙踝蕭嚙線嚙瑾嚙踝蕭嚙璀嚙璀嚙磐嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙褕，嚙踝蕭嚙諉向嚙瞑嚙複或主嚙豬坦嚙諛求嚙磊嚙豌？
嚙篁嚙踝蕭嚙踝蕭芼{嚙踝蕭嚙璀嚙踝蕭嚙緯嚙確嚙瞎嚙踝蕭吽A嚙緯嚙踝蕭q嚙踝蕭えO嚙稻嚙踝蕭嚙稽嚙箴嚙畿嚙瑾嚙瞇嚙瘤嚙諸憂嚙緹嚙篇嚙緩嚙諒而定嚙瘠
嚙踝蕭i嚙踝蕭嚙瞑嚙複病嚙踝蕭嚙瘡
嚙諉病嚙談迎蕭嚙踝蕭嚙論則嚙篌嚙篁嚙瞌嚙稻嚙緩嚙踝蕭嚙瘠嚙瑾嚙踝蕭~嚙緹嚙篇嚙緩嚙諒迎蕭隉A嚙穀\嚙篁嚙瘩嚙豬對蕭嚙羯嚙緹嚙篇嚙衛歹蕭嚙瘤嚙諸，
嚙瞑嚙褕又嚙踝蕭嚙踝蕭嚙緞嚙瞌嚙踝蕭嚙線嚙調，嚙窯嚙罵嚙踝蕭w嚙諒承橘蕭嚙篁嚙踝蕭嚙踝蕭嚙瞌嚙瘠嚙羯嚙緹嚙篇嚙篆嚙談胡嚙褕歹蕭嚙瘡嚙盤嚙諉人嚙踝蕭嚙篇嚙踝蕭{嚙踝蕭嚙璀
嚙踝蕭嚙踝蕭b嚙踝蕭D嚙豬而歹蕭嚙箭嚙踝蕭嚙緬嚙璀嚙瑾嚙諉大嚙踝蕭嚙緬嚙諄許\嚙箠嚙瘡嚙踝蕭嚙踝蕭~嚙緹嚙篇嚙篆嚙緩嚙踝蕭嚙編嚙箭嚙璀
嚙踝蕭鼣∴蕭嚙踝蕭Z嚙踝蕭嚙踝蕭嚙瞌嚙璀嚙瘩嚙豬迎蕭嚙璀嚙論將嚙踝蕭嚙踝蕭嚙瞎嚙緩嚙褊迎蕭嚙緞嚙確嚙瘠
嚙瑾嚙踝蕭嚙課剁蕭瑼綽蕭嚙踝蕭嚙踝蕭D嚙豬，嚙趣本嚙線嚙瑾嚙踝蕭O嚙豌好嚙璀嚙踝蕭w嚙羯嚙緹嚙篇嚙踝蕭A
嚙盤嚙糊嚙畿嚙緲嚙盤嚙篁嚙褕塚蕭嚙踩迫、嚙踝蕭嚙瞌嚙箴嚙篌嚙踝蕭嚙範嚙綞嚙羯嚙褓。嚙盤嚙瞑嚙瘩嚙豬瘀蕭嚙緬嚙踝蕭A
嚙瞇嚙踝蕭職嚙褓調橘蕭雂H嚙複喉蕭嚙踝蕭A嚙豬理嚙碼嚙諂蛛蕭嚙踝蕭嚙瞌嚙踝蕭嚙線嚙瑾嚙璀
嚙踝蕭L嚙踝蕭嚙踝蕭v嚙踝蕭嚙稻嚙踝蕭A嚙篁嚙磅嚙調回嚙趣本嚙踝蕭嚙踝蕭嚙踝蕭C
嚙窯嚙糊嚙諉剁蕭嚙璀嚙誶是嚙緯嚙豎莎蕭織嚙踝蕭嚙踝蕭^嚙諉判嚙稻嚙瞌嚙稻嚙箠嚙踝蕭職嚙踝蕭嚙瞑嚙複。
嚙踝蕭嚙踝蕭嚙褕認嚙踝蕭嚙璀嚙磐嚙瞌嚙踝蕭嚙論迎蕭嚙羯嚙緹嚙篇嚙緩嚙諒最好嚙誶是嚙褓殷蕭嚙踝蕭嚙罷嚙踝蕭嚙瞌嚙踝蕭嚙璀
嚙踝蕭嚙踝蕭嚙談命嚙緯嚙踝蕭嚙褓選蕭荓o嚙踝蕭嚙緯嚙瘠
嚙踝蕭嚙緬嚙踝蕭嚙璀嚙論是嚙踝蕭嚙踝蕭
1111嚙瘡嚙瞌嚙褓佗蕭o嚙踝蕭嚙瘡嚙範嚙談穎嚙踝蕭嚙踝蕭嚙瞇嚙瞌嚙諉憂嚙緹嚙篇嚙緩嚙諒，嚙諍前嚙踝蕭嚙璀嚙衝�?嚙瘠
嚙盤嚙踝蕭嚙踝蕭嚙踝蕭疇嚙踝蕭]嚙踝蕭嚙踝蕭嚙篁嚙衛他嚙踝蕭嚙線嚙瑾嚙踝蕭O嚙璀嚙踝蕭b嚙盤嚙踝蕭嚙瞇嚙褕對蕭嚙緙嚙盤嚙璀
嚙複至要嚙瘩嚙踝蕭L嚙踝蕭u嚙瘠嚙諸湛蕭嚙踝蕭嚙盤嚙磐嚙衝。嚙範嚙談穎嚙稽嚙踝蕭嚙瘩嚙窯嚙瞑嚙諍他嚙踝蕭嚙踝蕭嚙踝蕭A嚙箭嚙線嚙瑾嚙磕嚙踝蕭[嚙踝蕭O嚙瘠
嚙踝蕭~嚙諒哨蕭嚙緯嚙踝蕭嚙赭產嚙瞌嚙瘡嚙羯嚙璀嚙踝蕭嚙瘤嚙瞎嚙羯嚙羯嚙璀嚙踝蕭u嚙踝蕭嚙範嚙稽嚙罵嚙瞌嚙緞嚙確嚙踝蕭u嚙瑾嚙踝蕭{嚙踝蕭嚙踝蕭嚙篌嚙稽嚙踝蕭嚙瘠
嚙踝蕭u嚙磐嚙稽嚙賠理嚙箴嚙篆嚙諉伐蕭嚙踝蕭A嚙瞇嚙踝公嚙緬嚙緙嚙踝蕭嚙踝蕭嚙篌嚙締嚙踝蕭嚙璀
嚙稽嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭嚙緬嚙瞇嚙諸剁蕭o嚙諉堆蕭嚙瘩嚙璀嚙褕紛採剁蕭w嚙踝蕭嚙諉抬蕭v嚙踝蕭嚙踝蕭C
2002嚙羯嚙踝蕭嚙璀嚙賡本嚙踝蕭嚙踝蕭s嚙踝蕭嚙踝蕭X嚙璀嚙踝蕭嚙緘嚙踝蕭嚙踝蕭~嚙糊嚙褊穿蕭嚙畿嚙糊嚙褊穿蕭嚙踝蕭嚙緩嚙羯嚙緹嚙篇嚙璀
嚙稽嚙踝蕭嚙磊嚙諉愈嚙篁嚙賡本嚙踝蕭~嚙踝蕭嚙踝蕭嚙線嚙踝蕭嚙賠理嚙踝蕭嚙範嚙璀嚙賡本嚙瘢嚙篁嚙踝蕭嚙踝蕭嚙�1998嚙羯嚙稻嚙璀
嚙瘠嚙羯嚙踝蕭嚙緬嚙線嚙踝蕭嚙踝蕭v嚙瞑嚙瘠嚙諉哨蕭u嚙諉別嚙踝蕭嚙談，嚙衛蛛蕭嚙踝蕭嚙踝蕭議嚙瘠嚙箭嚙綞嚙磕嚙璀嚙談命嚙線嚙窯嚙瘤嚙複佗蕭嚙罷嚙褕迎蕭隉A
嚙緻2嚙畿3嚙羯嚙踝蕭嚙穀\嚙篁嚙踝蕭~嚙踝蕭嚙瘡嚙赭部嚙踝蕭嚙緬嚙豌至生命嚙線嚙瞎嚙瘩嚙踝蕭U嚙璀嚙緻嚙踝蕭黹磥綽蕭嚙羯嚙踝蕭嚙踝蕭嚙罷嚙締嚙踝蕭嚙踝蕭嚙線嚙踝蕭嚙賠理嚙踝蕭嚙瘩嚙瘠
嚙踝蕭~嚙踝蕭嚙踝蕭嚙踝蕭嚙抬蕭f嚙踝蕭u嚙瘡
嚙赭內嚙穀\嚙篁嚙羯嚙諉伐蕭~嚙稽嚙賠了嚙踝蕭u嚙踝蕭U嚙踝蕭蛂]Employee Assistance Program嚙稷嚙瘠嚙踝蕭~嚙羯嚙稽嚙踝蕭嚙瞎嚙踝蕭嚙踝蕭c嚙璀
嚙踝蕭嚙線嚙諄其直嚙緣嚙踝蕭嚙豎哨蕭嚙緹嚙賠理嚙畿嚙稽嚙褓、嚙糊嚙賠蛛蕭嚙踝蕭嚙踝蕭嚙踝蕭嚙瘩嚙褕，嚙箠嚙瘡嚙踝蕭嚙踝蕭嚙踝蕭嚙複地嚙踝蕭嚙豌佗蕭嚙踝蕭嚙箱嚙諂商。
嚙磐嚙豎哨蕭嚙談，嚙踝蕭嚙緬嚙瘠嚙羯嚙踝蕭嚙踝蕭嚙瘠嚙諉哨蕭u5嚙踝蕭嚙踝蕭嚙皺嚙瞌嚙畿嚙論。嚙踝蕭嚙踝蕭嚙箱嚙踝蕭嚙踝蕭嚙磕嚙賠於公司嚙踝蕭嚙羯嚙璀嚙踝蕭u嚙踝蕭嚙踝蕭嚙踝蕭蓱瓵埶茠嚙踝蕭嚙踝蕭e嚙罵嚙瞋嚙踝蕭嚙緬嚙課迎蕭嚙瘠
嚙緣嚙範嚙赭內嚙盤嚙緯嚙畿嚙踝蕭B嚙踝蕭嚙論蛛蕭嚙踝蕭嚙緬嚙踝蕭u嚙踝蕭U嚙踝蕭蛌嚙踝蕭悀O嚙褓歹蕭嚙磊嚙豎歹蕭嚙緬嚙諂商心理嚙緞嚙瞋嚙踝蕭嚙踝蕭嚙豌，
嚙綞嚙磕嚙磊嚙諉愈嚙篁嚙踝蕭~嚙窯嚙踝蕭嚙踝蕭u嚙賠理嚙璀嚙踝蕭q嚙瘩嚙豬工嚙瑾嚙箱嚙踝蕭嚙璀嚙賠佗蕭嚙締嚙諉力嚙踝蕭嚙踝蕭嚙璀嚙稽嚙踝蕭嚙盤嚙諒就嚙踝蕭t嚙瘤嚙踝蕭嚙賠迎蕭嚙諂詢橘蕭嚙箱嚙瘠
嚙蝓莎蕭嚙緬嚙締嚙踟內喉蕭嚙瞎嚙線嚙賠理嚙緞嚙璀嚙踝蕭嚙諍汽嚙踝蕭嚙篁嚙稽嚙賠哨蕭u嚙諂商鳴蕭嚙褕專嚙線嚙璀嚙踝蕭嚙瞎嚙範嚙瘡嚙踝蕭嚙踝蕭u嚙諂商剁蕭U嚙璀
嚙衛且嚙踝蕭嚙緩嚙踝蕭嚙罵嚙踝蕭嚙踝蕭F嚙踝蕭嚙諍、嚙踝蕭嚙瞌嚙調適嚙踝蕭嚙緙嚙瘠
嚙瞑嚙篌嚙諛己嚙踝蕭嚙踝蕭嚙踝蕭D
嚙瞎嚙諉，嚙綞嚙磕嚙踝蕭嚙緘嚙踝蕭~嚙踝蕭嚙篁嚙璀嚙緬嚙窯嚙踝蕭嚙踝蕭嚙瘠嚙踝蕭u嚙賠理嚙踝蕭嚙瑾嚙緩嚙踝蕭C嚙踝蕭p嚙踝蕭~嚙諸抬蕭H嚙複少，嚙瘩嚙豬若嚙緙嚙稼嚙窯嚙瞇嚙璀
嚙踝蕭嚙踝蕭搘X嚙踝蕭u嚙踝蕭嚙賠理嚙踝蕭嚙緘嚙衛歹蕭嚙瘡嚙踝蕭U嚙瘠嚙瘡嚙踝蕭嚙踝蕭嚙踝蕭嚙踝蕭嚙諄自動化對蕭~嚙踝蕭嚙踝蕭嚙踝蕭嚙緬嚙踝蕭嚙課，嚙踝蕭嚙緬嚙瑾16嚙瘡嚙璀
嚙窯嚙篇嚙緲嚙踝蕭嚙踝蕭嚙踝蕭嚙窯嚙踝蕭b嚙瑾嚙瞑嚙踝蕭嚙踝蕭嚙稼嚙踝蕭嚙瘠嚙諉人嚙踝蕭嚙踝蕭嚙踝蕭i嚙褊。
嚙皚嚙踝蕭嚙線嚙箴嚙箴嚙踝蕭嚙誰，嚙諄工嚙瑾嚙衝率嚙踝蕭嚙緘嚙瘡嚙踝蕭嚙褕，嚙盤嚙踝蕭雈D嚙褊與嚙踝蕭u嚙談，嚙複至湛蕭嚙窮嚙踝蕭u嚙篁嚙踝蕭嚙踝蕭矷A嚙衛穿蕭嚙踝蕭嚙瘢嚙踝蕭嚙衝費嚙諄。
嚙踝蕭嚙緻嚙稽嚙踝蕭隉A嚙踝蕭嚙踝蕭e嚙篆嚙踝蕭嚙瞌嚙緩嚙踝蕭嚙諉抬蕭v嚙踝蕭C嚙踝蕭嚙踝蕭嚙褕也嚙緹嚙踝蕭嚙線嚙瑾嚙踝蕭嚙瞌嚙箱嚙踝蕭嚙踝蕭嚙磕嚙稿嚙誹，
嚙踝蕭嚙褕要嚙踝蕭嚙踝蕭嚙踝蕭嚙瞌嚙踝蕭嚙璀嚙踝蕭X嚙豎抬蕭菑v嚙踝蕭嚙踝蕭嚙瞑嚙質式嚙璀嚙課如嚙踝蕭嚙褕抬蕭聽h嚙瑾嚙諍抬蕭嚙瘡嚙踝蕭葑嚙踝蕭C
30嚙瑾嚙瞇嚙踝蕭嚙璀嚙璀嚙踝蕭嚙踝蕭雈嚙踝蕭嚙畿嚙瘤嚙諸迎蕭嚙質式嚙篁嚙踝蕭嚙踝蕭o嚙踝蕭嚙褐色風嚙褕，嚙箭嚙複業嚙衝刺的嚙瞑嚙褕，嚙稽嚙踝蕭嚙踝蕭嚙踝蕭嚙窯嚙諛己嚙踝蕭嚙踝蕭嚙瘤嚙瘠
嚙踝蕭A嚙踝蕭嚙羯嚙緹嚙褕向嚙褕，嚙踝蕭嚙論諱求嚙踝蕭A嚙磐嚙踝蕭嚙緘嚙賠感嚙碾嚙緻嚙踝蕭嚙踝蕭嚙瘤嚙瞑嚙稻嚙褕，嚙稽嚙踝蕭嚙踝蕭菑v嚙諄佗蕭嚙範嚙稻嚙瘠

嚙論英嚙踝蕭盚庤嚙踝蕭嚙踝蕭葑z嚙瘦
http://www.eboss.ligsystem.com/women/


author: Ian Dean

subject: Re: Warez on CE...

text:
Fred Bouvry wrote:

In my experience the majority of software is pirated from a friend who
bought the software (or a friend of a friend or a friend of a friend of
a friend). These people are the people who will find it very hard to
pirate my software (although I have no doubt that they'll try)...

Ian Dean


author: Manu

subject: Passing argument from a TACL script to a UNIX script

text:
Hi Guys,

Is there a way to pass an argument to the unix script from a TACL
script.
Im looking for something like

#set arg1 %1%

osh <- > /tmp/outlog 2> /tmp/errlog -c /tmp/dummy/script1.sh [arg1]

I tried this but didnt work


author: mustlearntandem

subject: Re: Passing argument from a TACL script to a UNIX script

text:
On Nov 18, 9:00 am, Manu <[email]> wrote:

Manu - does it work if you hard-code an argument?  This works fine on
my system:

junktest 19>     type test
?tacl macro
#frame
#set junk %1% [#push junk]
osh -c [junk]
#unframe
5 RECORDS TRANSFERRED

and then running:

test ls

Provides a default listing of my default directory.


author: Joachim Schmitz

text:
Manu wrote:

osh -c needs " around it's arg

osh <- > /tmp/outlog 2> /tmp/errlog -c "/tmp/dummy/script1.sh [arg1]"

If (and only if)  that /tmp/dummy/script1.sh (or any shell script for that
matter) starts with the magic

#!/bin/sh

("#!" need to be the 1st 2 chars in the file, optionally followed by spaces
or tabs, followed by the absulute pathname of an interpreter, optionially
followed by arguments to that interpreter)
you can use osh -p instead, which does not need the " around its argumane

osh <- > /tmp/outlog 2> /tmp/errlog -p /tmp/dummy/script1.sh [arg1]

(and this doesn't go thou /etc/profile and ~/.profile)

bye, Jojo


text:
On Nov 18, 8:40 pm, "Joachim Schmitz" <[email]>
wrote:

the double quotes have done the trick !!!!!!!!!!!!!!!
Thnx alot guys


text:
Joachim Schmitz wrote:

to be more precise: ... , if the arg (to -c) has more than one word
(separated by space or tab).

Bye, Jojo


subject: downloading large programming tools

text:
I'm trying to download some large programming tools over dialup, and
they're all in one big file.  Unfortunately, I keep getting
disconnected in the middle for some weird reason, and I have to start
all over.  Does anyone know of some software that will let me start off
where the download left off instead of starting at the beginning?


subject: Re: downloading large programming tools

text:
This truedownloader program is garbage.  I downloaded two large files
with it and both were corrupt.  I think I found something called
Getright that seems to work.


subject: Re: downloading large programming tools

text:
On 4 May 2005 03:43:24 -0700, [email] wrote:

What you need is known, generically, as a download manager.
A Web search or a look through the big archive sites like Simtel
will turn up one for your hardware and operating system.  Just
be careful not to use one that's polluted with spyware.  Any
free utility that's heavily advertised, especially in spam or
banner ads, is suspect.   Whenever I go online with Windows, I
use Ad-Aware and Spybot Search & Destroy to vet any program I
download, and I use the ZoneAlarm firewall to warn me whenever a
new program wants net access.  Note that the firewall included
with Windows XP does _not_ detect outgoing traffic, probably
because Microsoft doesn't want us to notice how often various
bits of Windows want to phone home.  Mostly, I try to use Linux
for Internet work.


author: Tatu Portin

subject: Re: downloading large programming tools

text:
[email] wrote:

Download with this if using Windows:

http://francis.dupont.free.fr/truedownloader/

If using Linux/Unix, use wget.


author: Robert Heller

subject: Re: MIT vs. Motorola 68k

text:
[email]     ,
  In a message on 18 June, wrote :

a >
a > Hi!
a >
a > In article <[email]>, Ben A. Mesander writes
a >
a > > 	link a6,#0
a > > 	moveml #0x3f3c,sp@-
a > > 	clrl d3
a > > 	movel a6@(8),d6
a > etc. etc.
a >
a > Why did people at the MIT develop this alternative syntax?
a >

Guess:  The assembler tool(s) the people at MIT were using would not
allow periods in opcodes (i.e. movem.l vs moveml).  One quick & dirty
way to implement a cross assembler for a new chip is to use an existing
native assembler on the host machine and write macros for the new
processor.  I used the CDC Cyber assembler (COMPASS) to assemble code
for an 8008 once.  (SNOBOL4 was originally written in assembler for an
invented SNOBOL4 processor, that never really existed in hardware. To
port SNOBOL4, one wrote a zillion macros and re-assembled it...).

Robert

---
 ï¿½ ATP/OSK 1.40 ï¿½ OS-9/68000 -- The only *real* operating system.


author: Ralph Schmidt

subject: Re: MIT vs. Motorola 68k

text:
[email] (Robert Heller) writes:

Really sad that they released it and caused so many crap sources
instead of keeping it inhouse.

P.S. Always frustrated when i see MIT syntax.

Regards


author: Walter Harms

subject: Re: MIT vs. Motorola 68k

text:
[email] (Ralph Schmidt) writes:

	maybe i can help with a mit->mot converter ?

	A1000--
####################################################################
 "Life starts at '030, fun starts at '040, impotence starts at '86"
              keyboard not connected -- press F1 to continue

<><><><><><>alles nur gestohlen, alles nur geraubt ..<><><><><><><><>


author: Manfred Hollstein US/ESB B60/3/142 #71283

subject: Re: MIT vs. Motorola 68k

text:
In article <2ucf7u$[email]> [email] (Christian Stieber) writes:

If somebody knows, please reply to the net! I'm also interested!

Regards,


author: Christian Stieber

subject: Re: MIT vs. Motorola 68k

text:
Walter Harms ([email]) wrote:

Daran waere ich ebenfalls sehr interessiert... gibt es vielleicht einen
FTP-Server auf dem das Teil rumliegt?

Christian


author: Duane K Fields

subject: PasTeX

text:
Well, I have PasTeX installed correctly (pretty much), except for a few
things...

dvips and dviprint can NOT find the fonts, but showdvi can....

it complains that ***cmr10 not found! or whatever...

what did i miss in the installation process?

thanks


author: Helmut Hoffmann

subject: Re: PasTeX

text:
[email] (Duane K Fields) writes:
dvips and dviprint use other font-sizes than showdvi. With the standard
PasTeX distribution (I think) there a no printer specific fonts anyway,
because the needed sizes depend on the DPI-Resolution of the printer.
But you can install AREXX-Scripts in a way, that dviprint (and the other
progs) generate automatically any necessary font-size from the font sources
with the MetaFont-program (if you installed this as well).

Bye

H.Hoffmann

EMail: [email]


author: Matt Simmons

subject: Re: PasTeX

text:
Duane K Fields ([email]) wrote:

: Well, I have PasTeX installed correctly (pretty much), except for a few
: things...

: dvips and dviprint can NOT find the fonts, but showdvi can....

: it complains that ***cmr10 not found! or whatever...

: what did i miss in the installation process?

: thanks

Install Metafont, make an environment variable CALLMF, set it to
'mf:rexx/maketexfont.rexx', start up AREXX, and run dviprint... It'll
generate the fonts for you as needed.. Note it takes a while to do that...
It's not uncommon to take 20-25 minutes/font on my unaccel. 500...


author: Mark Rinfret

subject: Re: PasTeX

text:
In article <[email]>, Duane K Fields writes:

I had the same problem. I found that PasTeX, MetaFont and ShowDVI
were looking for font names of the form

    tex:pk/100/cmr10.100pk

while DVIPS was looking for font file names of the form

    texpks:cmr10.100pk

I took a rather brute-force approach and modified the DVIPS source to be
compatible with PasTeX. I'm sure there has to be a better answer but I
thought you'd like to know you had company :-).

Mark


author: David Crooke

subject: Re: PasTeX

text:
What is the mechanism in ShowDVI for invoking MakeTeXPK or whatever? The one given in
the docs doesn't work. I am prepared to write my own script to put it in that FLib
format (I already have, actually).

Dave


author: Georg Hessmann

subject: Re: PasTeX

text:
In article <[email]> [email] (David Crooke) writes:

The CALLMF Arexx package works fine for me.
Install Metafont and create the correct base file (with the PasTeX modes)
and set the ENV: variable CALLMF to one of the two ARexx scripts
(with full path of the script).
Now, ShowDVI and DVIprint will call this script, if they don't find
a font (after trying fontcaching via fontvols).

	Georg.


author: ftp

subject: Any expert here?

text:
Can I do the following query in Access?

insert into tableA select a, b, c from tableB

if "a" is the primary key for table A and there is a record with a=1 in
both tableA and tableB, how can I do the above query in Access in order to
avoid error?

Is Access able to do the above query?

Very urgent! If possible, please reply me by e-mail. Thanks


author: Heinz Huber

subject: Re: Any expert here?

text:
ftp wrote:

INSERT INTO TableA (a, b, c)
 SELECT a, b, c
  FROM TableB
  WHERE a NOT IN (SELECT a FROM TableA);

This inserts all rows from TableB for which there is no corresponding row (a =
a) in TableA.

No idea.

hth,
Heinz


author: Michiel de Roo

subject: Re: Any expert here?

text: Don't know Access, but I do know this is not the Acces newsgroup.


author: The Wizard of Oz

subject: Manuals - Got a hankerin to do some programmin

text:
I understand there are a couple of assembler programs now in the public
domain. Plus I was given a non-functioning version of Orca 8 (original
disks, manuals, and the whole package). I'm just looking to pound out some
quick code and use it for an article in Call-A.P.P.L.E.. I've found the
Mini-assembler is OK for some things, but making a change to existing code
(mine) can be a pain. This brings me to my point...

1) Does anybody have a PDF of the Merlin (P8) manuals? I've been told this
is now PD.
2) Can Orca/M (16 bit - early version also given to me by the same guy)
generate 8 bit code? The manual wasn't exactly clear what to do if I did
not want a ".system" or shell file. Besides it was about 10 years ago...
3) Any recommendations for free computer languages on the Apple//? I also
have access to a couple of Macs and a Linux PC if there are cross
compilers.

	TIA for the advice...

				Later
				Mike


author: Bill Garber

subject: Re: Manuals - Got a hankerin to do some programmin

text:
"The Wizard of Oz" <[email]> wrote in message
news:[email]...
: I understand there are a couple of assembler
: programs now in the public domain. Plus I was
: given a non-functioning version of Orca 8
: (original disks, manuals, and the whole package).
: I'm just looking to pound out some quick code and
: use it for an article in Call-A.P.P.L.E.. I've
: found the Mini-assembler is OK for some things,
: but making a change to existing code (mine) can
: be a pain. This brings me to my point...
:
: 1) Does anybody have a PDF of the Merlin (P8)
: manuals? I've been told this is now PD.

I have them in text for PC and on DSK image for
Apple II. I do have the manual for Merlin 16 in
PDF. Two of the PDFs are 12MB and 6MB and two are
considerably smaller.

: 2) Can Orca/M (16 bit - early version also
: given to me by the same guy) generate 8 bit
: code? The manual wasn't exactly clear what
: to do if I did not want a ".system" or shell
: file. Besides it was about 10 years ago...

I don't seem to have Orca/M 16 bit, but I have
the 8 bit version. However it's from Asimov and
even though it seems to work, I don't have enough
experience with it yet to be sure it is 100%.
Orca/M 16 is sold by Syndicomm, IIRC.

: 3) Any recommendations for free computer
: languages on the Apple//? I also have access
: to a couple of Macs and a Linux PC if there
: are cross compilers.

CC65 and CA65 are, as I'm told, good cross compilers
for the PC. I don't have much Mac experience in this
area. Unfortunately, I also don't have the link to
these handy. Perhaps someone can help me here.

: TIA for the advice...

You are welcome, as always,  :o)

Bill @ GarberStreet Enterprizez };-)
Web Site - http://garberstreet.netfirms.com
Email - willy46pa @ comcast DOT net
Change DOT to a dot to contact me

---
This email ain't infected, dude!

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 7/13/04


author: Jeff Blakeney

text:
On Wed, 21 Jul 2004 15:16:22 -0400, "Bill Garber" <willy46pa@comcast
DOT net> wrote:

I believe the 8 bit Orca/M is also sold by Syndicomm as they have all
the ByteWorks products.

The 16 bit Orca/M can produce 8 bit code but it won't produce a
.SYSTEM file directly but it can produce an 8 bit BIN file that can be
BRUN from BASIC.SYSTEM.

The NinjaForce Assembler is good for quick and dirty assembly coding
and is free.  There is also the Lisa environment and assembler that
was reclassified as freeware years ago.

I'm sure there are others but that's all that came to mind
immediately.


author: John B. Matthews

text:
In article <[email]>,
 "Bill Garber" <willy46pa@comcast DOT net> wrote:

CC65 <http://www.cc65.org/> is well maintained and includes
a 6502 macro assembler, along with the C compiler.

If you just want an assembler, I ported J. H. Van Ornum's
6502 cross-assembler to Mac OS. It should compile under linux.
<http://www.wright.edu/~john.matthews/a2/a65.tgz>

John
----
[email]
www dot wright dot edu/~john.matthews/


text:
On Wed, 21 Jul 2004 15:16:22 -0400, Bill Garber wrote:

	Text is fine with me. I found some manuals for the older version but it
only has about half the information I want. The other half is the editor.
Any suggestions about how to go about getting them? Replying to this
address won't work (too many spammers - over 100/day). Worst case you can
go to http://www.digitalcivilization.ca and send something to the Mike
account in the "Contact us" section (as if a spammer ever understood a
newsgroup message in their entire life).

	Orca/M 16 bit actually works very well. Unfortunately I've only managed
shell programs from it. I think I only need one file to get the 8 bit
working. If I contacted Syndicom directly the solution would more likely
than not be to send a replacement disk. The downside to this is
cross-border shipping is VERY expensive (about three times what you pay
just to ship in the States). Not to mention they would want to verify I
have the real thing and not a copy.

	I'll look into this. I have some fantastic utilities under Linux. With
the Macs it is a two step procedure to move files from my GS to my PC or
the other way.

	You're too kind. :-)

				Later
				Mike


text:
On Wed, 21 Jul 2004 20:30:29 -0400, Jeff Blakeney wrote:

	Top notch products. I was given a box of them about 15 years ago. It
looks as though they were earlier releases. The former owner is now a
Linux convert. :-)

	I am interested in the BIN files. I want to use this as a general
tool. This little bit of information can save me weeks of hunting around.
I was only able to save to shell files. How can it save to a BIN file?
Please remember it's been over 10 years since I've touched it.

	If I can set up Orca/M 16 again I won't have to look any farther. Just in
case the disks have gone bad can you provide some links for me to check
out?

	Thanks. This IS really helping.

				Later
				Mike


author: Don Bruder

text:
In article <[email]>,
 Jeff Blakeney <[email]> wrote:

So if it produces a BIN file, why not org your code to $2000, create the
bin file, fire up basic, bload the bin, then bsave it as a .SYSTEM/type
SYS file? Think of it as the final step in linking, and it's trivial to
get around that problem :)


author: Michael J. Mahon

text:
Jeff Blakeney wrote:

Glen Bredon's Merlin Pro is an excellent macro assembler that
runs on any 8-bit Apple II and works very well.  It has been
released into the public domain.

-michael

Check out parallel computing for 8-bit Apples on my
Home page:  http://members.aol.com/MJMahon/


text:
On Thu, 22 Jul 2004 02:30:42 +0000, John B. Matthews wrote:

	Thanks for the info. I'll save the message and check it out on Saturday
(Tied up real bad today and tomorrow).

				Later
				Mike


text:
"The Wizard of Oz" <[email]> wrote in message
news:[email]...
: On Wed, 21 Jul 2004 15:16:22 -0400, Bill Garber wrote:
:
: > : 1) Does anybody have a PDF of the Merlin (P8)
: > : manuals? I've been told this is now PD.
: >
: > I have them in text for PC and on DSK image for
: > Apple II. I do have the manual for Merlin 16 in
: > PDF. Two of the PDFs are 12MB and 6MB and two are
: > considerably smaller.
:
: Text is fine with me. I found some manuals for the
: older version but it
: Later
: Mike

Ok Mike, I went and attached them to your address
found at the specified web page. I hope this does
not cause you to receive any spam there. It should
not. I hope they are what you need. I also have the
Merlin16 docs in PDF should you need those. However,
one file is 12 MB and the other 6 MB.  I'll have to
break them up into smaller ZIP files. Good Luck.

Bill @ GarberStreet Enterprizez };-)
Web Site - http://garberstreet.netfirms.com
Email - willy46pa @ comcast DOT net
Change DOT to a dot to contact me

---
This email ain't infected, dude!

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.725 / Virus Database: 480 - Release Date: 7/19/04


author: Laine Houghton

text:
"The Wizard of Oz" <[email]> wrote in message
news:[email]...

I would recommend using the 65C02 ON directive in your assembly.

After you assemble the code use the MAKEBIN utility.

MAKEBIN [-P] loadfile [binfile] [org=val]
-P , supress copywrite info.
loadfile, what orca produced
binfile, name of bin to create
org=val,  if absent $2000 is the default

MAKEBIN  orcaout
would turn the orcaout load segment into a bin file assembled at $2000

MAKEBIN -P orcaout  /HD1/MYSTUFF/MYBIN  ORG=$1000

 MYBIN ASSEMBLED AT $1000 IS CREATED IN /HD1/MYSTUFF

FILETYPE orcaout SYS
The bin created in step 1 becomes a sys $ff file


text:
On Thu, 22 Jul 2004 19:37:20 GMT, The Wizard of Oz
<[email]> wrote:

It looks like Laine explained how to do this one quite well.

Ninjaforce's web site is at:

     http://www.ninjaforce.com

Go to the products link and you'll find the Ninjaforce Assembler and
other great IIgs programs there.

The Lisa system for the IIgs is available out there, I'm just not sure
where.  I did a quick check on Trenco (http://www.gno.org/pub/apple2)
but didn't see it.  It may be on the ground FTP site, though.


text:
"Don Bruder" <[email]> wrote in message
news:_wHLc.3564$[email]...
: In article <[email]>,
:  Jeff Blakeney <[email]> wrote:
:
: > On Wed, 21 Jul 2004 15:16:22 -0400, "Bill Garber"
<willy46pa@comcast
: > DOT net> wrote:
: >
: > >I don't seem to have Orca/M 16 bit, but I have
: > >the 8 bit version. However it's from Asimov and
: > >even though it seems to work, I don't have enough
: > >experience with it yet to be sure it is 100%.
: > >Orca/M 16 is sold by Syndicomm, IIRC.
: >
: > I believe the 8 bit Orca/M is also sold by Syndicomm as they
have all
: > the ByteWorks products.
: >
: > The 16 bit Orca/M can produce 8 bit code but it won't produce
a
: > .SYSTEM file directly but it can produce an 8 bit BIN file
that can be
: > BRUN from BASIC.SYSTEM.
:
: So if it produces a BIN file, why not org your
: code to $2000, create the bin file, fire up basic,
: bload the bin, then bsave it as a .SYSTEM/type
: SYS file? Think of it as the final step in linking,
: and it's trivial to get around that problem :)


text:
On Thu, 22 Jul 2004 14:55:49 -0600, Laine Houghton wrote:

	Perfect! Precisely what I am (and was) looking for! Very exciting! Too
many exclamation marks! Considering how much time this has saved me they
are justified! :-)

	Now to dig out the old floppies and see if they still work.

				Later
				Mike


text:
On Sat, 24 Jul 2004 12:58:20 -0400, Jeff Blakeney wrote:

	Thanks. I'm printing the message now...

				Later
				Mike


text:
In article <[email]>,
 "Bill Garber" <willy46pa@comcast DOT net> wrote:

Sure, most of the above is true. But you're forgetting that when you
write a .SYSTEM program for ProDOS, it's your responsibility to put it
where you want it to live. Build it to live wherever you want it, then
put in some "shift things around code" orged to $2000 to move it there
at program startup, and you're good to go. Shovel it upstairs into the
aux card and transfer execution to it there if you want. Point being,
it's your problem to put it where you think it'll be safe.

Anything running anywhere CAN crash your machine if it's written wrong.
Nothing particularly magic about a SYS vs BIN program that way.


text:
In article <[email]>,
 "Bill Garber" <willy46pa@comcast DOT net> wrote:
[...]

One solution is to have the SYSTEM program move a short loader
up to $B000 or so, init the system, and then load your main
binary.

Pros: your binary runs where you want without relocation; you
can revise your main without changing the loader; you can choose
among several binaries depending on what you find.

Cons: multiple files can get lost/separated

John
----
[email]
www dot wright dot edu/~john.matthews/


text:
"Don Bruder" <[email]> wrote in message
news:m2KLc.3582$[email]...
: In article <[email]>,
:  "Bill Garber" <willy46pa@comcast DOT net> wrote:
:
: > "Don Bruder" <[email]> wrote in message
: > news:_wHLc.3564$[email]...
: > : In article <[email]>,
: > :  Jeff Blakeney <[email]> wrote:
: > :
: > : > On Wed, 21 Jul 2004 15:16:22 -0400, "Bill Garber"
: > <willy46pa@comcast
: > : > DOT net> wrote:
: > : >
: > : > >I don't seem to have Orca/M 16 bit, but I have
: > : > >the 8 bit version. However it's from Asimov and
: > : > >even though it seems to work, I don't have enough
: > : > >experience with it yet to be sure it is 100%.
: > : > >Orca/M 16 is sold by Syndicomm, IIRC.
: > : >
: > : > I believe the 8 bit Orca/M is also sold by Syndicomm as
they
: > have all
: > : > the ByteWorks products.
: > : >
: > : > The 16 bit Orca/M can produce 8 bit code but it won't
produce
: > a
: > : > .SYSTEM file directly but it can produce an 8 bit BIN
file
: > that can be
: > : > BRUN from BASIC.SYSTEM.
: > :
: > : So if it produces a BIN file, why not org your
: > : code to $2000, create the bin file, fire up basic,
: > : bload the bin, then bsave it as a .SYSTEM/type
: > : SYS file? Think of it as the final step in linking,
: > : and it's trivial to get around that problem :)
: >
: > From what I've been reading on .SYSTEM files,
: > they are made to relocate somewhere below HIMEM
: > so they are out of the way of other routines
: > that may be wanting to load at $2000 or so they
: > don't interfere with Hi-res or Double Hi-res
: > graphics. I have also confimed this info by taking
: > a few and disassemling them. It is true.
:
: Sure, most of the above is true. But you're forgetting that
when you
: write a .SYSTEM program for ProDOS, it's your responsibility to
put it
: where you want it to live. Build it to live wherever you want
it, then
: put in some "shift things around code" orged to $2000 to move
it there
: at program startup, and you're good to go. Shovel it upstairs
into the
: aux card and transfer execution to it there if you want. Point
being,
: it's your problem to put it where you think it'll be safe.
:
: > Of course
: > if you are careful, you could write a program that
: > runs at $2000, but it may crash your machine.
:
: Anything running anywhere CAN crash your machine if it's
written wrong.
: Nothing particularly magic about a SYS vs BIN program that way.

I love the way some feel they have to repeat what
I've written nearly verbatum. It does get tiresome
albeit humorous at times.  :o)

Bill @ GarberStreet Enterprizez };-)
Web Site - http://garberstreet.netfirms.com
Email - willy46pa @ comcast DOT net
Change DOT to a dot to contact me

---
This email ain't infected, dude!

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.725 / Virus Database: 480 - Release Date: 7/19/04


text:
"John B. Matthews" <[email]> wrote in message
news:[email].c
om...
: In article <[email]>,
:  "Bill Garber" <willy46pa@comcast DOT net> wrote:
: > "Don Bruder" <[email]> wrote in message
: > news:_wHLc.3564$[email]...
: [...]
: > : So if it produces a BIN file, why not org your
: > : code to $2000, create the bin file, fire up basic,
: > : bload the bin, then bsave it as a .SYSTEM/type
: > : SYS file? Think of it as the final step in linking,
: > : and it's trivial to get around that problem :)
: >
: > From what I've been reading on .SYSTEM files,
: > they are made to relocate somewhere below HIMEM
: > so they are out of the way of other routines
: > that may be wanting to load at $2000 or so they
: > don't interfere with Hi-res or Double Hi-res
: > graphics. I have also confimed this info by taking
: > a few and disassemling them. It is true. Of course
: > if you are careful, you could write a program that
: > runs at $2000, but it may crash your machine.
:
: One solution is to have the SYSTEM program move a short
: loader up to $B000 or so, init the system, and then load
: your main binary.
:
: Pros: your binary runs where you want without relocation;
: you can revise your main without changing the loader; you
: can choose among several binaries depending on what you find.
:
: Cons: multiple files can get lost/separated

Well, since the subject was .SYSTEM files, and that I had
just covered some on the topic, I'd throw in my $0.02.
I, for now, plan to stick in the BIN area being they are
so easily loaded by a short BASIC routine, why saddle
myself with the burden of worrying about where my code is
and whether it's being trashed.  :o)

Bill @ GarberStreet Enterprizez };-)
Web Site - http://garberstreet.netfirms.com
Email - willy46pa @ comcast DOT net
Change DOT to a dot to contact me

---
This email ain't infected, dude!

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.725 / Virus Database: 480 - Release Date: 7/19/04


text:
On Fri, 23 Jul 2004 15:14:40 -0600, Laine Houghton wrote:

<snip>

	Daily... Linux PC. Once or twice/week same machine under Windows to
review games. Reason - sheer horsepower relative to my other machines.

	The Macs are older Macs. The newest one I have is a 7100. My business
partner uses it when she is here to do some surfing. The others are 68K
models. I don't have the harddrive space or software to do much on them
yet. I have a CX I want to repair and turn into a BSD box.

	I use the GSs I have to write and test simple programs and ideas. Still
can't beat them for stability and ease of use. They are also a whole lot
easier to program. Before the switch to Call-A.P.P.L.E. I used to generate
a puzzle for Digital Civilization with one every month.

	Speaking about which I have to run. Three more articles need to be done
by the 28'th.

				Later
				Mike


text:
"Bill Garber" <willy46pa@comcast DOT net> wrote in message
news:[email]...

I usually make mine SYS files. Actually bin files burden you with where the
code is. A SYS file you always know is located at $2000.

The main reason though ,  I prefer to launch the programs from the Prodos
quit code.

When prodos loads a SYS file it loads it at $2000 to EOF then does a JMP
$2000. From then on  your code is in complete control of the computer.

BTW, ORCA/M always assumes org $2000 unless it is overridden.
After orca produces the bin file use the command filetype to change to SYS.

filetype mybin sys      or
filetype mybin $FF    or
filetype mybin 255


author: Paul Vigay

subject: Re: Disinformation: UK Schools need W95 PC's for Web Access

text:
In article <6jf87t$qgg$[email]>, Philip Rolt
<URL:mailto:[email]> wrote:

Well, I can view the site anyway because I have a shiny Pentium PC on my desk
as well. I just choose to use the Acorn most of the time. It's not that I
*can't* view the sites, I just prefer not to.


author: Colin B. German

subject: Re: CRC adequate for electronic book authentication?

text:
Well.......how hard to modify do you think CD content is?  Did you consider
that CD writers are cheaper and more widespread?  Even if the actual CD
cannot be modified, files can be modified in the process of copying to
another CD!!


author: Emilio Grimaldo

subject: Re: *** Yggdrasil F94 Unsolved Problems ***

text:
WELL, it seems everybody (even Yggdrasil) goes happily about
ignoring these problems! veeeery disappointing. Here I give
some of my findings but there is still a LOT of them that
have not been solved, I've spent my weekends and nights
on this.

[email] (Emilio Grimaldo) writes:
: Fellows, I have installed (and gone throught the errata fixups) my
: Yggdrasil Fall '94 and up to this moment I have experienced these
: problems:
:
: - The user account I created for myself (I am also the ONLY person
:   using this box!) -the root double personality :)- suddenly
:   disappeared after 1 week! gone, vanished! why? even the /etc/passwd
:   entry was removed! No no, I do NOT have a double personality
:   problem!
:
: - The UserMain program I used to create the wiped out user (originally
:   I did it by hand, now I wanted to explore this program) seems buggy.
:   I entered all the data for the new user and when I selected it to
:   Edit all the info I got was "-1", even the /etc/passwd file had
:   an entry "-1" (and nothing else!) rather than the new user.
:
: - Every now and then X (XFree 3.x) crashes, when I do xinit the
:   part of the screen shows the "sandpaper effect" (moving lines as
:   in a bad TV but NOT the whole screen), I can see the outline (frame)
:   of the window nothing is readable. It has happened twice with
:   no good reason, so everytime I have to remove the Xconfiguration
:   and start a new one!
:
: - I can't mount my floppy, I have the entry in /etc/fstab, when I
:   do the mount it spins but it does not mount anything and sometimes
:   gives error.
:
	Well, now It mounts, also the DOS HD but still gives some
	messages like "cannot find minix filesystem" even though
	I set the type to msdos

: - I need to dial out to my slip server for internet access -I really
:   want to do this, I am sick of DOS- I have a new connection.dip
:
    I fixed this already

: Well, those are the problems and would like to find a solution
: from somebody out there before I get disappointed with Linux
: and/or Yggdrasil.
:

  SMAIL is behaving weird, users can't read mail with elm if
  they have anything on their mailbox (yes, I read everything
  and the errata and changed the groups and permissions as
  suggested in the readme but it does NOT work!

  XVIEW installs but when you try to run it the shell tells me
  it can't find (xv or xview), I did a find and indeed the
  xview program doesn't seem to be anywhere! is this a virtual
  install? it makes you believe everything is alright when it
  is NOT, did Yggdrasil ever bothers to do a full installation
  BEFORE releasing a new version? what happened to quality
  control?


author: Petey

text:
In article <[email]> [email] writes:

I purchased the Fall 93 version of Yggdrasil Linux, and I liked it so much
that when I saw the Fall 94 Linux by Yggdrasil I immediately picked it
up and installed the new OS.

And  yes I was having all the problems that everyone has been talking about
and a few other crazy things in the instal process.  It has been an upsetting
experience.  Truly.  However, I did like how the system set itself up so
that everything you did not install could still be used directly from the
CD.

I have also had the same problems with XFree, XV, SMAIL, and the usermaint
software.  I have to say that in comparison with the Fall 93 version, I
was quite dissappointed.

If anyone has any fixes for anything, Please e-mail me.  I'm also a collector
of things like text filters, and strange toys that you don't find on sunsite
or tsx-11.

Peter
[email]


author: Kit Transue

text:
In article <384fsv$[email]> [email] (Petey)
writes:

Try display instead of xview.  It's a program called "ImageMagick" or
something like that [the executable is "display"].  The Fall '94 manual
explains that it's free, instead of shareware, and is more featureful.  I
like it.

kit transue


author: Avi Boots

subject: Run Client and Server in the same computer

text:
Where i run Client and Server Software in the same computer with ip:
127.0.0.1
It's a real simulation like running in deferent computers with
deferent connection to the internet?
What is the meaning of ip: 127.0.0.1 ?


author: Mark J. Graham

subject: Re: Run Client and Server in the same computer

text:
Hi,

Yes 127.0.0.1 is your localloop address.  This allows you to test and
see if the nic. is responding to your computer.

Mark J. Graham  ::  http://www.numeration.org

[email] (Avi Boots) wrote in message news:<[email]>...


author: Sciallo

text:
Avi Boots wrote:

It is a real simulation, it tests the configuration of both client and
server (whatever server we're talking about) but in no way it tests your
network configuration or device.
127.0.0.1 is a virtual device, it can exist even if you have no phisical
network device at all, no Ethernet, no modem etc.


author: kj

subject: Need help with Python scoping rules

text:
I have many years of programming experience, and a few languages,
under my belt, but still Python scoping rules remain mysterious to
me.  (In fact, Python's scoping behavior is the main reason I gave
up several earlier attempts to learn Python.)

Here's a toy example illustrating what I mean.  It's a simplification
of a real-life coding situation, in which I need to initialize a
"private" class variable by using a recursive helper function.

class Demo(object):
    def fact(n):
        if n < 2:
            return 1
        else:
            return n * fact(n - 1)

    _classvar = fact(5)

This code fails to compile, with the error "global name 'fact' not
defined".

Scanning the Python Language Reference page I see nothing that
would suggest to me a discussion of Python's scoping rules, let
alone anything that would help me solve the specific problem above.
I'm sure it's in there, *somewhere*, but it's anyone's guess where.

Likewise, my book, Beazley's "Python: Essential Reference" is of
no help.  I don't doubt that the answer to my question "is in there,
*somewhere*", but finding it (without reading the book sequentially
from page 1) is a tall order.

All that's left is trial-and-error, the worst kind of programming.
And still I can't find the right way to do this...  I've tried
every variant of this code that I can imagine, including decorating
fact with @staticmethod or @classmethod, etc., etc.  (In the latter
case, I get cryptic errors saying that the staticmethod or classmethod
object is not callable.  Or something like that.)

Needless to say, I'm pretty beat by this point.  Any help would be
appreciated.

Thanks,

kynn


author: Martin P. Hellwig

subject: Re: Need help with Python scoping rules

text:
kj wrote:
<cut>

eh?

<cut>
Sorry still doesn't make sense, I'll give it a try though:

class Demo(object):
     """Apparently a 'real-life coding situation'"""
     def __init__(self):
         # Look at http://docs.python.org/tutorial/classes.html
         # for init explanation.
         self.__class_var = self.fact(5)

     def fact(self, number):
         """Look at http://docs.python.org/tutorial/classes.html why you
need
         self."""
         if number < 2:
             return(1)
         else:
             return_value = number * self.fact(number -1)
             return(return_value)

TEST = Demo()
# Print the 'private' class variable
print(TEST._Demo__class_var)


author: Diez B. Roggisch

subject: Re: Need help with Python scoping rules

text:
kj wrote:

Classes are not scopes.

So the above doesn't work because name resolution inside functions/methods
looks for local variables first, then for the *global* scope. There is no
class-scope-lookup.

If you want anything else, you need to qualify it with a full name,
Demo.fact. Which isn't working for your example because "Demo" isn't
available yet.

But if you insist on the above methodology, you can do this:

class Demo(object):

    def fact(n):
        def inner(n):
            if n < 2:
                return 1
            else:
                return n * inner(n - 1)
        return inner(n)

    _classvar = fact(5)

This makes inner a *local* variable, which is found.

Diez


author: Jean-Michel Pichavant

subject: Re: Need help with Python scoping rules

text:
kj wrote:
[snip]

fact is defined within the Demo class, so to access it, you'll need to
prefix it with Demo:

_classvar = Demo.fact(5).

The problem is, Demo will raise a NameError exception.
The solution is pretty simple, cause your fact function seems to be
unrelated to the Demo class :

def _fact(n):
    # some code

class Demo(object):
    _classvar = _fact(5)

It may happen that you *want* your fact within the Demo, in you example
it's not that obvious, but I think Java would allow such following patern:

class Color:
    def __init__(self, r, g,b):
          pass
    BLACK = Color(0,0,0)

It make sens from a design point of view to put BLACK in the Color
namespace. But I don't think it's possible with python.
You could trick the system using inheritance:

class Chrome:
    def __init__(self, r,g,b)
       pass
Putting all your code in the Chrome class then:

class Color(Chrome):
    BLACK = Chrome(0,0,0)

I'm not sure this is satisfying.

JM


author: Stephen Fairchild

subject: Re: Need help with Python scoping rules

text:
You are trying to run code in a class that does not exist yet.

def Demo():
    def fact(n):
        if n < 2:
            return 1
        else:
            return n * fact(n - 1)
    return type("Demo", (object,), {"fact": staticmethod(fact), "_classvar":
fact(5)})
Demo = Demo()

d = Demo()
print d._classvar    # prints 120
print d.fact(7)      # prints 5040
print Demo           # prints <class '__main__.Demo'>


author: Dave Angel

subject: Re: Need help with Python scoping rules

text:
Stephen Fairchild wrote:
In all these messages, something I haven't seen pointed out is that
fact() has no self argument.  Seems to me that makes it a staticmethod,
so it should be declared that way.  But you can't call a static method
from the class scope, since the class hasn't been completed yet.  That's
the part I consider a problem, not all the rest.  I've seen the same
problem in Forth, where 'smudge' is used to prevent a definition from
accidentally calling itself.  But I don't recall whether that was in the
standard, or just vendor's helpful additions.

Anyway, my first choice is to move the static method out of the class.
Second choice workaround follows, moving the initialization of the class
variable to after the class, when it can properly use the class name.:

class Demo(object):
    @staticmethod
    def fact(n):
        if n < 2:
            return 1
        else:
            return n * Demo.fact(n - 1)

Demo._classvar = Demo.fact(5)

print Demo._classvar
xx = Demo()
print xx.fact(6)

DaveA


author: Steven D'Aprano

subject: Re: Need help with Python scoping rules

text:
On Wed, 26 Aug 2009 10:57:32 +0000, kj wrote:

I don't even know what that is supposed to mean. If anything, your
problem could be because Python has TOO MUCH "class-level encapsulation"
compared to what you are expecting: functions inside a class don't see
the class attributes you expect them too.

Actually, I think your problem is that you are interpreting what you're
seeing in terms of C++ or Java, and assuming that whatever they do is the
One True Definition of OO. That's hardly valid -- if any language
deserves the label of the One True OO Design, it might be Smalltalk, on
the basis that it was the first OO language. But even that is silly --
just because something was the first, that doesn't make it the best
example of something.

Incorrect. Recursive calls are just like any other function call in
Python: when you call *any* function from the body of a function, it must
be in scope at runtime.

def fact(n):
    print g()  # g must be in scope when fact is called
    if n < 2: return 1
    return n*fact(n-1)  # fact must be in scope when fact is called

Python doesn't treat recursive functions specially in any way. It is
*classes*, not functions, that are special. This is explained in the docs:

http://docs.python.org/reference/executionmodel.html

It is also discussed in the PEP introducing nested scopes to Python:

http://www.python.org/dev/peps/pep-0227/

It's even eluded to in the tutorial:

http://docs.python.org/tutorial/classes.html

Why are you defining a method without a self parameter?

In any case, the problem has nothing to do with recursion:

...     def f():
...             return g()
...     def g():
...             return "gee"
...     x = f()
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 6, in Broken
  File "<stdin>", line 3, in f
NameError: global name 'g' is not defined

That's nonsense. It compiles, and then it suffers a runtime error when
you *execute* it.  (NameError occurs at runtime, not at compile time.)
You can prove this for yourself by putting that above class definition
inside a string, s:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 1, in <module>
  File "", line 15, in Demo
  File "", line 6, in fact_rec
NameError: global name 'fact_rec' is not defined

If you expect us to take your criticisms seriously, at least get your
basic facts right.

[...]

It doesn't need to be "fixed" because it's not broken. The question is,
should it be *changed* to match C++ programmers' expectations?


subject: Re: Need help with Python scoping rules

text:
On Wed, 26 Aug 2009 13:57:23 +0000, kj wrote:

An int variable is an int. A string variable is a string. A bool variable
is a bool. A class variable is a class.

Perhaps you mean a class attribute?

Classes have their own bona fide scope. It just doesn't work the way you
expect it to.

It's all in the Fine Manual:

http://docs.python.org/reference/executionmodel.html

Incorrect. As I showed in my previous post, your problem has nothing to
do with recursion.

Recursion isn't evil, and Python isn't intent on preventing foot-shooting.


author: Nigel Rantor

subject: Re: Need help with Python scoping rules

text:
kj wrote:

Based on your statement above, and the fact that multiple people have
now explained *exactly* why your attempt at recursion hasn't worked, it
might be a good idea to step back, accept the advice and walk away
instead of trying to convince people that the language forbids recursion
and doesn't provide decent OO ecapsulation.

Otherwise I'd wager you'll soon be appearing in multiple kill-files.

  n


subject: Re: Need help with Python scoping rules

text:
On Wed, 26 Aug 2009 14:09:57 +0000, kj wrote:

Python doesn't treat the addition of new keywords, and the corresponding
breakage of code which used that word as a normal name, as "trivial" --
the Python dev team takes their responsibilities to not casually break
people's code seriously. That pretty much rules out "this", although it
would allow "__this__".

However, what's your use-case?

class Demo(object):
    def f(n):
        return n+1
    x = f(10)

is a poorly written class, because the user will expect to do this:

instance = Demo()
assert instance.c == 11  # suceeds
instance.f(10) == 11  # fails

Since the function f doesn't refer to a Demo instance, or the Demo class,
why do you put it inside the Demo class? It doesn't belong there, it
belongs in the global (module) scope. Move it out, and your problem goes
away.

The only use-case I can think of for __this__ is the following:

class Example(object):
    @staticmethod
    def rec(n):
        if n < 2: return "x"
        return "x" + __this__.rec(n/2)

Example.rec(15)

but again, why include rec() in the class if it doesn't actually have
anything to do with the class or the instance? Or why make it a
staticmethod? Just make it a class method:

class Example(object):
    @classmethod
    def rec(cls, n):
        if n < 2: return "x"
        return "x" + cls.rec(n/2)


subject: Re: Need help with Python scoping rules

text:
On Wed, 26 Aug 2009 15:36:35 +0000, kj wrote:

There's nothing "clearly" about it.

This helper function doesn't reference the class, or any instance of the
class. Why should it be encapsulated in the class? It's not *part* of the
class, it shouldn't be *inside* the class.

Look at it this way: classes are made from building blocks. Just because
a building block ends up in a class, doesn't mean the function that makes
the building block has to be inside the class too.

It's an accident of Python's execution model that a single function call
*sometimes* works as you expect inside the class statement:

class Demo:
    def f():
        return 2
    def g():
        return f()+1
    x = f()  # works
    y = g()  # fails

As you can see, the problem is not because of recursion, but because the
class scope is not inserted into the function scope. As I said earlier,
your problem isn't too little class encapsulation, but too much: the
class scope doesn't leak into the function scope.

Python could, of course, behave the way you want, but it would lead to
some odd interactions:

class Weird(object):
    x = 1
    def __init__(self):
        self.y = 2
    def test(self):
        print self.x  # refers to attribute x with value 1
        print x       # refers to attribute x with value 1
        print self.y  # refers to attribute y with value 2
        print y       # refers to global y

In existing Python, both x and y will refer to globals, because it's
considered more important for all attribute access to be consistently
explicit than to insert the class scope into the function scope. This
isn't a design flaw, or a bug, it's a feature. Yes, it makes it hard for
you to solve your problem the way you want to solve it, but it doesn't
stop you from solving your problem. The module is encapsulation enough.


author: Ethan Furman

subject: Re: Need help with Python scoping rules

text:
kj wrote:

As has been pretty thoroughly discussed, the issue here is not
recursion, but name lookup.

Going back through the archives I found Arnaud's post with this decorator:

def bindfunc(f):
     def boundf(*args, **kwargs):
         return f(boundf, *args, **kwargs)
     return boundf

If you use it on your fact function like so...

class Demo(object):
     @bindfunc
     def fact(recurse, n)	# recurse can be any name you like
         if n < 2:
             return 1
         else:
             return n * recurse(n-1)
     _classvar = fact(5)
     del fact			# no longer needed, and won't work
				# once class is created

This should do as you want.

As a side note, if you're going to bother asking questions on this list,
you really should try to understand the answers.  I won't gripe at you
too much, though, 'cause I learned a lot from the many responses given
due to your refusal to do so.  ;-)

~Ethan~


author: Jan Kaliszewski

subject: Re: Need help with Python scoping rules

text:
26-08-2009 o 09:03:27 Ulrich Eckhardt <[email]> wrote:

Or simpler:

     class Color:
         ...

     Color.BLACK = Color(...)

Then
(Color.BLACK is Color.BLACK.BLACK.BLACK.BLACK) == True
:-)

*j

PS. Obviously, that's nothing special (there is no problem with
creating such "recursive" references in Python).


subject: Re: Need help with Python scoping rules

text:
26-08-2009 o 17:45:54 kj <[email]> wrote:

1. I don't understand then... Why do you desire to both define and
run it *within* that class statement as if it was this class's
method?

2. Could you please show me how it could be done in C++ or Java?
(Or you want to say that that languages also are not fully valuable
OO languages?)

3. Python makes function bodies "agnostic" about the context of their
definition -- generally any non-global information must be passed
explicitly to their interior. *It has nothing to do with recursion.*

If you really must both define and use such a function within the
class definition, pass function object to itself explicitly, and
everybody will be happy:

     class Demo(object):

         def fact(fact, n):
             if n < 2:
                 return 1
             else:
                 return n * fact(fact, n - 1)

         fact(fact, 3)

*j


author: Hendrik van Rooyen

subject: Re: Need help with Python scoping rules

text:
On Wednesday 26 August 2009 17:14:27 kj wrote:

I think this might go to nub of your problem - It might help you to think as
follows:

A Python class, even after it has been executed, does not really exist except
as a kind of template or pattern - it is mostly useless until an instance of
the class is made by calling it with whatever it needs to set up the
instance.  And once you have an instance, you can do stuff with that
particular instance.  Before that time, the class is mostly just a promise of
things to come.

<aside>
The other thing to bear in mind is that you cannot really hide stuff in python
classes - there are no really private things.
</aside>

Yes and no - mostly no -  your examples just illustrate the point I tried to
make above.

Pythons object model, and its classes, are different from what you are used
to.  A bare class is mostly useless without an instance, which is ultimately
why accessing a function in a class from itself like you are doing, without
reference to an instance, does not work - the function does not exist yet to
a degree that it can be referenced.  It is kind of subtle, and different from
other languages.

8<------------- rant against the way things are -----------------------

Welcome to python, and the newsgroup, by the way.

- Hendrik


subject: Re: Need help with Python scoping rules

text:
On Wednesday 26 August 2009 17:45:54 kj wrote:
<[email]> writes:

If the sole purpose of the function is to be used to define what will become a
constant, why do you not just calculate the constant on your calculator, or
at the interactive prompt, and assign it to the attribute, and be done with
it?

Why waste run time recalculating every time the programme is called?

Why *must* it be there?

Seems no point to me even when there is recursion - a number is a number is a
number.  If you know the arguments when you write it, and if the function is
known at time of writing, storing a literal is the best solution.

Conversely, if the arguments are not known at time of writing, then they
should be passed at run time, when an instance is created, and assigned as
part of the __init__ method.

And the same is true if the function is not known at time of writing - then it
must be passed to the constructor of the instance.

Storm in a teacup.

- Hendrik


subject: Re: Need help with Python scoping rules

text:
On Thu, 27 Aug 2009 08:38:29 +0200, Hendrik van Rooyen wrote:

Oh my! I couldn't disagree more strongly! I think the above is totally
incorrect.

Classes and types are first class objects, you can treat them like
anything else in Python. In fact, classes themselves are instances of
type, so you can say:

...     pass
...
True
True

Classes are themselves instances of their metaclass. By default, classes
have a metaclass of type, but you can easily change that. Metaclass
programming is advanced but very powerful.

Because classes are themselves objects, you can (with a bit of metaclass
jiggery-pokery) make them do all sorts of interesting things. For
instance, huge amounts of effort are often put into creating a Singleton
class, a class that has a single instance. Well, okay... but why not just
use the class object itself, instead of an instance? There's already one
of those, and you can't (easily) make a copy of it, and even if you did,
it would be an independent class. Instead of this:

singleton = SingletonClass(args)
do_something_with(singleton)

just do this:

do_something_with(SingletonClass)

Of course SingletonClass needs to be designed to work that way, which
will probably need some metaclass magic. It would be interesting to see
which requires less effort.

When it comes to built-in classes (types), I often use the class object
itself as an object. E.g. I might do something like this:

def convert(seq):
    t = type(seq)  # remember the original type
    result = process(seq)  # always produces a list
    if t is list:
        return result  # don't bother making a copy of the result
    elif t is str or t is unicode:
        empty = t()
        return empty.join(result)
    else:
        return t(result)  # return the original type

Completely no. You may have missed the examples I've given, but the
problems the Original Poster were having had nothing to do with recursion.

That is incorrect. What's going on is more subtle.

...     def function(x):
...         print "Calling function with argument %s" % x
...     function(None)
...     function(1)
...     function(function)
...
Calling function with argument None
Calling function with argument 1
Calling function with argument <function function at 0xb7d495dc>
<class __main__.Demo at 0xb7d4e0ec>


subject: Re: Need help with Python scoping rules

text:
On Thu, 27 Aug 2009 09:09:21 +0200, Hendrik van Rooyen wrote:

What you are calculating might actually be quite complicated to enter as
a literal. You might have something like:

class C(object):
    TABLE = []
    for i in xrange(100):
        row = []
        for j in xrange(100):
            row.append((i**3 + 2*i**2 - i*j + 7*j**2 + 9*i*j**2 - j)/3)
        TABLE.append(row)

It's a little hard to type out C.TABLE as a literal.

And even if you could, which would you rather see if you were debugging
this class? The above, or:

class C(object):
    TABLE = [
        [0.0, 2.0, 8.6666666666666661, 20.0, 36.0, ... ],
        [1.0, 5.666666666666667, 21.0, 47.0, 83.666666666666671, ...],
        [5.333333333333333, 12.666666666666666, 36.666666666666664, ...],
        ...
        [... , 3143161.0, 3201497.6666666665, 3260433.0]
        ]

For obvious reasons I haven't typed the whole thing out! And imagine
trying to check it for typos!

Clearly this is a made-up example, but the principle is sound. If Python
can calculate values for you, why not let it do so? It is easier for you,
easier to check that you've calculated them correctly, easier to debug
and read, it makes the algorithm clearer (fewer "magic constants"). Yes,
there is a run-time cost, but you only pay it once, when you import the
module, and it's likely to be not that much more expensive than parsing
the literals anyway.

Of course, for something as big and complicated as the above table, I'd
almost certainly put the code to calculate it in a function outside of
the class, but that's a matter of style, and it will work to put it
inside the class.


subject: Re: Need help with Python scoping rules

text:
On Thu, 27 Aug 2009 13:45:00 +0200, Jean-Michel Pichavant wrote:

Incorrect. That works fine.

...     c = 5
...     d = c # not actually broken
...
5
5

The class is a scope, and inside the class scope, you can access local
names. What you can't do is access the class scope from inside nested
functions.