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
List<String> findUniqueCodes(List<String> a, List<String> b){ | |
var result = <String>[]; | |
var setA = <String>{}; | |
setA.addAll(a); | |
var setB = <String>{}; | |
setB.addAll(b); | |
//var common = setA.intersection(setB); |
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
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script> | |
// http://mikemurko.com/general/jquery-keycode-cheatsheet/ | |
var speed = 0.8; //transition speed | |
var transition = "push"; //types of transition: instant, fade, swap, push | |
var nextKeys= [39, 40, 34]; | |
var prevKeys= [37, 38, 33]; | |
$(function(){ |
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
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script> | |
//To be included on a header script for Hype | |
function updateSceneFromHash(){ | |
var hash = window.location.hash; | |
var sceneName=hash.replace('#',''); | |
var hypeDocument = HYPE.documents['index']; | |
if(hash.length == 0){ | |
sceneName = hypeDocument.sceneNames()[0]; |
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
//To be included on a header script for Hype | |
//Updates the scene when the hash changes (Does not update on initial hash value) | |
$(window).bind( 'hashchange', function(e) { | |
var hash = window.location.hash; | |
var sceneName=hash.replace('#',''); | |
var hypeDocument = HYPE.documents['index'] | |
hypeDocument.showSceneNamed(sceneName, hypeDocument.kSceneTransitionInstant); | |
}); |
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
//To be added as a Timeline "Run Javascript" action at the very first of the Main timeline (of the first scene). | |
function jumpToParameterScene(hypeDocument, element, event) { | |
var hash = window.location.hash; | |
var sceneName=hash.replace('#',''); | |
hypeDocument.showSceneNamed(sceneName, hypeDocument.kSceneTransitionInstant); | |
} |