Plot data for a range of years in Wolfram Alpha

I am trying to compare a bunch of statistics in Wolfram Alpha, but haven’t been able to figure out how to configure the plot/graph:

For example, a search for population of Egypt vs Vietnam shows a plot of the entire population history. Is it possible to restrict it to a specific range? It does not seem to understand inputs such as:

  • population of Egypt vs Vietnam, 1970-1990
  • population of Egypt vs Vietnam, 1970..1990
  • population of egypt vs vietnam, (1970..1990)
  • (population of egypt vs vietnam)(1970..1990)

And others I have tried.

real analysis – Why does Wolfram say this sum equals 0?

Today I tried forming some nth-derivatives of certain functions involving trigonometric functions. And I formed an expression which holds my requirements for every derivative but not for the function itself:

$(frac{d}{dx})^n,xcos(2x)=2^{n-1}sumlimits_{k=1}^{n}(frac{(-1)^{n-1}}{2i^{n-1}}e^{2ix}+frac{1}{2i^{n-1}}e^{-2ix}),,, + ,,, 2^n(frac{(-1)^{n}}{2i^{n}}e^{2ix}+frac{1}{2i^{n}}e^{-2ix})x $

This expression works perfectly fine for any $n in N$ but it also would work for $0$ if there wouldnt be the issue with the sum.. that i cant really make it $0$. But than I figured.. well when I plugg in $0$ everything works but the sum goes for $k=1$ to $0$. So i asked Wolfram Alpha for fun if this sum is even defined. Wolfram surprisingly said: $sumlimits_{k=1}^{0} k = 0$.
I mean this looks more like undefined.. and since Wolfram is not always to be trusted blindly, I wanted to ask you, why the sum equals zero for cases where the running index starts with a higher value than the upper bound of the sumation.. I mean technically we dont sum anything, but it feels fishy.. maybe someone has an explanation for this? Is it really defined, that if the running index starts with a higher value than the upper bound the sum always quals zero?

Diophantine equations – Should I waste my time with wolfram alpha to solve problems like $ x ^ 3 + y ^ 3 + z ^ 3 = 390 $?

I'm sorry to ask this question, it probably doesn't fit here, however I have read some articles on number theory related to the solution of $ x ^ 3 + y ^ 3 + z ^ 3 = n $ for a known solved problem on the representation of numbers as the sum of three cubes as $ 42, But all these representations have never used the alpha wolfram as a means of solving, I am interested in this problem and at the same time I do not want to waste my time looking for triplets $ (x, y, z) $ For who $ x ^ 3 + y ^ 3 + z ^ 3 = $ 390 using wolfram alpha if this is not a suitable means for research, now my question here is: can anyone find the solution to $ x ^ 3 + y ^ 3 + z ^ 3 = $ 390 just using wolfram alpha? or is this not a suitable means for this? or should we wait for the supercomputer solution?

How to reproduce the base64 encoded string from Wolfram Language with the command line tool?

When you use the "Base64" you encode a particular file format. For export calls, the file format is derived from the given file name, such as Export("file.ext.b64", expr) use it ext format.

When used with ExportString, the format is chosen automatically. You can see here that the automatically chosen format is "String":

ExportString("foobar中文", {"Base64", "String"}) === 
 ExportString("foobar中文", "Base64")
(* True *)

To get the same output as from openssl, you can use the "Text" format:

ExportString("foobar中文", {"Base64", "Text"})
(* "Zm9vYmFy5Lit5paHn" *)

Another method, which does not add a new line to the coded string, would be to BaseEncode and StringToByteArray:

BaseEncode@StringToByteArray@"foobar中文"
(* "Zm9vYmFy5Lit5paH" *)

How do I permanently delete the Wolfram Desktop folder?

Wolfram Desktop creates a "Wolfram Desktop" folder in my Documents folder on macOS, in violation of Apple guidelines. I can delete it but it comes back every time I launch Desktop.

How can I permanently to delete the Wolfram Desktop folder?

version 12 – ImageContents not working on Wolfram Cloud iOS app

I tried using the experimental ImageContents() function, introduced in MMA 12, on my PC (using Mathematica) as well as on my iPad (using Wolfram Cloud app). On my PC it worked, but not on Wolfram Cloud. It said that it had to download some 200 MB of data from their servers, just like it did on Mathematica. However after the download nothing happened.

This was the image: https://i.stack.imgur.com/6Fd4n.jpg

And this is the result on my PC: ImageContents results

Does anyone know what is the issue?

Does Wolfram support / implement a constraint satisfaction style solver?

Looking at the documents, I get the impression that at least the foundation seems to be in place. However, I am unable to delve further due to the inability to find examples.

The branch cut of the complex logarithm used by default in Wolfram Alpha

The title says it all: which branch to cut (like what value of $ k $ in $ ln (z) = ln (r) + i ( theta + 2 pi k)) $ Does Wolfram Alpha use it by default to calculate the complex logarithm. I would say "main branch"; however, that doesn't give me the same as that, even though I used the main branch. It is entirely possible that I made a mistake (in this case, some may tell me where), but even then I still want to know.

compatibility – Is there a place where Wolfram Research announces breakthrough changes for new versions?

Mathematica version 12.1 introduced numerous break changes (regarding my code base). Here is a simple example:

ClearAll(sml, mol1, mol2);
sml = "O=C(NCC1=CC(NC(C2=CN=C3C=CC=CN23)=O)=C(C)C=C1)NC4=CC=CC(F)=C4";
mol1 = Molecule(sml);
mol2 = Molecule(sml, IncludeHydrogens -> True);

MoleculeContainsQ(mol1, MoleculePattern({"C", "H", "H"}, {Bond({1, 2}), Bond({1, 3})}))
(* Returns False in Version 12.1; used to return True in Version 12.0 *)

MoleculeContainsQ(mol2, MoleculePattern({"C", "H", "H"}, {Bond({1, 2}), Bond({1, 3})}))
(* Returns True in Version 12.1 *)

For what it's worth, I consider the behavior of Version 12.0 to be correct.

This is not the only change. There are many more. But instead of declaiming, I would just like to know if there is a way to know about these changes before I uninstall the old version and install the new one. Is there a place where Wolfram Research announces API changes and invites comments?

Thanks in advance.

wolfram cloud – Can Delayed FormFunction redirect to itself (with the body)

I want one FormFunction to display a history of entries, by default an empty list. But once the submission is sent, the form must be reloaded with the history displayed at the top.

I cannot deploy another form on submit.

The last entry must be transferred via the body of the http request, not in the url parameters.

Here is my attempt:

CloudDeploy(
  Delayed @ With(
    { inputList = ImportString( 
        FromCharacterCode(
          HTTPRequestData()(("BodyBytes"))/.{}->ToCharacterCode@"()"
        , "UTF8"
        )
       ,"RawJSON"
       )
    }
  , FormFunction(
      { 
        Framed @ inputList
      , "x" -> "Number"
      }
    , HTTPResponse(
        ExportString(Append(inputList, #x),"RawJSON") (*BODY, it needs to be in the body not url parameters*)
      , <|
          "Headers"->{ "Location" -> First@CloudObject@"temp/recursiveForm" }
        , "StatusCode"->302
        |>
      , CharacterEncoding->None
      )&
    )
  )
, "temp/recursiveForm"
, "Permissions"->"Public"
)

The form submit function is a manually generated http redirect response, in order to add body.

It doesn't work in the sense that the body looks empty after the redirect.

It could be due to the way browsers handle 302, but I'm not sure. I do not know if my approach is wrong, if it is a limitation of FormFunctions or for any other reason.

Any comments appreciated.