0

NOTE: The prequel to my question has been answered before here

In the case of the question linked above, the author's code was available. But I would like to know if it is possible to reveal the code from a demo when the source code is not made available.

Example demonstration file can be found here.

GOAL HERE

How to release MMA demo files (NB or CDF) for distribution among class, and make sure that the user will not be able to see the back-end code by employing the technique as shown in this post answered by Jonathan

UPDATE: A comment from @Szabolcs

@Szabolcs "Select the manipulate, copy to another notebook, convert to input form there. But what's the point of this if the author code is available already?"

How do I restrict this? I do not want to reveal the code at all for my Manipulate. I just want to publish the demonstration alone using a notebook file.

demo

Rene Duchamp
  • 1,419
  • 10
  • 20
  • 1
    Select Source -> Download Author Code... I see the source code immediately. – ktm Feb 14 '19 at 15:12
  • @user6014 Read the NOTE in my question – Rene Duchamp Feb 14 '19 at 15:41
  • 1
    It seems that OP intends to crack a code that is not shown by its author by intention, is it not? – Alexei Boulbitch Feb 14 '19 at 15:57
  • Why not provide a link to the notebook you're interested in that doesn't have a source code button to avoid confusion? – MassDefect Feb 14 '19 at 18:04
  • @MassDefect http://www.filedropper.com/bayesstheoremandinverseprobability-1 – Rene Duchamp Feb 14 '19 at 18:22
  • I meant to provide a link to a Wolfram Demonstration which didn't have source code available. Your original link for the Bayes Theorem notebook was fine, but that notebook does have a source code button, and I suspect that most (maybe all) Wolfram Demonstrations are the same. – MassDefect Feb 14 '19 at 18:56
  • 2
    Select the manipulate, copy to another notebook, convert to input form there. But what's the point of this if the author code is available already? – Szabolcs Feb 14 '19 at 19:31
  • What's the goal here? – ktm Feb 14 '19 at 20:06
  • I do not see your question being answerable unless you can link to the Demonstration that satisfies your claim of not having accessible source code. – J. M.'s missing motivation Feb 15 '19 at 04:51
  • @J.M.iscomputer-less Updated post contains a demo notebook – Rene Duchamp Feb 15 '19 at 14:19
  • @user6014 Changed title to express intention of the question – Rene Duchamp Feb 15 '19 at 14:19
  • @Szabolcs This is the answer I was looking for, so it is possible to reveal the code somehow. How do I restrict this from happening. Please see my updated post. – Rene Duchamp Feb 15 '19 at 14:21
  • 4
    Please do not change the question. Open a new thread for a new question. Now the existing answers do not fit. – Szabolcs Feb 15 '19 at 15:13
  • 1
    BTW look up Encode and be aware that Mathematica is not terribly secure. A determined person may still be able to unlock your code. Example: With[{str = StringToStream[ "(*!1N!*)mcm\naZQzYV \ j/%/5#f$s@#K6cMR2?v\\ttttx`jv3._KTTV[VBmahZpd_!a8k!l+#+B'?kP,,>2\n\ nfplO6uDiA1Qpsg<h.E!oKc?\";(\\0 Yyhf(, "]}, Get[str]; Close[str]; ]. It defines fun upon evaluation. – Szabolcs Feb 15 '19 at 15:14
  • @Szabolcs understood. Reverting back to old title to keep all comments and answers connected. Opened new thread here: https://mathematica.stackexchange.com/questions/191628/how-to-release-a-secure-mma-nb-cdf-with-restrictions-locks-to-the-back-end-code – Rene Duchamp Feb 15 '19 at 15:39

2 Answers2

6

One method that I think works is to highlight the demonstration, copy it to a new Mathematica notebook, and then click "Convert to Input Form" on the cell.

Convert to input form.

The result of convert to input form.

MassDefect
  • 10,081
  • 20
  • 30
  • Yes, so this is exactly what I want to restrict the user from doing so. Most Wolfram Demo have source code available, I want to release my own demo files to my peers without them able to do something like what you showed. Is it possible? If so how is basically my question. – Rene Duchamp Feb 15 '19 at 14:26
  • @abhilashsukumari if you wanted to ask about how to restrict access to the source code you should have asked about how to restrict access to the source code. Try asking that as a separate question. – b3m2a1 Feb 17 '19 at 01:50
2

In the very end of the CDF document there find a button "Download source code". By clicking that you will have a Mathematica 11.2 notebook with the source code.

enter image description here

Alexei Boulbitch
  • 39,397
  • 2
  • 47
  • 96