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
'use strict'; | |
describe('Karma reporter', function () { | |
var $rootScope; | |
var $q; | |
beforeEach(inject(function (_$rootScope_, _$q_) { | |
$rootScope = _$rootScope_; | |
$q = _$q_; |
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 boilerplate.entity; | |
import lombok.Data; | |
import org.seasar.doma.Entity; | |
import org.seasar.doma.GeneratedValue; | |
import org.seasar.doma.GenerationType; | |
import org.seasar.doma.Id; | |
import org.seasar.doma.SequenceGenerator; | |
import org.seasar.doma.Version; |
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
using MvcApplication3.Controllers; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Http; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using System.Web.Routing; |
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
infix operator |> { associativity left precedence 80 } | |
func |> <T, U>(value: T, function: (T -> U)) -> U { | |
return function(value) | |
} | |
func increment(x: Int) -> Int { | |
return x + 1 | |
} |
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
let add = fun x y -> | |
x + y | |
open Checked | |
let addWithCheck = fun x y -> | |
x + y | |
open Unchecked |
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
# Description: | |
# Follow-up | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
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
// http://stackoverflow.com/a/18654421 | |
// を参考にしている | |
// | |
// このコード片を以下のアプリに追加して動作確認 | |
// https://github.com/angular/angular-phonecat | |
phonecatApp.factory('MyInterceptor', | |
function ($q, $rootScope, $injector) { | |
// リトライの上限回数 | |
var retryMaxCount = 2; | |
return function (promise) { |
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
// 構造的部分型 = Structural Subtyping | |
// 構造的部分型 (インタフェース) | |
module withInterface { | |
interface IHello { | |
name: string; | |
greeting(word: string): string; | |
} | |
function doGreeting(hello: IHello) { |
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 example; | |
import static java.util.stream.Collectors.groupingBy; | |
import static java.util.stream.Collectors.mapping; | |
import static java.util.stream.Collectors.toList; | |
import static org.junit.Assert.assertEquals; | |
import java.util.Arrays; | |
import java.util.LinkedHashMap; | |
import java.util.List; |
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 example; | |
import org.apache.commons.beanutils.expression.DefaultResolver; | |
public class SafeResolver extends DefaultResolver { | |
@Override | |
public String next(String expression) { | |
String property = super.next(expression); | |
if ("class".equalsIgnoreCase(property)) { |