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
public class Permutations { | |
public static <T> Stream<Stream<T>> of(final List<T> items) { | |
return IntStream.range(0, factorial(items.size())).mapToObj(i -> permutation(i, items).stream()); | |
} | |
private static int factorial(final int num) { | |
return IntStream.rangeClosed(2, num).reduce(1, (x, y) -> x * y); | |
} |
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 System; | |
using MonoTouch.UIKit; | |
using MonoTouch.SceneKit; | |
using MonoTouch.Foundation; | |
namespace HelloSceneKit | |
{ | |
public class HelloSceneKitController : UIViewController | |
{ | |
SCNView sceneView; |
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
/* jQuery Tinier Pub/Sub - v0.9 - 2013-02-11 | |
* original by http://benalman.com/ 10/27/2011 | |
* Original Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ | |
(function($) { | |
// "topic" holder | |
var o = $({}); // use $('<b>') with Zepto, as it doesn't like {} ? | |
// attach each alias method |