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
var Counter = (function () { | |
function Counter() { | |
var _this = this; | |
this.countUp = function () { | |
_this.count++; | |
alert(_this.count); | |
}; | |
this.countDown = function () { | |
_this.count--; | |
alert(_this.count); |
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
using System; | |
// 角度が30°の場合 | |
var angle = 30; | |
var sin = Math.Sin(angle * (Math.PI / 180)); | |
var cos = Math.Cos(angle * (Math.PI / 180)); | |
var tan = Math.Tan(angle * (Math.PI / 180)); | |
//"Sin:0.5, Cos:0.87, Tan:0.58" ※少数第二位で四捨五入 | |
Console.WriteLine("Sin:{0}, Cos:{1}, Tan:{2}", sin, cos, tan); |
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
$(function () { | |
var indexedDB = window.indexedDB; | |
var db = null; | |
var request = indexedDB.open('library', 1); | |
request.onupgradeneeded = function (event) { | |
db = event.target.result; | |
var store = db.createObjectStore('books', { keyPath: 'isbn' }); | |
store.createIndex('index', 'isbn', false); | |
}; | |
request.onsuccess = function (event) { |
NewerOlder