aimmath-commit Mailing List for AiM Assessment in Mathematics (Page 22)
Brought to you by:
gustav_delius,
npstrick
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(73) |
Aug
(96) |
Sep
(240) |
Oct
(34) |
Nov
(12) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(6) |
Mar
(17) |
Apr
(6) |
May
(5) |
Jun
|
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(19) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(14) |
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <gr...@us...> - 2003-07-19 17:37:37
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv28505 Modified Files: Tag: develop_2_1 Int.mpl Util1.mpl Log Message: Util1.mpl: added - NiceFrac ... for fine-tuning of fractions - simplifyabs ... simplifies the result of diff(ln(abs(u)), u) to 1/u Int.mpl: some improvements (using the above) + added some new features for checking for integration constants with indefinite integrals. - GG Index: Int.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Int.mpl,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** Int.mpl 10 Jul 2003 20:10:03 -0000 1.2.2.1 --- Int.mpl 19 Jul 2003 17:37:34 -0000 1.2.2.2 *************** *** 119,131 **** @a['AnswerNote']@. The function returns a list of the form @[mark,feedback,note]@. ", proc(a, Q::`aim/Int/Problem/Indefinite`, #optional ! val_::numeric ) ! local q,argtype,ans,diffans,rightans,integrand,var, ! feedback,note,mark,t,val,u,base,expt,newvar,ns; if type(a,`aim/Question/Attempt`) then --- 119,140 ---- @a['AnswerNote']@. The function returns a list of the form @[mark,feedback,note]@. + By default, the student's answer need not have an integration constant, + but to insist that one be included pass as 4th argument + the optional argument @intconst_@ with value @\"insist\"@, and in this case + the student is penalised (by multiplying by a factor of 0.9). + To suggest there should be an integration constant but not penalise + pass the optional argument @intconst_@ with value @\"alert\"@. + In order for there to be a 4th argument one is obliged, in this case, + to pass the 3rd argument @val_@. ", proc(a, Q::`aim/Int/Problem/Indefinite`, #optional ! val_::numeric, ! intconst_::string ) ! local q,argtype,ans,diffans,rightans,integrand,var,subsvars,varstr, ! feedback,note,mark,t,val,intconst,u,base,expt,newvar,ns; if type(a,`aim/Question/Attempt`) then *************** *** 140,144 **** fi; ! val := `if`(nargs > 2, val_,1); q := `aim/Int/Problem/Split`(Q); --- 149,159 ---- fi; ! if nargs >= 4 then ! val, intconst := val_, intconst_; ! elif nargs = 3 then ! val, intconst := val_, "ignore"; ! else ! val, intconst := 1, "ignore"; ! fi; q := `aim/Int/Problem/Split`(Q); *************** *** 150,155 **** note := ""; ! diffans := ! traperror(simplify(diff(ans,var),assume = positive)); if diffans = lasterror then --- 165,170 ---- note := ""; ! diffans := traperror(simplify(simplifyabs(diff(ans,var)))); ! t := `aim/CheckVars`(ans, integrand); if diffans = lasterror then *************** *** 159,163 **** mark := 0; ! elif traperror(simplify(diffans - integrand)) = 0 then feedback := ""; note := ""; --- 174,188 ---- mark := 0; ! # Sometimes it's best to compare the integrals and sometimes it's best to ! # differentiate and see that it gives back the integrand ! # ... if a student transforms the integrand in some way and then ! # integrates, as is typical of some trig. integrals, differentiation and ! # comparing with the integrand can sometimes fail no matter how much help ! # you give Maple. simplifyabs here takes care of examples like int(1/u, u) ! # where the student gives the answer: ln(abs(u)) + C ! elif traperror(simplify(simplifyabs(diff(simplify(ans - rightans))))) = 0 or ! traperror(expand(simplify(diffans - integrand))) = 0 or ! traperror(expand(simplify(diffans - integrand), assume = positive)) = 0 ! then feedback := ""; note := ""; *************** *** 171,176 **** __("In fact, the derivative of your answer is:"), "\n", ! sprintf("<latex>\\[\\frac{d}{d%a}\\left[%s\\right] = %s\\]</latex>", ! var,LaTeX(ans),LaTeX(diff(ans,var))), "\n", __("so you must have done something wrong."), --- 196,201 ---- __("In fact, the derivative of your answer is:"), "\n", ! sprintf("<latex>\\[\\frac{d}{d%a}\\bigl(%s\\bigr) = %s\\]</latex>", ! var,LaTeX(ans),LaTeX(simplifyabs(diff(ans,var)))), "\n", __("so you must have done something wrong."), *************** *** 180,198 **** mark := 0; ! t := `aim/CheckVars`(ans,Q); ! ! if t['Extra'] <> [] then feedback := feedback, ! __("Your answer involves the following variable(s) that do not occur in the question or the right answer:"), ! " <font color='red'><tt>", ! `Util/CommaJoin`(op(t['Extra'])), ! "</tt></font>\n<br/>\n", ! __("Note that variable names are case-sensitive; you should not enter <font color='green'><tt>A</tt></font> for <font color='green'><tt>a</tt></font> or vice-versa."), ! "<br/><br/>\n"; ! note := __("extra vars"); ! if ({op(t['Extra'])} intersect {"u","v","w","U","V","W"}) <> {} then feedback := ! feedback,__("#Explain integration backsubstitution"),"\n<br/>\n"; fi; elif type([integrand],[`^`]) then --- 205,240 ---- mark := 0; ! if t['Missing'] = [] and nops(t['Extra']) > 1 then feedback := feedback, ! __("Your answer seems to include at least one superfluous integration constant, one is enough!"); ! fi; ! ! if t['Missing'] <> [] then ! if t['Extra'] <> [] then feedback := ! feedback, ! __("Your answer involves the following variable(s) that do not occur in the integrand:"), ! " <font color='red'><tt>", ! `Util/CommaJoin`(op(t['Extra'])), ! "</tt></font>\n<br/>\n", ! __("Note that variable names are case-sensitive; you should not enter <font color='green'><tt>A</tt></font> for <font color='green'><tt>a</tt></font> or vice-versa. One of the extra variables could be intended as the integration constant but where is the original variable of integration?"), ! "<br/><br/>\n"; ! note := __("extra vars"); ! if ({op(t['Extra'])} intersect {"u","v","w","U","V","W"}) <> {} then ! feedback := ! feedback,__("#Explain integration backsubstitution"),"\n<br/>\n"; ! fi; ! #The following is a possible alternative for the preceding if ... fi ! #subsvars := {op(t['Extra'])} intersect {"u","v","w","U","V","W"}; ! #if subsvars <> {} then ! # varstr := convert(var, string); ! #feedback := ! # feedback, "It looks as if you made a substitution ", subsvars[1], ! # " = f(", varstr, ") for some function f. ", ! # "Your final answer should be expressed in terms of the original ", ! # "integration variable by substituting f(", varstr, ") for ", ! # subsvars[1], "\n<br/>\n"; ! #fi; fi; elif type([integrand],[`^`]) then *************** *** 219,222 **** --- 261,283 ---- fi; + if intconst <> "ignore" and nops(t['Extra']) < 1 then + if member("C", t['Correct']) then + # strange choice of integration variable!! + feedback := feedback, + __("You neglected to include an integration constant."); + else + feedback := feedback, + __("You neglected to include an integration constant, i.e. you should have included, e.g.: + C."); + fi; + if intconst = "insist" then + mark := mark * 0.9; + else + feedback := feedback, + __("There was no penalty for omitting it."); + fi; + feedback := feedback, "\n<br>\n"; + note := note, __("no integration constant"); + fi; + feedback := cat(feedback); note := cat(note); *************** *** 268,271 **** --- 329,336 ---- feedback := ""; note := ""; + elif `aim/TestSymbolic`(ans,-q['RightAnswer']) then + mark := 0; + feedback := __("Possibly you evaluated the limits in the wrong order."); + note := __("Reversed limits"); else mark := 0; *************** *** 310,326 **** `Package/Assign`( `aim/DefInt/ShowSubs`, ! "It is assumed that @Q@ is an indefinite integration problem, and that @F@ is a solution of the corresponding indefinite problem. The output is a LaTeX string enclosed in a <latex> tag, ! expressing something like this: <pre><font color='green'> 4 ! / | 3 | 4 | 3 | | 3 | ! | 2 | x | | 4 | | 2 | 64 8 56 ! | x dx = | ---- | = | -- | - | -- | = -- - - = -- ! | | 3 | | 3 | | 3 | 3 3 3 ! / | | x=2 | | | | 2 --- 375,410 ---- `Package/Assign`( + `aim/DefInt/NiceInt`, + "Given @Q@, a definite integration problem, returns + a LaTeX string for the integration problem that has its + limits set more nicely and with a little whitespace before + the d@x@, where @x@ is the integration variable + ", + proc(Q::`aim/Int/Problem/Definite`,F) + local q, a, b; + q := `aim/Int/Problem/Split`(Q); + a, b := op( q['Limits'] ); + cat( "\\int_{", NiceFrac(a, 1, "textstyle"), "}", + "^{", NiceFrac(b, 1, "textstyle"), "} ", + LaTeX( op(1, q['Integral']) ), " d", LaTeX( q['Variable'] ) ); + end + ): + + ###################################################################### + + `Package/Assign`( `aim/DefInt/ShowSubs`, ! "It is assumed that @Q@ is a definite integration problem, and that @F@ is a solution of the corresponding indefinite problem. The output is a LaTeX string enclosed in a <latex> tag, ! expressing something like this, except on multiple lines: <pre><font color='green'> 4 ! / | 3 | 4 / 3 \\ / 3 \\ ! | 2 | x | | 4 | | 2 | 64 8 56 ! | x dx = | ---- | = | -- | - | -- | = -- - - = -- ! | | 3 | | 3 | | 3 | 3 3 3 ! / | | x=2 \\ / \\ / 2 *************** *** 328,353 **** ", proc(Q::`aim/Int/Problem/Definite`,F) ! local q,limits,a,b,x,Fa,Fb,L0,L1,L2,L3,s; q := `aim/Int/Problem/Split`(Q); ! limits := q['Limits']; ! a := op(1,limits); ! b := op(2,limits); x := q['Variable']; Fa := limit(F,x=a); Fb := limit(F,x=b); ! L0 := LaTeX(q['Integral']); ! L1 := ! cat("\\left[ ", LaTeX(F), "\\right]_{",LaTeX(a),"}^{",LaTeX(b),"}"); ! L2 := ! cat("\\left( ", LaTeX(Fb), "\\right) - \\left(", LaTeX(Fa), "\\right)"); L3 := LaTeX(Fb - Fa); ! s := cat(L0," = ",L1," = ",L2," = ",L3); # The next line tests whether Fb - Fa is visibly equal to --- 412,441 ---- ", proc(Q::`aim/Int/Problem/Definite`,F) ! local q,limits,a,b,x,Fa,Fb,L0,L1,L2,L3,LaTeXF,s; q := `aim/Int/Problem/Split`(Q); ! a, b := op( q['Limits'] ); x := q['Variable']; Fa := limit(F,x=a); Fb := limit(F,x=b); ! limits := cat("_{", NiceFrac(a, 1, "textstyle"), "}", ! "^{", NiceFrac(b, 1, "textstyle"), "}"); ! L0 := cat( "\\int", limits, " ", ! LaTeX( op(1, q['Integral']) ), " d", LaTeX(x) ); ! LaTeXF := LaTeX(F); ! L1 := `if`( evalb( SearchText("frac", LaTeXF) > 0 ), ! cat("\\left[ ", LaTeXF, " \\right]", limits), ! cat("\\bigl[ ", LaTeXF, " \\bigr]", limits) ); ! ! L2 := cat( "\\left(", LaTeX(Fb), "\\right) - ", ! "\\left(", LaTeX(Fa), "\\right)"); L3 := LaTeX(Fb - Fa); ! s := cat(L0, " &= ", L1, "\\\\ &= ", L2, "\\\\ &= ", L3); # The next line tests whether Fb - Fa is visibly equal to *************** *** 355,362 **** # simplification, provided that the question is correct. if (Fb - Fa <> q['RightAnswer']) then ! s := cat(s," = ",LaTeX(q['RightAnswer'])); fi; ! RETURN(cat("<latex>\\[ ",s," \\]</latex>\n")); end ): --- 443,450 ---- # simplification, provided that the question is correct. if (Fb - Fa <> q['RightAnswer']) then ! s := cat(s,"\\\\ &= ", LaTeX(q['RightAnswer'])); fi; ! RETURN(cat("<latex>\\begin{eqnarray*} ",s," \\end{eqnarray*}</latex>\n")); end ): Index: Util1.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Attic/Util1.mpl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Util1.mpl 9 Jul 2003 09:59:48 -0000 1.1.2.1 --- Util1.mpl 19 Jul 2003 17:37:34 -0000 1.1.2.2 *************** *** 8,12 **** Package("aim/Util1"," This package provides some extra utility functions initially created ! as they were needed by or were useful with the #`aim/Trig`# package. " ): --- 8,13 ---- Package("aim/Util1"," This package provides some extra utility functions initially created ! as they were needed by or were useful with packages such as the ! #`aim/Trig`# package. " ): *************** *** 148,151 **** --- 149,248 ---- s_ := cat(s_[1 .. pos - 1], s_[posn .. posb - 1], "/", s_[posb .. -1]); od; + end + ): + + `Package/Assign`( + NiceFrac::string, + "Return a nicely formatted rendition of the fraction @n@/@d@ as a + LaTeX string. It accepts the following optional arguments + <dl> + <dt>@\"term\"@</dt> + <dd>if present, @n@/@d@ is treated as a term in a larger expression, + i.e. if @n@/@d@ = 0 then an empty string is returned or otherwise + the operational sign (+ or -) is prepended;</dd> + <dt>@\"coef\"@ (or @\"coeff\"@)</dt> + <dd>if present, @n@/@d@ is treated as the coefficient of a term, + i.e. if @n@/@d@ = 1 or -1 then only an operational sign is returned + (+, in the former case, or - otherwise); in any case, as with + @\"term\"@ an operational sign is prepended;</dd> + <dt>@\"lcoef\"@ (or @\"lcoeff\"@)</dt> + <dd>if present, @n@/@d@ is treated as the coefficient of a leading term, + i.e. if @n@/@d@ = -1 then only the operational sign - is returned, + and if @n@/@d@ = 1 a null string is returned; in any case, an + operational sign is prepended only if @n@/@d@ is negative;</dd> + <dt>@\"nocancel\"@</dt> + <dd>if present, @n@/@d@ is not cancelled to lowest terms;</dd> + <dt>@\"textstyle\"@</dt> + <dd>if present, @n@/@d@ is formatted in textstyle, i.e. using / between + numerator and denominator + (by default, @n@/@d@ is formatted in displaystyle, i.e. in + @\\frac{..}{..}@ form). + </dl>", + proc(n, d) + local x, n_, d_, sign_, term, coef, lcoef, nocancel, textstyle; + if nargs = 1 or type(args[2], string) then + d_ := 1; + else + d_ := d; + fi; + term := member("term", [args]); + coef := member("coef", [args]) or member("coeff", [args]); + lcoef := member("lcoef", [args]) or member("lcoeff", [args]); + nocancel := member("nocancel", [args]); + textstyle := member("textstyle", [args]); + + x := n/d_; + sign_ := `if`(evalb( convert(signum(x), string)[1] = "-" ), + "-", `if`(evalb(term or coef), "+", "")); + if sign_ = "-" then + x := -x; + fi; + if term or coef then + sign_ := cat(sign_, " "); + fi; + + if not nocancel and term and x = 0 then + return ""; + elif not nocancel and (coef or lcoef) and x = 1 then + return sign_; + elif not nocancel and denom(x) = 1 then + return cat(sign_, LaTeX(x)); + else + if nocancel then + n_ := `if`(evalb( signum(n) = -1 ), -n, n); + d_ := `if`(evalb( signum(d_) = -1 ), -d_, d_); + else + n_, d_ := numer(x), denom(x); + fi; + if textstyle then + return cat(sign_, LaTeX(n_), "/", + `if`(evalb(nops(d_) = 1), "", "("), + LaTeX(d_), + `if`(evalb(nops(d_) = 1), "", ")")); + else + return cat(sign_, "\\frac{", LaTeX(n_), "}{", LaTeX(d_), "}"); + fi; + fi; + end + ): + + `Package/Assign`( + `simplifyabs`::algebraic, + "Returns @e@ with any subexpression pairs of form @abs(1, u)@, @abs(u)@ + replaced by @u@. These typically turn up when differentiating expressions + that contain absolute values, e.g. @diff(ln(abs(u)),u)@ gives + @abs(1,u)/abs(u)@ which #`simplifyabs`# simplifies to @1/u@. It is used + in #`aim/Int/Test`#.", + proc(e::algebraic) + local e_, absfns, x, u; + e_ := e; + absfns := selectfun(e_, abs); + for x in select(x -> evalb(nops(x) = 2), absfns) do + u := op(2, x); + if member(abs(x), absfns) then + e_ := subs( abs(1, u) = 1, abs(u) = u, e_ ); + fi; + od; + return e_; end ): |
From: <gr...@us...> - 2003-07-18 07:24:49
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv21516/aim Modified Files: Tag: develop_2_1 Diff.mpl Log Message: Just a few improvements. - GG Index: Diff.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Diff.mpl,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** Diff.mpl 10 Jul 2003 20:10:03 -0000 1.2.2.1 --- Diff.mpl 18 Jul 2003 07:24:46 -0000 1.2.2.2 *************** *** 168,172 **** note := ""; ! if traperror(simplify(ans - rightans,assume=positive)) = 0 then mark := 1; else --- 168,173 ---- note := ""; ! # sometimes an extra simplify is needed ... maybe an eval needed elsewhere? ! if traperror(simplify(simplify(ans - rightans,assume=positive))) = 0 then mark := 1; else *************** *** 202,210 **** if type([f],[function]) and type([op(0,f)],[symbol]) and ! nops(f) = 1 then # Check for the mistake (g o h)' = g' o h. ! g := op(0,f)(uu); ! h := op(1,f); wrongans := eval(subs(uu = h,diff(g,uu))); if traperror(simplify(ans - wrongans,assume=positive)) = 0 then --- 203,223 ---- if type([f],[function]) and type([op(0,f)],[symbol]) and ! nops(f) = 1 or ! # f = log[b] (gets ``unwrapped'' by Maple) ! type([f],[`*`]) and ! type([op(1,f)],[function]) and op(0, op(1,f)) = `ln` and ! type([op(2,f)],[`^`]) and op(2, op(2,f)) = -1 and ! type([op(1, op(2,f))],[function]) and ! op(0, op(1, op(2,f))) = `ln` and ! type([op(1, op(1, op(2,f)))],[constant]) then # Check for the mistake (g o h)' = g' o h. ! if type([f],[function]) then ! g := op(0,f)(uu); ! h := op(1,f); ! else ! g := ln(uu) * op(2,f); ! h := op(1, op(1,f)); ! fi; wrongans := eval(subs(uu = h,diff(g,uu))); if traperror(simplify(ans - wrongans,assume=positive)) = 0 then *************** *** 234,238 **** sprintf( __("But this is $%s$, not $%s$."), ! LaTeX(Diff(fn,newvar)),LaTeX(Diff(fn,var)))); feedback := feedback,"<latex>\n",msg,"</latex>\n"; fi; --- 247,251 ---- sprintf( __("But this is $%s$, not $%s$."), ! TextStyle(LaTeX(Diff(fn,newvar))),TextStyle(LaTeX(Diff(fn,var))))); feedback := feedback,"<latex>\n",msg,"</latex>\n"; fi; *************** *** 330,334 **** newvar,LaTeX(base),fn,LaTeX(f),LaTeX(newvar^expt)), sprintf( ! __("Then \[ %s = %s = %s, \] which is your answer.\n"), LaTeX(Diff(fn,newvar)), LaTeX(expt * newvar^(expt - 1)), --- 343,347 ---- newvar,LaTeX(base),fn,LaTeX(f),LaTeX(newvar^expt)), sprintf( ! __("Then \\[ %s = %s = %s, \\] which is your answer.\n"), LaTeX(Diff(fn,newvar)), LaTeX(expt * newvar^(expt - 1)), |
From: <gr...@us...> - 2003-07-18 06:52:40
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv16976 Modified Files: Tag: develop_2_1 Util.mpl Log Message: Added `Util/CommaAndJoin` (like `Util/CommaJoin` but adds an extra space after each comma and an `and' between the last two arguments). - GG Index: Util.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Util.mpl,v retrieving revision 1.1.1.1.2.2 retrieving revision 1.1.1.1.2.3 diff -C2 -d -r1.1.1.1.2.2 -r1.1.1.1.2.3 *** Util.mpl 10 Jul 2003 20:10:03 -0000 1.1.1.1.2.2 --- Util.mpl 18 Jul 2003 06:52:37 -0000 1.1.1.1.2.3 *************** *** 157,160 **** --- 157,180 ---- `Package/Assign`( + `Util/CommaAndJoin`::string, + "Join strings together, inserting a \", \" between them, + except for the second last and last strings, where \" and \" is + inserted instead. + If arguments are not strings, convert them using + @sprintf(\"%A\",..)@ first. + ", + proc() + if nargs = 0 then + ""; + elif nargs = 1 then + `Util/JoinString`("", args[1]); + else + `Util/JoinString`(" and ", + `Util/JoinString`(", ", args[1 .. -2]), args[-1]); + fi; + end + ): + + `Package/Assign`( `Util/ColonJoin`::string, "Join strings together, inserting colons between them. |
From: <gus...@us...> - 2003-07-17 13:52:46
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv8040/WEB-INF/maple/aim Modified Files: Tag: develop_2_1 Compile.mpl Log Message: temporary fix for bug with av> setting answerprompt which leads to problems in matrix questions Index: Compile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Compile.mpl,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -C2 -d -r1.2.2.3 -r1.2.2.4 *** Compile.mpl 13 Jul 2003 15:02:14 -0000 1.2.2.3 --- Compile.mpl 17 Jul 2003 13:52:41 -0000 1.2.2.4 *************** *** 409,416 **** nam,flagnum,lines]); fi; ! if setprompt = "" then ! setprompt := ! sprintf("questionversion['Prompt'] := \"%s = \";\n",ansvar); ! fi; ########## elif flag = "note>" then --- 409,416 ---- nam,flagnum,lines]); fi; ! # if setprompt = "" then ! # setprompt := ! # sprintf("questionversion['Prompt'] := \"%s = \";\n",ansvar); ! # fi; ########## elif flag = "note>" then |
From: <gr...@us...> - 2003-07-17 06:11:59
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv2602 Modified Files: Tag: develop_2_1 AutoConf.mpl Log Message: Configuration of TtH set to search where it used to as well as the new possible place. - GG Index: AutoConf.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v retrieving revision 1.1.1.1.2.6 retrieving revision 1.1.1.1.2.7 diff -C2 -d -r1.1.1.1.2.6 -r1.1.1.1.2.7 *** AutoConf.mpl 17 Jul 2003 05:29:37 -0000 1.1.1.1.2.6 --- AutoConf.mpl 17 Jul 2003 06:11:56 -0000 1.1.1.1.2.7 *************** *** 714,724 **** # Look for TtH - if os_os = "Linux" then ! Config['TtHProgram'] := cat(Config['WebAppDir'],"/bin/tth_exe/tth"): else ! Config['TtHProgram'] := cat(Config['WebAppDir'],"\\bin\\tth_exe\\tth.exe"): fi: - p("\n"): --- 714,742 ---- # Look for TtH if os_os = "Linux" then ! Config['TtHProgram'] := ! look_for_prog( ! "TtH", ! "Conf" = 'TtHProgram', ! "Path" = "tth", ! "Def" = "/usr/local/bin/tth", ! "Def" = "/usr/bin/tth", ! "Def" = "/bin/tth", ! "Def" = cat(Config['WebAppDir'],"/bin/tth_exe/tth"), ! "Check" = ["-r < tthtest.tex","TtH is OK"] ! ): else ! Config['TtHProgram'] := ! os_osname(look_for_prog( ! "TtH", ! "Conf" = 'TtHProgram', ! "Path" = "tth.exe", ! "Def" = "C:\\TtH\\tth.exe", ! "Def" = "C:\\Program Files\\tth.exe", ! "Def" = "C:\\Program Files\\TtH\\tth.exe", ! "Def" = cat(Config['WebAppDir'],"\\bin\\tth_exe\\tth.exe"), ! "Check" = ["-r < tthtest.tex","TtH is OK"] ! )): fi: p("\n"): |
From: <gr...@us...> - 2003-07-17 05:44:28
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv31326 Modified Files: Tag: develop_2_1 Servlet.mpl Log Message: Fixed typo. ... make.mpl intended to be Make.mpl (last line). - GG Index: Servlet.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Servlet.mpl,v retrieving revision 1.1.1.1.2.3 retrieving revision 1.1.1.1.2.4 diff -C2 -d -r1.1.1.1.2.3 -r1.1.1.1.2.4 *** Servlet.mpl 14 Jul 2003 23:20:26 -0000 1.1.1.1.2.3 --- Servlet.mpl 17 Jul 2003 05:44:25 -0000 1.1.1.1.2.4 *************** *** 417,419 **** fi: ! read("make.mpl"); --- 417,419 ---- fi: ! read("Make.mpl"); |
From: <gr...@us...> - 2003-07-17 05:29:40
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv29020 Modified Files: Tag: develop_2_1 AutoConf.mpl Log Message: Fixed bug in look_for_dir. When looking for "Def" (default) places variable d1 was only set on Windows ... now set to d for the rest of us :-) - GG Index: AutoConf.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v retrieving revision 1.1.1.1.2.5 retrieving revision 1.1.1.1.2.6 diff -C2 -d -r1.1.1.1.2.5 -r1.1.1.1.2.6 *** AutoConf.mpl 14 Jul 2003 23:45:15 -0000 1.1.1.1.2.5 --- AutoConf.mpl 17 Jul 2003 05:29:37 -0000 1.1.1.1.2.6 *************** *** 162,165 **** --- 162,167 ---- if r[1] = "" or r[1] = "c:" or r[1] = "C:" then d1 := cat(d,"/"): + else + d1 := d; fi: if (os_direxists(d1)) then |
From: <gus...@us...> - 2003-07-15 19:50:15
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv25298/doc Added Files: Tag: develop_2_1 installwin.html Log Message: Instructions for installation under Windows --- NEW FILE: installwin.html --- <html> <head> <title>Installing AiM under Windows</title> </head> <body> <h1>Installing AiM under Windows</h1> These are instructions for installing and configuring AiM. Installation has been tested with Windows 2000 and Windows XP. <h2>License terms</h2> AiM relies on various external components, such as <a href="http://www.maplesoft.com">Maple</a>, <a href="http://java.sun.com">Java</a>, the <a href="http://jakarta.apache.org/tomcat/">Tomcat</a> web server, <a href="http://hutchinson.belmont.ma.us/tth/">TtH</a> for LaTeX-to-HTML conversion, the <a href="http://www.servlets.com/cos/index.html">com.oreilly.servlet</a> support classes, and the <a href="http://www.interlog.com/~tcharron/blat.html">blat</a> mailer. The license terms for these components can be found on their webpages. <p/> The Maple and Java source code for AiM itself is free software; you can redistribute it and/or modify it under the terms of the GNU <a href='http://www.gnu.org/licenses/gpl.html'>General Public License</a>, as distributed by the <a href='http://www.fsf.org'>Free Software Foundation</a>; either version 2 of the license or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. <h2>Maple</h2> You will need Maple version 7 or 8. Simply follow Maple's default installation procedure. <p> If you want to use AiM for actual teaching (rather than just checking it out) you will need a Maple license that allows you to make the program available over the web. If you have a campus site license, then this is not an issue. If you do not have such a license, or are unsure of the type of license that your campus has, then you should contact <a href='mailto:in...@ma...'>Waterloo Maple</a> directly to ensure that you are complying with your license terms. If you have any complex discussions about licensing issues then I (<a href='mailto:N.P...@sh...'>Neil Strickland</a>) would appreciate a copy. Waterloo Maple are aware of AiM and are generally supportive. Our main contact there has been <a href='dmc...@ma...'>Darren McIntyre</a> (but you should email <a href='mailto:in...@ma...'>in...@ma...</a> in the first instance). <h2>Java</h2> You will need to download the JDK (Java development kit) from <a href="http://java.sun.com">java.sun.com</a>. The current version is <a href="http://java.sun.com/j2se/1.4.2/download.html">J2SDK 1.4.2</a> but any other version should work just as well. Note that you need the full JDK, not just the runtime environment JRE. It comes with an automatic installer. Just follow the default procedure. It will install the JDK into the folder C:/j2sdk1.4.2. <h2>Tomcat</h2> You will need the Jakarta Tomcat 4 server from <a href="http://jakarta.apache.org">jakarta.apache.org</a>. Download and run the automatic installer for <a href="http://apache.towardex.com/jakarta/tomcat-4/binaries/tomcat-4.1.24.exe"> tomcat 4.1.24</a>. When the installer offers you to change the default installation location, I recommend you choose <font color='green'>C:\Tomcat</font> because it will be easier to find than the default location deep inside the <font color='green'>C:\Program</font> Files folder. Towards the end of the installation you will also be asked for the port number, you can simply leave it at the default <font color='green'>8080</font>. You will be able to create an admin account on the Tomcat manager. <h2>AiM</h2> You are now finally ready to install AiM itself by following the following steps. <ol> <li> Download the latest file release (with a name starting with <font color='green'>complete</font>) from <a href="http://sourceforge.net/projects/aimmath/">SourceForge</a> and unzip it into a subdirectory of the <font color='green'>C:\Tomcat\webapps\</font> directory. You can choose any name for this subdirectory. Below we will assume that you chose the name "<font color='green'>AiM</font>". If you chose something different, simply replace "<font color='green'>AiM</font>" by your choice in all filenames and URLs below. You might for example want to change a different name if you already have an AiM server installed in the folder <font color='green'>AiM</font> and want to run the new installation in parallel. </li> <li> Change directory to <font color='green'>C:\Tomcat\webapps\AiM\WEB-INF\maple</font>. Open the file <font color='green'>ManualConfig.dist</font> in notepad or you favourite texteditor. In this file you can make changes to the default configuration. You should then save it under the name <font color='green'>ManualConfig.mpl</font>. You will want to uncomment the line <font color='green'>Config['SMTPServer'] := "smtp.york.ac.uk":</font> and replace the server name by the name of your local mail server. Also, if you chose a directory other than <font color='green'>AiM</font> you should uncomment the line <font color='green'>Config['TomcatContext'] := "AiM":</font> and replace <font color='green'>AiM</font> by the name you chose. </li> <li> Now start Maple, and issue the command <font color='green'>read(`AutoConf.mpl`);</font> This will use the settings you made in <font color='green'>ManualConfig.mpl</font> but otherwise will try to find out all the necessary configuration information automatically. If it complains of any problems, you may wish to set <font color='green'>waffle := true</font> and run it again to get a more verbose report. The output is saved in the file <font color='green'>autoconf.log</font> as well as being printed on the terminal. Using this information you can then review the settings in <font color='green'>ManualConfig.mpl</font> and make the necessary changes before reading in AutoConf.mpl again. You can iterate this procedure as often as you like until you get an installation without error messages. </li> <li>The installation is complete. Now start your Tomcat server. The Tomcat installation will have installed a shortcut "Start Tomcat" for this purpose in the Start menu. </li> <li> Point your webbrowser at the URL of the AiM server. This will be something like <font color='green'>http://localhost:8080/AiM/admin.html</font>, where you may have to replace <font color='green'>AiM</font> by the name of the subdirectory of the <font color='green'>Tomcat/Webapps/</font> directory into which you unzipped AiM. You should click on 'Zone login' to log on as the administrator (with empty password). After logging in, you can set a password, create new subjects and so on. </li> </ol> <h2><a name="trouble">Troubleshooting</a></h2> If the Alice servlet manages to start up, it will then check its configuration, ask Maple to calculate 2+2, and ask TtH to translate a minimal tex file. If any of these things fail, it will display an error report when you try to log in as the administrator; this will hopefully be self-explanatory. If necessary, you can ask for help in the <a href="http://aimmath.sourceforge.net/mod/forum/index.php?id=2">AiM Forums</a>. <p/> Some other kinds of errors may give you a Java stacktrace in your browser, looking something like this: <font color='red'> <pre> 2002-08-18 03:45:27 StandardWrapperValve[Alice]: Servlet.service() for servlet Alice threw exception javax.servlet.ServletException: Unexpected output while initializing new AiM process: Error, unable to read `AliceServer.mpl` at Alice.initMaple(Alice.java:579) at Alice.doPost(Alice.java:352) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) <continued for many lines> </pre> </font> Note that this includes the line number in the source file Alice.java where the error occurred. The top of the stacktrace is often reasonably comprehensible. <p/> With other kinds of problems you may see a message like <font color='red'>Servlet Alice is unavailable</font> in your browser. This means that Tomcat started successfully but Alice did not. You should look at the most recent Tomcat log file <font color='green'>Tomcat\logs\log.YYYY-MM-DD.txt</font>, and search backwards from the end for the string "unavailable". Just above this, you should find a stacktrace, and the top of the stacktrace may be informative. <p/> If you see nothing at all in the browser, then Tomcat itself failed to start. Some possible reasons: <ul> <li>Tomcat had not shut down properly when you tried to restart it. I have found it safest to shut down twice (which gives an error message on the second attempt) before restarting. </li> <li>There may be another web server (such as Apache or IIS) already listening on port 8080 or whichever port you chose for Tomcat. This will give a message saying <font color='red'>java.net.BindException: Address already in use</font> in the log file. You should either shut down the other server, or change the port that Tomcat is listening and also set <font color='green'>Config['TomcatPort']</font> in <font color='green'>ManualConfig.mpl</font> to specify a different port. </li> <li>The message <font color='red'>Catalina.stop: java.net.ConnectException: Connection refused</font> just means that you tried to stop Tomcat when it was already stopped; this can safely be ignored. </li> </ul> <hr> Last modified by Gustav Delius on 15/07/03 </body> </html> |
From: <gus...@us...> - 2003-07-14 23:45:18
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv29880/WEB-INF/maple Modified Files: Tag: develop_2_1 AutoConf.mpl Log Message: corrections made after checking installation procedure on a new machine. Index: AutoConf.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v retrieving revision 1.1.1.1.2.4 retrieving revision 1.1.1.1.2.5 diff -C2 -d -r1.1.1.1.2.4 -r1.1.1.1.2.5 *** AutoConf.mpl 14 Jul 2003 23:20:26 -0000 1.1.1.1.2.4 --- AutoConf.mpl 14 Jul 2003 23:45:15 -0000 1.1.1.1.2.5 *************** *** 448,464 **** fi: - ###################################################################### - - # Look for TtH - - - if os_os = "Linux" then - Config['TtHProgram'] := cat(Config['CatalinaHome'],"/bin/tth/tth"): - else - Config['TtHProgram'] := cat(Config['CatalinaHome'],"\\bin\\tth\\tth.exe"): - fi: - - - p("\n"): ###################################################################### --- 448,451 ---- *************** *** 720,723 **** --- 707,725 ---- setconfig('MapleInitOptions',"default"): + + ###################################################################### + + # Look for TtH + + + if os_os = "Linux" then + Config['TtHProgram'] := cat(Config['WebAppDir'],"/bin/tth_exe/tth"): + else + Config['TtHProgram'] := cat(Config['WebAppDir'],"\\bin\\tth_exe\\tth.exe"): + fi: + + + p("\n"): + ###################################################################### *************** *** 814,819 **** fi: - ###################################################################### if problems = true then --- 816,821 ---- fi: + ###################################################################### if problems = true then *************** *** 830,837 **** else p("AIM was successfully configured. \n"): - read("Servlet.mpl"): fi: - - fclose(logd): --- 832,838 ---- else p("AIM was successfully configured. \n"): fi: fclose(logd): + + if problems = false then read("Servlet.mpl"): fi: |
From: <gus...@us...> - 2003-07-14 23:20:29
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv25806/WEB-INF/maple Modified Files: Tag: develop_2_1 AutoConf.mpl Servlet.mpl Log Message: streamlined installation which does not overwrite Tomcat's servlet.xml Index: AutoConf.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v retrieving revision 1.1.1.1.2.3 retrieving revision 1.1.1.1.2.4 diff -C2 -d -r1.1.1.1.2.3 -r1.1.1.1.2.4 *** AutoConf.mpl 14 Jul 2003 22:51:47 -0000 1.1.1.1.2.3 --- AutoConf.mpl 14 Jul 2003 23:20:26 -0000 1.1.1.1.2.4 *************** *** 829,837 **** if (dontquit <> true) then `quit`(1): fi: else ! p("AIM was successfully configured. You should now read in the \n"): ! p("file Servlet.mpl to generate the servlet configuration files \n"): ! p("and put them in their proper places. Before doing this, you \n"): ! p("may want to make a backup copy of the file \n"): ! p("<top tomcat directory>/conf/server.xml. \n"): fi: --- 829,834 ---- if (dontquit <> true) then `quit`(1): fi: else ! p("AIM was successfully configured. \n"): ! read("Servlet.mpl"): fi: Index: Servlet.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Servlet.mpl,v retrieving revision 1.1.1.1.2.2 retrieving revision 1.1.1.1.2.3 diff -C2 -d -r1.1.1.1.2.2 -r1.1.1.1.2.3 *** Servlet.mpl 14 Jul 2003 22:51:47 -0000 1.1.1.1.2.2 --- Servlet.mpl 14 Jul 2003 23:20:26 -0000 1.1.1.1.2.3 *************** *** 416,417 **** --- 416,419 ---- printf("com.oreilly.servlet classes are already installed.\n"): fi: + + read("make.mpl"); |
From: <gus...@us...> - 2003-07-14 22:51:50
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv21370/WEB-INF/maple Modified Files: Tag: develop_2_1 AutoConf.mpl ManualConfig.dist Servlet.mpl Log Message: streamlined installation which does not overwrite Tomcat's servlet.xml Index: AutoConf.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v retrieving revision 1.1.1.1.2.2 retrieving revision 1.1.1.1.2.3 diff -C2 -d -r1.1.1.1.2.2 -r1.1.1.1.2.3 *** AutoConf.mpl 10 Jul 2003 20:10:03 -0000 1.1.1.1.2.2 --- AutoConf.mpl 14 Jul 2003 22:51:47 -0000 1.1.1.1.2.3 *************** *** 364,367 **** --- 364,368 ---- "Def" = ["C:\\java","jdk"], "Def" = ["C:","jdk"], + "Def" = ["C:","j2sdk1.4.2"], "Def" = ["C:\\Program Files\\java","jdk"], "Def" = ["C:\\Program Files","jdk"], *************** *** 453,477 **** if os_os = "Linux" then ! Config['TtHProgram'] := ! look_for_prog( ! "TtH", ! "Conf" = 'TtHProgram', ! "Path" = "tth", ! "Def" = "/usr/local/bin/tth", ! "Def" = "/usr/bin/tth", ! "Def" = "/bin/tth", ! "Check" = ["-r < tthtest.tex","TtH is OK"] ! ): else ! Config['TtHProgram'] := ! osname1(look_for_prog( ! "TtH", ! "Conf" = 'TtHProgram', ! "Path" = "tth.exe", ! "Def" = "C:\\TtH\\tth.exe", ! "Def" = "C:\\Program Files\\tth.exe", ! "Def" = "C:\\Program Files\\TtH\\tth.exe", ! "Check" = ["-r < tthtest.tex","TtH is OK"] ! )): fi: --- 454,460 ---- if os_os = "Linux" then ! Config['TtHProgram'] := cat(Config['CatalinaHome'],"/bin/tth/tth"): else ! Config['TtHProgram'] := cat(Config['CatalinaHome'],"\\bin\\tth\\tth.exe"): fi: *************** *** 495,507 **** setconfig('SMTPServer',""): else ! Config['BLATProgram'] := ! osname1(look_for_prog( ! "BLAT", ! "Conf" = 'BLATProgram', ! "Path" = "blat.exe", ! "Def" = "C:\\BLAT\\blat.exe", ! "Def" = "C:\\Program Files\\blat.exe", ! "Def" = "C:\\Program Files\\BLAT\\blat.exe" ! )): setconfig('SendmailProgram',""); setconfig('SMTPServer',""): --- 478,482 ---- setconfig('SMTPServer',""): else ! Config['BLATProgram'] := cat(Config['CatalinaHome'],"\\bin\\blat\\blat.exe"): setconfig('SendmailProgram',""); setconfig('SMTPServer',""): *************** *** 702,706 **** fi: ! setconfig('TomcatPort' , "80"): if (Config['TomcatPort'] = "80") then --- 677,681 ---- fi: ! setconfig('TomcatPort' , "8080"): if (Config['TomcatPort'] = "80") then *************** *** 710,714 **** fi: ! setconfig('TomcatContext' , "ROOT"): if Config['TomcatContext'] = "ROOT" then --- 685,689 ---- fi: ! setconfig('TomcatContext' , "AiM"): if Config['TomcatContext'] = "ROOT" then Index: ManualConfig.dist =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/ManualConfig.dist,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** ManualConfig.dist 20 Apr 2003 23:15:41 -0000 1.1.1.1 --- ManualConfig.dist 14 Jul 2003 22:51:47 -0000 1.1.1.1.2.1 *************** *** 10,26 **** ###################################################################### ! # The top directory for the Java distribution. This is used to set the ! # environment variable JAVA_HOME in the script (startaim.sh or ! # startaim.bat) that is used to start the server. This variable must ! # be set to tell Tomcat where to find its basic java class files. The # recommended locations are as follows: # Config['JavaHome'] := "/usr/java/jdk": ! # Config['JavaHome'] := "C:\\JDK": ###################################################################### ! # The top directory for the Tomcat distribution. This is used to set the ! # environment variable CATALINA_HOME in the script (startaim.sh or ! # startaim.bat) that is used to start the server. The recommended # locations are as follows: # Config['CatalinaHome'] := "/usr/local/tomcat": --- 10,39 ---- ###################################################################### ! # The name of the subdirectory of the Tomcat\webapps directory into ! # which you have copied the AiM files ! # Config['TomcatContext'] := "AiM": ! ! ###################################################################### ! # The SMTP server that AiM should use for sending mail. This is only ! # used under Windows. You will certainly want to change this setting. ! # Config['SMTPServer'] := "smtp.york.ac.uk": ! ! # The absolute path to the BLAT program, used for sending email under ! # Windows. ! # Config['BLATProgram'] := "C:\\Tomcat\\webapps\\AiM\\bin\\blat\\blat.exe": ! ! # The absolute path to the sendmail program, used under Linux ! # Config['SendmailProgram'] := "/usr/lib/sendmail": ! ! ! ###################################################################### ! # The top directory for the Java distribution. The # recommended locations are as follows: # Config['JavaHome'] := "/usr/java/jdk": ! # Config['JavaHome'] := "C:\\j2sdk1.4.2": ###################################################################### ! # The top directory for the Tomcat distribution. The recommended # locations are as follows: # Config['CatalinaHome'] := "/usr/local/tomcat": *************** *** 29,62 **** ###################################################################### ! # The absolute path to the maple program. Under Windows, the path ! # should use backslashes as separators, and should not contain any ! # spaces; in particular, 'Program Files' is disallowed. ! # Also under windows the file extension .exe is required. # The recommended locations are as follows: # Config['MapleProgram'] := "/usr/bin/maple": ! # Config['MapleProgram'] := "C:\\Maple\\bin.wnt\\cmaple.exe": ###################################################################### # The absolute path to the tth program (used to convert LaTeX to HTML). - # The command used by the server to start the TeX-to-HTML converter tth. - # Under Windows, the path should use backslashes as separators, and - # should not contain any spaces; in particular, 'Program Files' is - # disallowed. Also under windows the file extension .exe is required. # The recommended locations are as follows: ! # Config['TtHProgram'] := "/usr/bin/tth": ! # Config['TtHProgram'] := "C:\\TtH\\tth.exe": ! ! ###################################################################### ! # The absolute path to the BLAT program, used for sending email under ! # Windows. The file extension .exe is required. ! ! # Config['BLATProgram'] := "C:\\BLAT\\blat.exe: ! ! # The SMTP server that BLAT should use for sending mail ! # Config['SMTPServer'] := "": - # The absolute path to the sendmail program, used under Linux - # Config['SendmailProgram'] := "/usr/lib/sendmail": ###################################################################### --- 42,57 ---- ###################################################################### ! # The absolute path to the maple program. # The recommended locations are as follows: # Config['MapleProgram'] := "/usr/bin/maple": ! # Config['MapleProgram'] := "C:\\Program Files\\Maple 8\\bin.win\\cmaple8.exe": ###################################################################### # The absolute path to the tth program (used to convert LaTeX to HTML). # The recommended locations are as follows: ! # Config['TtHProgram'] := "/usr/local/tomcat/webapps/aim/bin/tth/tth": ! # Config['TtHProgram'] := "C:\\Tomcat\\webapps\\AiM\\bin\\tth\\tth.exe": ###################################################################### *************** *** 67,71 **** # The recommended locations are as follows # Config['TempDir'] := "/tmp": ! # Config['TempDir'] := "C:\\temp": --- 62,66 ---- # The recommended locations are as follows # Config['TempDir'] := "/tmp": ! # Config['TempDir'] := "C:\\WINDOWS\\Temp": *************** *** 86,97 **** ###################################################################### # The number of the port on which Tomcat should listen. By default ! # this is 80, which is the standard port for web servers; other ! # common values are 8000 and 8080. For any port other than 80, the # number must be included explicitly in URL's (for example, ! # http://allserv.rug.ac.be:8081). The disadvantages of port 80 are ! # (a) you will need superuser privileges to start the server, and ! # (b) you may already have a webserver (such as Apache or IIS) ! # listening on that port. ! # Config['TomcatPort'] := 80: --- 81,88 ---- ###################################################################### # The number of the port on which Tomcat should listen. By default ! # this is 8080. For any port other than 80, the # number must be included explicitly in URL's (for example, ! # http://allserv.rug.ac.be:8080). ! # Config['TomcatPort'] := 8080: *************** *** 138,145 **** # Config['DocumentURL'] # Config['ServletURL'] - # Config['TomcatContext'] # Config['WEBINFDir'] # Config['WebAppDir'] # Config['WebDir'] ###################################################################### --- 129,136 ---- # Config['DocumentURL'] # Config['ServletURL'] # Config['WEBINFDir'] # Config['WebAppDir'] # Config['WebDir'] + ###################################################################### Index: Servlet.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Servlet.mpl,v retrieving revision 1.1.1.1.2.1 retrieving revision 1.1.1.1.2.2 diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2 *** Servlet.mpl 8 Jul 2003 06:21:33 -0000 1.1.1.1.2.1 --- Servlet.mpl 14 Jul 2003 22:51:47 -0000 1.1.1.1.2.2 *************** *** 201,280 **** ###################################################################### ! ! file := cat(webinf,"/server.xml"): ! ! fd := traperror(fopen(file,'WRITE')): ! ! if fd = lasterror then ! printf("Cannot open web.xml for writing:\n%a\n\n",fd): ! `quit`(1): ! fi: ! ! port := ServletConfig['TomcatPort']: ! ctxt := ServletConfig['TomcatContext']: ! path := `if`(ctxt = "ROOT","",ctxt): ! ! fprintf(fd," ! <!-- AIM Server Configuration File --> ! ! <!-- This is automatically generated from data in ServletConfig.mpl ! by running Servlet.mpl. The file ServletConfig.mpl is in turn ! automatically generated by AutoConf.mpl, using values supplied ! in ManualConfig.mpl if necessary. ! --> ! ! <Server port=\"8005\" shutdown=\"SHUTDOWN\" debug=\"0\"> ! <Service name=\"Tomcat-Standalone\"> ! <Connector className=\"org.apache.catalina.connector.http.HttpConnector\" ! port=\"%s\" minProcessors=\"5\" maxProcessors=\"75\" ! enableLookups=\"true\" redirectPort=\"8443\" ! acceptCount=\"10\" debug=\"0\" connectionTimeout=\"60000\"/> ! <Engine name=\"Standalone\" defaultHost=\"localhost\" debug=\"0\"> ! <Logger className=\"org.apache.catalina.logger.FileLogger\" ! prefix=\"catalina_log.\" suffix=\".txt\" ! timestamp=\"true\"/> ! <Realm className=\"org.apache.catalina.realm.MemoryRealm\" /> ! <Host name=\"localhost\" debug=\"0\" ! appBase=\"webapps\" unpackWARs=\"true\"> ! <Valve className=\"org.apache.catalina.valves.AccessLogValve\" ! directory=\"logs\" prefix=\"access.\" suffix=\".txt\" ! pattern=\"common\"/> ! <Logger className=\"org.apache.catalina.logger.FileLogger\" ! directory=\"logs\" prefix=\"log.\" suffix=\".txt\" ! timestamp=\"true\"/> ! <Context path=\"%s\" docBase=\"%s\" debug=\"0\" reloadable=\"true\"/> ! </Host> ! </Engine> ! </Service> ! </Server> ! ! ",port,path,ctxt ! ! ): ! ! unassign('port','ctxt','dbse'): ! fclose(fd): ! ! file1 := ! os_maplename(cat(ServletConfig['CatalinaHome'],"/conf/server.xml")): ! file2 := ! os_maplename(cat(ServletConfig['CatalinaHome'],"/conf/server.bak")): ! ! if os_fileexists(file1) then ! printf("Backing up %s\n",file1): ! err := traperror(os_copy(file1,file2)): ! if err = lasterror then ! printf("Failed: %s\n\n",err): ! `quit`(1): ! fi: ! fi: ! ! printf("Copying %s to %s\n", file, file1): ! err := traperror(os_copy(file,file1)): ! if err = lasterror then ! printf("Failed: %s\n\n",err): ! `quit`(1): ! fi: ! ###################################################################### --- 201,283 ---- ###################################################################### ! # ! # This section used to create a file server.xml and use it to ! # overwrite Tomcat's server.xml. There is no reason to do this. ! # ! # file := cat(webinf,"/server.xml"): ! # ! # fd := traperror(fopen(file,'WRITE')): ! # ! # if fd = lasterror then ! # printf("Cannot open web.xml for writing:\n%a\n\n",fd): ! # `quit`(1): ! # fi: ! # ! # port := ServletConfig['TomcatPort']: ! # ctxt := ServletConfig['TomcatContext']: ! # path := `if`(ctxt = "ROOT","",ctxt): ! # ! # fprintf(fd," ! # <!-- AIM Server Configuration File --> ! # ! # <!-- This is automatically generated from data in ServletConfig.mpl ! # by running Servlet.mpl. The file ServletConfig.mpl is in turn ! # automatically generated by AutoConf.mpl, using values supplied ! # in ManualConfig.mpl if necessary. ! # --> ! # ! # <Server port=\"8005\" shutdown=\"SHUTDOWN\" debug=\"0\"> ! # <Service name=\"Tomcat-Standalone\"> ! # <Connector className=\"org.apache.catalina.connector.http.HttpConnector\" ! # port=\"%s\" minProcessors=\"5\" maxProcessors=\"75\" ! # enableLookups=\"true\" redirectPort=\"8443\" ! # acceptCount=\"10\" debug=\"0\" connectionTimeout=\"60000\"/> ! # <Engine name=\"Standalone\" defaultHost=\"localhost\" debug=\"0\"> ! # <Logger className=\"org.apache.catalina.logger.FileLogger\" ! # prefix=\"catalina_log.\" suffix=\".txt\" ! # timestamp=\"true\"/> ! # <Realm className=\"org.apache.catalina.realm.MemoryRealm\" /> ! # <Host name=\"localhost\" debug=\"0\" ! # appBase=\"webapps\" unpackWARs=\"true\"> ! # <Valve className=\"org.apache.catalina.valves.AccessLogValve\" ! # directory=\"logs\" prefix=\"access.\" suffix=\".txt\" ! # pattern=\"common\"/> ! # <Logger className=\"org.apache.catalina.logger.FileLogger\" ! # directory=\"logs\" prefix=\"log.\" suffix=\".txt\" ! # timestamp=\"true\"/> ! # <Context path=\"%s\" docBase=\"%s\" debug=\"0\" reloadable=\"true\"/> ! # </Host> ! # </Engine> ! # </Service> ! # </Server> ! # ! # ",port,path,ctxt ! # ! # ): ! # ! # unassign('port','ctxt','dbse'): ! # fclose(fd): ! # ! # file1 := ! # os_maplename(cat(ServletConfig['CatalinaHome'],"/conf/server.xml")): ! # file2 := ! # os_maplename(cat(ServletConfig['CatalinaHome'],"/conf/server.bak")): ! # ! #if os_fileexists(file1) then ! # printf("Backing up %s\n",file1): ! # err := traperror(os_copy(file1,file2)): ! # if err = lasterror then ! # printf("Failed: %s\n\n",err): ! # `quit`(1): ! # fi: ! #fi: ! # ! #printf("Copying %s to %s\n", file, file1): ! #err := traperror(os_copy(file,file1)): ! #if err = lasterror then ! # printf("Failed: %s\n\n",err): ! # `quit`(1): ! #fi: ! # ###################################################################### *************** *** 412,414 **** else printf("com.oreilly.servlet classes are already installed.\n"): ! fi: \ No newline at end of file --- 415,417 ---- else printf("com.oreilly.servlet classes are already installed.\n"): ! fi: |
From: <gus...@us...> - 2003-07-14 22:22:58
|
Update of /cvsroot/aimmath/AIM/bin/tth_exe In directory sc8-pr-cvs1:/tmp/cvs-serv16216/bin/tth Added Files: Tag: develop_2_1 license.txt tth tth.exe Log Message: freeware included for convenience --- NEW FILE: license.txt --- License for Non-Commercial Use of TtH, a TeX to HTML translator _______________________________________________________________ tth is copyright Ian Hutchinson, 1997-2000 (hu...@ps...). You may freely use this software for non-commercial purposes. It may not be used for commercial purposes without an additional license. If you distribute any copies, you must include this file and these conditions must apply to the recipient. No warranty of fitness for any purpose whatever is given, intended, or implied. You use this software entirely at your own risk. If you choose to use tth, by your actions you acknowledge that any consequential damage whatever is your responsibility, not mine. --- NEW FILE: tth --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tth.exe --- (This appears to be a binary file; contents omitted.) |
From: <gus...@us...> - 2003-07-14 22:21:22
|
Update of /cvsroot/aimmath/AIM/bin/blat In directory sc8-pr-cvs1:/tmp/cvs-serv16058/bin/blat Added Files: Tag: develop_2_1 Readme.txt blat.exe Log Message: freeware included for convenience --- NEW FILE: Readme.txt --- INDEX - description - installation - what's new in this version - usage - examples - future improvements - copyright - authors - contributors DESCRIPTION: Blat is a Public Domain (generous aren't we?) Windows NT console utility that sends the contents of a file in an e-mail message using the SMTP protocol. Blat is useful for creating scripts where mail has to be sent automatically (CGI, backups, etc.) To use Blat you must have access to a SMTP server via TCP-IP. Blat uses the a DLL ("gensock" or "gwinsock") from WinVN, the public domain usenet newsreader for windows. Blat can store a default SMTP server address and a default "From:" field in the registry. The server's address can be overriden using the -server flag, and the "From:" address using the -f flag. Input from the console (stdin) can be used instead of a disk file (if the special filename '-' is specified). Blat can also "carbon copy" and "blind carbon copy" the message. Impersonation can be done with the -i flag which puts the value specified in the "From:" line, however when this is done the real senders address is stamped in the "Reply-To:" and "Sender:" lines. This feature can be useful when using the program to send messages from NT users that are not registered on the SMTP host. Optionally, blat can also attach multiple binary files to your message. INSTALLATION: If you are upgrading from version 1.2 or later, simply copy Blat.exe over the old one. Blat no longer needs gensock.dll or gwinsock.dll. You can delete these unless another application you use requires them. If you are upgrading from Blat 1.1 or 1.0 (phew!) or you never used Blat before you must follow these steps: 1) Copy the file "Blat.exe" to your "\WINNT\SYSTEM32" directory, or to any other directory in your path. 2) Run "Blat -install yourhost.site.blah.blah youruserid@site.blah.blah" WHAT'S NEW IN THIS VERSION Version 1.9.4 2001.12.12 - Speed up to processing of messages with mime/html/enriched attachments - Add quotes around 'boundary' fields Version 1.9.3 2001.11.06 - Wildcards that included sub-directories caused blat to die Version 1.9.2 2001.8.21 - Added "-a1" and "-a2" settings to control initial two headers Version 1.9.1 2001.4.25 - Added "-charset" setting (NOT FULLY TESTED) Version 1.9.0 2001.4.5 - Added "-priority" setting (Toby Korn) Version 1.8.9 2001.3.19 - Minor changes. (My hard drive crashed, I lost details on what changed) Version 1.8.8 2001.3.9 - Fixed multi-line reponse support with some ESMTP servers (Tim Charron) Version 1.8.7 2001.2.28 - Added "-authplain" Plain Authorization (Craig Morrison <cr...@2c...>) - The character '?' is now converted to quoted-printable (Fabien THIRIOT <an...@fr...>) - Changes to support Win64/IA-64 (Thierry Fevrier (Hewlett-Packard) <v-...@mi...>) Version 1.8.6e 2001.2.1 - Fixed possible crash when sending multiple files (occurred if subsequent files were smaller than earlier ones) Version 1.8.6d - Bug in GetLengthConvertToQuotedPrintable, possible crash situation (Michael Walz <wa...@ep...>) Version 1.8.6c - Misc. changes (based on Lint output) Version 1.8.6a 2000.10.20 - Fixed a problem reading -bf/-cf/-tf files. Possible crash. Version 1.8.6 2000.10.20 - Fixed the 'fixup()' fix. It would only work for accented character fields. :( Version 1.8.5j 2000.10.19 - Fixed the 'fixup' routine, which caused problems when recipient name had accented characters Version 1.8.5i 2000.08.23 - Add the -log option. Change from Craig Morrison - Fixed conversion of non-std characters in the subject line (no line breaks) "Biebricher, Peter" <pbi...@de...> Version 1.8.5h 2000.08.23 - Optimize the "-" with console input (slow in 1.8.5g) Version 1.8.5g 2000.08.22 - -sf fix from Craig Morrison <cr...@2c...>. If the file does not exist the filename itself is copied - when '-' is used for console input, a temp file is not created Version 1.8.5f 2000.07.05 - -s @subject.txt : Reads the first line of the file @subject.txt for the subject line of the message. Change from Craig Morrison - -t johndoe<jo...@do...> Now works correctly and just sends 'jo...@do...' . Change from Craig Morrison <cr...@2c...> Version 1.8.5e 2000.07.04 - Add -u and -pw option for AUTH LOGIN Version 1.8.5d 2000.07.02 - Supress temporary file for console input - fix crash with -debug option Version 1.8.5c 2000.05.10 - Fixed POST for CGI feature Version 1.8.5b 2000.03.13 - Fixed -body Version 1.8.5 2000.02.08 - RFC compliant options added by Skough Axel IT-S <axe...@sc...> -mailfrom <addr> The RFC 821 MAIL From: statement -from <addr> The RFC 822 From: statement -replyto <addr> The RFC 822 Reply-To: statement -returnpath <addr> The RFC 822 Return-Path: statement -sender <addr> The RFC 822 Sender: statement - Migrated -t to -to, -c to -cc, -b to -bcc, -s to -subject, -o to -organization Version 1.8.4e 2000.01.14 - -body translates '|' into CRLF Version 1.8.4d 99.11.22 - Added "-body" parameter (requires argv[1]=="-") - Fixed problem with missing To/CC headers Version 1.8.4b 99.09.22 - buffer from 255 to 2048 chars (I forget which one) - -x fixed - -noh2 fixed (-noh or -noh2 was messing up headers) - single quotes in email addresses used to mean 'comment'. Removed. - Replaced "|" in if statement with "||" inside of ConvertToQuotedPrintable(). 99.9.20 - Added -enriched and -html options (Courtesy of James Greene) - Enhanced support for paths in -attach files (Bergamini Angelo <Ang...@sa...>) - Added df/cf/bf command line options to support using email addresses from a file (Kenneth Massey <km...@mr...>) - Added header when mail is sent using cgi. Version 1.8.4 99.02.20 - Much improved support for use within CGI scripts (by Gilles Vollant) (see included blatcgi.txt file) - Minor change to "Date:" header generation code. Although it was Y2K compliant, it wasn't obvious. This was fixed to remove the confusion. - Added support for customized "X-" style headers. (-x) Version 1.8.3 99.02.?? - Internal development release Version 1.8.2d 99.01.?? - Added -debug flag Version 1.8.2c 98.11.30 - Added optional "Return-Receipt-To:" and "Disposition-Notification-To:" headers. - It's now possible to run blat without an install. You must specify the "-server" and "-f" parameters (at a minimum) on the command line. Version 1.8.2b 98.11.30 - Removed all calls in gensock to MessageBox() - Fixed timeout when configured for retries. (was using ms instead of s) Version 1.8.2a 98.11.20 - "-q" option was still printing "Attached text file: attach.txt" messages Version 1.8.2 98.11.17 - Oops. was still identifying itself as 1.8 - Added terminating boundary to any messages with attachments. - Autodetection of file types in MIME headers (from Toby Korn <tk...@sn...>) Version 1.8.1 98.11.15 - Fixed Multiline response treatment. (courtesy of Wolfgang Schwart <sc...@wm...>) - Fixed ability to use "-" filenames. Ctrl-Z detection was broken. - Fixed use of "-noh"/"-noh2" option (also broken in 1.8). Version 1.8 98.10.29 1.8 is a merge of 2 different source trees which started diverging at version 1.5. If you're upgrading from the prior "official" release, then changes include: - Use of "-attach *.ZIP" to send multiple files - Use of 'profiles' to store server/userid/n_of_tries/port in the registry for multiple profiles. - Multiple retries - Other changes as described below labeled version 1.6-1.7.9 If you're upgrading from 1.7.9 at http://www.interlog.com/~tcharron/blat.html, then changes include: - gwinsock.dll/gensock.dll are no longer needed - UUencoding of the main file is possible - Graceful termination of connection to smtp server - hostname <hst> option to select the hostname used to send the message - Ability to specify port using "server:port" style names. (ports specified this way will override any specified with "-port") Version 1.7.9 98.9.16 - omission of a terminating boundary was causing some e-mail systems to not process the message properly. (Toby Korn tk...@sn...) Version 1.7.8d 98.9.1 - Added "-noh" command line option to prevent X-Mailer header from showing homepage of blat. Added "-noh2" to prevent X-Mailer header entirely Version 1.7.8c 98.8.25 - Changed copyright limitations to prohibit use as a spam tool Version 1.7.8b 98.8.11 - Cleaned up some wild pointers that was a potential crash (although crashes have not been reported, better safe than sorry...) Version 1.7.8 98.8.8 - Support for non-standard character sets in the header fields (hopefully). Version 1.7.7 98.8.8 - Fixed problem with wildcards/filename parsing when compile with Watcom version 1.7.6 - Made output cleaner when wildcards used - Increased limit on attachments to 64 files. - Message Boundary is a random string instead of a fixed string (allows sending 2 or more blat messages as attachements to a 3rd message using BLAT) version 1.7.5 - Added a delay of 15 seconds between retries - Added the ability to use wildcards (*.*, ?) in "-attach" and "-attacht" options - Changed the way file "-" was read, removing phantom character that was appearing version 1.7.4 - Minor correction to return values in the event of server timeout version 1.7.3 - Fixed "-attach"ing of largish files (but in calculation of internal space required). version 1.7.2 - Added "-attacht" which enables attaching multiple files without base64 encoding them. version 1.7.1 - Minor command line parsing bugs fixed version 1.7 - Added command line option "-port" to allow usage of a proxy listening on many ports and redirecting toward many SMTP servers. - Added command line option "-try" to avoid "time-out" error message when using phone-line connection or "Too many users connected" error message when using a proxy. - Added these options to the registry. Added profiles to the registry for ease in choosing server, user, retries and port. - Added a "-profile" to see the existing profiles. - Added a "-profile -delete" to delete a profile. version 1.6.3 - Added command line option "-attach" to allow attaching multiple binary files to a message. - "-base64" causes inclusion via 'attachment' method instead of 'inline' version 1.6.2 - Added command line option "-o" to provide Organization field in the headers of the sent message. version 1.6 - Added support for mailing of binary files (mime base64 encoding) which will make it possible to mail ANY file. - Fixed argument parsing for '-q' and '-mime' options (these used to only work if they were the last argument) version 1.5 - Two bugs were corrected that made Blat generate exceptions with certain CC or BCC adresses. - Blat now generates descriptive error messages, rather than the infamous "gensock error 4017" type errors - Blat now returns an error code when the SMTP session fails - A new option -mime was added. This implements the possibility to use the MIME quoted-printable transfer encoding. The assumptions are: 1: The file is a text file 2: The charset is ISO 8859/1 USAGE: syntax: Blat <filename> -to <recipient> [optional switches (see below)] Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]] [-q] Blat -profile [-delete | "<default>"] [profile1] [profileN] [-q] Blat -h [-q] -install <server addr> <sender's addr> [<try n times> [<port> [<profile>]]] : set's SMTP server, sender, number of tries and port for profile (<try n times> and <port> may be replaced by '-'). <filename> : file with the message body ('-' for console input, end with ^Z) -to <recipient> : recipient list (also -t) (comma separated) -tf <recipient> : recipient list filename -subject <subj>: subject line (also -s) -f <sender> : overrides the default sender address (must be known to server) -i <addr> : a 'From:' address, not necessarily known to the SMTP server. -cc <recipient>: carbon copy recipient list (also -c) (comma separated) -cf <file> : cc recipient list filename -bcc <recipient>: blind carbon copy recipient list (also -bcc) (comma separated) -bf <file> : bcc recipient list filename -organization <organization>: Organization field (also -o and -org) -body <text> : Message body -x <X-Header: detail>: Custom 'X-' header. eg: -x "X-INFO: Blat is Great!" -r : Request return receipt. -d : Request disposition notification. -h : displays this help. -q : supresses *all* output. -debug : Echoes server communications to screen (disables '-q'). -noh : prevent X-Mailer header from showing homepage of blat -noh2 : prevent X-Mailer header entirely -p <profile> : send with SMTP server, user and port defined in <profile>. -priority <pr> : set message priority 0 for low, 1 for high. -server <addr> : Specify SMTP server to be used. (optionally, addr:port) -port <port> : port to be used on the server, defaults to SMTP (25) -hostname <hst>: select the hostname used to send the message -mime : MIME Quoted-Printable Content-Transfer-Encoding. -enriched : Send an enriched text message (Content-Type=text/enriched) -html : Send an HTML message (Content-Type=text/html) -uuencode : Send (binary) file UUEncoded -base64 : Send (binary) file using base64 (binary Mime) -try <n times> : how many time blat should try to send. from '1' to 'INFINITE' -attach <file> : attach binary file to message (may be repeated) -attacht <file>: attach text file to message (may be repeated) -ti <n> : Set timeout to 'n' seconds. -u <username> : Username for AUTH LOGIN (use with -pw) -pw <password> : Password for AUTH LOGIN (use with -u) -log <filename>: Log everything but usage to <filname> -plain : Use AUTH PLAIN to login to SMTP server (use with -u -pw) -charset <cs> : User defined charset. The default is ISO-8859-1 Note that if the '-i' option is used, <sender> is included in 'Reply-to:' and 'Sender:' fields in the header of the message. Optionally, the following options can be used instead of the -f and -i options: -mailfrom <addr> The RFC 821 MAIL From: statement -from <addr> The RFC 822 From: statement -replyto <addr> The RFC 822 Reply-To: statement -returnpath <addr> The RFC 822 Return-Path: statement -sender <addr> The RFC 822 Sender: statement For backward consistency, the -f and -i options have precedence over these RFC 822 defined options. If both -f and -i options are omitted then the RFC 821 MAIL FROM statement will be defaulted to use the installation-defined default sender address EXAMPLES: Blat -install smtphost.bar.com fo...@ba... // Sets host and userid Blat -install smtphost.bar.com foo // Sets host and userid Blat -install smtphost.bar.com // Sets host only Blat myfile.txt -subject "A file for pedro" -to fo...@ba... // Sends a file with subject line "A file for pedro" Blat myfile.txt -subject "A file for pedro" -to fo...@ba... -q // Sends a file with subject line "A file for pedro" and does not print // informative messages on the console Blat myfile.txt -subject "A file for mark" -to fe...@fi... -f fo...@ba... // -f option overrides the default sender Blat myfile.txt -subject "A file for pedro" -to fo...@ba... -i "devil@fire.hell" // -i replaces "From:" line address (but leaves Reply-To: and Sender: lines) Blat myfile.txt -subject "animals" -to fe...@fi... -cc "mo...@gr...,horse@meadow.hill" // -c mails carbon copies to users mo...@gr... and horse@meadow.hill Blat.exe BLAT.ZIP -subject "file to gil" -to fo...@ba... -base64 // Sends the binary file BLAT.ZIP to Gilles in MIME Base 64 format Blat.exe BLAT.ZIP -subject "file to gil" -to fo...@ba... -uuencode // Sends the binary file BLAT.ZIP to Gilles in the old UUEncode format Blat myfile.txt -subject "oumpla" -to fo...@ba... -attach c:\myfolder\*.txt // Sends a file with subject line "oumpla", attach all files with extension "TXT" // in folder "myfolder" on drive "C:". Note: you must specify a filename/pattern, // "-attach .\*.*" will send all files in current folder. // "-attach ." will not send anything AND WILL NOT GIVE YOU ANY WARNING. Blat myfile.txt -to fe...@fi... -server smtp.domain.com -port 6000 // sends the message through SMTP server smtp.domain.com at port 6000 Blat myfile.txt -to fe...@fi... -hostname friend // tells the SMTP that this computer is called "friend" COPYRIGHT License to use Blat The authors of Blat have placed it in the public domain. This means you can use it free of charge for any purpose you like, with nearly no conditions being placed on its use by us. The source code is also available free of charge and under the same conditions as the executables. You have permission to modify, redistribute, hoard, or even sell Blat in its executable or source form. If you do sell Blat, though, we'd appreciate it if you'd provide your own support (and send us a free copy). We cannot take any support load for Blat (we've got better things to do). The only limitation we impose is that blat not be used to send unsolicited commercial email. Use of this software to send unsolicited commercial email constitutes an agreement to pay the authors $10,000. Various bits of the source code are copyright by other people/organizations. Look in the source code for copyright ownership. The authors and contributors of the package are not responsible for any damage or losses that the usage of Blat may cause. We are especially not responsible for the misuse of the SMTP (or other) mail system. AUTHORS Mark Neal (mj...@ab...) Pedro Mendes (pr...@ab...) Gilles Vollant (in...@wi...) Tim Charron (tch...@in...) CONTRIBUTORS We'd like to thank: the WinVN team - wrote gensock.dll and the excellent WinVN newsreader from which we copied most of Blat's code (PD apps are nice!) Beverly Brown (be...@da...) - fixed the argument parsing Bob Beck (rb...@ib...) - added console input (even though we did not use his code in the end...) Axel Skough (axe...@sc...) - added the MIME code, fixed the CC/BCC bug, added the return code, added RFC compliant header support Tim Charron (tch...@in...) - Added base64 encoding code - Added multiple binary "-attach"ments - Misc. features and fixes Christophe Henquin (ch...@in...) - Added -port, -try and -profile support Toby Korn (tk...@sn...) - Bugfixes, MIME type autodetection Stephen Gun (GU...@ba...) - Bugfixes --- NEW FILE: blat.exe --- (This appears to be a binary file; contents omitted.) |
From: <gus...@us...> - 2003-07-14 07:59:29
|
Update of /cvsroot/aimmath/AIM/bin/tth_exe In directory sc8-pr-cvs1:/tmp/cvs-serv10911/tth_exe Log Message: Directory /cvsroot/aimmath/AIM/bin/tth_exe added to the repository --> Using per-directory sticky tag `develop_2_1' |
From: <gus...@us...> - 2003-07-14 07:08:06
|
Update of /cvsroot/aimmath/AIM/bin/blat In directory sc8-pr-cvs1:/tmp/cvs-serv1855/blat Log Message: Directory /cvsroot/aimmath/AIM/bin/blat added to the repository --> Using per-directory sticky tag `develop_2_1' |
From: <gus...@us...> - 2003-07-13 18:55:41
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv8111/doc Added Files: Tag: develop_2_1 favicon.ico Log Message: small AiM sphere as icon --- NEW FILE: favicon.ico --- (This appears to be a binary file; contents omitted.) |
From: <gus...@us...> - 2003-07-13 18:55:05
|
Update of /cvsroot/aimmath/AIM/doc In directory sc8-pr-cvs1:/tmp/cvs-serv8029/doc Added Files: Tag: develop_2_1 AiM.png aim.gif Log Message: AiM logo --- NEW FILE: AiM.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: aim.gif --- (This appears to be a binary file; contents omitted.) |
From: <gr...@us...> - 2003-07-13 15:02:18
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim In directory sc8-pr-cvs1:/tmp/cvs-serv6454/aim Modified Files: Tag: develop_2_1 Compile.mpl Log Message: Fixed code dealing with i> or include> flags. There were a few problems: 1. `aim/Compile/Readlines` didn't call `aim/Compile/GetIncludes` for an i> or include> that was the first or last flag. 2. The arguments were in the wrong order when `aim/Compile/GetIncludes` was called. 3. The brackets weren't stripped off the lines compiled by `aim/Compile/Readlines` within a `aim/Compile/GetIncludes` call. 4. `aim/Compile/GetIncludes` did not expand EXAMPLES in a file name. To deal with 1. `aim/Compile/GetIncludes` needed to be called twice and so for the sake of elegance some code was moved to `aim/Compile/GetIncludes` and the flag also passed. In order to reflect the slight change in function `aim/Compile/GetIncludes` was renamed `aim/Compile/ExpandIncludes` - GG Index: Compile.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Compile.mpl,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** Compile.mpl 10 Jul 2003 20:10:03 -0000 1.2.2.2 --- Compile.mpl 13 Jul 2003 15:02:14 -0000 1.2.2.3 *************** *** 1392,1396 **** ", proc(file::string,depth_::integer) ! local depth,filehandle,retseq,flag,line,i,l,f; if nargs < 2 then --- 1392,1396 ---- ", proc(file::string,depth_::integer) ! local depth,filehandle,retseq,flag,line,dir,i,l,f; if nargs < 2 then *************** *** 1405,1410 **** retseq := NULL; ! flag := NULL; line := ""; while true do --- 1405,1411 ---- retseq := NULL; ! flag := ""; line := ""; + dir := `Util/Dirname`(file); while true do *************** *** 1416,1459 **** l := `Util/Unixify`(l); f := `aim/Compile/FindFlag`(l); ! if (flag = NULL) then ! # this is the first non-ignored line ! if (nops(f) = 2) then ! flag := f[1]; ! line := f[2]; ! else ! ERROR( cat(sprintf("Read error in file %A\n",file), ! "The first line (apart from comments and blank lines) is:\n", ! sprintf("%A\n",l), ! "This does not start with a flag.\n")); ! fi; ! else # not the first non-ignored line. ! if (nops(f) = 2) then ! # We have a new flag. ! # If the previous flag was an include>, add the contents of ! # the indicated files to retseq. Otherwise, just add the ! # previous flag and associated text to retseq. ! if (flag = "include>") then ! retseq := ! retseq, ! `aim/Compile/GetIncludes`(line,depth,`Util/Dirname`(file)); ! else ! retseq := retseq,[flag,line]; ! fi; ! ! flag := f[1]; ! line := f[2]; ! else ! # This is a continuation line, attached to a flag that we read ! # earlier. ! line := cat(line,"\n",f[1]); ! fi; # matches if (nops(f) = 2) then ... else ... ! fi; # matches if (flag = NULL) then ... else ... fi; # matches if (line is blank or comment) then ... else ... od; ! if ( flag <> NULL ) then ! retseq := retseq,[flag,line]; ! fi; fclose(filehandle); --- 1417,1442 ---- l := `Util/Unixify`(l); f := `aim/Compile/FindFlag`(l); ! if (nops(f) = 2) then ! # We have a new flag. First deal with the previous flag, if there ! # was one. ! retseq := retseq, `aim/Compile/ExpandIncludes`(flag,line,dir,depth); ! flag := f[1]; ! line := f[2]; ! elif (flag <> "") then ! # f[1] is a continuation line, attached to a flag that we read ! # earlier. ! line := cat(line,"\n",f[1]); ! else ! # f[1] contains the first non-ignored line, but it doesn't have a flag ! ERROR( cat(sprintf("Read error in file %A\n",file), ! "The first line (apart from comments and blank lines) is:\n", ! sprintf("%A\n",l), ! "This does not start with a flag.\n")); ! fi; # matches if (nops(f) = 2) then ... elif ... else ... fi; # matches if (line is blank or comment) then ... else ... od; ! retseq := retseq, `aim/Compile/ExpandIncludes`(flag,line,dir,depth); fclose(filehandle); *************** *** 1492,1511 **** `Package/Assign`( ! `aim/Compile/GetIncludes`, ! "This interprets @line@ as a list of filenames (possibly with wildcards). It applies #`aim/Compile/ReadLines`# to each of the relevant files, ! concatenates the resulting sequences, and returns the result. ", ! proc(line::string,dir::string,depth_::integer) ! local depth,filelist,expandedfilelist,filespec,directorypart, matchingfiles,newlines,includefile; ! if nargs < 2 then ! depth := 0; ! else ! depth := depth_; ! fi; ! ! if (depth > 10) then ERROR(__("File inclusion nested more than 10 levels deep.")); fi; --- 1475,1497 ---- `Package/Assign`( ! `aim/Compile/ExpandIncludes`, ! "If @flag@ is empty there is nothing to do (NULL is returned); this is ! the case when #`aim/Compile/ReadLines`# is first called for a file. ! If @flag@ is not \"include>\" nothing needs to be expanded and so ! [@flag@, @line@] is returned. ! Otherwise, @line@ as a list of filenames (possibly with wildcards). It applies #`aim/Compile/ReadLines`# to each of the relevant files, ! concatenates the resulting sequences of flag-line lists, and ! returns the result. ", ! proc(flag::string,line::string,dir::string,depth::integer) ! local filelist,expandedfilelist,filespec,directorypart, matchingfiles,newlines,includefile; ! if (flag = "") then ! RETURN(NULL); ! elif (flag <> "include>") then ! RETURN([flag,line]); ! elif (depth > 10) then ERROR(__("File inclusion nested more than 10 levels deep.")); fi; *************** *** 1513,1516 **** --- 1499,1504 ---- # make the file list from the comma separated filenames filelist := map(`Util/StripEndSpaces`,[`Util/CommaSplit`(line)]); + # expand EXAMPLES to path of examples directory + filelist := map(`aim/ExpandExamplesPath`, filelist); # ignore blank filenames filelist := remove(x->x="",filelist); *************** *** 1541,1545 **** newlines := newlines, ! `aim/Compile/ReadLines`(includefile,depth + 1); od; --- 1529,1533 ---- newlines := newlines, ! op(`aim/Compile/ReadLines`(includefile,depth + 1)); od; |
From: <gus...@us...> - 2003-07-13 14:54:08
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1:/tmp/cvs-serv5490/WEB-INF/maple/aim/admin Modified Files: Tag: develop_2_1 Zone.mpl Log Message: temporary fix for bug that hits when no subjects exist. Neil could fix this more nicely when he is back. Index: Zone.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Zone.mpl,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** Zone.mpl 11 Jul 2003 14:17:29 -0000 1.2.2.2 --- Zone.mpl 13 Jul 2003 14:54:05 -0000 1.2.2.3 *************** *** 335,343 **** hiddensubjects := sort([op(hiddensubjects)]); ! if visiblesubjects = [] and ! hiddensubjects = [] then ! subjecttable := ! __("There are no visible or hidden subjects for this zone."); ! else subjecttable := `new/HTML/Tag`( --- 335,343 ---- hiddensubjects := sort([op(hiddensubjects)]); ! # if visiblesubjects = [] and ! # hiddensubjects = [] then ! # subjecttable := ! # __("There are no visible or hidden subjects for this zone."); ! # else subjecttable := `new/HTML/Tag`( *************** *** 418,422 **** fi; fi; ! fi; page['Title'] := __("Zone:"); --- 418,422 ---- fi; fi; ! # fi; page['Title'] := __("Zone:"); |
From: <gus...@us...> - 2003-07-13 13:46:26
|
Update of /cvsroot/aimmath/AIM/images In directory sc8-pr-cvs1:/tmp/cvs-serv26948/images Added Files: Tag: develop_2_1 equi.gif isos.gif Log Message: making the gifs binary |
From: <gus...@us...> - 2003-07-13 13:44:44
|
Update of /cvsroot/aimmath/AIM/images In directory sc8-pr-cvs1:/tmp/cvs-serv26721/images Added Files: Tag: develop_2_1 sinperiod.gif Removed Files: Tag: develop_2_1 equi.gif isos.gif Log Message: attempting to make the gifs binary --- NEW FILE: sinperiod.gif --- (This appears to be a binary file; contents omitted.) --- equi.gif DELETED --- --- isos.gif DELETED --- |
From: <gus...@us...> - 2003-07-12 20:43:17
|
Update of /cvsroot/aimmath/AIM/images In directory sc8-pr-cvs1:/tmp/cvs-serv3199/images Modified Files: Tag: develop_2_1 equi.gif isos.gif Log Message: hopefully they will now be treated as binary Index: equi.gif =================================================================== RCS file: /cvsroot/aimmath/AIM/images/Attic/equi.gif,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 Binary files /tmp/cvsOngmPQ and /tmp/cvseqannx differ Index: isos.gif =================================================================== RCS file: /cvsroot/aimmath/AIM/images/Attic/isos.gif,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 Binary files /tmp/cvs5t96SR and /tmp/cvsI0RJuz differ |
From: <nps...@us...> - 2003-07-11 15:30:50
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv1764/WEB-INF/maple Added Files: Tag: develop_2_1 OS0Win.mpl OSWin.c OSWin.dll Log Message: New files using external calling to access operating system functions --- NEW FILE: OS0Win.mpl --- cookdate := define_external( 'cookdate', 't'::integer[4], 'a'::ARRAY(datatype=integer[2]), LIB="OSWin.dll"): uncookdate := define_external( 'uncookdate', 'a'::ARRAY(datatype=integer[2]), 'RETURN'::integer[4], LIB="OSWin.dll"): --- NEW FILE: OSWin.c --- /* This file should be compiled as follows to produce OSWin.dll: cl -Gz OSWin.c -link -dll -export:cookdate -export:uncookdate -out:OSWin.dll */ #include <stdio.h> #include <time.h> #include <Windows.h> void cookdate(DWORD t,WORD *r) { FILETIME ft; SYSTEMTIME stUTC,stLocal; LONGLONG ll; ll = Int32x32To64(t, 10000000) + 116444736000000000; ft.dwLowDateTime = (DWORD) ll; ft.dwHighDateTime = ll >>32; FileTimeToSystemTime(&ft,&stUTC); SystemTimeToTzSpecificLocalTime(NULL, &stUTC, &stLocal); r[0] = stLocal.wYear; r[1] = stLocal.wMonth; r[2] = stLocal.wDay; r[3] = stLocal.wDayOfWeek; if (r[3] == 0) { r[3] = 7; }; r[4] = stLocal.wHour; r[5] = stLocal.wMinute; r[6] = stLocal.wSecond; } DWORD uncookdate(WORD *r) { FILETIME ftLocal,ft; SYSTEMTIME st; LONGLONG l0,l1,l2,l3,l4,ll; st.wYear = r[0]; st.wMonth = r[1]; st.wDay = r[2]; st.wDayOfWeek = r[3]; if (r[3] == 7) { st.wDayOfWeek = 0; }; st.wHour = r[4]; st.wMinute = r[5]; st.wSecond = r[6]; SystemTimeToFileTime(&st,&ftLocal); LocalFileTimeToFileTime(&ftLocal,&ft); ll = ((((LONGLONG) ft.dwHighDateTime) << 32) + ((LONGLONG) ft.dwLowDateTime) - 116444736000000000)/10000000; return (DWORD) ll; } --- NEW FILE: OSWin.dll --- (This appears to be a binary file; contents omitted.) |
From: <nps...@us...> - 2003-07-11 15:29:21
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1:/tmp/cvs-serv1454/WEB-INF/maple Added Files: Tag: develop_2_1 newDate.mpl Log Message: New version of Date.mpl using external calling --- NEW FILE: newDate.mpl --- # @(#)$Id: newDate.mpl,v 1.1.2.1 2003/07/11 15:29:17 npstrick Exp $ # Copyright (C) 2003 Neil Strickland # Distributed without warranty under the GPL - see README for details read("Package.mpl"): Package("Date"," This package defines various functions for dealing with dates and times. "): `Package/Dependencies` := ["I18n","Class"]: ###################################################################### `Package/Assign`( `type/Date/RawDate`::type, "A raw date is just an integer, interpreted as a number of seconds since the beginning of the year 1970 in Greenwich. ", integer ): ###################################################################### `Package/Assign`( `type/Date/ListDate`::type, "A list date is a list of six integers, interpreted as a date of the form [year,month,day,hour,minute,second]. ", [integer$6] ): ###################################################################### `Package/Assign`( `Date/EnglishShortMonthName`::table, "A table of short names of the months in English, indexed by 1..12. Even if we are working in a different language, these are needed to interpret dates reported by the operating system etc.", table([ 1 = "Jan", 2 = "Feb", 3 = "Mar", 4 = "Apr", 5 = "May", 6 = "Jun", 7 = "Jul", 8 = "Aug", 9 = "Sep", 10 = "Oct", 11 = "Nov", 12 = "Dec" ])): `Package/Assign`( `Date/MonthNumber`::table, "A table indexed by the short English names of months, giving their numbers; for example @`Date/MonthNumber`[\"Oct\"] = 10@. ", table([]) ): for i from 1 to 12 do `Date/MonthNumber`[`Date/EnglishShortMonthName`[i]] := i: od: unassign('i'): `Package/Assign`( `Date/ShortMonthName`::table, "A table of short names of the months in the current locale, indexed by 1..12.", table([ 1 = __("Jan"), 2 = __("Feb"), 3 = __("Mar"), 4 = __("Apr"), 5 = __("May"), 6 = __("Jun"), 7 = __("Jul"), 8 = __("Aug"), 9 = __("Sep"), 10 = __("Oct"), 11 = __("Nov"), 12 = __("Dec") ])): `Package/Assign`( `Date/MonthName`::table, "A table of full names of the months in the current locale, indexed by 1..12.", table([ 1 = __("January"), 2 = __("February"), 3 = __("March"), 4 = __("April"), 5 = __("May"), 6 = __("June"), 7 = __("July"), 8 = __("August"), 9 = __("September"), 10 = __("October"), 11 = __("November"), 12 = __("December") ])): ###################################################################### `Package/Assign`( `Date/MonthLengths`::list(integer), "The list of lengths of months in a non-leap year", [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] ): `Package/Assign`( `Date/IsLeapYear`::boolean, "Returns @true@ if @year@ is a leap year, and false otherwise. Years divisible by 100 are usally not leap years, but the year 2000 is an exception, and we are unlikely to need any other centuries. We therefore use the naive rule.", proc(year::integer) RETURN(evalb(irem(year,4) = 0)); end ): `Package/Assign`( `Date/MonthLength`::integer, "Return the number of days in month @month@ in year @year@.", proc(month::integer,year::integer) if month = 2 and `Date/IsLeapYear`(year) then RETURN(29); else RETURN(`Date/MonthLengths`[month]); fi; end ): `Package/Assign`( `Date/ShortDayName`::table, "A table of short names of the days of the week in the current locale, indexed by 1..7, with 1 corresponding to Monday. ", table([ 1 = __("Mon"), 2 = __("Tue"), 3 = __("Wed"), 4 = __("Thu"), 5 = __("Fri"), 6 = __("Sat"), 7 = __("Sun") ])): `Package/Assign`( `Date/DayName`::table, "A table of full names of the days of the week in the current locale, indexed by 1..7, with 1 corresponding to Monday. ", table([ 1 = __("Monday"), 2 = __("Tuesday"), 3 = __("Wednesday"), 4 = __("Thursday"), 5 = __("Friday"), 6 = __("Saturday"), 7 = __("Sunday") ])): `Package/Assign`( `Date/CurrentRawDate`::`Date/RawDate`, "Return the current raw date.", proc() iolib(25); end ): if (SearchText("APPLE",interface('version')) > 0) then `Date/CurentRawDate` := proc() 2212118897 + iolib(25); end: fi: ###################################################################### `Class/Declare`(`Date`, "An instance represents a date and time, to an accuracy of one second, together with information about which time zone is being used. ", ['Constructor', "If @date_@ is absent, construct the current date.<br> If @date_@ is an integer, interpret it as a raw date, and construct a corresponding Date object.<br> If @date_@ is a list of six integers, interpret them as year, month, day, hour, minute and second, and construct a corresponding date object. ", proc(this,date_::{`Date/RawDate`,`Date/ListDate`}) this['SetTimeZone']; if nargs = 1 then this['Raw'] := `Date/CurrentRawDate`(); this['FillFromRaw']; else if type(date_,integer) then this['SetRaw',args[2..-1]]; elif type(date_,list(integer)) then this['SetCooked',args[2..-1]]; fi; fi; end ], ['Field','Raw'::`Date/RawDate` = 0, "The number of seconds since 1st January 1970 00:00:00 UTC" ], ['Field', 'TimeZoneName'::string = "UTC", "This field is not used in this version of Date.mpl, and should eventually be removed. " ], ['Field','TimeZoneOffset'::integer = 0, "Number of seconds ahead of UTC. This field is not used in this version of Date.mpl, and should eventually be removed. " ], ['Field','Summer'::boolean = false, "True if summer time is in effect at this date. This field is not used in this version of Date.mpl, and should eventually be removed. " ], ['Field','Year'::integer, "The number of the year" ], ['Field','Month'::integer, "The number of the month (starting with January = 1)" ], ['Field','Day'::integer, "The number of the day within the month" ], ['Field','WeekDay'::integer, "The number of the day within the week (starting with Monday = 1)" ], ['Field','Hour'::integer], ['Field','Minute'::integer], ['Field','Second'::integer], ['Method','SetTimeZone'::'void', "This method is not used in this version of Date.mpl, and should eventually be removed. ", proc() end ], ['Method','SetRaw'::'void', "Set the @Raw@ field to @raw@, and set all other fields accordingly", proc(this,raw::`Date/RawDate`) this['Raw'] := raw; this['FillFromRaw']; end ], ['Method','FillFromRaw'::'void', "Set all other fields from the @Raw@ and @TimeZoneOffset@ fields", proc(this) local a; a := Array(0..6, datatype=integer[2], order=C_order); cookdate(this['Raw'],a); this['Year'] := a[0]; this['Month'] := a[1]; this['Day'] := a[2]; this['WeekDay'] := a[3]; this['Hour'] := a[4]; this['Minute'] := a[5]; this['Second'] := a[6]; NULL; end ], ['Method','Cooked'::`Date/ListDate`, "Return the @[Year,Month,Day,Hour,Minute,Second]@ list corresponding to this date", proc(this) [this['Year'], this['Month'], this['Day'], this['Hour'], this['Minute'], this['Second']]; end ], ['Method','SetCooked'::'void', "Set @[Year,Month,Day,Hour,Minute,Second]@ to @ymdhms@, then set the @Raw@ field accordingly", proc(this,ymdhms::`Date/ListDate`) this['Year'] := ymdhms[1]; this['Month'] := ymdhms[2]; this['Day'] := ymdhms[3]; this['Hour'] := ymdhms[4]; this['Minute'] := ymdhms[5]; this['Second'] := ymdhms[6]; this['FillFromCooked']; end ], ['Method','FillFromCooked'::'void', "Set the @Raw@ field from the other fields", proc(this) local a; a := Array(0..6, datatype=integer[2], order=C_order); a[0] := this['Year']; a[1] := this['Month']; a[2] := this['Day']; a[3] := this['DayOfWeek']; a[4] := this['Hour']; a[5] := this['Minute']; a[6] := this['Second']; this['Raw'] := uncookdate(a); end ], ['Method','MonthName'::string, "The full name of the month, in the language of the current locale", proc(this) `Date/MonthName`[this['Month']]; end ], ['Method','ShortMonthName'::string, "The short name of the month, in the language of the current locale", proc(this) `Date/ShortMonthName`[this['Month']]; end ], ['Method','WeekDayName'::string, "The name of the day of the week", proc(this) `Date/DayName`[this['WeekDay']]; end ], ['Method','ShortWeekDayName'::string, "The short name of the day of the week", proc(this) `Date/ShortDayName`[this['WeekDay']]; end ], ['Method','DateString'::string, "A string describing the date (without the time) in the language of the current locale.", proc(this) sprintf("%A %A %A", this['Day'], this['ShortMonthName'], this['Year']); end ], ['Method','TimeDateString'::string, "A string describing the date and time in the language of the current locale.", proc(this) sprintf("%02d:%02d:%02d %d %s %04d", this['Hour'], this['Minute'], this['Second'], this['Day'], this['ShortMonthName'], this['Year']); end ], ['Method','IsPast'::boolean, "Returns @true@ if the invoking date has passed", proc(this) evalb(`Date/CurrentRawDate`() >= this['Raw']); end ], ['Method','IsValid'::boolean, "Return @true@ if the month, day, hour, minute and second fields lie in the right ranges. ", proc(this) evalb( this['Month'] >= 1 and this['Month'] <= 12 and this['Day'] >= 1 and this['Day'] <= `Date/MonthLength`(this['Month'],this['Year']) and this['Hour'] >= 0 and this['Hour'] < 24 and this['Minute'] >= 0 and this['Minute'] < 60 and this['Second'] >= 0 and this['Second'] < 60 ); end ] ): `Package/Assign`( `Date/CurrentDate`::Date, "Return the current date", `new/Date` ): ###################################################################### `Package/Assign`( `Date/Before`::boolean, "Return @true@ if @d1@ is before or equal to @d2@", proc(d1::Date,d2::Date) evalb(d1['Raw'] <= d2['Raw']); end ): ###################################################################### `Package/Assign`( `Date/Equal`::boolean, "Return @true@ if @d1@ is equal to @d2@", proc(d1::Date,d2::Date) evalb(d1['Raw'] = d2['Raw']); end ): ###################################################################### `Package/Assign`( `Date/Selector/JScript`::string, "Text of a JavaScript function for use in a date selection widget", " function MaybeClearDate(f,n,t) { e = document.forms[f].elements[n + t]; dayelt = document.forms[f].elements[n + 'Day']; monthelt = document.forms[f].elements[n + 'Month']; yearelt = document.forms[f].elements[n + 'Year']; if (e.selectedIndex == 0) { dayelt.selectedIndex = 0; monthelt.selectedIndex = 0; yearelt.selectedIndex = 0; } else { if (dayelt.selectedIndex == 0) { dayelt.selectedIndex = 1; } if (monthelt.selectedIndex == 0) { monthelt.selectedIndex = 1; } if (yearelt.selectedIndex == 0) { yearelt.selectedIndex = 1; } } }; function MaybeClearFullDate(f,n,t) { e = document.forms[f].elements[n + t]; minelt = document.forms[f].elements[n + 'Minute']; hourelt = document.forms[f].elements[n + 'Hour']; dayelt = document.forms[f].elements[n + 'Day']; monthelt = document.forms[f].elements[n + 'Month']; yearelt = document.forms[f].elements[n + 'Year']; if (e.selectedIndex == 0) { minelt.selectedIndex = 0; hourelt.selectedIndex = 0; dayelt.selectedIndex = 0; monthelt.selectedIndex = 0; yearelt.selectedIndex = 0; } else { if (minelt.selectedIndex == 0) { minelt.selectedIndex = 1; } if (hourelt.selectedIndex == 0) { hourelt.selectedIndex = 1; } if (dayelt.selectedIndex == 0) { dayelt.selectedIndex = 1; } if (monthelt.selectedIndex == 0) { monthelt.selectedIndex = 1; } if (yearelt.selectedIndex == 0) { yearelt.selectedIndex = 1; } } }; " ): ################################################## `Package/Assign`( `Date/Selector`::`HTML/String`, "Return HTML text including input elements for selecting a date. @form@ is the name of the form that will contain these elements. @nam@ is used as a prefix for the names of the input elements; the suffices @\"Day\"@, @\"Month\"@, and @\"Year\"@ will be appended. @startyear@ and @endyear@ specify the range of years to be selected from. The optional argument @initial_@ specifies an initial selection. <br><br> No input fields are provided for the hour, minute and second. ", proc(form::string, nam::string, startyear::integer, endyear::integer, # optional initial_::Date) local initialday,initialmonth,initialyear; if nargs > 4 then initialday := sprintf("%A",initial_['Day']); initialmonth := sprintf("%A",initial_['Month']); initialyear := sprintf("%A",initial_['Year']); else initialday := "0"; initialmonth := "0"; initialyear := "0"; fi; `new/HTML/Tag`( "table", ["tr", ["td",__("Day:")], ["td", [["select", "name" = cat(nam,"Day"), "selection" = initialday, "onchange" = sprintf("MaybeClearDate('%s','%s','Day')",form,nam)], [["option", "value" = "0"],__("none")], seq([["option", "value" = sprintf("%A",i)], sprintf("%A",i)], i = 1..31)]], ["td",__("Month:")], ["td", [["select", "name" = cat(nam,"Month"), "selection" = initialmonth, "onchange" = sprintf("MaybeClearDate('%s','%s','Month')",form,nam)], [["option", "value" = "0"],__("none")], seq([["option", "value" = sprintf("%A",i)], `Date/ShortMonthName`[i]], i = 1..12)]], ["td",__("Year:")], ["td", [["select", "name" = cat(nam,"Year"), "selection" = initialyear, "onchange" = sprintf("MaybeClearDate('%s','%s','Year')",form,nam)], [["option", "value" = "0"],__("none")], seq([["option", "value" = sprintf("%A",i)], sprintf("%A",i)], i = startyear..endyear)]]]); end ): ################################################## `Package/Assign`( `Date/FullSelector`::`HTML/String`, "Return HTML text including input elements for selecting a date. @form@ is the name of the form that will contain these elements. @nam@ is used as a prefix for the names of the input elements; the suffices @\"Hour\"@, @\"Minute\"@, @\"Day\"@, @\"Month\"@, and @\"Year\"@ will be appended. @startyear@ and @endyear@ specify the range of years to be selected from. The optional argument @initial_@ specifies an initial selection. ", proc(form::string, nam::string, startyear::integer, endyear::integer, # optional initial_::Date) local initialday,initialmonth,initialyear, initialhour,initialminute; if nargs > 4 then initialhour := sprintf("%A",initial_['Hour']+1); initialminute := sprintf("%A",round(initial_['Minute']/5)+1); initialday := sprintf("%A",initial_['Day']); initialmonth := sprintf("%A",initial_['Month']); initialyear := sprintf("%A",initial_['Year']); else initialhour := "0"; initialminute := "0"; initialday := "0"; initialmonth := "0"; initialyear := "0"; fi; `new/HTML/Tag`( "table", ["tr", ["td",__("Hour:")], ["td", [["select", "name" = cat(nam,"Hour"), "selection" = initialhour, "onchange" = sprintf("MaybeClearFullDate('%s','%s','Hour')",form,nam)], [["option", "value" = "0"],__("none")], seq([["option", "value" = sprintf("%A",i)], sprintf("%A",i-1)], i = 1..24)]], ["td",__("Minute:")], ["td", [["select", "name" = cat(nam,"Minute"), "selection" = initialminute, "onchange" = sprintf("MaybeClearFullDate('%s','%s','Minute')",form,nam)], [["option", "value" = "0"],__("none")], seq([["option", "value" = sprintf("%A",i)], sprintf("%A",5*(i-1))], i = 1..12)]], ["td",__("Day:")], ["td", [["select", "name" = cat(nam,"Day"), "selection" = initialday, "onchange" = sprintf("MaybeClearFullDate('%s','%s','Day')",form,nam)], [["option", "value" = "0"],__("none")], seq([["option", "value" = sprintf("%A",i)], sprintf("%A",i)], i = 1..31)]], ["td",__("Month:")], ["td", [["select", "name" = cat(nam,"Month"), "selection" = initialmonth, "onchange" = sprintf("MaybeClearFullDate('%s','%s','Month')",form,nam)], [["option", "value" = "0"],__("none")], seq([["option", "value" = sprintf("%A",i)], `Date/ShortMonthName`[i]], i = 1..12)]], ["td",__("Year:")], ["td", [["select", "name" = cat(nam,"Year"), "selection" = initialyear, "onchange" = sprintf("MaybeClearFullDate('%s','%s','Year')",form,nam)], [["option", "value" = "0"],__("none")], seq([["option", "value" = sprintf("%A",i)], sprintf("%A",i)], i = startyear..endyear)]]]); end ): ################################################## `Package/Assign`( `Date/GetSelection`, "This function is used to extract a date that has been selected using form elements as produced by the function #`Date/Selector`#. The argument @nam@ is the name prefix supplied to that function, and @p@ is the CGI parameter table. Thus, if @nam = \"Foo\"@ then the date is obtained from the entries @p[\"FooYear\"]@, @p[\"FooMonth\"]@ and @p[\"FooDay\"]@. There are no fields for the hour, minute or second; instead, the date returned is always 23:59:59 at the end of the specified day. @NULL@ is returned if there is any kind of failure. ", proc(p::table,nam::string) local conv,year,month,day,date; conv := proc(x) local y; if not(type(x,string)) then RETURN(NULL); fi; y := traperror(sscanf(x,"%d")[1]); if type(y,integer) then RETURN(y) else RETURN(NULL); fi; end; year := conv(p[cat(nam,"Year")]); month := conv(p[cat(nam,"Month")]); day := conv(p[cat(nam,"Day")]); if (year = NULL or month = NULL or day = NULL) then RETURN(NULL); fi; date := traperror(`new/Date`([year,month,day,23,59,59])); if not(type(date,Date)) then date := NULL; fi; RETURN(eval(date)); end ): ################################################## `Package/Assign`( `Date/GetFullSelection`, "This function is used to extract a date that has been selected using form elements as produced by the function #`Date/FullSelector`#. The argument @nam@ is the name prefix supplied to that function, and @p@ is the CGI parameter table. Thus, if @nam = \"Foo\"@ then the date is obtained from the entries @p[\"FooYear\"]@, @p[\"FooMonth\"]@, @p[\"FooDay\"]@, @p[\"FooHour\"]@ and @p[\"FooMinute\"]@. @NULL@ is returned if there is any kind of failure. ", proc(p::table,nam::string) local conv,year,month,day,hour,minute,date; conv := proc(x) local y; if not(type(x,string)) then RETURN(NULL); fi; y := traperror(sscanf(x,"%d")[1]); if type(y,integer) then RETURN(y) else RETURN(NULL); fi; end; if p[cat(Nam,"Hour")] = "0" then RETURN(NULL); else hour := conv(p[cat(nam,"Hour")]) - 1; fi; if p[cat(Nam,"Minute")] = "0" then RETURN(NULL); else minute := (conv(p[cat(nam,"Minute")]) - 1) * 5; fi; year := conv(p[cat(nam,"Year")]); month := conv(p[cat(nam,"Month")]); day := conv(p[cat(nam,"Day")]); if (year = NULL or month = NULL or day = NULL or hour = NULL or minute = NULL) then RETURN(NULL); fi; date := traperror(`new/Date`([year,month,day,hour,minute,0])); if not(type(date,Date)) then date := NULL; fi; RETURN(eval(date)); end ): ###################################################################### EndPackage(): |
From: <nps...@us...> - 2003-07-11 14:17:39
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin In directory sc8-pr-cvs1:/tmp/cvs-serv23666/WEB-INF/maple/aim/admin Modified Files: Tag: develop_2_1 Zone.mpl Log Message: Removed code for updating home pages, which now belongs in ZoneAdminHome.mpl and ZoneStudentHome.mpl, and was left in accidentally. Index: Zone.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/admin/Zone.mpl,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** Zone.mpl 10 Jul 2003 20:10:04 -0000 1.2.2.1 --- Zone.mpl 11 Jul 2003 14:17:29 -0000 1.2.2.2 *************** *** 245,251 **** local subject,excludedsubject,nam,subjectlist,ord,err, subjecttable,subjectnumber,togglehidden,explainhidden, ! hiddensubjects,visiblesubjects, ! studenthead,studentfoot,adminhead,adminfoot, ! studentheadfile,studentfootfile,adminheadfile,adminfootfile; global DefaultZone; --- 245,249 ---- local subject,excludedsubject,nam,subjectlist,ord,err, subjecttable,subjectnumber,togglehidden,explainhidden, ! hiddensubjects,visiblesubjects; global DefaultZone; *************** *** 263,300 **** fi; - studentheadfile := cat(Config['RootDir'],"/zonehead.html"); - studentfootfile := cat(Config['RootDir'],"/zonefoot.html"); - adminheadfile := cat(Config['RootDir'],"/adminhead.html"); - adminfootfile := cat(Config['RootDir'],"/adminfoot.html"); - if p["Action"] = "LoadZoneOptions" then - - studenthead := - traperror(`Util/TextFileContents`(studentheadfile)); - if studenthead = lasterror then studenthead := ""; fi; - - studentfoot := - traperror(`Util/TextFileContents`(studentfootfile)); - if studentfoot = lasterror then studentfoot := ""; fi; - - adminhead := - traperror(`Util/TextFileContents`(adminheadfile)); - if adminhead = lasterror then adminhead := ""; fi; - - adminfoot := - traperror(`Util/TextFileContents`(adminfootfile)); - if adminfoot = lasterror then adminfoot := ""; fi; else - - studenthead := p["StudentHead"]; - studentfoot := p["StudentFoot"]; - adminhead := p["AdminHead"]; - adminfoot := p["AdminFoot"]; - - fprintf(studentheadfile,"%s\n",studenthead); - fprintf(studentfootfile,"%s\n",studentfoot); - fprintf(adminheadfile,"%s\n",adminhead); - fprintf(adminfootfile,"%s\n",adminfoot); - page['SetTable', DefaultZone, --- 261,266 ---- *************** *** 472,480 **** "togglehidden" = togglehidden, "explainhidden" = explainhidden, ! "subjecttable" = subjecttable['ToString'], ! "studenthead" = studenthead, ! "studentfoot" = studentfoot, ! "adminhead" = adminhead, ! "adminfoot" = adminfoot ]; end --- 438,442 ---- "togglehidden" = togglehidden, "explainhidden" = explainhidden, ! "subjecttable" = subjecttable['ToString'] ]; end |