@scurrlin/stencil 1.21.1 → 1.21.2

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 +27 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,34 +16,40 @@ 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 179 "Largest Number":
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 180 "Consecutive Numbers":
20
20
 
21
21
  ## Example
22
22
 
23
23
  Solution
24
24
 
25
- ```python
26
- class Solution:
27
- def largestNumber(self, nums: List[int]) -> str:
28
- array = list(map(str, nums))
29
- array.sort(key = lambda x: x * 10, reverse = True)
30
- if array[0] == "0":
31
- return "0"
32
- largest = ''.join(array)
33
- return largest
25
+ ```sql
26
+ SELECT DISTINCT
27
+ l1.Num AS ConsecutiveNums
28
+ FROM
29
+ Logs l1,
30
+ Logs l2,
31
+ Logs l3
32
+ WHERE
33
+ l1.Id = l2.Id - 1
34
+ AND l2.Id = l3.Id - 1
35
+ AND l1.Num = l2.Num
36
+ AND l2.Num = l3.Num;
34
37
  ```
35
38
 
36
39
  Solution with Stencil
37
40
 
38
- ```python
39
- c S:
40
- d l(s, n: L[i]) -> s:
41
- a = l(m(s, n))
42
- a.s(k = l x: x * 1, r = T)
43
- i a[0] == "0":
44
- r "0"
45
- l = ''.j(a)
46
- r l
41
+ ```sql
42
+ S D
43
+ l.N A C
44
+ F
45
+ L l,
46
+ L l,
47
+ L l
48
+ W
49
+ l.I = l.I - 1
50
+ A l.I = l.I - 1
51
+ A l.N = l.N
52
+ A l.N = l.N;
47
53
  ```
48
54
 
49
55
  ## Local Installation
@@ -57,7 +63,7 @@ npm install @scurrlin/stencil
57
63
  Once installed, you can run it with the following command:
58
64
 
59
65
  ```bash
60
- npx stencil path/to/your/file.py --start <start_line> --end <end_line>
66
+ npx stencil path/to/your/file.sql --start <start_line> --end <end_line>
61
67
  ```
62
68
 
63
69
  ## Global Installation
@@ -71,5 +77,5 @@ npm install -g @scurrlin/stencil
71
77
  Once installed, you can run it with the following command:
72
78
 
73
79
  ```bash
74
- stencil path/to/your/file.py --start <start_line> --end <end_line>
80
+ stencil path/to/your/file.sql --start <start_line> --end <end_line>
75
81
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scurrlin/stencil",
3
- "version": "1.21.1",
3
+ "version": "1.21.2",
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": {