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
#pragma once | |
#include "ofEvents.h" | |
#include <functional> | |
class Timer | |
{ | |
public: | |
using Callback = std::function<bool()>; | |
virtual ~Timer() { |
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
namespace ImGui | |
{ | |
static bool SelectFile(const std::string &path, std::string &selected, const std::vector<std::string> &ext={}) { | |
bool ret = false; | |
if(ofFile(path).isDirectory()) { | |
if(TreeNode(ofFilePath::getBaseName(path).c_str())) { | |
ofDirectory dir; | |
if(!ext.empty()) { | |
dir.allowExt(""); | |
for(auto &&e : ext) { |
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
#include "ofApp.h" | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
int sample_rate = 44100; | |
int num_channels = 2; | |
int num_buffers = 1; | |
int num_samples = 512; | |
ofSoundStreamSettings sss; |
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
#include "Keyboard.h" | |
static const String A_HISTORY_WE_WANT_TO_SHARE_WITH_YOU = "https://photos.google.com/share/AF1QipOiNoiT3l6e1My0i1Tm5YYT_2535g0d4lw9gWmYTNn4l627UD1kwlCy__PLY1R7MQ?key=bTdWaGk2VG84WWRMdTcxelRpNnAzSXBRSmd5ZGNn"; | |
boolean pressed = false; | |
const String yourname = "BACKSPACE Productions Inc."; | |
int counter = yourname.length(); | |
void setup() { | |
Keyboard.begin(); |
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
#pragma once | |
#include "json.hpp" | |
namespace json { | |
static nlohmann::json merge(nlohmann::json src, const nlohmann::json &append, bool overwrite_leaf, int depth=-1) | |
{ | |
if(!src.is_object() || !append.is_object()) { | |
if(overwrite_leaf) { | |
return append; |
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
// Testate.h | |
// Copyright 2020 nariakiiwatani | |
// 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. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF |
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
#!/bin/bash | |
set -e | |
echoDots(){ | |
sleep 0.1 # Waiting for a brief period first, allowing jobs returning immediatly to finish | |
while isRunning $1; do | |
for i in $(seq 1 10); do | |
echo -ne . |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>limit.maxfiles</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>launchctl</string> | |
<string>limit</string> |
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
<html lang="ja"> | |
<head> | |
<title>othello</title> | |
<style type="text/css"> | |
.cell { | |
margin: 0 -1px -1px 0; | |
position: relative; | |
display: inline-block; | |
width:30px; | |
height:30px; |
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
#pragma once | |
#include <functional> | |
class Once | |
{ | |
public: | |
using Work = std::function<void()>; | |
Once(){} | |
Once(Work work) { |