Doug Meade

 

Doug

---------------------------------------------------------------------
Douglas B. Meade <><
Math, USC, Columbia, SC 29208 E-mail: mailto:meade@math.sc.edu
Phone: (803) 777-6183 URL: http://www.math.sc.edu

MaplePrimes Activity


These are replies submitted by Doug Meade

@Will Your comments are in italics, and indented.


I doubt that it's possible for a Maplet to load up a remotely served JAR file. It seems to me that this would be a huge security loophole in Java, so I doubt it's allowed.

OK. But, what about a locally served JAR file, that is, oneon the MapleNet server?

By web service I mean a simple page that your Maplet could load to get the data from the database. For example, if your Maplet needs to load up a list of people's names with a search parameter. The Maplet could load this URL from your server:

http://myserver/loadnames.php?term=will

But, to the best of my knowledge it is not possible to put a URL like this in a Maplet. Maybe I could have a button that uses the system command to run the PHP code on the server, writing results to a file that can then be accessed by code within the Maplet. But, doesn't this have the same (or more) security concerns?

Last month, in response to a question under the title "Open URL" (http://www.mapleprimes.com/questions/97949-External-Communication-With-Maplet#comment97950) you suggested having a Close button open a webpage. I did discover that this is possible - by using the system (or ssystem) command with the command being "open <some URL>". This appears to work for several combinations of OS and browser, but I've not yet determined that it will work for all cases. This question is different - at least in some respects.

Have others wanted to do anything like this?

Doug

P.S. I received (at least) four notices that you had responded to my question. The timestamps are 10:45am, 12:45pm, 2:45pm, and 4:45pm.

@Will Your comments are in italics, and indented.


I doubt that it's possible for a Maplet to load up a remotely served JAR file. It seems to me that this would be a huge security loophole in Java, so I doubt it's allowed.

OK. But, what about a locally served JAR file, that is, oneon the MapleNet server?

By web service I mean a simple page that your Maplet could load to get the data from the database. For example, if your Maplet needs to load up a list of people's names with a search parameter. The Maplet could load this URL from your server:

http://myserver/loadnames.php?term=will

But, to the best of my knowledge it is not possible to put a URL like this in a Maplet. Maybe I could have a button that uses the system command to run the PHP code on the server, writing results to a file that can then be accessed by code within the Maplet. But, doesn't this have the same (or more) security concerns?

Last month, in response to a question under the title "Open URL" (http://www.mapleprimes.com/questions/97949-External-Communication-With-Maplet#comment97950) you suggested having a Close button open a webpage. I did discover that this is possible - by using the system (or ssystem) command with the command being "open <some URL>". This appears to work for several combinations of OS and browser, but I've not yet determined that it will work for all cases. This question is different - at least in some respects.

Have others wanted to do anything like this?

Doug

P.S. I received (at least) four notices that you had responded to my question. The timestamps are 10:45am, 12:45pm, 2:45pm, and 4:45pm.

Will,

There is nothing that prevents a Maplet from accessing a database. I have done this when the Maplet is being run on my local computer (and the database is on another server). My question was how to get this to work when the Maplet is being run on the server, via MapleNet.

Maybe your answer is that MapleNet does not allow this, based on security concerns. If so, I hope you will say so explicitly - with appropriate modifications to your reasoning.

I'm not sure I know what you mean by a "webservice". Can you elaborate on this?

I'll check back after class.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu

Will,

There is nothing that prevents a Maplet from accessing a database. I have done this when the Maplet is being run on my local computer (and the database is on another server). My question was how to get this to work when the Maplet is being run on the server, via MapleNet.

Maybe your answer is that MapleNet does not allow this, based on security concerns. If so, I hope you will say so explicitly - with appropriate modifications to your reasoning.

I'm not sure I know what you mean by a "webservice". Can you elaborate on this?

I'll check back after class.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu

Thanks Duncan and Will, these are helpful.

I have confirmed that Maple's system (and ssystem) commands can launch a webpage in the default browswer. For example:

Windows:  ssystem( "start http://www.maplesoft.com/" );
Mac:      ssystem( "open http://www.maplesoft.com/" );

I still have to identify the correct command for UNIX / Linux, but that should not be difficult to find (When I have the time). Within Maple, I can detect the hardware on which Maple from a little proc that I've been using for a few years:

GetVersion:=proc()
  local S, S1, S3, S4;
  options `Copyright 2009, Philip B. Yasskin and Douglas B. Meade, Maplets for Calculus`;
  uses StringTools;
  S:=interface(version);
  S:=map( Trim, Split( S, "," ) );
  S3:=Split(S[3], " " );
  sprintf("%s (%s)", S[2],S3[-1]);
end proc:

GetVersion();
                       "Maple 14.00 (XP)"


Since the MapleNet server can serve a Maple worksheet file, I wonder if there is a way - within Maple - to determine if a worksheet is being run with a local copy of Maple or served over the internet with MapleNet?

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu

Thanks Duncan and Will, these are helpful.

I have confirmed that Maple's system (and ssystem) commands can launch a webpage in the default browswer. For example:

Windows:  ssystem( "start http://www.maplesoft.com/" );
Mac:      ssystem( "open http://www.maplesoft.com/" );

I still have to identify the correct command for UNIX / Linux, but that should not be difficult to find (When I have the time). Within Maple, I can detect the hardware on which Maple from a little proc that I've been using for a few years:

GetVersion:=proc()
  local S, S1, S3, S4;
  options `Copyright 2009, Philip B. Yasskin and Douglas B. Meade, Maplets for Calculus`;
  uses StringTools;
  S:=interface(version);
  S:=map( Trim, Split( S, "," ) );
  S3:=Split(S[3], " " );
  sprintf("%s (%s)", S[2],S3[-1]);
end proc:

GetVersion();
                       "Maple 14.00 (XP)"


Since the MapleNet server can serve a Maple worksheet file, I wonder if there is a way - within Maple - to determine if a worksheet is being run with a local copy of Maple or served over the internet with MapleNet?

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu

@Christopher2222 

The problem is not the brackets.

To be honest, I thought you had mistyped (as when you misspelled display) when you used display with round parentheses (h,g). But, I tested this and it does work - which does not really surprise me as (h,g) will evaluate to h,g.

The key to my solution was the nested displays with different insequence values. display without the insequence=true superimposes frames from each animation.

My preferred style is to put the plots that I am trying to combine in square brackets [a,b]. I would have created your animation with:

display( [ display( [a,b] ), c], insequence=true );

Note that the insequence=true is asserted only for the outer call to display. The inner call to display has insequence=false.

Doug

@Christopher2222 

The problem is not the brackets.

To be honest, I thought you had mistyped (as when you misspelled display) when you used display with round parentheses (h,g). But, I tested this and it does work - which does not really surprise me as (h,g) will evaluate to h,g.

The key to my solution was the nested displays with different insequence values. display without the insequence=true superimposes frames from each animation.

My preferred style is to put the plots that I am trying to combine in square brackets [a,b]. I would have created your animation with:

display( [ display( [a,b] ), c], insequence=true );

Note that the insequence=true is asserted only for the outer call to display. The inner call to display has insequence=false.

Doug

Why do you want to do this calculation symbolically? Do you have an estimate of the nuber of terms that will be present in the 100th iterate of this function? What do you want to do with the symbolic expression. Why stop at 100 terms? Honestly, I can't image what you would be able to do with this esxpression.

While I think more about an efficient way to do the symbolic computations, I hope you can give us a little more background information abourt your problem, and what you hope to do with this expressoin if I can provide it for you.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu

This looks odd. Not becuase of anything to do with the symbol or view options, but because I don't see any animation. I don't see the orientation changing. The only change I see is the different values of the parameter A in the titile of each frame.

Doug

---------------------------------------------------------------------
Douglas B. Meade <><
Math, USC, Columbia, SC 29208 E-mail: mailto:meade@math.sc.edu
Phone: (803) 777-6183 URL: http://www.math.sc.edu

I am not quite sure what you are seeing. If you could show us exactly what you see it might allow someone on here to answer your question.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu

I had thought of this, but decided against it as it does not compress the space used by the text. Well, I guess you could also modify the size, but the smallest fontsize available is 8.

I agree that it would be nice to have a simple way to do this.

Doug

---------------------------------------------------------------------
Douglas B. Meade <><
Math, USC, Columbia, SC 29208 E-mail: mailto:meade@math.sc.edu
Phone: (803) 777-6183 URL: http://www.math.sc.edu

I had thought of this, but decided against it as it does not compress the space used by the text. Well, I guess you could also modify the size, but the smallest fontsize available is 8.

I agree that it would be nice to have a simple way to do this.

Doug

---------------------------------------------------------------------
Douglas B. Meade <><
Math, USC, Columbia, SC 29208 E-mail: mailto:meade@math.sc.edu
Phone: (803) 777-6183 URL: http://www.math.sc.edu

In my previous post I neglected to say that Maple also uses complex exponentials when it evaluates this indefinite integral.

How do I know this?

The infolevel command (see ?userinfo) can be used to get some information about the steps Maple takes as it evaluates a command.

restart;
infolevel[all]:=5:
int( -1/3*sinh(2*x)*sin(3*x), x );
int: Beginning integration with _EnvContinuous=_EnvContinuous, _EnvAllSolutions=_EnvAllSolutions, and _EnvCauchyPrincipalValue=_EnvCauchyPrincipalValue.
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/indef2: converting to exp-sin-cos notation
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
sum: process the input arguments
sum: definite sum
sum: process the input arguments
sum: definite sum
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
       1                      1                   
       -- exp(2 x) cos(3 x) - -- exp(2 x) sin(3 x)
       26                     39                  

            1                       1                    
          - -- exp(-2 x) cos(3 x) - -- exp(-2 x) sin(3 x)
            26                      39                   

You can change the infolevel level to see more or less information. Note that if you repeat this calculation (with, say, a different infolevel setting), Maple does not repeat all of these steps, it remembers the previous result. If you execute the restart command ( ?restart ), this erases Maple's memory and you can see the steps again.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu

In my previous post I neglected to say that Maple also uses complex exponentials when it evaluates this indefinite integral.

How do I know this?

The infolevel command (see ?userinfo) can be used to get some information about the steps Maple takes as it evaluates a command.

restart;
infolevel[all]:=5:
int( -1/3*sinh(2*x)*sin(3*x), x );
int: Beginning integration with _EnvContinuous=_EnvContinuous, _EnvAllSolutions=_EnvAllSolutions, and _EnvCauchyPrincipalValue=_EnvCauchyPrincipalValue.
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/indef2: converting to exp-sin-cos notation
int/indef1: first-stage indefinite integration
int/indef1: first-stage indefinite integration
int/indef2: second-stage indefinite integration
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
sum: process the input arguments
sum: definite sum
sum: process the input arguments
sum: definite sum
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
int/trigexp: case of integrand containing exp and trigs
       1                      1                   
       -- exp(2 x) cos(3 x) - -- exp(2 x) sin(3 x)
       26                     39                  

            1                       1                    
          - -- exp(-2 x) cos(3 x) - -- exp(-2 x) sin(3 x)
            26                      39                   

You can change the infolevel level to see more or less information. Note that if you repeat this calculation (with, say, a different infolevel setting), Maple does not repeat all of these steps, it remembers the previous result. If you execute the restart command ( ?restart ), this erases Maple's memory and you can see the steps again.

Doug

---------------------------------------------------------------------
Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu
First 6 7 8 9 10 11 12 Last Page 8 of 76