Skip to content

Instantly share code, notes, and snippets.


Robin van Emden robinvanemden

View GitHub Profile
robinvanemden / QualtricsJSPsychHeader.html
Last active Nov 30, 2016
Loading external jQuery and jsPsych libraries in Qualtrics header
View QualtricsJSPsychHeader.html
<!-- Load external jQuery -->
<script src=""></script>
<script>var jq=$.noConflict();</script>
<!-- Load the jspsych library and plugins, after upload to file library -->
<script src=""></script>
robinvanemden / QualtricsQuestionJs.js
Created Nov 3, 2014
Adding jsPsych to Qualtrics
View QualtricsQuestionJs.js
Qualtrics.SurveyEngine.addOnload(function() {
//Retrieve the Response ID from the hidden Qualtrics Session ID value
var responseIdFromSessionID = jq('#SessionID').val().replace("SS_", "R_");
//Retrieve Qualtrics object and save in qthis
var qthis = this;
//Hide buttons - can also (even better) be hidden in the CSS
jq('#Buttons').css("display", "none");
View ChangeBlindnessInQualtricsJquery.js
var qthis;
var globalInterval;
var counter = 0;
var continuecounter = 0;
Qualtrics.SurveyEngine.addOnload(function() {
qthis = this;
jq(window).load(function() {
View ChangeBlindnessInQualtricsHTML.html
<div id="basicdiv" style="position: relative; left: 0; top: 0; width: 920px; height: 575px;background-color:#666666;">
<img id="imgmask" src=
style="position: absolute; top: 0; left: 0; width: 920px; height: 575px; z-index: 1;">
<img id="imgself1" src=
style="position: absolute; top: 0; left: 0; width: 920px; height: 575px; z-index: 2;">
<img id="imgself2" src=
-- Authware 7.0 Script,
-- Robin van Emden 2015
-- Communicates with an Arduino
-- Over Serial Port on a PC
-- Implements DirectCommunication Xtra from
-- Instantiate the DirectCommunication Xtra
Trace("--- DirectCommunication -- ")
View Authorware-to-Arduino_Arduino-Code.ino
/* Control a Peltier Cooler over Arduino Motor Shield from Authorware
Developed for Arduino Uno with a Velleman VMA23 or KA03 Motor Shield
The circuit:
* Peltier elements connected to the motor outputs A and B
* 50 V (max.) external power supply connected to motor input
Created 2015
by Robin van Emden
robinvanemden /
Created Jul 2, 2015
Audio Detector and Recorder
package com.hollandhaptics.babyapp;
import java.text.SimpleDateFormat;
robinvanemden /
Created Sep 1, 2015
Android BLE UART Service
package io.pavlov.bleuart;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
View custom_hungarian.php
* A php implementation of the Hungarian algorithm for solving the assignment
* problem. An instance of the assignment problem consists of a number of
* workers along with a number of jobs and a cost matrix which gives the cost of
* assigning the i'th worker to the j'th job at position (i, j). The goal is to
* find an assignment of workers to jobs so that no job is assigned more than
* one worker and so that no worker is assigned to more than one job in such a
* manner so as to minimize the total cost of completing the jobs.
View read_sensor_data.R
# read_sensor_data.R
# Import script. Parses MLX sensor data
# Robin van Emden - - 2015