Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 342 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

I was pleasently surprised that Mupad (which is a part of Matlab now, included in the 2008b release) allows specifying the priority of a new operator as an integer between 1 and 1999.

Alec

Axel,

Happy New Year!

Alec

Axel,

Happy New Year!

Alec

Divide the interval of integration (from 0 to infinity) in 3 intervals - from 0 to 1, from 1 to k, and from k to infinity. The integrals over the first and over the last interval cancel, and the integral over the second interval gives EllipticCK (after appropriate change of variables).

Alec

Divide the interval of integration (from 0 to infinity) in 3 intervals - from 0 to 1, from 1 to k, and from k to infinity. The integrals over the first and over the last interval cancel, and the integral over the second interval gives EllipticCK (after appropriate change of variables).

Alec

Just tried it in lynx 2.8.6rel.4 and it seems to be fine. Table headers are slightly dislocated, and names are right-aligned, but that doesn't seem to matter. I did the following (in terminal, but ssystem, probably also could be used):

echo "year=2000&top=20&number=n" | lynx -post-data -dump 
"http://www.ssa.gov/cgi-bin/popularnames.cgi" > names2000.txt

After that, in Maple, following the format suggested by Robert Israel above,

f := "../../names2000.txt";
to 20 do readline(f) end do:
s := cat(seq(readline(f), i = 1 .. 20)):
s := StringTools:-SubstituteAll(s, ",", ""):
A := sscanf(s, "%{20,5}am")[];

Alec

HTTP:-URLEncode does something different - it converts spaces to %20 etc. - similar to what I did in my other blog post, Accessing MAGMA from Maple.

For example,

HTTP:-URLEncode("year=2000&top=20&number=n");

                "year%3D2000%26top%3D20%26number%3Dn"

which is useless in this case.

While urlencode in Python takes a dictionary - which is a hash-table similar to table in Maple, and writes it as a string, 'top=20&number=n&year=2000' in this example.

It's hard to tell exactly what HTTP:-Post does without documentation, because it refers to some other procedures from the HTTP module, and I hate to look through long code without comments.

Trying to use it as in Python gives

HTTP:-Post("http://www.ssa.gov/cgi-bin/popularnames.cgi",
    "year=2000&top=20&number=n");

                               200, ""

which means that the post was successful (code 200 means OK), but the response seems to be lost during processing - perhaps, the problem is caused by chunked transfer-encoding of the response, for which the HTTP module seems to be missing the procedures.

Alec

PS Since developer(s) of the HTTP module didn't respond in the previous thread on this topic, cited somewhere in the Baby Names thread, he/she/they, probably, won't respond here as well. -Alec

I've just added system and help pages in many languages. You might check if your language is there - the easiest way is to login (preferably with FirstnameLastname in camel case) and select the preferred language in Preferences.

Alec

A very similar thing could be done with Visual Studio Shell which could be easily included in Maple distribution if developers and/or management were interested in that - it is royalty-free.

Alec

A very similar thing could be done with Visual Studio Shell which could be easily included in Maple distribution if developers and/or management were interested in that - it is royalty-free.

Alec

Yes, or lynx - depending which output is easier to parse. I'm not sure whether links is actively developed - some hacked versions may. It should still work though. I used to use it about 3 or 4 years ago, in cygwin - and at that time its table displaying was better than in lynx.

Alec

Now, compare that with getting the html page in Python. Say, in Python 2.6,

>>> from urllib import *
>>> par = urlencode({'year':2000, 'top':20, 'number':'n'})
>>> f = urlopen("http://www.ssa.gov/cgi-bin/popularnames.cgi", par)
>>> print f.read()

Alec

Another possibility (that I might use in a similar situation) would be to use links (a text web browser which works nicely with tables) to save the web pages as text files (using a simple shell script that can be done for any number of them, not just for one).

Alec

They might have that in text form, too - something like that.

Alec

 

What about Jordan, Alexis, and Angel?

They are unisex, I think.

Alec

First 84 85 86 87 88 89 90 Last Page 86 of 180