You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/_freeze/index/execute-results/html.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
-
"hash": "a030b219fc18d58b27547d2267b43c0f",
2
+
"hash": "61154ed732487d9179d206dfd250cb56",
3
3
"result": {
4
-
"markdown": "---\ntitle: Geometry example\nexecute:\n daemon: 999999\n---\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\nusing DynamicObjects\n\n\"\"\"\nA common base type for shapes.\n\"\"\"\n@dynamic_type DynamicShape\n\ndescription(what::DynamicShape) = \"A $(what) has an area of $(what.area).\"\n\n\"\"\"\nA fancy rectangle.\n\"\"\"\n@dynamic_object Rectangle <: DynamicShape height::Number width=1 \narea(what::Rectangle) = what.height * what.width\n\n\"\"\"\nA boring circle.\n\"\"\"\n@dynamic_object Circle <: DynamicShape radius::Number\narea(what::Circle) = what.radius^2 * pi \n\nprintln(Rectangle(10).description)\nprintln(Circle(20).description)\nCircle(20) \n\nDynamicObjects.cached(Circle(20), :area)\n```\n\n::: {.cell-output .cell-output-stderr}\n```\n┌ Info: Precompiling DynamicObjects [23d02862-63fe-4c6e-8fdb-1d52cbbd39d5]\n└ @ Base loading.jl:1664\n```\n:::\n\n::: {.cell-output .cell-output-stdout}\n```\nA Rectangle(height = 10, width = 1) has an area of 10.\nA Circle(radius = 20,) has an area of 1256.6370614359173.\n```\n:::\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n1256.6370614359173\n```\n:::\n:::\n\n\n",
4
+
"markdown": "---\ntitle: Geometry example\nexecute:\n daemon: 999999\n---\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\nusing DynamicObjects\n\n\"\"\"\nA common base type for shapes.\n\"\"\"\n@dynamic_type DynamicShape\n\ndescription(what::DynamicShape) = \"A $(what) has an area of $(what.area).\"\n\n\"\"\"\nA fancy rectangle.\n\"\"\"\n@dynamic_object Rectangle <: DynamicShape height::Number width=1 \narea(what::Rectangle) = what.height * what.width\n\n\"\"\"\nA boring circle.\n\"\"\"\n@dynamic_object Circle <: DynamicShape radius::Number\narea(what::Circle) = what.radius^2 * pi \n\nprintln(Rectangle(10).description)\nprintln(Circle(20).description)\nCircle(20) \n\nCircle(20).cached_area\n\nCircle(20) |> update(:area) |> cached(:description) \nCircle(20) |> update(:area) |> cached(:description) \n```\n\n::: {.cell-output .cell-output-stdout}\n```\nA Rectangle(height = 10, width = 1) has an area of 10.\nA Circle(radius = 20,) has an area of 1256.6370614359173.\n```\n:::\n\n::: {.cell-output .cell-output-display execution_count=12}\n```\n\"A Circle(radius = 20, area = 1256.6370614359173) has an area of 1256.6370614359173.\"\n```\n:::\n:::\n\n\n",
0 commit comments