Skip to content

Instantly share code, notes, and snippets.

@wataru218
wataru218 / index.html
Created June 4, 2013 16:07
A CodePen by iw3. WebRTCのgetUserMediaでビデオ出力 - カメラとマイクへのアクセスを許可するとブラウザに表示されます。 - サポート状況 Google Chrome 27、Firefox 21で動作しました。 Opera 12では映像のみ出力され、音声は出力されませんでした。 Internet Explorer、Safariでは動作しませんでした。
<video id="video" autoplay controls></video>
@wataru218
wataru218 / index.html
Created June 4, 2013 16:28
A CodePen by iw3. 閏年(うるうどし)を調べる - 入力した年が閏年か表示します。 参考: http://ja.wikipedia.org/wiki/閏年 1. 西暦年が4で割り切れる年は閏年 2. ただし、西暦年が100で割り切れる年は平年 3. ただし、西暦年が400で割り切れる年は閏年
<input type="text" id="year" value="2016">年
<input type="button" value="実行" onclick="execute()">
@wataru218
wataru218 / index.html
Created June 4, 2013 16:39
A CodePen by iw3. FullCalendarの日本語化やオプションいろいろ
<div id='calendar'></div>
@wataru218
wataru218 / index.html
Created June 27, 2013 10:43
A CodePen by iw3. jQuery UI Dialog + validate
<input id="openButton" type="button" value="Open" />
<div id="dialog">
<form id="form">
<input type="text" id="name" name="name" />
<input type="text" id="pinCode" name="pinCode" />
</form>
</div>
@wataru218
wataru218 / gist:3fb0ce3fa4aa83ae937f
Created June 19, 2014 23:59
jQueryのbrowserでIE11を対応する
$(function() {
if (!$.browser.msie) {
// IE11は認識されないため、下記の対応を行います。
var ua = navigator.userAgent.toLowerCase();
var rmsie = /(trident)(?:.*? rv:([\w.]+))/;
var match = ua.indexOf('compatible') < 0 && rmsie.exec(ua) || [];
if (match[1] === 'trident') {
$.browser['msie'] = true;
$.browser.version = match[2] || '0';
}
public class ObjectUtils {
public static boolean equalsAny(Object obj, Object... others) {
if (others != null) {
for (Object other : others) {
if (Objects.equals(obj, other)) {
return true;
}
}
}