pict-section-formeditor 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +118 -0
  3. package/docs/.nojekyll +0 -0
  4. package/docs/README.md +162 -0
  5. package/docs/_sidebar.md +23 -0
  6. package/docs/_topbar.md +5 -0
  7. package/docs/cover.md +12 -0
  8. package/docs/css/docuserve.css +73 -0
  9. package/docs/index.html +39 -0
  10. package/docs/retold-catalog.json +224 -0
  11. package/docs/retold-keyword-index.json +46846 -0
  12. package/example_applications/form_editor/.quackage.json +10 -0
  13. package/example_applications/form_editor/FormEditor-Example-Application.js +226 -0
  14. package/example_applications/form_editor/html/icon-chooser.html +375 -0
  15. package/example_applications/form_editor/html/index.html +54 -0
  16. package/example_applications/form_editor/package.json +50 -0
  17. package/package.json +55 -0
  18. package/sample_manifests/Complex-Table.json +974 -0
  19. package/sample_manifests/Distill-Example.json +200 -0
  20. package/sample_manifests/Gradebook-Assignment.json +38 -0
  21. package/sample_manifests/Gradebook-Student.json +40 -0
  22. package/sample_manifests/Manyfest-Editor.json +347 -0
  23. package/sample_manifests/Simple-Form.json +232 -0
  24. package/sample_manifests/Simple-Table.json +79 -0
  25. package/source/Pict-Section-FormEditor-DefaultConfiguration.js +3321 -0
  26. package/source/Pict-Section-FormEditor.js +35 -0
  27. package/source/providers/Pict-Provider-ChildPictManager-Application.js +40 -0
  28. package/source/providers/Pict-Provider-ChildPictManager.js +238 -0
  29. package/source/providers/Pict-Provider-FormEditorDocumentation.js +356 -0
  30. package/source/providers/Pict-Provider-FormEditorDragDrop.js +535 -0
  31. package/source/providers/Pict-Provider-FormEditorIconography.js +1002 -0
  32. package/source/providers/Pict-Provider-FormEditorManifestOps.js +1443 -0
  33. package/source/providers/Pict-Provider-FormEditorRendering.js +730 -0
  34. package/source/providers/Pict-Provider-FormEditorUtilities.js +862 -0
  35. package/source/providers/Pict-Provider-PreviewCSS.js +42 -0
  36. package/source/views/PictView-FormEditor-InlineEditing.js +309 -0
  37. package/source/views/PictView-FormEditor-InputTypePicker.js +532 -0
  38. package/source/views/PictView-FormEditor-PropertiesPanel.js +7730 -0
  39. package/source/views/PictView-FormEditor.js +681 -0
  40. package/test/Pict-Section-FormEditor_tests.js +4102 -0
  41. package/user-documentation/.pict_documentation_topics.json +695 -0
  42. package/user-documentation/Getting-Started.md +32 -0
  43. package/user-documentation/Groups.md +52 -0
  44. package/user-documentation/Inputs.md +98 -0
  45. package/user-documentation/Sections.md +36 -0
  46. package/user-documentation/Shortcuts.md +44 -0
  47. package/user-documentation/Solver-Expression-Walkthrough.md +176 -0
  48. package/user-documentation/Solver-Expressions-Advanced.md +344 -0
  49. package/user-documentation/Solver-Functions.md +213 -0
  50. package/user-documentation/Solvers.md +81 -0
  51. package/user-documentation/ToC.md +18 -0
  52. package/user-documentation/solverfunctions/abs.md +84 -0
  53. package/user-documentation/solverfunctions/aggregationhistogram.md +83 -0
  54. package/user-documentation/solverfunctions/aggregationhistogrambyobject.md +64 -0
  55. package/user-documentation/solverfunctions/arrayconcat.md +64 -0
  56. package/user-documentation/solverfunctions/avg.md +81 -0
  57. package/user-documentation/solverfunctions/bucketset.md +69 -0
  58. package/user-documentation/solverfunctions/ceil.md +70 -0
  59. package/user-documentation/solverfunctions/cleanvaluearray.md +66 -0
  60. package/user-documentation/solverfunctions/cleanvalueobject.md +68 -0
  61. package/user-documentation/solverfunctions/colorgroupbackground.md +60 -0
  62. package/user-documentation/solverfunctions/colorinputbackground.md +62 -0
  63. package/user-documentation/solverfunctions/colorinputbackgroundtabular.md +64 -0
  64. package/user-documentation/solverfunctions/colorsectionbackground.md +59 -0
  65. package/user-documentation/solverfunctions/compare.md +72 -0
  66. package/user-documentation/solverfunctions/concat.md +73 -0
  67. package/user-documentation/solverfunctions/concatraw.md +73 -0
  68. package/user-documentation/solverfunctions/cos.md +75 -0
  69. package/user-documentation/solverfunctions/count.md +73 -0
  70. package/user-documentation/solverfunctions/countset.md +65 -0
  71. package/user-documentation/solverfunctions/countsetelements.md +63 -0
  72. package/user-documentation/solverfunctions/createarrayfromabsolutevalues.md +63 -0
  73. package/user-documentation/solverfunctions/createvalueobjectbyhashes.md +69 -0
  74. package/user-documentation/solverfunctions/cumulativesummation.md +96 -0
  75. package/user-documentation/solverfunctions/dateadddays.md +79 -0
  76. package/user-documentation/solverfunctions/dateaddhours.md +74 -0
  77. package/user-documentation/solverfunctions/dateaddmilliseconds.md +65 -0
  78. package/user-documentation/solverfunctions/dateaddminutes.md +72 -0
  79. package/user-documentation/solverfunctions/dateaddmonths.md +74 -0
  80. package/user-documentation/solverfunctions/dateaddseconds.md +66 -0
  81. package/user-documentation/solverfunctions/dateaddweeks.md +73 -0
  82. package/user-documentation/solverfunctions/dateaddyears.md +74 -0
  83. package/user-documentation/solverfunctions/datedaydifference.md +84 -0
  84. package/user-documentation/solverfunctions/datefromparts.md +81 -0
  85. package/user-documentation/solverfunctions/datehourdifference.md +64 -0
  86. package/user-documentation/solverfunctions/datemathadd.md +72 -0
  87. package/user-documentation/solverfunctions/datemilliseconddifference.md +64 -0
  88. package/user-documentation/solverfunctions/dateminutedifference.md +64 -0
  89. package/user-documentation/solverfunctions/datemonthdifference.md +66 -0
  90. package/user-documentation/solverfunctions/dateseconddifference.md +64 -0
  91. package/user-documentation/solverfunctions/dateweekdifference.md +65 -0
  92. package/user-documentation/solverfunctions/dateyeardifference.md +64 -0
  93. package/user-documentation/solverfunctions/differencearrays.md +59 -0
  94. package/user-documentation/solverfunctions/disablesolverordinal.md +58 -0
  95. package/user-documentation/solverfunctions/distributionhistogram.md +96 -0
  96. package/user-documentation/solverfunctions/distributionhistogrambyobject.md +64 -0
  97. package/user-documentation/solverfunctions/enablesolverordinal.md +57 -0
  98. package/user-documentation/solverfunctions/entryinset.md +72 -0
  99. package/user-documentation/solverfunctions/euler.md +77 -0
  100. package/user-documentation/solverfunctions/exp.md +74 -0
  101. package/user-documentation/solverfunctions/findfirstvaluebyexactmatch.md +67 -0
  102. package/user-documentation/solverfunctions/findfirstvaluebystringincludes.md +67 -0
  103. package/user-documentation/solverfunctions/flatten.md +76 -0
  104. package/user-documentation/solverfunctions/floor.md +70 -0
  105. package/user-documentation/solverfunctions/gaussianelimination.md +75 -0
  106. package/user-documentation/solverfunctions/generatearrayofobjectsfromsets.md +70 -0
  107. package/user-documentation/solverfunctions/generatehtmlhexcolor.md +67 -0
  108. package/user-documentation/solverfunctions/getvalue.md +90 -0
  109. package/user-documentation/solverfunctions/getvaluearray.md +64 -0
  110. package/user-documentation/solverfunctions/getvalueobject.md +67 -0
  111. package/user-documentation/solverfunctions/hidesections.md +58 -0
  112. package/user-documentation/solverfunctions/if.md +109 -0
  113. package/user-documentation/solverfunctions/iterativeseries.md +107 -0
  114. package/user-documentation/solverfunctions/join.md +75 -0
  115. package/user-documentation/solverfunctions/joinraw.md +64 -0
  116. package/user-documentation/solverfunctions/largestinset.md +63 -0
  117. package/user-documentation/solverfunctions/leastsquares.md +66 -0
  118. package/user-documentation/solverfunctions/linest.md +58 -0
  119. package/user-documentation/solverfunctions/log.md +74 -0
  120. package/user-documentation/solverfunctions/logvalues.md +65 -0
  121. package/user-documentation/solverfunctions/match.md +71 -0
  122. package/user-documentation/solverfunctions/matrixinverse.md +67 -0
  123. package/user-documentation/solverfunctions/matrixmultiply.md +71 -0
  124. package/user-documentation/solverfunctions/matrixtranspose.md +72 -0
  125. package/user-documentation/solverfunctions/matrixvectormultiply.md +69 -0
  126. package/user-documentation/solverfunctions/max.md +73 -0
  127. package/user-documentation/solverfunctions/mean.md +63 -0
  128. package/user-documentation/solverfunctions/median.md +79 -0
  129. package/user-documentation/solverfunctions/min.md +73 -0
  130. package/user-documentation/solverfunctions/mode.md +66 -0
  131. package/user-documentation/solverfunctions/objectkeystoarray.md +66 -0
  132. package/user-documentation/solverfunctions/objectvaluessortbyexternalobjectarray.md +65 -0
  133. package/user-documentation/solverfunctions/objectvaluestoarray.md +67 -0
  134. package/user-documentation/solverfunctions/percent.md +75 -0
  135. package/user-documentation/solverfunctions/pi.md +77 -0
  136. package/user-documentation/solverfunctions/polynomialregression.md +69 -0
  137. package/user-documentation/solverfunctions/predict.md +71 -0
  138. package/user-documentation/solverfunctions/rad.md +85 -0
  139. package/user-documentation/solverfunctions/randomfloat.md +63 -0
  140. package/user-documentation/solverfunctions/randomfloatbetween.md +72 -0
  141. package/user-documentation/solverfunctions/randomfloatupto.md +65 -0
  142. package/user-documentation/solverfunctions/randominteger.md +56 -0
  143. package/user-documentation/solverfunctions/randomintegerbetween.md +72 -0
  144. package/user-documentation/solverfunctions/randomintegerupto.md +64 -0
  145. package/user-documentation/solverfunctions/refreshtabularsection.md +57 -0
  146. package/user-documentation/solverfunctions/resolvehtmlentities.md +64 -0
  147. package/user-documentation/solverfunctions/round.md +111 -0
  148. package/user-documentation/solverfunctions/runsolvers.md +49 -0
  149. package/user-documentation/solverfunctions/setconcatenate.md +64 -0
  150. package/user-documentation/solverfunctions/setgroupvisibility.md +60 -0
  151. package/user-documentation/solverfunctions/setsectionvisibility.md +59 -0
  152. package/user-documentation/solverfunctions/setsolverordinalenabled.md +59 -0
  153. package/user-documentation/solverfunctions/settabularrowlength.md +57 -0
  154. package/user-documentation/solverfunctions/setvalue.md +65 -0
  155. package/user-documentation/solverfunctions/showsections.md +58 -0
  156. package/user-documentation/solverfunctions/sin.md +83 -0
  157. package/user-documentation/solverfunctions/slice.md +80 -0
  158. package/user-documentation/solverfunctions/smallestinset.md +63 -0
  159. package/user-documentation/solverfunctions/sortarray.md +58 -0
  160. package/user-documentation/solverfunctions/sorthistogram.md +70 -0
  161. package/user-documentation/solverfunctions/sorthistogrambykeys.md +69 -0
  162. package/user-documentation/solverfunctions/sortset.md +75 -0
  163. package/user-documentation/solverfunctions/sqrt.md +85 -0
  164. package/user-documentation/solverfunctions/stdev.md +81 -0
  165. package/user-documentation/solverfunctions/stdeva.md +58 -0
  166. package/user-documentation/solverfunctions/stdevp.md +83 -0
  167. package/user-documentation/solverfunctions/stringcountsegments.md +66 -0
  168. package/user-documentation/solverfunctions/stringgetsegments.md +74 -0
  169. package/user-documentation/solverfunctions/subtractingsummation.md +66 -0
  170. package/user-documentation/solverfunctions/sum.md +78 -0
  171. package/user-documentation/solverfunctions/tan.md +78 -0
  172. package/user-documentation/solverfunctions/tofixed.md +75 -0
  173. package/user-documentation/solverfunctions/unionarrays.md +59 -0
  174. package/user-documentation/solverfunctions/uniquearray.md +58 -0
  175. package/user-documentation/solverfunctions/var.md +67 -0
  176. package/user-documentation/solverfunctions/vara.md +58 -0
  177. package/user-documentation/solverfunctions/varp.md +66 -0
  178. package/user-documentation/solverfunctions/when.md +98 -0
@@ -0,0 +1,58 @@
1
+ # sortarray
2
+
3
+ Returns a sorted copy of the array.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ sortarray(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | The array to sort |
16
+
17
+ ## Returns
18
+
19
+ A new array with the elements sorted in ascending order.
20
+
21
+ ## Description
22
+
23
+ The `sortarray` function takes an array and returns a new array with its elements sorted in ascending order. The original array is not modified. This is useful for ordering lists of values for display or further processing.
24
+
25
+ ## Examples
26
+
27
+ ### Sorting scores
28
+
29
+ ```expression
30
+ Sorted = sortarray(Scores)
31
+ // If Scores is [85, 42, 97, 63],
32
+ // Sorted is [42, 63, 85, 97]
33
+ ```
34
+
35
+ ### Sorting names alphabetically
36
+
37
+ ```expression
38
+ OrderedNames = sortarray(NameList)
39
+ // Returns the names in alphabetical order
40
+ ```
41
+
42
+ ## Use Cases
43
+
44
+ - **Ordering data for display**: Sort a list of values before presenting them to the user
45
+ - **Ranking**: Arrange numeric values in order for ranking or comparison
46
+ - **Alphabetizing**: Sort string values into alphabetical order
47
+
48
+ ## Related Functions
49
+
50
+ - [uniquearray](./uniquearray.md) - Removes duplicates from an array
51
+ - [unionarrays](./unionarrays.md) - Returns all unique values from both arrays
52
+ - [differencearrays](./differencearrays.md) - Returns values in one array that are not in another
53
+
54
+ ## Notes
55
+
56
+ - The input must be an array
57
+ - The original array is not modified; a new sorted array is returned
58
+ - Sorting behavior follows standard JavaScript sort ordering
@@ -0,0 +1,70 @@
1
+ # sorthistogram
2
+
3
+ Sorts a histogram object by its values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ sorthistogram(histogram)
9
+ sorthistogram(histogram, descending)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `histogram` | Object | The histogram object to sort |
17
+ | `descending` | Boolean | If true, sort in descending order (optional) |
18
+
19
+ ## Returns
20
+
21
+ Array - Array of [key, value] pairs sorted by value.
22
+
23
+ ## Description
24
+
25
+ The `sorthistogram` function takes a histogram (object with keys and numeric values) and returns it as a sorted array of key-value pairs, ordered by the values.
26
+
27
+ ## Examples
28
+
29
+ ### Ascending Sort (Default)
30
+
31
+ ```expression
32
+ // Given histogram: { 'A': 5, 'B': 2, 'C': 8 }
33
+ Result = SORTHISTOGRAM(Histogram)
34
+ // Result: [['B', 2], ['A', 5], ['C', 8]]
35
+ ```
36
+
37
+ ### Descending Sort
38
+
39
+ ```expression
40
+ Result = SORTHISTOGRAM(Histogram, true)
41
+ // Result: [['C', 8], ['A', 5], ['B', 2]]
42
+ ```
43
+
44
+ ### With Distribution Histogram
45
+
46
+ ```expression
47
+ Distribution = DISTRIBUTIONHISTOGRAM("AppData.Orders", "status")
48
+ SortedByCount = SORTHISTOGRAM(Distribution, true)
49
+ // Most common statuses first
50
+ ```
51
+
52
+ ## Use Cases
53
+
54
+ - **Rankings**: Rank categories by frequency
55
+ - **Top N**: Find top categories
56
+ - **Reports**: Ordered category lists
57
+ - **Analysis**: Sorted distributions
58
+
59
+ ## Related Functions
60
+
61
+ - [sorthistogrambykeys](./sorthistogrambykeys.md) - Sort by keys instead
62
+ - [sortset](./sortset.md) - Sort simple arrays
63
+ - [distributionhistogram](./distributionhistogram.md) - Create histogram
64
+ - [aggregationhistogram](./aggregationhistogram.md) - Create aggregation histogram
65
+
66
+ ## Notes
67
+
68
+ - Returns array of [key, value] pairs
69
+ - Sorts by numeric value
70
+ - Uses the Math service's `sortHistogram` method
@@ -0,0 +1,69 @@
1
+ # sorthistogrambykeys
2
+
3
+ Sorts a histogram object by its keys.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ sorthistogrambykeys(histogram)
9
+ sorthistogrambykeys(histogram, descending)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `histogram` | Object | The histogram object to sort |
17
+ | `descending` | Boolean | If true, sort in descending order (optional) |
18
+
19
+ ## Returns
20
+
21
+ Array - Array of [key, value] pairs sorted by key.
22
+
23
+ ## Description
24
+
25
+ The `sorthistogrambykeys` function takes a histogram (object with keys and values) and returns it as a sorted array of key-value pairs, ordered alphabetically or numerically by the keys.
26
+
27
+ ## Examples
28
+
29
+ ### Alphabetical Sort (Default)
30
+
31
+ ```expression
32
+ // Given histogram: { 'Charlie': 5, 'Alice': 2, 'Bob': 8 }
33
+ Result = SORTHISTOGRAMBYKEYS(Histogram)
34
+ // Result: [['Alice', 2], ['Bob', 8], ['Charlie', 5]]
35
+ ```
36
+
37
+ ### Descending Sort
38
+
39
+ ```expression
40
+ Result = SORTHISTOGRAMBYKEYS(Histogram, true)
41
+ // Result: [['Charlie', 5], ['Bob', 8], ['Alice', 2]]
42
+ ```
43
+
44
+ ### State Data
45
+
46
+ ```expression
47
+ PopulationByState = AGGREGATIONHISTOGRAM("AppData.Cities", "state", "population")
48
+ SortedByState = SORTHISTOGRAMBYKEYS(PopulationByState)
49
+ // Alphabetically by state name
50
+ ```
51
+
52
+ ## Use Cases
53
+
54
+ - **Alphabetical ordering**: Sort categories alphabetically
55
+ - **Consistent display**: Predictable key ordering
56
+ - **Reports**: Ordered by category name
57
+ - **Lookups**: Binary search preparation
58
+
59
+ ## Related Functions
60
+
61
+ - [sorthistogram](./sorthistogram.md) - Sort by values instead
62
+ - [sortset](./sortset.md) - Sort simple arrays
63
+ - [distributionhistogram](./distributionhistogram.md) - Create histogram
64
+
65
+ ## Notes
66
+
67
+ - Returns array of [key, value] pairs
68
+ - Sorts by key (alphabetically/numerically)
69
+ - Uses the Math service's `sortHistogramByKeys` method
@@ -0,0 +1,75 @@
1
+ # sortset
2
+
3
+ Sorts an array of values in ascending or descending order.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ sortset(array)
9
+ sortset(array, descending)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `array` | Array | The array to sort |
17
+ | `descending` | Boolean | If true, sort in descending order (optional) |
18
+
19
+ ## Returns
20
+
21
+ Array - The sorted array.
22
+
23
+ ## Description
24
+
25
+ The `sortset` function sorts an array of values. By default, it sorts in ascending order. Pass `true` as the second parameter to sort in descending order.
26
+
27
+ ## Examples
28
+
29
+ ### Ascending Sort (Default)
30
+
31
+ ```expression
32
+ Result = SORTSET([3, 1, 4, 1, 5, 9, 2, 6])
33
+ // Result: [1, 1, 2, 3, 4, 5, 6, 9]
34
+ ```
35
+
36
+ ### Descending Sort
37
+
38
+ ```expression
39
+ Result = SORTSET([3, 1, 4, 1, 5, 9, 2, 6], true)
40
+ // Result: [9, 6, 5, 4, 3, 2, 1, 1]
41
+ ```
42
+
43
+ ### With Data
44
+
45
+ ```expression
46
+ SortedScores = SORTSET(FLATTEN(AppData.Students.score), true)
47
+ // Highest to lowest scores
48
+ ```
49
+
50
+ ### Top N Values
51
+
52
+ ```expression
53
+ TopThree = SLICE(SORTSET(Values, true), 0, 3)
54
+ ```
55
+
56
+ ## Use Cases
57
+
58
+ - **Rankings**: Create leaderboards
59
+ - **Analysis**: Sorted data examination
60
+ - **Selection**: Find top/bottom values
61
+ - **Display**: Ordered presentation
62
+
63
+ ## Related Functions
64
+
65
+ - [sorthistogram](./sorthistogram.md) - Sort histogram by values
66
+ - [sorthistogrambykeys](./sorthistogrambykeys.md) - Sort histogram by keys
67
+ - [max](./max.md) - Find maximum value
68
+ - [min](./min.md) - Find minimum value
69
+ - [slice](./slice.md) - Extract portion after sorting
70
+
71
+ ## Notes
72
+
73
+ - Returns new sorted array
74
+ - Original array unchanged
75
+ - Uses the Math service's `sortSet` method
@@ -0,0 +1,85 @@
1
+ # sqrt
2
+
3
+ Calculates the square root of a number with arbitrary precision.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ sqrt(value)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `value` | Number/String | The value to calculate the square root of |
16
+
17
+ ## Returns
18
+
19
+ String - The square root of the input value with arbitrary precision.
20
+
21
+ ## Description
22
+
23
+ The `sqrt` function computes the square root of a numeric value. It uses arbitrary precision arithmetic, so results are accurate for very large or very precise numbers.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = sqrt(16)
31
+ // Result: "4"
32
+
33
+ Result = sqrt(2)
34
+ // Result: "1.41421356237309504880168872420969807856967187537694..."
35
+
36
+ Result = sqrt(100)
37
+ // Result: "10"
38
+ ```
39
+
40
+ ### In Complex Expressions
41
+
42
+ ```expression
43
+ // Pythagorean theorem: c = sqrt(a² + b²)
44
+ Hypotenuse = sqrt(X^2 + Y^2)
45
+ // With X=3, Y=4: Result: "5"
46
+
47
+ // Distance formula
48
+ Distance = sqrt((X2 - X1)^2 + (Y2 - Y1)^2)
49
+ ```
50
+
51
+ ### With Variables
52
+
53
+ ```expression
54
+ Result = sqrt(100 * (C + 30)) + sin(Depth - Width) / 10
55
+ // With C=-13, Depth=100.203, Width=10.5
56
+ // Result: "41.32965489638783839821"
57
+ ```
58
+
59
+ ### Nested in Other Functions
60
+
61
+ ```expression
62
+ Result = 1.5 * sqrt(8 * 2.423782342^2) / 10
63
+ // Result: "1.02832375808904701855"
64
+
65
+ Result = 1 * sqrt(16)
66
+ // Result: "4"
67
+ ```
68
+
69
+ ## Use Cases
70
+
71
+ - **Geometry calculations**: Computing diagonals, distances, and hypotenuses
72
+ - **Statistical analysis**: Used in standard deviation calculations
73
+ - **Physics formulas**: Many physics equations involve square roots
74
+ - **Financial calculations**: Volatility and other risk metrics
75
+
76
+ ## Related Functions
77
+
78
+ - [abs](./abs.md) - Absolute value
79
+ - [pow](./pow.md) - Power/exponentiation (use `^` operator)
80
+
81
+ ## Notes
82
+
83
+ - Returns arbitrary precision results as strings
84
+ - Input can be a number or a numeric string
85
+ - Works with the Math service's `sqrtPrecise` method internally
@@ -0,0 +1,81 @@
1
+ # stdev / stdeva
2
+
3
+ Calculates the sample standard deviation of a set of values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stdev(array)
9
+ stdeva(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `array` | Array | An array of numeric values |
17
+
18
+ ## Returns
19
+
20
+ String - The sample standard deviation.
21
+
22
+ ## Description
23
+
24
+ The `stdev` and `stdeva` functions calculate the sample standard deviation, which measures how spread out the values are from the mean. Sample standard deviation divides by (n-1) rather than n, providing an unbiased estimate when working with a sample of a larger population.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ StDev = STDEV(Values)
32
+ // With Values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
33
+ // Result: approximately "3.3166"
34
+ ```
35
+
36
+ ### Financial Risk Analysis
37
+
38
+ ```expression
39
+ // Calculate volatility of returns
40
+ Volatility = STDEV(DailyReturns)
41
+ ```
42
+
43
+ ### Quality Control
44
+
45
+ ```expression
46
+ // Measure variation in measurements
47
+ ProcessVariation = STDEV(Measurements)
48
+ ```
49
+
50
+ ## Formula
51
+
52
+ Sample Standard Deviation (s):
53
+ ```
54
+ s = sqrt(Σ(xi - x̄)² / (n - 1))
55
+ ```
56
+
57
+ Where:
58
+ - xi = each value
59
+ - x̄ = mean of all values
60
+ - n = number of values
61
+
62
+ ## Use Cases
63
+
64
+ - **Finance**: Measuring volatility and risk
65
+ - **Quality control**: Process variation analysis
66
+ - **Research**: Data variability measurement
67
+ - **Statistics**: Confidence intervals, hypothesis testing
68
+
69
+ ## Related Functions
70
+
71
+ - [stdevp](./stdevp.md) - Population standard deviation
72
+ - [var](./var.md) - Sample variance
73
+ - [varp](./varp.md) - Population variance
74
+ - [avg](./avg.md) / [mean](./mean.md) - Average
75
+
76
+ ## Notes
77
+
78
+ - `stdev` and `stdeva` are aliases
79
+ - Uses (n-1) in denominator (Bessel's correction)
80
+ - For population data, use [stdevp](./stdevp.md) instead
81
+ - Works with the Math service's `standardDeviationPrecise` method
@@ -0,0 +1,58 @@
1
+ # stdeva
2
+
3
+ Calculates standard deviation including text and boolean values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stdeva(value1, value2, ...)
9
+ stdeva(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Any | Values including numbers, text, and booleans |
17
+
18
+ ## Returns
19
+
20
+ String - The standard deviation including converted text/boolean values.
21
+
22
+ ## Description
23
+
24
+ The `stdeva` function calculates sample standard deviation while treating text as 0 and boolean TRUE as 1, FALSE as 0. This is similar to Excel's STDEVA function.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = STDEVA(1, 2, true, false, "text")
32
+ // Text = 0, true = 1, false = 0
33
+ ```
34
+
35
+ ### With Mixed Data
36
+
37
+ ```expression
38
+ StdDev = STDEVA(MixedDataArray)
39
+ ```
40
+
41
+ ## Use Cases
42
+
43
+ - **Mixed data**: Standard deviation with non-numeric values
44
+ - **Spreadsheet compatibility**: Excel-like behavior
45
+ - **Survey data**: Handle mixed responses
46
+
47
+ ## Related Functions
48
+
49
+ - [stdev](./stdev.md) - Numeric-only standard deviation
50
+ - [stdevp](./stdevp.md) - Population standard deviation
51
+ - [vara](./vara.md) - Variance with text/boolean
52
+
53
+ ## Notes
54
+
55
+ - Text values treated as 0
56
+ - TRUE = 1, FALSE = 0
57
+ - Uses sample formula (n-1)
58
+ - Uses the Math service's `stdevaPrecise` method
@@ -0,0 +1,83 @@
1
+ # stdevp
2
+
3
+ Calculates the population standard deviation of a set of values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stdevp(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | An array of numeric values |
16
+
17
+ ## Returns
18
+
19
+ String - The population standard deviation.
20
+
21
+ ## Description
22
+
23
+ The `stdevp` function calculates the population standard deviation, which measures how spread out the values are from the mean. Population standard deviation divides by n (not n-1), and is used when you have data for the entire population, not just a sample.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ StDevP = STDEVP(Values)
31
+ // With Values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
32
+ // Result: approximately "3.1623"
33
+ ```
34
+
35
+ ### Comparing Sample vs Population
36
+
37
+ ```expression
38
+ // Sample standard deviation (divides by n-1)
39
+ SampleStDev = STDEV(Values) // ≈ 3.3166
40
+
41
+ // Population standard deviation (divides by n)
42
+ PopStDev = STDEVP(Values) // ≈ 3.1623
43
+ ```
44
+
45
+ ## Formula
46
+
47
+ Population Standard Deviation (σ):
48
+ ```
49
+ σ = sqrt(Σ(xi - μ)² / n)
50
+ ```
51
+
52
+ Where:
53
+ - xi = each value
54
+ - μ = population mean
55
+ - n = population size
56
+
57
+ ## When to Use STDEVP vs STDEV
58
+
59
+ | Use STDEVP when... | Use STDEV when... |
60
+ |-------------------|-------------------|
61
+ | You have the entire population | You have a sample |
62
+ | Census data | Survey data |
63
+ | All possible outcomes | Subset of outcomes |
64
+
65
+ ## Use Cases
66
+
67
+ - **Census data**: When you have measurements from everyone
68
+ - **Theoretical analysis**: Known distributions
69
+ - **Complete datasets**: When no inference is needed
70
+
71
+ ## Related Functions
72
+
73
+ - [stdev](./stdev.md) - Sample standard deviation
74
+ - [var](./var.md) - Sample variance
75
+ - [varp](./varp.md) - Population variance
76
+ - [avg](./avg.md) / [mean](./mean.md) - Average
77
+
78
+ ## Notes
79
+
80
+ - Uses n in denominator (no Bessel's correction)
81
+ - Results are slightly smaller than sample standard deviation
82
+ - For sample data, use [stdev](./stdev.md) instead
83
+ - Works with the Math service's `populationStandardDeviationPrecise` method
@@ -0,0 +1,66 @@
1
+ # stringcountsegments
2
+
3
+ Counts the number of segments in a string when split by a delimiter.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stringcountsegments(text, delimiter)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `text` | String | The string to count segments in |
16
+ | `delimiter` | String | The delimiter to split by |
17
+
18
+ ## Returns
19
+
20
+ String - The number of segments.
21
+
22
+ ## Description
23
+
24
+ The `stringcountsegments` function splits a string by a delimiter and returns the count of resulting segments.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = STRINGCOUNTSEGMENTS("a,b,c,d,e", ",")
32
+ // Result: "5"
33
+ ```
34
+
35
+ ### Path Segments
36
+
37
+ ```expression
38
+ PathDepth = STRINGCOUNTSEGMENTS("/home/user/documents", "/")
39
+ // Result: "4" (empty first segment + 3 folders)
40
+ ```
41
+
42
+ ### Word Count
43
+
44
+ ```expression
45
+ WordCount = STRINGCOUNTSEGMENTS("Hello World Everyone", " ")
46
+ // Result: "3"
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Validation**: Check expected number of parts
52
+ - **Path analysis**: Count path segments
53
+ - **Data parsing**: Validate delimited data
54
+ - **Text analysis**: Count words or phrases
55
+
56
+ ## Related Functions
57
+
58
+ - [stringgetsegments](./stringgetsegments.md) - Get the actual segments
59
+ - [concat](./concat.md) - Combine strings
60
+ - [join](./join.md) - Join with delimiter
61
+
62
+ ## Notes
63
+
64
+ - Returns count as string
65
+ - Empty string returns "1" (one empty segment)
66
+ - Uses the Utility service