Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

Strange, executing the with(StringTools[PatternDictionary]) produces a dictionary command.  Is it undocumented???

with(StringTools[PatternDictionary])
                             [Create, Factors, Get, Search, Size, dictionary]

dictionary is in the list of commands which is undocumented and appears to not have a use.  Executing the with command does bring up all useable commands within the package right?  If so, ,why is dictionary there?  and why is there no mention of it in the help file?

@soechristian Make sure you've highlighted all of the graphs with your mouse and not just selecting to export in which case it can only export one section at a time. 

Not sure about the problem you experience with pdf but a workaround is to highlight the full 4 graphs and first paste them into microsoft Word then copy from there. 

@soechristian Make sure you've highlighted all of the graphs with your mouse and not just selecting to export in which case it can only export one section at a time. 

Not sure about the problem you experience with pdf but a workaround is to highlight the full 4 graphs and first paste them into microsoft Word then copy from there. 

An interesting observation showed (in M12 at least anyway) that creating the module manually produced a minor different result on execution however does not appear in M14 I have discovered.

word := module ()
  option unload =free,dictionary;
  local did, stringlist, free;
  export get, size, search;
end module

results in :
                    word:= module() option unload=free,PatternDictionary:-dictionary; local did, stringlist, free; export get, size, search;  end module

as opposed to
                  word:= module() option unload=free, dictionary; local did, stringlist, free; export get, size, search;  end module

when the word:=Create('builtin') command is used


The slight difference only the reference to Pattern:-dictionary instead of just dictionary.  Perhaps that represents part of the reason?  but maybe not, just thought I'd point it out.

It would be interesting to know how to insert this as an option in the command, in any case..

using the mouse

Right click on the graph -> Table -> Properties...  and select none for both interior and exterior borders.

 

It would be interesting to know how to insert this as an option in the command, in any case..

using the mouse

Right click on the graph -> Table -> Properties...  and select none for both interior and exterior borders.

 

ospd3 exists in the code but doesn't work prior to M15

with(StringTools):
with(PatternDictionary):
> bid := Create('ospd3');
Error, (in create) argument must be a list of strings, or the special name `builtin'

> bid := Create(something); #just to see what Maple is loooking for
Error, invalid input: StringTools:-PatternDictionary:-Create expects its 1st argument, dict, to be of type {list(string), identical(builtin), identical(ospd3)}, but received something

It shows in the error that type ospd3 is there, but doesn't recognize when it's used for some reason.  How can we get it to work?

Indeed, and there is a story behind it. 

Work started on that project as early as June 22, 2010 initiated by me when I contacted the author about how to download earthquake data using the internet on a different site named seismon using sockets.  I then asked about using HTTP[Get] which, was undocumented, when I had a problem downloading from the site in my application.  Apparently the key was hidden control characters in the loaded information causing errors.  Simply getting Maple to find and remove the control characters worked nicely.  He sent me his complete application on Aug 4, 2010 which later appeared, to his full credit as you know, in the application center on April 14, 2011 for Maple 15. 

Finding the control character problem was the key, and allowed me to complete and continue with my applications one of which I had roughly completed Aug 17, 2010 (the application as above).  The author had mentioned it would make a great blog and that he would make reference to me in the post, I don't think that happened.  Of course that application is all of his work, but having my name attached to the originality of the idea for Maple was gone.  In any case thumbs up to his work on the project and thanks to him, the error Maple kept throwing with HTTP[Get] for certain data was solved.

@Pseudomodo That works only in 15.  It appears not to work in Maple 12 (or 13 or 14) even though ospd3 exists in the code.

Since ospd3 exists there must be a workaround to work for older versions, no?

In any case here is the english words list acceptable in scrabble (known as sowpods).  I was unable to load any file greater than 200kb so I had to break it up into 4 bits.  The list contains 267,751 words excluding of course the obvious 1 letter words a and i.

atod.zip

etol.zip

mtor.zip

stoz.zip

@Michal 

Also it seems the globalization model falls on it's head when companies move.  Globalization is fine for the world when companies stay the course that is stay where they are - in that case predictions are easy to model. 

Now when companies move it throws everything off.  Higher unemployment means less tax revenue for the government resulting in higher taxes and more people not being able to afford things.  It's a cascading effect which plunges flourishing economies into more debt.  In fact 10 year Greek bonds are trading at 20 cents on the dollar.  Funny how one country pulls the whole world economy down. 

You run into a situation where even though items are cheaper, ironically, no one can afford them.  We were better off 25 years ago.  You know it's way better to have a little money and buy something expensive than it is to have no money and not afford something cheap. 

@Michal 

Also it seems the globalization model falls on it's head when companies move.  Globalization is fine for the world when companies stay the course that is stay where they are - in that case predictions are easy to model. 

Now when companies move it throws everything off.  Higher unemployment means less tax revenue for the government resulting in higher taxes and more people not being able to afford things.  It's a cascading effect which plunges flourishing economies into more debt.  In fact 10 year Greek bonds are trading at 20 cents on the dollar.  Funny how one country pulls the whole world economy down. 

You run into a situation where even though items are cheaper, ironically, no one can afford them.  We were better off 25 years ago.  You know it's way better to have a little money and buy something expensive than it is to have no money and not afford something cheap. 

> findall("speak", "t", 4, 5);

 TABLE([5 = ("stake", "steak", "skate", "paste", "spate", "septa"), 4 = (

   "take", "tape", "peat", "pate", "seat", "east", "skat", "task", "spat",

   "past", "kept", "pest", "sept", "step")])

trivially and explicitly we could add

  if Search(char,input)=0 then
    error "expecting 2nd argument to be part of 1st argument"
  end if;

>findall("speak", "t", 4, 5);
Error, (in findall) expecting 2nd argument to be part of 1st argument

 

> findall("speak", "t", 4, 5);

 TABLE([5 = ("stake", "steak", "skate", "paste", "spate", "septa"), 4 = (

   "take", "tape", "peat", "pate", "seat", "east", "skat", "task", "spat",

   "past", "kept", "pest", "sept", "step")])

trivially and explicitly we could add

  if Search(char,input)=0 then
    error "expecting 2nd argument to be part of 1st argument"
  end if;

>findall("speak", "t", 4, 5);
Error, (in findall) expecting 2nd argument to be part of 1st argument

 

Thanks acer, works nicely now. 

Now I mentioned a nice free word database sowpods.txt (found on sourceforge) which is only 2 Mb when unzipped but reading it into Maple causes Maple to use about 27Mb's.  That's using the command readdata("g:/sowpods.txt",string,1).   

Are there other ways to read in large databases while consuming less memory or I should say more efficiently?

Or I suppose what I mean is, and this is probably really a second question, is there a way (and how) using Maple to search the database without actually loading it into Maple to conserve memory?

Thanks acer, works nicely now. 

Now I mentioned a nice free word database sowpods.txt (found on sourceforge) which is only 2 Mb when unzipped but reading it into Maple causes Maple to use about 27Mb's.  That's using the command readdata("g:/sowpods.txt",string,1).   

Are there other ways to read in large databases while consuming less memory or I should say more efficiently?

Or I suppose what I mean is, and this is probably really a second question, is there a way (and how) using Maple to search the database without actually loading it into Maple to conserve memory?

First 106 107 108 109 110 111 112 Last Page 108 of 162