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 DEIDENTIFIER = (function () { | |
'use strict'; | |
// ** Constants ** // | |
var separator = '\t', // what separates fields in a row | |
saltRegex = /^\S{20,40}$/, // 20-40 characters, no white space | |
tokenRegex = /^\S{3,}$/, // at least 3 characters, no white space | |
emailRegex = /^.+@.+$/, // @ with something before and after | |
tokenColumnName = 'plaintext_token', |
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
openapi: 3.0.1 | |
servers: | |
- url: https://macrander-toptal.appspot.com/api | |
description: Production server (uses live data) | |
- url: http://localhost:3002/api | |
description: Sandbox server (uses test data) | |
info: | |
description: Toptal Time Management | |
version: "1.0.0" | |
title: Toptal Time Management |
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 omit from 'lodash/omit'; | |
const LoadingDefault = () => <div>Loading…</div>; | |
/** | |
* Higher-order component factory, acting as a layer between App and the scenes | |
* that want to load data. Pass in a scene component and a collection of | |
* functions that "select" i.e. pick out certain parts of the "appState" i.e. | |
* App's `this.state` to use as props. The scene will then only re-render when |
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
<?php | |
# Custom Portal Code Sample | |
# ---------------------------------------------------------------------------- | |
# | |
# The purpose of this script is to demonstrate how institutions should | |
# handle a PERTS program participant and correctly return them to PERTS. | |
# | |
# The most up-to-date version of this script and other accompanying | |
# documentation is available at: |
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>JavaScript Promises</title> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/q.js/0.9.2/q.min.js"></script> | |
</head> | |
<body> | |
<button id="the-button">Click Me</button> |
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
// CTC Dynamic Content File | |
if (window.perts === undefined) { | |
window.perts = {}; | |
} | |
window.perts.dynamicContent = (function () { | |
'use strict'; | |
var dynamicContent = {}; |
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 unloadEvent; | |
var listener; | |
Qualtrics.SurveyEngine.addOnload(function () { | |
'use strict'; | |
// initially hides completion code | |
$j('#completion-code').hide(); | |
var code = '${e://Field/mturk_code_part_1}'; |
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
q_unique_ed <- mutate( | |
q_unique, | |
#the reason for the repetitions is that I cannot figure out how to handle the NAs otherwise | |
mother_education = t1__demog__ed_level_m, | |
father_education = t1__demog__ed_level_f, | |
mother_education = ifelse(mother_education > 10,NA,mother_education), | |
father_education = ifelse(father_education > 10,NA,father_education), | |
mother_education = ifelse(is.na(mother_education),0,mother_education), | |
father_education = ifelse(is.na(father_education),0,father_education), | |
highest_parents_education = apply(data.frame(mother_education,father_education), 1, max), |
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
// qualtrics.js | |
// | |
// Original author: CAM 2014-07-23 | |
// CURRENTLY TESTING JFE COMPATIBILITY | |
// | |
// Purpose: Javascript file to be included in Qualtrics. Designed to be easy | |
// for survey writers and editors. | |
// | |
// Example javascript to be put in head of a survey: | |
/* |
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
// Read query string parameters as a javascript object. | |
// | |
// Not tested for: | |
// | |
// * Mixing bracketed and non-bracketed keys | |
// * Indexed brackets | |
// * Nested lists | |
// | |
// Some examples (See unit tests below for full details): | |
// |
NewerOlder