Skip to content

Instantly share code, notes, and snippets.

@marketinview
marketinview / changeNextButtonText.js
Last active July 12, 2024 18:59
Qualtrics: Change Next Button Text. This script changes the text of the Next button. Change value of newName value as needed. #qualtrics #js #jq #next #button #finish
Qualtrics.SurveyEngine.addOnReady(function() {
var newName = 'Finish'; //Update - New Next Button label
var lastLoopOnly = true; //Last loop only? Value doesn't matter to non-loops
//No changes below
if(!lastLoopOnly || "${lm://CurrentLoopNumber}" == "${lm://TotalLoops}") {
var nb = jQuery('#NextButton');
nb.val(newName);
nb.attr('title', newName);
}
});
@kunev
kunev / coroutines_example.py
Last active July 9, 2020 15:09
Coroutines example with python's asyncio module
import asyncio
@asyncio.coroutine
def open_file(name):
print("opening {}".format(name))
return open(name)
@asyncio.coroutine
def close_file(file):
print("closing {}".format(file.name))