Skip to content

Instantly share code, notes, and snippets.

@WakkyFree
WakkyFree / 32bit_assembler.py
Created January 26, 2022 13:04
32bir assembler for the assembly language defined in https://www.coronasha.co.jp/np/isbn/9784339029062/
# This is the assembler for the assembly language defined in https://www.coronasha.co.jp/np/isbn/9784339029062/
import sys
def p_b(digits, num):
num_int = int(num)
if(num_int > 0):
print(format(num_int, 'b').zfill(digits), end = "", file=fw)
else:
print(format(num_int & 0xffff, 'b').zfill(digits), end = "", file=fw)
@WakkyFree
WakkyFree / spreadsheet_read_test.gs
Created July 21, 2021 15:48
google apps script to read spreadsheet
function readSheet(){
var data = openSheet().getDataRange().getValues();
return data;
}
function doGet() {
const htmlOutput = HtmlService.createTemplateFromFile('ss_open_test').evaluate();
htmlOutput.setTitle("スプレッドシート読み込みテスト");
return htmlOutput;
}
@WakkyFree
WakkyFree / spreadsheet_read_test.html
Created July 21, 2021 15:42
html to read spreadsheet
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<h1>スプレッドシート読み込みテスト</h1>
<p>スプレッドシートから読み込んだ内容を表示↓</p>
<?
var data = readSheet();
@WakkyFree
WakkyFree / spreadsheet_write_test.html
Created July 21, 2021 14:29
html to write spreadsheets by google apps script
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script type="text/javascript">
function sendText(){
google.script.run
.withSuccessHandler(inform())
.writeSheet(document.forms['formText'].elements['message'].value);
}
@WakkyFree
WakkyFree / spreadsheet_write_test.gs
Last active July 21, 2021 15:46
google apps script to write spreadsheet
function writeSheet(e) {
var ss = openSheet();
ss.appendRow([e]);
}
function doGet() {
const htmlOutput = HtmlService.createTemplateFromFile('ss_open_test').evaluate();
htmlOutput.setTitle("スプレッドシート書き込みテスト");
return htmlOutput;
}
@WakkyFree
WakkyFree / BearWalk.cs
Created April 17, 2021 04:51
control bear walk and stop
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BearWalk : MonoBehaviour
{
private Animator bearAnm;
// Start is called before the first frame update
void Start()
{
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
タイトルを表示させるテスト。
</body>
</html>
function doGet() {
const htmlOutput = HtmlService.createTemplateFromFile('title_test').evaluate();
htmlOutput.setTitle('タイトルのテスト');
return htmlOutput;
}
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script type="text/javascript">
function update() {
google.script.run
.withSuccessHandler(result).getScriptUrl();
function result(url){
window.open(url, '_top')
function doGet() {
const htmlOutput = HtmlService.createTemplateFromFile('reload_test').evaluate();
return htmlOutput;
}
function getScriptUrl() {
var url = ScriptApp.getService().getUrl();
return url;
}