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 sections = data.triggerPoints; | |
const seo = data.seo; | |
//const activeSection = []; | |
t = scrollTop+ headerOffset; | |
if (t < sections[0][1]) | |
return R.find((_seo) => $('body').hasClass(_seo.id), seo); | |
var hasSEO = (_id) => R.find((_seo) =>_seo.id==_id, seo) != undefined; |
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
var getSEOByPosition = function(scrollTop, headerOffset) { | |
//-------------------- | |
onsole.log('LENGTH', sections.length); | |
/* for (var i=0; i<sections.length; i++) { | |
// if position is above or below nav sections then set the activeSection to null | |
if (t <= sections[0][1] - headerOffset ) { | |
for(var j=0; j<seo.length; j++) { |
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 type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.21.0/ramda.min.js"></script> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | |
<body class="clinical-trials"> | |
<div class="monotherapy"></div> | |
</body> | |
<script> | |
/* | |
t can be any of 1 to 5000 |
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
var Bacon = require('baconjs'); | |
var bus = new Bacon.Bus(); | |
bus.onValue(function(){ | |
var a = Bacon.fromArray([1,2,3]) | |
a.onValue(function(val){ | |
console.log(val) |
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
# On Mavericks (same for 10.6+) the biggest issue is that port 5432 is already taken so | |
# this: --- config.vm.network "forwarded_port", guest: 5432, host: 5433' --- | |
# should go on 'Vagrantfile' and then you use port 5433 to connect through pgadmin3 | |
echo >&2 "===CUSTOM-MSG=== Setup THE DATABASE" | |
# installs postgresql database and creates "vagrant" superuser with password "somepass". | |
sudo apt-get -y install postgresql postgresql-client libpq-dev | |
echo >&2 "===CUSTOM-MSG=== Create role and login" |