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
getCustomStates: function() { | |
var isSuspendDataStoreEmpty = _.isEmpty(suspendDataStore); | |
if (!isSuspendDataStoreEmpty && suspendDataRestored) return _.clone(suspendDataStore); | |
var dataAsString = scorm.getSuspendData(); | |
if (dataAsString === "" || dataAsString === " " || dataAsString === undefined) return {}; | |
var dataAsJSON = this.tryParseJsonWithDefault(dataAsString, {}); | |
if (!isSuspendDataStoreEmpty && !suspendDataRestored) dataAsJSON = _.extend(dataAsJSON, suspendDataStore); |
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
function locateScormAPI() { | |
function findAPI(win) { | |
var attempts = 0; | |
while (win.API == null && win.parent != null && win.parent != win) { | |
if (++attempts > 7) return null; | |
win = win.parent; | |
} | |
return win.API; | |
} | |
return findAPI(window) || findAPI(window.opener); |
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
/* ... do setup here (omitted for brevity) ... */ | |
grunt.initConfig({ | |
/* ... add a configuration to the copy task ... */ | |
copy: { | |
/* this config copies the index page from src, leave this alone! */ | |
index: { | |
files: [ | |
{ | |
expand: true, | |
src: ['src/index.html'], |
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
function Download-File($url, $file) { | |
Write-Host $url | |
$webclient = New-Object System.Net.WebClient | |
$webclient.DownloadFile($url, $file) | |
return $file | |
} | |
$mongoInstaller = 'C:\temp\mongodb-windows-installer.msi' | |
if(!(Test-Path $mongoInstaller)) { | |
$osArchitecture = (wmic os get osarchitecture) | ? { $_ -like '*-bit*'} |
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
define(['coreJs/adapt', 'jquery'], function (Adapt, $) }{ | |
var readiness = Adapt.deferReadiness(); //signal the Core that I want to delay startup | |
//do something async | |
$.getJson('/data').always(function (data) { | |
readiness.advance(); //signal that the plugin is ready to move on. | |
}); |
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
{ | |
"_id":"c-140", | |
"_parentId":"b-70", | |
"_type":"component", | |
"_component":"vmcq", | |
"_classes":"", | |
"_layout":"full", | |
"_attempts":1, | |
"_questionWeight":1, | |
"_isRandom":false, |
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
{ | |
"name":"adapt-orientation-change", | |
"main":"main.js" | |
} |
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
{ | |
"dependencies": { | |
"adapt-contrib-vanilla": "develop", | |
"adapt-contrib-text": "develop", | |
"adapt-contrib-narrative": "develop", | |
"adapt-contrib-media": "develop", | |
"adapt-contrib-hotgraphic": "develop", | |
"adapt-contrib-blank": "develop", | |
"adapt-contrib-accordion": "develop", | |
"adapt-contrib-graphic": "develop", |
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
_.mixin({ | |
'combine': function (xArray, yArray, func) { | |
return xArray.map(function (x) { | |
return yArray.map(function (y) { | |
return func(x, y); | |
}); | |
}); | |
} | |
}); |
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 Q = require('Q'); | |
var mongo = require('mongodb').MongoClient; | |
var main = function(){ | |
connect('mongodb://localhost') | |
.then(close) | |
.catch(logError); | |
}; | |
function connect(url) { |
NewerOlder