Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jake Robers jakerobers

🏠
Working from home
View GitHub Profile
View lawofdemeter-6.js
interface Validator {
isValid: () => bool,
getErrorMessage: () => string
}
interface Quantity {
isValid: () => bool,
getRaw: () => string,
getValue: () => number,
}
View lawofdemeter-5.js
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: {
raw: '3',
value: 3,
validation: {
isValid: true,
errMessage: ""
}
View lawofdemeter-4.js
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: {
raw: '3',
value: 3,
isValid: true,
},
price: 100
}
View lawofdemeter-3.js
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: '3',
price: 100
};
const total = Number(product.quantity) * product.price;
View lawofdemeter-2.js
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: '3',
price: 100
};
View lawofdemeter-1.js
const product = {
id: 1,
name: 'Supreme Vacuum Cleaner',
quantity: 3,
price: 100
};
View webring-template.html
<section class="webring">
<h3>Articles from blogs I follow around the net</h3>
<section class="flex flex-wrap articles" style='margin: -0.5rem;'>
{{range .Articles}}
<div class="flex flex-auto flex-column pa2 bg-light-gray w4">
<h4 class="ma0">
<a href="{{.Link}}" target="_blank" rel="noopener">{{.Title}}</a>
</h4>
<p class="f6 flex-auto">{{.Summary}}</p>
<small class="source">
View name-that-alg-4-3.py
[
['Status', 'Payment Date', 'Type', 'Amount', 'Receipt Number'],
['Paid','01/01/2020','A','$1000','1234'],
['Paid','02/01/2020','A','$1000','1235'],
['Paid','03/01/2020','A','$1000','1236']
]
View name-that-alg-4-3.py
[
['Status', 'Payment Date', 'Type', 'Amount', 'Receipt Number'],
['Paid','01/01/2020','A','$1000','1234'],
['Paid','02/01/2020','A','$1000','1235'],
['Paid','03/01/2020','A','$1000','1236']
]
View name-that-alg-4-2.py
[
{
'Status': 'Paid',
'Payment Date': '01/01/2020',
'Type': 'A',
'Amount': '$1000',
'Receipt Number': '1234'
},
...
]