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
/*! | |
* Given a set of numeric values, returns a set of integer percents | |
* | |
* Algorithm defined by Rahul Narain, translated to JavaScript. | |
* http://math.stackexchange.com/questions/183476/rounding-of-complementary-percentages#186225 | |
* | |
* > round_percents([20.5, 79.5]) | |
* [21, 79] | |
* > round_percents([24.8, 25.2, 0.5, 49.5]) | |
* [25, 25, 1, 49] |
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
Then for each row, I should see some "FOOD" | |
| FOOD | | |
| Cheese | | |
| Carob Chips | |
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
Then the page should display either | |
| Cat | | |
| Dog | | |
| Mouse | |
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
diff --git a/reducers/entities.js b/reducers/entities.js | |
index 3cf689d..764be35 100644 | |
--- a/reducers/entities.js | |
+++ b/reducers/entities.js | |
@@ -87,7 +87,10 @@ function storeVideos(state, { payload }) { | |
} | |
const normalShow = normalizeShow(payload, getRelationship(payload, video, 'show')); | |
newState[normalVideo.id] = normalVideo; | |
- newState[normalShow.id] = normalShow; | |
+ // VideoList may have stale Show entities, do not overwrite |
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
diff --git a/applications/responsive/ShowPage/ShowPage.js b/applications/responsive/ShowPage/ShowPage.js | |
index af588ae..0adbee3 100644 | |
--- a/applications/responsive/ShowPage/ShowPage.js | |
+++ b/applications/responsive/ShowPage/ShowPage.js | |
@@ -13,7 +13,7 @@ import recordPageView from '../../../lib/recordPageView'; | |
import {isClassic, isTonightShowClassic} from '../../../lib/getShowType'; | |
import derivativeSrc from '../../../lib/derivativeSrc'; | |
import derivativeSrcSet from '../../../lib/derivativeSrcSet'; | |
-import {getRelationship} from '../../../utils/jsonAPIHelpers'; | |
+import {getRelationship, getRelationships, getDeepRelationship} from '../../../utils/jsonAPIHelpers'; |
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
# Font Squirrel Font-face Generator Configuration File | |
# Upload this file to the generator to recreate the settings | |
# you used to create these fonts. | |
{"mode":"expert","formats":["ttf","woff","eot","svg"],"tt_instructor":"default","options_subset":"advanced","subset_custom":"","subset_custom_range":"f000-f073,f200-f273","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0","rememberme":"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
$(document).ready(function() { | |
var data = $('body').data(); | |
$("#thing-1").load(data.path + "resource-1"); | |
$("#thing-2").load(data.path + "resource-2"); | |
}); |
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 onTap (el, callback) { | |
var allowClick = true; | |
var allowTouch = false; | |
$(el).on({ | |
touchstart: function () { | |
allowClick = false; | |
allowTouch = true; | |
}, | |
touchcancel: function () { | |
allowTouch = false; |
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
#urldiff http://www.google.com http://www.yahoo.com | |
function urldiff () { | |
local file | |
local files="" | |
for url in "$@" | |
do | |
file="urldiff-"${url//[^a-zA-Z0-9]/} | |
files=$files" "$file | |
echo "downloading $url > $file" | |
lwp-request -m 'GET' $url > $file |
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
<style>html,body,textarea{margin:0;padding:0;border:0;width:100%;height:100%}</style> | |
<textarea></textarea> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.min.js"></script> |
NewerOlder