Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Software Development sorted by activeMathematica Local WebServer on Mac OS X Failed to Start
http://community.wolfram.com/groups/-/m/t/1269849
I recently watched the video class on [Web Programming and Development][1] and was greatly intrigued by the ability to serve web related work locally before CloudDeploy'ing. In the video class, the StartWebServer function was used so I immediately stopped the on demand video to try it out. After realizing the **StartWebServer** command was not "standard" (at least not found in the standard Mathematica docs), I was able to uncover it lives in **HTTPHandling**.
I'm running Mathematica 11.2.0.0 on Mac OS 10.13.2 and executing the command below fails.
HTTPHandling`StartWebServer[ExportForm["Hello", "HTML"]]
The error message reported is:
WebServer: The HTTP server failed to start with error code None and stderr output:
EndOfFile.
Any ideas what I'm doing wrong? Perhaps there is some other dependency I need.
Regards.
[1]: http://www.wolfram.com/training/courses/wl050.htmlmacrod2018-01-20T21:50:46ZCan a function know its own name?
http://community.wolfram.com/groups/-/m/t/1266955
Say I have a function:
test[x_] := Block[{x}, ToExpression["test" <> "State"]; testState = 67]
testState is a global that test can refer to to see its last state:
In[133]:= testState
Out[133]= 67
*Test* needs to be used repeatedly by renaming it *test1*, *test2*, etc.
So, can test1 know its own name?Eric Johnstone2018-01-17T14:36:44ZHow do I convert a Mathematica Notebook into a fully interactive web page?
http://community.wolfram.com/groups/-/m/t/1266033
I have a Mathematica notebook that contains some animations based on numerical solutions to differential equations, with a few input parameters (either directly typed in or using sliders). I can't find a tutorial (either online or within the Help system) on how to convert this into an online web file that my students can explore for themselves. Ideally, it should show all the same content as the nb, but also be able to actually run the animation, with students being able to change the input. I tried simpleminded commands like "Export", but although a bunch of html files were created, they don't seem to do anything in my browser (Safari). Any hints would be appreciated!Sebastian Kuhn2018-01-15T17:08:09ZImprove paclet formatting?
http://community.wolfram.com/groups/-/m/t/1266698
Cross posted on StackExchange: [Improving paclet formatting](https://mathematica.stackexchange.com/questions/163854/improving-paclet-formatting)
---
For such an increasingly relevant data type the `Paclet` has a particularly useless formatted form.
Can we do better?
In particular we'll want the `Paclet` [`Format`](http://reference.wolfram.com/language/ref/Format.html) to be attractive, show particularly relevant paclet info, and be customizable.
Here's my version, to get people started:
pacletKeyOrdering =
{
"Name", "Version", "Creator",
"Description", "Root", "WolframVersion",
"MathematicaVersion", "Internal", "Loading",
"Qualifier", "SystemID", "BuildNumber",
"Tags", "Icon", "Categories",
"Authors", "Extensions"
};
With[{keyOrdering = pacletKeyOrdering},
pacletInfoAssociation[PacletManager`Paclet[k__]] :=
KeySortBy[First@FirstPosition[keyOrdering, #] &]@
With[
{
base =
KeyMap[Replace[s_Symbol :> SymbolName[s]], <|k|>]
},
ReplacePart[base,
"Extensions" ->
AssociationThread[
First /@ Lookup[base, "Extensions", {}],
Association@*Rest /@ Lookup[base, "Extensions", {}]
]
]
]
];
If[! AssociationQ@$pacletIconCache, $pacletIconCache = <||>];
pacletGetIcon[a_Association] :=
Replace[
FileNames[
Lookup[
a,
"Icon",
"PacletIcon.m" | "PacletIcon.png"
],
a["Location"]
],
{
{f_, ___} :>
Lookup[$pacletIconCache, f, $pacletIconCache[f] = Import[f]],
{} :>
With[{f =
"https://github.com/b3m2a1/mathematica-BTools/raw/master/\
Resources/Icons/PacletIcon.png"
},
Image[
Lookup[$pacletIconCache, f, $pacletIconCache[f] = Import[f]],
ImageSize -> 28
]
]
}
];
$formatPaclets = True;
Format[p_PacletManager`Paclet /;
($formatPaclets && AssociationQ@
pacletInfoAssociation[p])] :=
With[{a = pacletInfoAssociation[p]},
RawBoxes@
BoxForm`ArrangeSummaryBox[
"Paclet",
p,
pacletGetIcon[a],
KeyValueMap[
BoxForm`MakeSummaryItem[
{Row[{#, ": "}], #2},
StandardForm
] &,
a[[{"Name", "Version"}]]
],
Join[
{
If[KeyMemberQ[a, "Location"],
BoxForm`MakeSummaryItem[
{Row[{"Location", ": "}],
With[{l = a["Location"]},
Button[
Hyperlink[l],
SystemOpen[l],
Appearance -> None,
BaseStyle -> "Hyperlink"
]
]},
StandardForm
],
Nothing
]
},
KeyValueMap[
BoxForm`MakeSummaryItem[
{Row[{#, ": "}], #2},
StandardForm
] &,
KeyDrop[a, {"Name", "Version", "Location"}]
]
],
StandardForm
]
];
FormatValues[PacletManager`Paclet] =
SortBy[
FormatValues[PacletManager`Paclet],
FreeQ[HoldPattern[$formatPaclets]]
];
This is what I use in my own packages. It makes paclets that look like this:
PacletFind /@ {"BTools", "ChemTools"} // Flatten
[![img][1]][1]
(*sorry about bad raster quality*)
Of course where this is actually useful is that it shows you what's inside the paclet:
PacletFind["MQTTLink"][[1]]
[![asdasd][2]][2]
[1]: https://i.stack.imgur.com/yeIuE.png
[2]: https://i.stack.imgur.com/WCeVf.pngb3m2a1 2018-01-17T05:10:59ZCitation for a table “Large Tasks - Line count ratio” // Mathematica vs ...
http://community.wolfram.com/groups/-/m/t/1265482
I would like to include this table in a publication and need attribution. It's a screenshot I took, but I don't remember the source.
Anyone recognize it and can provide a citation?
![enter image description here][1]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=line-count-ratio_JPG.jpg&userId=389628Alan Calvitti2018-01-14T17:17:16Z