-
Can I Use
HTML/JS/CSSの各機能がどのブラウザで使えるかを判定するサイト -
CSSセレクタのおさらい
「+」とか「>」とか普段あんまり使わないものの説明 -
HTML5まとめ
わりと良く使いそうなもの
This file contains 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 Enum(values) { | |
for (var i=0; i<values.length; i++) { | |
var v = values[i]; | |
this[v.name] = v; | |
} | |
$.extend(this, { | |
"fromCode" : function(v) { | |
for (var i=0; i<values.length; i++) { | |
if (values[i].code == v) return values[i]; | |
} |
This file contains 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
@(map: Map[String, String]) | |
if (typeof(flect) == "undefined") flect = {}; | |
if (typeof(flect.app) == "undefined") flect.app = {}; | |
if (typeof(flect.app.XXXX) == "undefined") flect.app.XXXX = {}; | |
flect.app.XXXX.MSG = {@map.map{ case(key, value) => | |
"@key" : "@value",} | |
"format" : function(fmt) { | |
for (i = 1; i < arguments.length; i++) { | |
var reg = new RegExp("\\{" + (i - 1) + "\\}", "g") |
This file contains 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
if (typeof(flect) == "undefined") flect = {}; | |
if (typeof(flect.app) == "undefined") flect.app = {}; | |
if (typeof(flect.app.XXXX) == "undefined") flect.app.XXXX = {}; | |
flect.app.XXXX.MSG = { | |
#{list items:map.entrySet(), as:'entry' } | |
"${entry.getKey()}" : "${entry.getValue()}",#{/list} | |
"format" : function(fmt) { | |
for (i = 1; i < arguments.length; i++) { | |
var reg = new RegExp("\\{" + (i - 1) + "\\}", "g") |
This file contains 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 strToDate(str) { | |
var y = parseInt(str.substring(0, 4)), | |
m = parseInt(str.substring(5, 7)), | |
d = parseInt(str.substring(8, 10)), | |
h = parseInt(str.substring(11, 13)), | |
mi = parseInt(str.substring(14, 16)), | |
s = parseInt(str.substring(17, 19)), | |
ms = 0; | |
return new Date(y, m - 1, d, h, mi, s, ms); | |
} |
This file contains 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
package models; | |
import play.libs.WS; | |
import play.libs.WS.HttpResponse; | |
import play.libs.WS.WSRequest; | |
import com.google.gson.Gson; | |
import java.io.IOException; | |
import java.io.Serializable; | |
public class HerokuApi implements Serializable { |
This file contains 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
WebSocket負荷テストの結果 | |
---- | |
Room2, Client1 = 10000 | |
Room2, Client2 = 10000 | |
Room3, Client1 = 3600 | |
Room3, Client2 = 3600 | |
Room4, Client1 = 5500 | |
Room4, Client2 = 5500 | |
Room5, Client1 = 10000 | |
Room5, Client2 = 10000 |
This file contains 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
package herokuSamples.web.mail; | |
import java.util.List; | |
import java.util.ArrayList; | |
import java.util.Map; | |
import java.util.HashMap; | |
import java.io.UnsupportedEncodingException; | |
import java.io.InputStream; | |
import java.io.IOException; |
This file contains 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
angular.module('directive') | |
.directive("spMaxlength", function() { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: function(scope, elm, attrs, ctrl) { | |
var max = parseInt(attrs.spMaxlength || 0, 10); | |
ctrl.$parsers.unshift(function(viewValue) { | |
var len = viewValue ? viewValue.length - (viewValue.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[]).length : 0; | |
if (len <= max) { |
This file contains 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
module.exports = function (grunt) { | |
'use strict'; | |
function loadDependencies(deps) { | |
if (deps) { | |
for (var key in deps) { | |
if (key.indexOf("grunt-") == 0) { | |
grunt.loadNpmTasks(key); | |
} | |
} |
OlderNewer