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
import java.util.OptionalInt; | |
import java.util.stream.IntStream; | |
public class FilterDoesNotConsumeWholeStream { | |
public static void main(String... args) { | |
final OptionalInt first = IntStream.range(1, 10).map(i -> { | |
if (i > 5) { | |
throw new IllegalStateException(); | |
} |
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
<html> | |
<head> | |
<title>函数プログラミングのつどい2011/2012、函数型なんたらのつどい2014の人数遷移</title> | |
<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['sankey']}]}"></script> | |
<script type="text/javascript"> | |
google.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'From'); | |
data.addColumn('string', 'To'); |
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
dico_leque | |
gab_km | |
giantneco | |
golden_lucky | |
halcat0x15a | |
mzp | |
NaOHaq | |
notogawa | |
nsyee | |
omanuke |
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
/** | |
* @author <a href="mailto:mogami@exoego.net">MOGAMI Shu</a> | |
*/ | |
(function(namespace){ | |
/** @private */ | |
var _map = {}; | |
// assign static function to monday | |
monday["addAll"] = addAll; |
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 net.exoego.doukaku; | |
import java.util.*; | |
public class Poker { | |
private static enum Suit { | |
S, H, D, C; | |
static Suit from(final String value) { | |
return Suit.valueOf(Suit.class, value); |
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
final List<Integer> evenList = range(1, 100) | |
.asParallel() | |
.map((Func1) (arg) -> { | |
System.out.print(arg + " "); | |
return arg * 2; | |
}).toList(); |
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
// ガントチャートを2ヶ月前開始で表示 | |
// Shows gannt view starting 2 months ago | |
$(document).ready(function(){ | |
// configurable | |
var monthsAgo = 2; | |
var monthsRange = 6; | |
// ----- | |
var now = new Date(); | |
var thisMonth = now.getMonth() + 1; | |
var thisYear = now.getFullYear(); |
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 net.exoego; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import net.exoego.queen.Sequence; | |
import net.exoego.util.function.Func1; | |
import net.exoego.util.function.Func2; | |
import net.exoego.util.function.Funcs; |
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
final int m = 1; | |
List<Integer> answer = range(9, 0).except(m).permutations(7).first(new Predicate<List<Integer>>() { | |
@Override | |
public boolean evaluate(final List<Integer> perm) { | |
int s = perm.get(0); | |
int e = perm.get(1); | |
int n = perm.get(2); | |
int d = perm.get(3); | |
int o = perm.get(4); | |
int r = perm.get(5); |
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
@Controller | |
public class SearchController { | |
@Autowired | |
private SearchService searchService; | |
@RequestMapping("/search") | |
public String search( | |
@ModelAttribute("searchForm") | |
SearchForm searchForm, | |
Model model) { |
OlderNewer