This file contains 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
console.log(123); | |
let i = 0; | |
/*setInterval(() => { | |
analogWrite(D2, i, {freq: 50}); | |
console.log(i); | |
i+=0.1; | |
if (i > 1) i = 0; | |
}, 500);*/ |
This file contains 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
digitalPulse(LED1, true, 200); | |
I2C1.setup({sda: D12, scl: D11}); | |
const acc = require("LIS3DH").connectI2C(I2C1); | |
function ypl(a) { | |
const x = a.x; | |
const y = a.y; | |
const z = a.z; | |
This file contains 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 2022 The Chromium Authors | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
#include "media/gpu/chromeos/gl_image_processor_backend.h" | |
#include "base/functional/callback_forward.h" | |
#include "base/metrics/histogram_macros.h" | |
#include "base/stl_util.h" | |
#include "base/synchronization/waitable_event.h" |
This file contains 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
<body style="padding:0;margin:0"> | |
<div> | |
<video id="a" src="red.mp4" | |
style="height:100vh" autoplay></video> | |
<video id="b" src="gron.mp4" | |
style="height:100vh;display:none"></video> | |
</div> | |
<script> | |
const v1 = document.querySelector('#a'); | |
const v2 = document.querySelector('#b'); |
This file contains 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
<video src="red.mp4" autoplay loop /> |
This file contains 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
<div> | |
<video id="a" src="red.mp4" style="width:300px" autoplay></video> | |
<video id="b" src="gron.mp4" style="width:300px"></video> | |
</div> | |
<button id="btn">play</button> | |
<script> | |
const v1 = document.querySelector('#a'); | |
const v2 = document.querySelector('#b'); | |
document.querySelector('#btn').onclick = () => v1.play(); |
This file contains 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
<#PSScriptInfo | |
.VERSION 1.3 | |
.GUID ebf446a3-3362-4774-83c0-b7299410b63f | |
.AUTHOR Michael Niehaus | |
.COMPANYNAME Microsoft | |
This file contains 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
#!/bin/sh | |
# === BASIC SETUP === | |
# installing homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew tap caskroom/cask # enable installing osx software via brew | |
brew tap caskroom/versions # enable versions (to install older jdk, not sure if necessary) | |
brew tap homebrew/cask-fonts # enable font installing |
This file contains 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
export default class BtnGroup extends React.Component { | |
state = { | |
active: null | |
}; | |
onClick = (id) => { | |
this.setState({ active: id }); | |
} | |
render() { |
This file contains 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
const readFileAsync = file => new Promise((resolve, reject) => { | |
fs.readFile(file, (err, data) => err ? reject(err) : resolve(data)); | |
}); | |
const records = async (req, res) => { | |
await readFileAsync('phonebook.txt'); | |
const count = readBook.toString().split('\n').length - 1; | |
const str = `Welcome to The Phonebook\nRecords count: ${count}`; | |
res.write(str); | |
}; |
NewerOlder