Tag Info

Hot answers tagged

24

Actually this is just meant as a side note to your own answer, but it became too long for a comment. As you can guess I'm interested in this myself and have done some testing, most of what I mentioned is from that experience. It has been reported that there would be differences in what the player would allow depending on whether Mathematica is installed or ...


24

This is the sequence of commands that I use to create my CDFs. testCDF := DynamicModule[... some nice code] nb = CreateDocument[{testCDF} ,Visible -> False ,WindowTitle->"Export Test" ,WindowMargins->Automatic ,WindowSize->Automatic ,WindowElements->{"VerticalScrollBar","HorizontalScrollBar"} ...


22

Updated: presentations are now available from the Wolfram CDF Virtual Workshop. General info on the CDF format/creation/deployment: presentations of the CDF Virtual Workshop (4.24.2012) CDF FAQ download the CDF InfoKit Create a CDF File (Documentation Center) 1. Manipulate or DynamicModule? Though it is often stated that the interactive content in a ...


20

Here is a list of the most important differences: webMathematica is a server side technology (the Mathematica code runs on the server) while Mathematica code contained in a CDF-Document runs on the client, either in the standalone player or the browser-plugin. This of course has many important consequences, see the sections below for more details. The UI ...


18

With Version 9, CDF Player is officially supporting import via URL. This is currently the only way to bring any data into a web embedded CDF or notebook, regardless of license level. Other methods are being explored, particular for exchanging data with the surrounding DOM. Stay tuned for more information on this to come. Please consult the following table ...


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. ...


15

If your goal is to work within Mathematica, FreeCDF and Notebook are functionally equivalent. There might be, I suppose, a bug or two yet remaining such as the one pointed out in another response. But the file formats are identical, and the functionality is completely equivalent. However, saving a FreeCDF file will be slower. FreeCDF adds a signature to ...


14

You do not need to export an applet to be able to share things with non-Mathematica users. If you save your stuff as a CDF then other non-Mathematica people will be able to use it both on their desktops or view it in webpages (if you choose to embed your CDFs in a webpage). You can do this via File > Deploy See also ref/format/CDF in the documentation ...


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 ...


14

EDIT--- The code was updated to include anti-cheating filter to address important issues raised by @Jens in comments (thanks). More filters can be added to exclude other type of cheating. ---EDIT I was teaching physics and math for many years and consider this to be a very important question. I would say Mathematica is very well equipped for this type of ...


13

For part 2, you must add the following to your <head> section <script type="text/javascript" src="http://www.wolfram.com/cdf-player/plugin/v2.1/cdfplugin.js"></script> <script type="text/javascript"> var cdf = new cdfplugin(); cdf.embed('/path/to/filename.cdf', width, height); </script> For part 1, you can embed a ...


12

I think this sounds like an ideal use case for a CDF document and the free CDF player to "play" it. It's not necessary that the interactivity within a CDF document is more complicated than reacting to a button press :-). You will find other answers with examples that show that it is also not necessary to use a Manipulate, you can very well deploy a custom ...


12

This seems to be a very easy way to bite yourself in the foot (non-flexible programmers this is not for you). I also have the habit of doing those blocked set-based definitions. It's probably time to change the habit now. It seems to me that SaveDefinition extracts the definitions of the symbols required by the Manipulate, as you entered them. If you used ...


11

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 ...


11

Interesting question. I have done some (very limited) testing and up to now did only find one thing that didn't work: If you set the AutoGeneratePackage option for a notebook to Automatic and save as CDF the resulting package file will be named .cdf.m and not just .m. This can cause problems if you try to load that file. It's not something where using cdf ...


10

You do not really need a tool to depoly your CDF to HTML. It is very simple to do by hand. Here is what I do open your text editor and create a file called index.htm <HTML> <BODY > This is my CDF <p> <script src="http://www.wolfram.com/cdf-player/plugin/v1.0/cdfplugin.js" type="text/javascript"></script><script ...


10

I am the author of the comp.soft-sys.math.mathematica message linked by Szabolcs, wherein I briefly mentioned a CDF extension for MediaWiki I have developed. In the few days since I sent that message, I have improved the extension so that meets MediaWiki's best practice guidelines for extensions, and added new features: it can show CDF files uploaded to a ...


10

Here is a proof-of-concept of something that you can build upon to create such homework assignments. First, a helper function to check the correct answer and display the result. I'm only checking for accuracy to the third decimal, but you can tweak that as you wish. ClearAll[checkAnswer] checkAnswer[Null, _] := "" checkAnswer[ans_, correct_] := If[ ...


9

If your question is really "How do I remove the input?", then you can evaluate NotebookPut[DeleteCases[NotebookGet[], Cell[_, "Input", ___], Infinity]] to create a fresh copy of a notebook with no Input cells in it. Then save as CDF.


9

You can use SaveDefinitions->True to do this. If you copy a Manipulate box created with this option set to an empty notebook and save this as CDF, it will contain all necessary definitions to let it stand alone. The use of Manipulate is a prerequisite for CDF deployments. More information here: All interactive content must be generated with the ...


9

The deploy functionality was introduced in Mathematica 8.0.4. To my knowledge, it is not available in 8.0.1.0, see the changelog.


9

You cannot import data to a web embedded CDF: http://www.wolfram.com/player-pro/how-player-pro-compares.html ...that is to say in principle you can't. However if you read this thread: Deploying Mathematica Content Online you will note that @Jens demonstrated that it was possible to import data from a URL. However after investigating this I was told by ...


9

Short answers: it's very well possible to manage CDF-documents in a source control system, but you will loose some of the more attractive features of such systems. most probably any system will do equally well (or bad). Some elaboration: I don't know TFS, but all source control systems I know basically do work line oriented with plain text documents ...


9

This is just to update everyone on this topic. Wolfram Research released detailed blog and video tutorial "CDF Embedding in a Nutshell". It shows how to use built-in Mathematica wizard to deploy CDF online into HTML pages and Word Press blogs. URL: http://blog.wolfram.com/2012/02/22/mathematica-qa-series-cdf-embedding-in-a-nutshell/


9

CDFDeploy["G:\\tmp\\test.cdf", manip, Method -> "Standalone"] does what is needed. It also supports setting the WindowSize option. Unfortunately this introduction to CDF does not mention CDFDeploy as a function. One has to arrive here to find this.


9

Using InputForm on your Manipulate reveals (like it did in my SaveDefinitions Considered Dangerous post) that it contains the following: Manipulate[f[a, b], {a, -1, 1}, {b, -1, 1}, Initialization :> {f[x_, y_] = x + y, x = 1}] So, it actually stores two definitions, one for f and one for x. This actually makes sense, as SaveDefinitions's task is to ...


8

For short textual content, you can always use SystemOpen on a crafted URL. For example, the code below works in CDF and allows you to embed content in a tweet (sorry, I don't know the facebook API, so I went with this instead!): hexEncode[s_String] := StringJoin@Riffle[IntegerString[ToCharacterCode[s, "UTF-8"], 16, 2], "%", {1, -2, 2}]; sendTweet[text_, ...


8

load jQuery in the head, and also put this in the head <script type="text/javascript" src="http://www.wolfram.com/cdf-player/plugin/v2.1/cdfplugin.js"></script> <script type="text/javascript"> var cdf = new cdfplugin(); var width = 910; var height = 500; function changeDimensions(){ obj = document.embeds[0]; ...


8

1- Closing the notebook you're in could be done with: NotebookClose[InputNotebook[]] Note that this closes without warnings and saves (tip R.M.). Use NotebookSave to manually save the notebook or set the notebook's NotebookAutoSave to True to save after every result. 2- Notebooks[] will give you a list of open notebooks, so mapping your SetOptions over ...


8

Functionality you are looking for is included in Wolfram Player Pro. Detailed functionality difference relative to Free Wolfram CDF Player and Mathematica is listed here: CDF Player, Player Pro, and Mathematica Features Comparison Chart If including your data in CDF is possible in your case then 1) This blog (2nd example) shows simplest case of ...



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