Tumgik
#doubledigging
starflethegreat · 8 months
Text
GOOD MORNING shoveldrill/doubledig nation how are we doing!
3 notes · View notes
alohajust · 2 years
Text
Credit card checksum calculator
Tumblr media
#Credit card checksum calculator full#
#Credit card checksum calculator code#
But it's good to recognize as an alternative to the helper-function break-down above.ġ Yes, a more spacious layout improves this a lot! const luhn = (ds) => reduce ((a, b) => a + b, 0) and last is cleaner than its alternative. 1 But sum (.) is definitely cleaner than (.). Perhaps a more spacious layout would help. This one, especially where we inline the conditional expression (ternary) of doubleDig inside another ternary, seems pretty ugly. While the original version is dense, it's also not hard to follow. Those helper functions are useful, and I would almost always prefer to work with such, but each is called in only one place in our main function, which makes it easy to inline them if we want, and we could write a stand-alone version of this doing so: const luhn = (ds) => We finish by taking the modulus base 10, and report whether that value is 0. We total the results using the helper sum and find the last digit using the helper last, convert it into a number and add it to that total. Now we map over the results, doubling the even digits and casting out nines as necessary (using the helper function doubleDig), but keeping the odd digits intact. slice off the now-first element, which we will only need later as the check-digit. reverse the array to make it easier to track even and odd positions without fiddling with the array length. This function works on the array of single-digit numbers supplied, but also on a string of digits, so that luhn ('4539677908016808') is equivalent to luhn ().įirst we ensure we are working with an array of numbers, with.
#Credit card checksum calculator code#
So my problem is, that the algorithm is returning all my arrays as valid, my code is below (arrays provided by codecademy): // All valid credit card numbersĬonst valid1 = Ĭonst valid2 = Ĭonst valid3 = Ĭonst valid4 = Ĭonst valid5 = Ĭonst invalid1 = Ĭonst invalid2 = Ĭonst invalid3 = Ĭonst invalid4 = Ĭonst invalid5 = Ĭonst mystery1 = Ĭonst mystery2 = Ĭonst myster圓 = Ĭonst mystery4 = Ĭonst mystery5 = Ĭonst batch = Īnd my function implementing the algorithm: const validateCred = arr => I don't mean to question Luhn's algorithm but seriously I need some clarification on this.
#Credit card checksum calculator full#
I am currently going through Codecademy's Full Stack Engineer course, up until now I have been perfectly fine with it, discovering new things, working out problems on my own, but this is a serious roadblock in my progression as I just can't seem to identify the problem with this logic.
Tumblr media
0 notes
urbansproutfarms · 7 years
Photo
Tumblr media
Cabbage time #cabbage #doubledigging #organic #claysoils #mulchandclay #plugs #urbanfarming #youngfarmers #growmorefood Join our CSA box program starting in May (at Urban Sprout Farms)
1 note · View note
maledicatdominus · 7 years
Photo
Tumblr media
The photos on the left are of one of the "raised beds" in our backyard. A #raisedbed of thick grass and weeds, to be more accurate. The photo on the right is of the bed that Ben @ten_of_cups_healing and I double dug today. Holy shit #gardening is hard work!! One bed down; 2 more to go - but not today! #firsttimegardener #olympicpeninsula #washington #pawa #garden #intheworks #doubledigging #ihopethisworks!
0 notes
Tumblr media
#dinner 99% from the #garden. #leeks #treecollards and #potatoes I found while #doubledigging I think a #pocketgopher stashed them in a neat clump. The other ingredients are two types of cooking oil, salt, pepper, and a little bit of cumin. #growfood #growsoil #growbiointensive #ecologyaction
0 notes
urbansproutfarms · 7 years
Photo
Tumblr media
Wow! @communitybucket CRUSHEd it today! #doubledigging #planting #tomatoes #weeding #plantingonions #potatoes Thank you! #urbanfarming #urbanfarmingrevolution #permaculture #urbanagriculture #tagafriend (at Urban Sprout Farms)
0 notes
urbansproutfarms · 7 years
Video
Permaculture action day! It's warming up! #urbanfarming #permacultureaction #doubledigging #communityfarming #organicfarming #permaculture #youngfarmers @risingappalachia @permacultureaction
0 notes
timeintogo · 11 years
Text
Gardening
I was having a down couple of days. Until I started in on some gardening.
I double dug a tiny (essentially one meter square) raised bed in my compound, right next to my kitchen. I mixed in a bunch of compost and watered well. It gets a fair bit of shade, so I'm thinking it will be a good spot to try out growing swiss chard and kale. I am also dying for some green beans, so I seeded a couple of those plants, too, even though they prefer direct sun. We'll see if they actually prefer the Togolese direct sun. 
I also started eggplant, cabbage and basil to transplant. I'm using used water sachets, little plastic bags that we use to make tree nurseries, or pepinieres. I tried to mimic the trays we use for transplanting back at Pomykala's. I am appreciating those summers of farm work  - as I find local materials and get inventive to garden. Staking tomato plants that Alex left me? Easy, with some sturdy sticks knocked into the ground with a big rock, then some twine. Pretty much the same as home. No black trays? Cut some holes in the plastic sachets to let water drain, fill with a mix of compost and sand, and call it a day. Watering can? Try a big metal can that once held tomatoes. Puncture a couple holes in the bottom and get on with it.
The eggplant and cabbage will go into some beds I started to prep this afternoon in my actual garden plot, a fenced area in the center of the village. It's only a couple steps from my house, but goats have broken in and eaten Alex's veggies several times before. So I won't trust my swiss chard or kale there, but it'll be fine for cabbage, which needs plenty of space.
We'll see how my American seeds germinate and if they get pollinated!
0 notes