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 processPoints (firstPoint, secondPoint, thirdPoint, sessionPoints, width, height, radius = width * 0.05) { | |
const initialPoints = [firstPoint, secondPoint, thirdPoint]; | |
let transformedPoints = sessionPoints.concat(initialPoints); | |
// Traslate all points moving the secondPoint to (0, 0) on the plane | |
transformedPoints = transformedPoints.map((p) => { | |
return { | |
x: p.x - secondPoint.x, | |
y: p.y - secondPoint.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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> Heatmap page </title> | |
<script type="text/javascript" src="heatmap.min.js"></script> | |
</head> | |
<body> | |
<div class="heatmap" style="height: 250px; width: 100%;" /> | |
</body> | |
</html> |
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, { Component } from 'react'; | |
import { Platform, View, WebView } from 'react-native'; | |
import HeatmapUtils from '../../utils/HeatmapUtils'; | |
export default class Heatmap extends Component { | |
componentDidMount() { | |
setTimeout( |
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 heatmapInputGenerator (points, radius, max) { | |
return ` | |
var heatmapInstance = h337.create({ | |
container: document.querySelector('.heatmap'), | |
radius: ${radius} | |
}); | |
heatmapInstance.setData({ | |
max: ${max}, | |
data: ${JSON.stringify(points)} | |
}); |
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
[ | |
{ "provincia": "Buenos Aires", "poblacion": 15625084 }, | |
{ "provincia": "Córdoba", "poblacion": 3308876 }, | |
{ "provincia": "Santa Fe", "poblacion": 3194537}, | |
{ "provincia": "Ciudad Autónoma de Buenos Aires", "poblacion": 2890151}, | |
{ "provincia": "Mendoza", "poblacion": 1738929}, | |
{ "provincia": "Tucumán", "poblacion": 1448188}, | |
{ "provincia": "Entre Ríos", "poblacion": 1235994}, | |
{ "provincia": "Salta", "poblacion": 1214441}, | |
{ "provincia": "Misiones", "poblacion": 1101593}, |
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
// Models/DataBaseContext.cs | |
#region Using | |
using Microsoft.EntityFrameworkCore; | |
using MvcMovie.Models; | |
#endregion | |
namespace MvcMovie.Models |
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 System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using Microsoft.EntityFrameworkCore; |
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
-# TODO: Remove access with [] when proof of concept is finished | |
- if params[:modal] != 'true' | |
- if @model[:company].present? | |
.configurator-header | |
%h1.configurator-header-title | |
= @model[:name].humanize | |
.configurator-header-subtitle | |
.configurator-header-company | |
= @model[:company][:name] | |
- else |