Skip to content

Instantly share code, notes, and snippets.

View Himenon's full-sized avatar
😇
Working from home

K.Himeno Himenon

😇
Working from home
View GitHub Profile
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js' type='text/javascript'>
MathJax.Hub.Config({
HTML: ["input/TeX","output/HTML-CSS"],
TeX: { extensions: ["AMSmath.js","AMSsymbols.js"],
equationNumbers: { autoNumber: "AMS" } },
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true },
let ans: [Int] = [1, 0, 1, 1, 1]
var submit: [Int] = [1, 1, 1, 1, 1]
func check(answer: [Int], submit: [Int]) -> Bool {
for i in 0..<answer.count {
if answer[i] != submit[i]{ return false }
}
return true
}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>TechNS</title>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script>
$(document).ready(function() {
$(".test").on('click', function() {
$(this).attr('id', 'testtest');
@Himenon
Himenon / fetch.js
Last active September 6, 2015 02:39
$(function() {
$(".notification-counter").text('100');
var counter = 0;
function getLatestNotice() {
counter++;
$("title").text('おい' + counter);
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script>
$(function() {
$("h1").css('color', 'red');
});
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.container1, .container2 {
float: left;
width: 500px;
height: 500px;
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.wrapper {
width: 1000px;
}
.container1, .container2 {
$(function() {
// 初めての場合は undefined が代入される
var localCount = localStorage.count;
console.log("localCount = " + localCount);
if (!localCount) {
// undefinedが格納された場合の処理
$("#check").click(function() {
@Himenon
Himenon / diff_for_of
Last active October 3, 2015 21:19
Xcode7.0でoFがヘッダーファイルが見つけられなかあったので、それを修正。
diff --git a/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig
index 1c3d9ac..27e405a 100644
--- a/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig
+++ b/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig
@@ -9,6 +9,7 @@ HEADER_TESS2 = "$(OF_PATH)/libs/tess2/include"
HEADER_CAIRO = "$(OF_PATH)/libs/cairo/include/cairo"
HEADER_RTAUDIO = "$(OF_PATH)/libs/rtAudio/include"
HEADER_GLFW = "$(OF_PATH)/libs/glfw/include"
+HEADER_SSL = "$(OF_PATH)/libs/openssl/include
#from sympy import *
import numpy as np
import pylab as plt
class quantumEnergy:
def __init__(self):
self.electron_mass = 9.1E-31 # kg
self.elem_charge = - 1.6E-19 # eV
self.pi = np.pi