3.1 Tuesday, January 16, 2018

3.1.1 Top new questions this week
3.1.2 Greatest hits from previous weeks
3.1.3 Can you answer these?

3.1.1 Top new questions this week

How can I access NASA images and APIs?
Access last variable in a pure function?
Ordered RandomSample
Possible bug in Refresh[x, None] on the very first x = val
How to launch a separate Java VM on each sub-Kernel?
Three differential equations
How can I create an enumeration variable by groups?

How can I access NASA images and APIs?

https://mathematica.stackexchange.com/questions/163638/how-can-i-access-nasa-images-and-apis

I ♥ NASA. You ♥ NASA. We all ♥ NASA.

So how can I use the images and things they expose in their APIs in Mathematica?

- asked by b3m2a1 (23 votes), answered by b3m2a1 (29 votes)

Access last variable in a pure function?

https://mathematica.stackexchange.com/questions/163469/access-last-variable-in-a-pure-function

# is the first argument of a pure function, #n the nth, ## are all 
variables and ##n all beginning with the nth variable.

Now, I would like to access the last argument. In a list, this would be ...

- asked by riddleculous (13 votes), answered by Henrik Schumacher (14 votes)

Ordered RandomSample

https://mathematica.stackexchange.com/questions/163498/ordered-randomsample

This feels like a basic question yet I failed to find an answer.

  (*arbitrary list of unique elements, does not need to be sorted*) 
list = CharacterRange["a", "h"]; 
n = 5; 
 
RandomSample[ list, n]

asked by Kuba (11 votes), answered by Coolwater (13 votes)

Possible bug in Refresh[x, None] on the very first x = val

https://mathematica.stackexchange.com/questions/163559/possible-bug-in-refreshx-none-on-the-very-first-x-val

Bug introduced in 8 or earlier and persisting through 11.2.0

 
>From Refresh docs: 
 
 
  Refresh[expr,None] specifies that the value of expr 
should never automatically be refreshed. 
 
 
ClearAll[z] 
 ...

asked by Kuba (8 votes)

How to launch a separate Java VM on each sub-Kernel?

https://mathematica.stackexchange.com/questions/163387/how-to-launch-a-separate-java-vm-on-each-sub-kernel

I have some code that process very large flat files in to separate HSQL(Standalone) databases using ParallelSubmit and JDBC for each file using the strategy in this post (19542). Lately I keep ...

asked by Edmund (8 votes), answered by Edmund (5 votes)

Three differential equations

https://mathematica.stackexchange.com/questions/163566/three-differential-equations

I have the next figure with inflow and outflow rates:

And I need to calculate the time for which the pollution will be 50% from the initial value. Assuming that all lakes have the same pollution ...

asked by Darius Ionut (8 votes), answered by Henrik Schumacher (8 votes)

How can I create an enumeration variable by groups?

https://mathematica.stackexchange.com/questions/163764/how-can-i-create-an-enumeration-variable-by-groups

I copied the title and concept for this question from here. I have

data = {{"ID", "Value"}, {1, 48}, {1, 45}, {1, 52}, {1, 43}, {1, 
    41}, {2, 50}, {2, 42}, {2, 51}, {2, 52}, {bb, 52}, {bb, 54},  ...

asked by ramesh (7 votes), answered by kglr (8 votes)

3.1.2 Greatest hits from previous weeks

Labeling individual curves in Mathematica
Where can I find examples of good Mathematica programming practice?

Labeling individual curves in Mathematica

https://mathematica.stackexchange.com/questions/4444/labeling-individual-curves-in-mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I’ve read and my personal experience, PlotLegends is pretty bad.

Is ...

asked by Tianxiang Xiong (53 votes), answered by Artes (41 votes)

Where can I find examples of good Mathematica programming practice?

https://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I’m always looking out for ways to either improve my way of doing things in Mathematica, or to see if there’s something nifty that I haven’t ...

asked by J. M. (483 votes), answered by faysou (430 votes)

3.1.3 Can you answer these?

Why BoundingRegion does not work well?
Are integrals with coalescing saddles available in the core Mathematica or in standard packages?
Can FindFit be used with units?

Why BoundingRegion does not work well?

https://mathematica.stackexchange.com/questions/163756/why-boundingregion-does-not-work-well

Bug introduced in 10.0 and persisting through 11.2.0

I have a set of data points describing an ellipse in the plane. I want to obtain the best ellipse that fits them.

As a first attempt, I use ...

asked by José Antonio Díaz Navas (5 votes)

Are integrals with coalescing saddles available in the core Mathematica or in standard packages?

https://mathematica.stackexchange.com/questions/163581/are-integrals-with-coalescing-saddles-available-in-the-core-mathematica-or-in-st

I was having a look at the DLMF chapter on integrals with coalescing saddles, and there are a few things that I’d like to try out with the functions it describes, including e.g. the Pearcey integral,

asked by Emilio Pisanty (2 votes)

Can FindFit be used with units?

https://mathematica.stackexchange.com/questions/163391/can-findfit-be-used-with-units

I am trying to use the units capabilities of Mathematica throughout a course that I am teaching, but am finding that it isn’t uniformly implemented across many functions. In particular, I would love ...

asked by Kevin Ausman (1 vote)