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 React from 'react'; | |
import ReactHtmlParser from 'react-html-parser'; | |
import marked from 'marked'; | |
import _ from 'lodash'; | |
import withPrefix from './withPrefix'; | |
const ShortCodes = { | |
figure: function(attrs) { |
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
/** | |
* Like Promise.all(), this method resolves if all promises returned by invoking the "callback" are resolved, or rejects | |
* if at least one of these promises is rejected. This method ensures that only "poolSize" number of promises are | |
* executed at the same time. The "total" parameter specifies the number of total promises that need to be executed, | |
* therefore, the "callback" will be invoked "total" number of times. The "callback" is invoked with a single "index" | |
* parameter specifying the index of the invocation. | |
* | |
* @example | |
* let items = [...] |
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
const _ = require('lodash'); | |
module.exports = { | |
flattenData | |
}; | |
/** | |
* This function flattens objects by converting them into a flat array of objects having four fields: | |
* - "key": the path of the field in the original object | |
* - "type": the type of the field 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
- (void)viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
[[NSNotificationCenter defaultCenter] | |
addObserver:self | |
selector:@selector(keyboardWillChangeFrame:) | |
name:UIKeyboardWillChangeFrameNotification object:nil]; | |
} | |
- (void)viewDidDisappear:(BOOL)animated { | |
[super viewDidDisappear:animated]; |
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
- (void)viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
[[NSNotificationCenter defaultCenter] | |
addObserver:self selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillShowNotification object:nil]; | |
[[NSNotificationCenter defaultCenter] | |
addObserver:self selector:@selector(keyboardWillHide:) | |
name:UIKeyboardWillHideNotification object:nil]; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="http://fonts.googleapis.com/css?family=Skranji" rel="stylesheet" type="text/css"/> | |
</head> | |
<body> | |
<div id="wrapper" style="position:absolute; overflow:hidden;"> | |
<div id="content" style="position:relative; white-space: nowrap; font-family: serif;"> | |
<div id="innerWrapper" style="position:absolute; width:100%; height:100%; overflow:hidden;"> | |
<div id="innerContent"></div> |