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
extension UIImage { | |
class func imageByCombiningImage(firstImage: UIImage, withImage secondImage: UIImage) -> UIImage { | |
let newImageWidth = max(firstImage.size.width, secondImage.size.width ) | |
let newImageHeight = max(firstImage.size.height, secondImage.size.height) | |
let newImageSize = CGSize(width : newImageWidth, height: newImageHeight) | |
UIGraphicsBeginImageContextWithOptions(newImageSize, false, UIScreen.mainScreen().scale) |
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> | |
<body> | |
<video width="320" height="240" controls autoplay loop> | |
<source src="movie.mp4" type="video/mp4"> | |
Your browser does not support the video tag. | |
</video> | |
</body> |
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 * as moment from 'moment' | |
type DateMlMeasuremnet = {dateString: string, date: moment.Moment, ml: number} | |
type DailyMlIntakeSummary = { [key: string]: number } | |
const absDate = (date: moment.Moment): moment.Moment => { | |
return (moment(date).set({hour: 0, minute: 0, second: 0, millisecond: 0})) | |
} |