@scurrlin/stencil 1.20.6 → 1.20.8

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 (2) hide show
  1. package/README.md +11 -27
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,40 +16,24 @@ Whether you are studying for technical interviews, or just starting your coding
16
16
 
17
17
  Most people when they attempt to memorize something study the full text and then attempt to regurgitate it on a blank page. Shocking, I know... but what if there was a step in between? What if memorization and pattern recognition weren't all or nothing games? This is where Stencil comes in.
18
18
 
19
- Stencil is a language-agnostic memorization tool that strips code files down to their first letters while preserving spacing, capitalization, and punctuation. The "stencil" of the file is designed to act as a bridge between having something partially memorized and fully memorized. Below is an example of Stencil in action using LeetCode problem 174 "Dungeon Game":
19
+ Stencil is a language-agnostic memorization tool that strips code files down to their first letters while preserving spacing, capitalization, and punctuation. The "stencil" of the file is designed to act as a bridge between having something partially memorized and fully memorized. Below is an example of Stencil in action using LeetCode problem 176 "Second Highest Salary":
20
20
 
21
21
  ## Example
22
22
 
23
23
  Solution
24
24
 
25
- ```python
26
- class Solution:
27
- def calculateMinimumHP(self, dungeon: List[List[int]]) -> int:
28
- m, n = len(dungeon), len(dungeon[0])
29
- dp = [[inf] * (n + 1) for _ in range(m + 1)]
30
- dp[m][n - 1] = dp[m - 1][n] = 1
31
-
32
- for i in range(m - 1, -1, -1):
33
- for j in range(n - 1, -1, -1):
34
- dp[i][j] = max(1, min(dp[i + 1][j], dp[i][j + 1]) - dungeon[i][j])
35
-
36
- return dp[0][0]
25
+ ```sql
26
+ SELECT MAX(salary) AS SecondHighestSalary
27
+ FROM Employee
28
+ WHERE salary < (SELECT MAX(salary) FROM Employee);
37
29
  ```
38
30
 
39
31
  Solution with Stencil
40
32
 
41
- ```python
42
- c S:
43
- d c(s, d: L[L[i]]) -> i:
44
- m, n = l(d), l(d[0])
45
- d = [[i] * (n + 1) f _ i r(m + 1)]
46
- d[m][n - 1] = d[m - 1][n] = 1
47
-
48
- f i i r(m - 1, -1, -1):
49
- f j i r(n - 1, -1, -1):
50
- d[i][j] = m(1, m(d[i + 1][j], d[i][j + 1]) - d[i][j])
51
-
52
- r d[0][0]
33
+ ```sql
34
+ S M(s) A S
35
+ F E
36
+ W s < (S M(s) F E);
53
37
  ```
54
38
 
55
39
  ## Local Installation
@@ -63,7 +47,7 @@ npm install @scurrlin/stencil
63
47
  Once installed, you can run it with the following command:
64
48
 
65
49
  ```bash
66
- npx stencil path/to/your/file.py --start <start_line> --end <end_line>
50
+ npx stencil path/to/your/file.sql --start <start_line> --end <end_line>
67
51
  ```
68
52
 
69
53
  ## Global Installation
@@ -77,5 +61,5 @@ npm install -g @scurrlin/stencil
77
61
  Once installed, you can run it with the following command:
78
62
 
79
63
  ```bash
80
- stencil path/to/your/file.py --start <start_line> --end <end_line>
64
+ stencil path/to/your/file.sql --start <start_line> --end <end_line>
81
65
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scurrlin/stencil",
3
- "version": "1.20.6",
3
+ "version": "1.20.8",
4
4
  "description": "A memorization tool that strips code down to first letters and punctuation only.",
5
5
  "main": "src/index.js",
6
6
  "bin": {