Adam Ledger

Mr. Adam Ledger

335 Reputation

11 Badges

4 years, 209 days
unemployed
hobo
Perth, Australia

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by Adam Ledger

I am reading the help page for "time" and it says that it will display the time elapsed since the maple kernel was loaded, but I just want output that is the value of the time and date displayed on my computer at the point the input in the command line is exrcuted. How do I do this? 

Is it because I have handed subs a multiset or is it because I used the "``" things in the code producing my set? I seemed to remember algsubs and subs working perfectly well regardless of the dimensions of the argument in previous times i have needed it.

 

 

 

abCaseSet := {[`0<a<1`, `0<b<1`], [`0<a<1`, `b=-1`], [`0<a<1`, `b=0`], [`0<a<1`, `b=1`], [`0<a<1`, `1<b<&infin;`], [`0<a<1`, -`1<b<0`], [`0<a<1`, -`&infin;<b<-1`], [`a=-1`, `0<b<1`], [`a=-1`, `b=-1`], [`a=-1`, `b=0`], [`a=-1`, `b=1`], [`a=-1`, `1<b<&infin;`], [`a=-1`, -`1<b<0`], [`a=-1`, -`&infin;<b<-1`], [`a=0`, `0<b<1`], [`a=0`, `b=-1`], [`a=0`, `b=0`], [`a=0`, `b=1`], [`a=0`, `1<b<&infin;`], [`a=0`, -`1<b<0`], [`a=0`, -`&infin;<b<-1`], [`a=1`, `0<b<1`], [`a=1`, `b=-1`], [`a=1`, `b=0`], [`a=1`, `b=1`], [`a=1`, `1<b<&infin;`], [`a=1`, -`1<b<0`], [`a=1`, -`&infin;<b<-1`], [`1<a<&infin;`, `0<b<1`], [`1<a<&infin;`, `b=-1`], [`1<a<&infin;`, `b=0`], [`1<a<&infin;`, `b=1`], [`1<a<&infin;`, `1<b<&infin;`], [`1<a<&infin;`, -`1<b<0`], [`1<a<&infin;`, -`&infin;<b<-1`], [-`1<a<0`, `0<b<1`], [-`1<a<0`, `b=-1`], [-`1<a<0`, `b=0`], [-`1<a<0`, `b=1`], [-`1<a<0`, `1<b<&infin;`], [-`1<a<0`, -`1<b<0`], [-`1<a<0`, -`&infin;<b<-1`], [-`&infin;<a<-1`, `0<b<1`], [-`&infin;<a<-1`, `b=-1`], [-`&infin;<a<-1`, `b=0`], [-`&infin;<a<-1`, `b=1`], [-`&infin;<a<-1`, `1<b<&infin;`], [-`&infin;<a<-1`, -`1<b<0`], [-`&infin;<a<-1`, -`&infin;<b<-1`]}

{[`0<a<1`, `0<b<1`], [`0<a<1`, `b=-1`], [`0<a<1`, `b=0`], [`0<a<1`, `b=1`], [`0<a<1`, `1<b<&infin;`], [`0<a<1`, -`1<b<0`], [`0<a<1`, -`&infin;<b<-1`], [`a=-1`, `0<b<1`], [`a=-1`, `b=-1`], [`a=-1`, `b=0`], [`a=-1`, `b=1`], [`a=-1`, `1<b<&infin;`], [`a=-1`, -`1<b<0`], [`a=-1`, -`&infin;<b<-1`], [`a=0`, `0<b<1`], [`a=0`, `b=-1`], [`a=0`, `b=0`], [`a=0`, `b=1`], [`a=0`, `1<b<&infin;`], [`a=0`, -`1<b<0`], [`a=0`, -`&infin;<b<-1`], [`a=1`, `0<b<1`], [`a=1`, `b=-1`], [`a=1`, `b=0`], [`a=1`, `b=1`], [`a=1`, `1<b<&infin;`], [`a=1`, -`1<b<0`], [`a=1`, -`&infin;<b<-1`], [`1<a<&infin;`, `0<b<1`], [`1<a<&infin;`, `b=-1`], [`1<a<&infin;`, `b=0`], [`1<a<&infin;`, `b=1`], [`1<a<&infin;`, `1<b<&infin;`], [`1<a<&infin;`, -`1<b<0`], [`1<a<&infin;`, -`&infin;<b<-1`], [-`1<a<0`, `0<b<1`], [-`1<a<0`, `b=-1`], [-`1<a<0`, `b=0`], [-`1<a<0`, `b=1`], [-`1<a<0`, `1<b<&infin;`], [-`1<a<0`, -`1<b<0`], [-`1<a<0`, -`&infin;<b<-1`], [-`&infin;<a<-1`, `0<b<1`], [-`&infin;<a<-1`, `b=-1`], [-`&infin;<a<-1`, `b=0`], [-`&infin;<a<-1`, `b=1`], [-`&infin;<a<-1`, `1<b<&infin;`], [-`&infin;<a<-1`, -`1<b<0`], [-`&infin;<a<-1`, -`&infin;<b<-1`]}

(1)

map(subs, {[`0<a<1`, `0<b<1`], [`0<a<1`, `b=-1`], [`0<a<1`, `b=0`], [`0<a<1`, `b=1`], [`0<a<1`, `1<b<&infin;`], [`0<a<1`, -`1<b<0`], [`0<a<1`, -`&infin;<b<-1`], [`a=-1`, `0<b<1`], [`a=-1`, `b=-1`], [`a=-1`, `b=0`], [`a=-1`, `b=1`], [`a=-1`, `1<b<&infin;`], [`a=-1`, -`1<b<0`], [`a=-1`, -`&infin;<b<-1`], [`a=0`, `0<b<1`], [`a=0`, `b=-1`], [`a=0`, `b=0`], [`a=0`, `b=1`], [`a=0`, `1<b<&infin;`], [`a=0`, -`1<b<0`], [`a=0`, -`&infin;<b<-1`], [`a=1`, `0<b<1`], [`a=1`, `b=-1`], [`a=1`, `b=0`], [`a=1`, `b=1`], [`a=1`, `1<b<&infin;`], [`a=1`, -`1<b<0`], [`a=1`, -`&infin;<b<-1`], [`1<a<&infin;`, `0<b<1`], [`1<a<&infin;`, `b=-1`], [`1<a<&infin;`, `b=0`], [`1<a<&infin;`, `b=1`], [`1<a<&infin;`, `1<b<&infin;`], [`1<a<&infin;`, -`1<b<0`], [`1<a<&infin;`, -`&infin;<b<-1`], [-`1<a<0`, `0<b<1`], [-`1<a<0`, `b=-1`], [-`1<a<0`, `b=0`], [-`1<a<0`, `b=1`], [-`1<a<0`, `1<b<&infin;`], [-`1<a<0`, -`1<b<0`], [-`1<a<0`, -`&infin;<b<-1`], [-`&infin;<a<-1`, `0<b<1`], [-`&infin;<a<-1`, `b=-1`], [-`&infin;<a<-1`, `b=0`], [-`&infin;<a<-1`, `b=1`], [-`&infin;<a<-1`, `1<b<&infin;`], [-`&infin;<a<-1`, -`1<b<0`], [-`&infin;<a<-1`, -`&infin;<b<-1`]}, a = A)

Error, invalid input: subs received [`0<a<1`, `0<b<1`], which is not valid for its 1st argument

 

``


 

Download subsQuestionMP.mw

 

I am trying to use the StringTools package to extract the URLs from the html file exported from Microsoft Edge when i wish to transfer these to another browser, in a text file without all of the nonsense I havent learnt yet.

I just want to trim the file name to set up a Boolean function to check it's update for the day and the output went crazy and decided to spoil my day again

 


 

``

restart

with(StringTools);

[Anagrams, AndMap, ApproximateSearch, ApproximateSearchAll, ArithmeticMean, Border, BorderArray, BorderLength, CamelCase, Capitalize, CaseJoin, CaseSplit, Center, Centre, Char, CharacterFrequencies, CharacterMap, Chomp, Chop, CommonPrefix, CommonSuffix, Compare, CompareCI, Compress, CountCharacterOccurrences, Decode, Delete, DeleteSpace, DifferencePositions, Drop, EditDistance, Encode, Entropy, Escape, Exchange, ExpandCharacterClass, ExpandTabs, Explode, Fence, Fibonacci, Fill, FirstFromLeft, FirstFromRight, FormatMessage, FormatTime, FromByteArray, Generate, GenerateIdentifier, Group, HammingDistance, HammingSearch, HammingSearchAll, Has, HasASCII, HasAlpha, HasAlphaNumeric, HasBinaryDigit, HasControlCharacter, HasDigit, HasGraphic, HasHexDigit, HasIdentifier, HasIdentifier1, HasLower, HasOctalDigit, HasPrintable, HasPunctuation, HasSpace, HasUpper, HasVowel, Hash, Implode, Indent, IndexOfCoincidence, Insert, Iota, IsASCII, IsAlpha, IsAlphaNumeric, IsAnagram, IsBalanced, IsBinaryDigit, IsConjugate, IsControlCharacter, IsDerangement, IsDigit, IsEodermdrome, IsGraphic, IsHexDigit, IsIdentifier, IsIdentifier1, IsLower, IsMonotonic, IsOctalDigit, IsPalindrome, IsPeriod, IsPermutation, IsPrefix, IsPrimitive, IsPrintable, IsPunctuation, IsSorted, IsSpace, IsSubSequence, IsSuffix, IsUpper, IsVowel, Join, Kasiski, LeftFold, LeftRecursivePathOrder, Length, LengthSplit, Levenshtein, LexOrder, LongestCommonSubSequence, LongestCommonSubString, LowerCase, LyndonFactors, Map, MatchFence, MaxChar, MaximalPalindromicSubstring, Metaphone, MinChar, MinimumConjugate, MonotonicFactors, NGrams, NthWord, OrMap, Ord, OtherCase, Overlap, PadLeft, PadRight, ParseTime, PatternCanonicalForm, PatternDictionary, PatternEquivalent, Period, Permute, PrefixDistance, PrimitiveRoot, Random, Randomize, Readability, RegMatch, RegSplit, RegSub, RegSubs, Remove, Repeat, Repeats, RevLexOrder, Reverse, RightFold, RightRecursivePathOrder, Rotate, Search, SearchAll, Select, SelectRemove, Sentences, Shift, ShortLexOrder, ShortRevLexOrder, SimilarityCoefficient, Snarf, Sort, SortPermutation, Soundex, Split, Squeeze, Stem, StringBuffer, StringSplit, SubString, Substitute, SubstituteAll, SuffixDistance, Support, SyllableLength, Tabulate, Take, ThueMorse, ToByteArray, Trim, TrimLeft, TrimRight, Uncompress, Unique, UpperCase, Visible, WildcardMatch, WordContaining, WordCount, WordEnd, WordStart, Words, WrapText]

(1)

currentdir("G:\\Computer Science\\EDGE\\fav_exports"):

if is(currentdir() = "G:\\Computer Science\\EDGE\\fav_exports") = true then "Edge favorites usb import html directory is the current file path" end if;

"Edge favorites usb import html directory is the current file path"

(2)

Filename0 := ListDirectory(currentdir())[]

"Microsoft_Edge_‎08_‎29_‎2019.html"

(3)

StringTools['Reverse']("Microsoft_Edge_‎08_‎29_‎2019.html")

"lmth.9102���_92���_80���_egdE_tfosorciM"

(4)

Delete(Delete(Filename0, 1 .. 15), nops(Delete(Filename0, 1 .. 14))-4 .. nops(Delete(Filename0, 1 .. 14)))

Error, (in StringTools:-Delete) invalid range

 

dt := ParseTime("%Y-%m-%d", "2002-11-05")

dt:-year, dt:-month, dt:-monthDay

2002, 11, 5

(5)

``

``


 

Download microsoft_edge_fav_import_fail.mw
 

Edit: I have gotten closer with the following:

 


 

``

restart

with(StringTools);

[Anagrams, AndMap, ApproximateSearch, ApproximateSearchAll, ArithmeticMean, Border, BorderArray, BorderLength, CamelCase, Capitalize, CaseJoin, CaseSplit, Center, Centre, Char, CharacterFrequencies, CharacterMap, Chomp, Chop, CommonPrefix, CommonSuffix, Compare, CompareCI, Compress, CountCharacterOccurrences, Decode, Delete, DeleteSpace, DifferencePositions, Drop, EditDistance, Encode, Entropy, Escape, Exchange, ExpandCharacterClass, ExpandTabs, Explode, Fence, Fibonacci, Fill, FirstFromLeft, FirstFromRight, FormatMessage, FormatTime, FromByteArray, Generate, GenerateIdentifier, Group, HammingDistance, HammingSearch, HammingSearchAll, Has, HasASCII, HasAlpha, HasAlphaNumeric, HasBinaryDigit, HasControlCharacter, HasDigit, HasGraphic, HasHexDigit, HasIdentifier, HasIdentifier1, HasLower, HasOctalDigit, HasPrintable, HasPunctuation, HasSpace, HasUpper, HasVowel, Hash, Implode, Indent, IndexOfCoincidence, Insert, Iota, IsASCII, IsAlpha, IsAlphaNumeric, IsAnagram, IsBalanced, IsBinaryDigit, IsConjugate, IsControlCharacter, IsDerangement, IsDigit, IsEodermdrome, IsGraphic, IsHexDigit, IsIdentifier, IsIdentifier1, IsLower, IsMonotonic, IsOctalDigit, IsPalindrome, IsPeriod, IsPermutation, IsPrefix, IsPrimitive, IsPrintable, IsPunctuation, IsSorted, IsSpace, IsSubSequence, IsSuffix, IsUpper, IsVowel, Join, Kasiski, LeftFold, LeftRecursivePathOrder, Length, LengthSplit, Levenshtein, LexOrder, LongestCommonSubSequence, LongestCommonSubString, LowerCase, LyndonFactors, Map, MatchFence, MaxChar, MaximalPalindromicSubstring, Metaphone, MinChar, MinimumConjugate, MonotonicFactors, NGrams, NthWord, OrMap, Ord, OtherCase, Overlap, PadLeft, PadRight, ParseTime, PatternCanonicalForm, PatternDictionary, PatternEquivalent, Period, Permute, PrefixDistance, PrimitiveRoot, Random, Randomize, Readability, RegMatch, RegSplit, RegSub, RegSubs, Remove, Repeat, Repeats, RevLexOrder, Reverse, RightFold, RightRecursivePathOrder, Rotate, Search, SearchAll, Select, SelectRemove, Sentences, Shift, ShortLexOrder, ShortRevLexOrder, SimilarityCoefficient, Snarf, Sort, SortPermutation, Soundex, Split, Squeeze, Stem, StringBuffer, StringSplit, SubString, Substitute, SubstituteAll, SuffixDistance, Support, SyllableLength, Tabulate, Take, ThueMorse, ToByteArray, Trim, TrimLeft, TrimRight, Uncompress, Unique, UpperCase, Visible, WildcardMatch, WordContaining, WordCount, WordEnd, WordStart, Words, WrapText]

(1)

currentdir("G:\\Computer Science\\EDGE\\fav_exports"):

if is(currentdir() = "G:\\Computer Science\\EDGE\\fav_exports") = true then "Edge favorites usb import html directory is the current file path" end if;

"Edge favorites usb import html directory is the current file path"

(2)

Filename0 := ListDirectory(currentdir())[]

"Microsoft_Edge_‎08_‎29_‎2019.html"

(3)

StringTools['Reverse']("Microsoft_Edge_‎08_‎29_‎2019.html")

"lmth.9102���_92���_80���_egdE_tfosorciM"

(4)

Filename1 := StringTools:-Delete(Filename0, 1 .. nops(StringTools:-Explode(Filename0))-15)

"29_‎2019.html"

(5)

StringTools:-Delete(Filename1, nops(StringTools:-Explode(Filename1))-4 .. nops(StringTools:-Explode(Filename1)))

"29_‎2019"

(6)

StringTools:-Delete(StringTools:-Delete(Filename0, 1 .. nops(Filename0)), nops(StringTools:-Delete(Filename0, 1 .. nops(Filename0)))-4 .. nops(StringTools:-Delete(Filename0, 1 .. 10)))

Error, (in StringTools:-Delete) invalid range

 

dt := ParseTime("%Y-%m-%d", "2002-11-05")

dt:-year, dt:-month, dt:-monthDay

2002, 11, 5

(7)

``

``


 

Download microsoft_edge_fav_import_fail2.mw

 

The video component is going to save me alot of hassle in that I was previously building external java applications for audio visual analysis purposes, with the downside of course being that I didnt have maple code at my disposal. 

I read in the manual for the video component that I can provide a HTTP address for which a video is located, which would mean i could probably stream an IP camera, but I can I use the localhost IP address with some sort of extension that directs to the I/O of a webcamera connected to my local machine?

A few months ago i completely lost one of my linux operating systems in a single line of commands I entered into the terminal, and at some point I want to utilize the StringTools package with commands like  RegSubs and RegMatch to output the matching strings that match for the current command line content in a linux terminal, so I will know before I hit the enter key how stupid it was of me to do so *prior* to hitting the enter key.

 

The part I have no idea about is the piping of the keyboard input  for a terminal window to the maple session that will output the strings matching as previously described. I'm sorry if this question is not very clear I will try clarify more this afternoon. 

 

 

First 7 8 9 10 11 12 13 Last Page 9 of 34