This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static ConcurrentDictionary<string, string> dict = new ConcurrentDictionary<string, string>(); | |
static void Main(string[] args) | |
{ | |
var t1 = new Thread(() => | |
{ | |
dict.GetOrAdd("key1", x => | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nanoFramework Firmware Flasher v1.2.0+d5d164cfbc | |
Copyright (C) 2019 nanoFramework project contributors | |
Connected to ESP32 ESP32D0WDQ6 (revision 1) with MAC address 30AEA42503B8 | |
features WiFi, BT, Dual Core, Coding Scheme None | |
Flash information: manufacturer 0x200 device 0x16406 size 4MB | |
Trying to find ESP32_WROOM_32 in developement repository...OK | |
Downloading firmware package...OK | |
Updating to 1.4.0-preview.87 | |
Erasing flash...OK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
namespace NFApp1 | |
{ | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine("Hello world!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nanoff --update --target ESP32_WROOM_32 --serialport COM3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const express = require('express'); | |
const express_graphql = require('express-graphql'); | |
const { GraphQLSchema, GraphQLObjectType, GraphQLString } = require('graphql'); | |
// GraphQL schema | |
const songType = new GraphQLObjectType({ | |
name: 'SongType', | |
fields: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jump = () => { | |
const space = { bubbles: true, key: 'Space', keyCode: 32, charCode: 0 }; | |
document.activeElement.dispatchEvent(new window.KeyboardEvent('keydown', space)); | |
document.activeElement.dispatchEvent(new window.KeyboardEvent('keyup', space)); | |
}; | |
ctx = document.getElementsByClassName('runner-canvas')[0].getContext('2d'); | |
detect = () => { | |
const data = ctx.getImageData(105, 125, 1, 1).data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2016-2020 Wouter Huysentruit | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
* files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the | |
* Software is furnished to do so, subject to the following conditions: | |
* | |
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Caution! Be sure you understand the caveats before publishing an application with | |
// offline support. See https://aka.ms/blazor-offline-considerations | |
self.importScripts('./service-worker-assets.js'); | |
self.addEventListener('install', event => event.waitUntil(onInstall(event))); | |
self.addEventListener('activate', event => event.waitUntil(onActivate(event))); | |
self.addEventListener('fetch', event => event.respondWith(onFetch(event))); | |
const cacheNamePrefix = 'offline-cache-'; | |
const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.updateAvailable = new Promise((resolve, reject) => { | |
if (!('serviceWorker' in navigator)) { | |
const errorMessage = `This browser doesn't support service workers`; | |
console.error(errorMessage); | |
reject(errorMessage); | |
return; | |
} | |
navigator.serviceWorker.register('/service-worker.js') | |
.then(registration => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.floating-update-button { | |
position: fixed; | |
right: 2rem; | |
bottom: 2rem; | |
padding: 1rem 1.5rem; | |
animation: fadein 2s ease-out; | |
} |
OlderNewer