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
DecisionService.prototype.getVariation = function(configObj, experimentKey, userId, attributes) { | |
// by default, the bucketing ID should be the user ID | |
var bucketingId = this._getBucketingId(userId, attributes); | |
if (!this.__checkIfExperimentIsActive(configObj, experimentKey, userId)) { | |
return null; | |
} | |
var experiment = configObj.experimentKeyMap[experimentKey]; | |
var forcedVariationKey = this.getForcedVariation(configObj, experimentKey, userId); | |
if (!!forcedVariationKey) { |
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
jQuery.getJSON('http://67.215.227.107/cgi-bin/koha/svc/report?id=19', (data) => { | |
const ul = document.createElement('ul'); | |
data.forEach((value) => { | |
const li = document.createElement('li'); | |
const img = `<div><img src="${value[0]}" alt="" /></div>`; | |
const title = `<div>${value[1]}<div>`; | |
const approved = `<div><p>${value[2]}</p></div>`; | |
const review = `<div><p>${value[3]}</p></div>`; | |
li.innerHTML = img + title + approved + review; |
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
{ | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.colorTheme": "Material Theme Ocean", | |
"editor.tabSize": 2, | |
"editor.fontSize": 15, | |
"editor.fontLigatures": true, | |
"gitlens.advanced.messages": { | |
"suppressCommitHasNoPreviousCommitWarning": false, | |
"suppressCommitNotFoundWarning": false, | |
"suppressFileNotUnderSourceControlWarning": 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
{ | |
"sessions-161004": { | |
"aliases": {}, | |
"mappings": { | |
"session": { | |
"properties": { | |
"a1": { | |
"type": "long" | |
}, | |
"a2": { |
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
[TestFixture] | |
public class StringExtensionTests | |
{ | |
[TestCase(null, "old", "new", Result = null)] | |
[TestCase("", "old", "new", Result = "")] | |
public string ReplaceCalledOnNullOrEmptyReturnsNullOrEmpty(string src, string oldValue, string newValue) | |
{ | |
var result = src.Replace(oldValue, newValue, StringComparison.OrdinalIgnoreCase); | |
return result; |
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
/* Problem specs | |
* The prime factors of 13195 are 5, 7, 13 and 29. | |
* What is the largest prime factor of the number 600851475143 ? | |
*/ | |
(function(largestPrime) { | |
/* | |
* checks whether the passed in number is prime | |
* fails if the passed in number is a string, I believe |