# Tag Info

## Hot answers tagged webmathematica

16

Maybe it is worth mentioning that webMathematica sites can be viewed without downloading and installing the 197 MB plugin. A lot of users (in companies, banks, institutions) just are not allowed to install anything at all and IT departments do not like big uncertified plugins. Furthermore a webMathematica page you can view on a any tablet or mobile phone. ...

14

Depending on the total size of the files, CDF may or may not be a good option. A file of a few MB is probably still ok, 10Mb or more is probably not. That said, this looks like a case for WebMathematica to me. It is fairly easy to set up, and looking at your description, you won't need an awful lot of interactivity (which, had you needed it, would be one ...

11

What you did with setting the "com.wolfram.jlink.libdir" property will work. Perhaps you didn't enter the correct path, or you used the wrong JLinkNativeLibrary.dll file (meaning you used the 32-bit one from JLink/SystemFiles/Libraries/Windows, instead of the 64-bit one from JLink/SystemFiles/Libraries/Windows-x86-64, or vice-versa). But you really ...

10

You cannot use CDF for this because you have textual import fields and these are not supported when you embed online. You will just get a big grey box. InputField cannot accept strings (non-numeric) for online CDFs unless you are Wolfram Research and can override it. (I'm guessing you don't want to pay many thousands for CDF Pro.) You also cannot import and ...

6

You probably shouldn't put that package into the $InstallationDirectory, there are$BaseDirectory for system wide installations of packages and $UserBaseDirectory for user specific installations (As Alexey Popkov has indicated these did supersed$AddOnsDirectory and $UserAddOnsDirectory of earlier versions. These still exist for compatibility, but probably ... 5 Since it appears that you wish to use live input for your Timeline, webMathematica will be the best solution. CDF cannot accept anything but input from what is in the file itself. Documentation can be found here: http://www.wolfram.com/products/webmathematica/ User Guide is located here: ... 5 In this case, I assume you want both, dynamic interactivity and pull large datasets from a database in real time. This can be done with a CDF notebook, and it doesn't require WebMathematica unless your notebook really needs to do much more computationally intensive work than your example code indicates. So here are the steps: Server Save your dynamic ... 5 Trigger an external event Edit Don't you dare to close this question! :) I've to say, that for the Java/MathPackage part of this answer I've used Workbench plugin within eclipse/Juno and again I've to agree with @halirutan that this is not a time saver at all. It took me more time to configure this etc. than to write the code. I am already a user of the ... 5 "Any engine compatible with Servlet 2.4 or later, such as Apache Tomcat" http://www.wolfram.com/products/webmathematica/technology/?tab=Specifications I really don't know much about Geronimo, but it seems to support servlet 2.5 (via Tomcat.) 4 In webMathematica there is already MSPGetMessage[] So if you do something like mess = MSPGetMessages[]; you have a list of messages. E.g., if you had an error for 1/0 "1\nPower::infy: Infinite expression - encountered.\n 0" Notice that$MessageList gives just {HoldForm[Power::infy]}

3

There is no need to use Javascript to include CDF in a web page. Upload the CDF file (source.cdf) and the HTML page (index.htm) into a folder on the server. Keep both files in same folder for simplicity. Edit the index.htm file using a text editor and type this line in the HTML anywhere you want the CDF to show up and play in the web page: <embed ...

3

The answer depends on what you want to do with CDF documents. The standard version of Mathematica allows you to make CDF documents. A good example of what they can do is the stuff on demonstrations.wolfram.com. Basically, if you are content with making Manipulate statements with sliders and buttons, then you'll do well with the standard CDF document. You ...

3

you can try to add the dll to your path list. Window->Preferences->Java->Installed JREs. Then choose your current JRE(JDK) or the one you are using and click Edit. Fill Default VM Arguments: -Djava.library.path="the pathhhh of dll" or Under Linux set LD_LIBRARY_PATH. Under Windows set PATH.

3

You could use a trigger in your database which fires when data is added or changed in your table to execute a piece of code; I don't know sqlserver but I assume that a trigger can execute some c++ or .Net code. That in turn could pass the data into Mathematica through NetLink. Mathematica would have to be set up to listen for the data of course. Actually ...

2

No. But Dynamic and Button and so on just are not and cannot be supported. However, you can programmmatically generate CDF files, and put them onto your server. And in CDF's, when run through the CDF-plugin (on a Windows or OSX client; no Linux yet unfortunately) you can have Button etc.

2

Put a 2 in MSPConfiguration.xml like explained here <KernelNumber> 2 </KernelNumber> and then your kernels are used efficiently in that sense that if one kernel is busy serving one request, then another one is available if another request happens at the same time the first kernel is still running.

2

There is no problem importing base-64 encoded images into Mathematica. Here is an example: a = Import["ExampleData/rose.gif"]; Export["a.b64", a, {"Base64", "PNG"}]; Import["a.b64", "Base64"] The data that you create with your JavaScript function are in the form of a URL that then gets translated by a browser to a displayed PNG image. You have to strip ...

1

This seems to work. I think this sort of thing is probably dangerous -- well, unreliable. file = DataPacletsGetDataPacletResource["CountryData", "CountryData.wdx"]; DataPacletsCountryDataDump`\$StreamCache["CountryData"] = OpenRead[file, BinaryFormat -> True] I don't have webMathematica, so I can't test it on that.

1

Problem solved by restarting the Mathematica Kernel - it seems like an old version of the file was cached at some point and wasn't being reread. This appears to be a recurring problem, and restarting the kernel is the only way I've found to fix it. I'll leave this open for the moment, in case someone knows a good fix for this/reason why this occurred.

1

Given dataUrl, the output of canv.toDataURL(), this works: ImportString[ StringDrop[dataUrl, StringLength["data:image/png;base64,"]], "Base64"] You can specify {"Base64", "PNG"} instead if you like, ImportString seems to auto-detect the type anyway. Within Mathematica, you can get a test dataUrl value here, by clicking "Show in textarea" and ...

Only top voted, non community-wiki answers of a minimum length are eligible