Skip to content

Instantly share code, notes, and snippets.

View jeffputz's full-sized avatar
💭
Why does Github need a status? Married? Platinum? Likes long walks on the beach?

Jeff Putz jeffputz

💭
Why does Github need a status? Married? Platinum? Likes long walks on the beach?
View GitHub Profile
@jeffputz
jeffputz / ArrayTraverse.cs
Last active January 2, 2022 20:02
Array traversal: for vs. LINQ
using System;
using System.Diagnostics;
int[,] a = {
{1,2,3,4,5,6,7,8},
{4,5,6,7,8,9,10,1},
{7,8,9,10,11,12,13,14},
{10,1,2,3,4,5,6,7},
{1,2,3,4,5,6,7,8},
{4,5,6,7,8,9,10,1},
@jeffputz
jeffputz / gist:85ce0e74db4d159b60533997ff963e59
Last active November 11, 2020 03:59
How Blazor interop does work (when you return the promises)
window.IsUrlCached = (url) => {
return caches.open(CACHE_NAME)
.then((cache) => {
return cache.match(url)
.then((response) => {
if (typeof response !== 'undefined')
return true;
else
return false;
});