Skip to content

Instantly share code, notes, and snippets.

View RHeijnen's full-sized avatar
💭
I may be slow to respond.

RHeijnen

💭
I may be slow to respond.
View GitHub Profile
@RHeijnen
RHeijnen / _timerModule.js
Last active November 21, 2016 15:01
Angular countdown timer function with callback
var _timerModule = angular.module("_timerModule", []);
_timerModule.factory('timerModule', function() {
return {
startTimer: function(durationTimeInSeconds, callback) {
var timer = durationTimeInSeconds, minutes, seconds;
var timeInterval = setInterval(function () {
/*
* Thanks to http://stackoverflow.com/users/2126755/robbmj for the formatting of time and the idea of a datetime'less timer
*/
/*
* RobotJS supporter functions for end2end testing
* see specs/_tests/robotModule/robotModuleTest.js for unit tests
* ************* REQUIRES WINDOW FOCUS *************
* typeString - Function for simulating a set of/or single keyboard strokes
* - Example: typeString("Hello World"); //\\ typeString("A"); //\\ typeString("123");
* pressTab - Simulates an Tab Arrow button tap
module.exports = {
templateFunction1: function (_para) {
console.log(_para);
},
templateFunction2: function (_para) {
var temp = _para + _para;
return temp
},
};
module.exports = {
spearman: function (values,x,y) {
var sum = 0;
var orderedList = [];
var length = values[x].length;
// for every point in
for(i=0;i<length;i++){
orderedList.push([values[x][i], values[y][i]]);
}
(function() {
'use strict';
/*
Config
*/
const timeFormat = 'YYYYMMDD/HH:mm:ss'
const pollingTime = 1000; //ms
const fingerprinting = "uid";
const scanWebElements = false;
const logCoords = true;
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script>
var arr= [ 0.353846153846154,
5.161538517115385,
9.988461761538462,
10.071154080769231,
10.078846376923078,
10.842307815384613,
18.150000269230773,
var obj = require('./json.json');
var counter = 0;
var result = [];
for(var x = 0; x < obj.Data.length;x++){
var valueContainer = [];
for(var i = 0; i < obj.Data.length;i++){
try{
@RHeijnen
RHeijnen / css.css
Last active March 26, 2020 16:17
Scroll anchors and highlights
.custom-highlighter{
background-color:#de7cd2
}