@anhnha A function in Wolfram Language is defined f[x_, y_] := x + y or f = Function[{x, y}, x + y]. What you're doing is f = x + y where x and y are undefined symbols and f is just a variable... so naturally, when you write f[2,3] you then replace f with the value of that variable, which is x + y. So it becomes (x + y)[2, 3].
@AntiEarth maybe, just maybe, you could do this by looking for the limited number of ways in which patterns can constrain the range of numbers. For example,> and < set lower and upper limits, respectively. Alternatives (as in your example) has a max and a min. After you've found the max and min you could just generate all the number in that range and use Cases to select the valid ones.
@anhnha Note the similarity between Compile[..., x + y] and Function[{x, y}, x + y]. Also note the difference between := (normally used for function definitions) and = (used with Compile and Function).
It's a very basic question and as it often is with basic questions, it's hard to know where to start. I guess one example would be if you take x = 5 and then write x[10] what would you expect to happen? Well, we know that Mathematica always evaualtes the heads, so clearly (at least to me) this should evaluate to 5[10]. And it's the same thing that's happening in your case.
In[218]:= cf = Compile[{{a, _Integer}, {b, _Integer}, c}, a*b + c]; cf[2, 3, d] CompiledFunction::cfsa: Argument d at position 3 should be a machine-size real number. Out[219]= 6 + d
@anhnha The first paragraph of the details in the documentation say what types are supported in `Compile`, symbols is not one of them. https://reference.wolfram.com/language/ref/Compile.html
I don't get why EntityRegister doesn't mean that the EntityStore isn't stored between sessions. What's the point then - I'm not going to re-run all the code to create the entitystore every time I want to use it
As we say goodbye to the old year and welcome the new one, we have a tradition of sharing moderation stats for the past 12 months.
As most of you here are aware, sites on the Stack Exchange network are moderated somewhat differently to other sites on the web:
We designed the Stack Exchange netw...
@C.E. Yeah, I guess. I guess I just got a bit surprised that I didn't see an example in the docs of how to store them after an hour or two of messing with the syntax to get an EntityStore actually working nicely. I think I might use ResourceRegister or similar to store it, but I haven't tried it out.
With version 12.2 Mathematica has made a huge progress in the importation of pdf files. I have imported 2200 files as PlainText, Images, PageImage : No problem. Before 12.2 It didn't work in almost 40% of cases.
Problem : The good questions mentioning pdf import use linked example files. These are old question and the links are broken. It's Impossible to try again to update the answer.