Skip to content

Instantly share code, notes, and snippets.

View idoushiki's full-sized avatar

Idoushiki idoushiki

  • Japan
View GitHub Profile
@idoushiki
idoushiki / gazouhaiti.html
Last active April 17, 2023 03:13
画像を配置するjsコード
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<input type="button" class="button"id="btn1" value="消す" onclick="clc();">
<canvas id="c"width="600"height="600">
fp=open("words.txt","r")
msg = fp.read().lower()
counter = {}
for c in msg:
if not c in counter:
counter[c] = 1
amount=0
def bread(menu,am):
global amount
amount=amount+am
msg=menu+str(amount)
print(msg)
bread("greentea",20)
class Bread:
def __init__(self,menu="cheese "):
self.menu=menu
self.amount=0
def br(self,g):
self.amount+=g
msg=self.menu+str(self.amount)
print(msg)
<html>
<script>
max=6;
for(p=1;p<=max;p++){
for(h=1;h<=max;h++){
for(a=1;a<=max;a++){
for(b=1;b<=max;b++){
<?php
require_once("phpQuery-onefile.php"); //phpQuery-onefile.phpのファイルを配置した場所を指定する。
$html=file_get_contents("http://idoushiki.hatenablog.com"); //スクレイピングしたいサイトのURLを指定する。
echo phpQuery::newDocument($html)->find("body")->text();//
?>
@idoushiki
idoushiki / gazo.html
Last active January 3, 2018 01:58
画像が切り替わる何か
<html>
<head>
<script src="anime.js"></script>
<script>
var animation=new ImageLoop("loop",["a.png","b.png","c.png","d.png","e.png","f.png","g.png"]);
animation.start();
</script>
</head>
import math
from decimal import *
#桁数
keta=1000
N = 2*math.ceil(math.log2(keta))
getcontext().prec = keta
@idoushiki
idoushiki / pi.py
Last active December 7, 2017 10:27
import math
from decimal import *
import numpy as np
def getp(prec=1000, v=True):
prec = prec+2
@idoushiki
idoushiki / Cookie.js
Last active December 5, 2017 10:41
本、参考