classDiagram
namespace domain-runtime-DeliveredProduct {
class DeliveredProduct["DeliveredProduct
納入商品"] {
DeliveredProductId 納入商品ID
OfferSpec.OfferSpecId オファー仕様ID
User.UserId ユーザID
ServiceContract.ServiceContractId サービス契約ID
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
class ScreenGamePad { | |
UP = false; | |
DOWN = false; | |
RIGHT = false; | |
LEFT = false; | |
A = false; | |
B = false; | |
press = { | |
UP: false, | |
DOWN: false, |
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
class ChangeEventChecker { | |
add(name, checkerFunc) { | |
this[name] = {checkerFunc, lastValue:undefined, isChanged:false}; | |
return this; | |
} | |
check() { | |
Object.entries(this).forEach((e) => { | |
const [k, v] = e; | |
const value = v.checkerFunc(); |
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
class GamePad { | |
UP = false; | |
DOWN = false; | |
RIGHT = false; | |
LEFT = false; | |
A = false; | |
B = false; | |
press = { | |
UP: false, | |
DOWN: false, |
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
class GameObjects { | |
children = new Set(); | |
constructor() { | |
this.children = new Set(); | |
} | |
add(child) { | |
this.children.add(child); | |
} | |
remove(child) { |
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 text = "name=naosim,point=10,state=4" | |
const result = text.split(",").reduce((memo, v) => { | |
const [key, value] = v.split("="); | |
return {...memo, [key]:value}; | |
}, {}) | |
console.log(result); | |
const result2 = Object.fromEntries(text.split(",").map(v => v.split("="))) | |
console.log(result2); |
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
class CheatCommand { | |
cheatCommandDef = "uuddlrlrba" // コナミコマンド | |
initKeys; | |
inputKeys; | |
isCheatCompleted = false; | |
init() { | |
this.initKeys = this.cheatCommandDef.split("").map(v => "-").join(""); | |
this.inputKeys = this.initKeys; | |
} | |
update() { |
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
// https://microstudio.dev/documentation/Matter/ | |
var engine; | |
var ground; | |
var box; | |
init = function() { | |
engine = Matter.Engine.create(); | |
engine.world.gravity.y = -1; | |
ground = Matter.Bodies.rectangle(0, -50, 200, 10, {isStatic: true}); | |
Matter.Composite.add(engine.world, ground); | |
box = Matter.Bodies.rectangle(0, 50, 20, 20); |
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
// chromeを起動する | |
// "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir=remote-profile | |
import puppeteer from 'puppeteer'; | |
// Or import puppeteer from 'puppeteer-core'; | |
// Launch the browser and open a new blank page | |
// const browser = await puppeteer.launch(); | |
const browser = await puppeteer.connect({ | |
browserURL: 'http://127.0.0.1:9222', |
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
import { IncomingWebhookClient } from 'https://unpkg.com/@slack/webhook@latest/dist/cjs/index.js'; | |
import fs from 'fs'; | |
const url = 'YOUR_SLACK_WEBHOOK_URL'; // Incoming Webhook URL | |
const channel = '#general'; // 送信先チャンネル | |
const message = '画像を送信します'; // メッセージ | |
const filePath = 'image.jpg'; // 送信する画像ファイルのパス | |
(async () => { |
NewerOlder