query stringlengths 9 34k | document stringlengths 8 5.39M | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
when user clicks on the screen test if they clicked on an edge. If so, show the probablility of moving from one node to the other. | function checkIfOnEdge(tree, xPos, yPos){
for(var i = 0; i < tree.edgeProbs.length; i++){
//get the nodes for the current node pair
var node1 = tree.edgeProbs[i][0];
var node2 = tree.edgeProbs[i][1];
//find the coordinates
var coord1 = tree.getNodeById(node1).coordinates;
var coord2 = tree.getNodeById(n... | [
"function checkNeighbour() {\n sendToPid(CheckState.neighbour, ROOM, CHECK);\n Utility.log('Checking neighbour: ', CheckState.neighbour);\n }",
"function pointerUp(e) {\n let newMouse = {x: (e.clientX/window.innerWidth)*2-1, y: (e.clientY/window.innerHeight)*-2+1};\n if (mouse.x == newMouse.x && mous... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function which to create a select with the list of filters of the user | function create_filter_list_select(select) {
//Get the user name
var user = "test_user";
//Indicates the filter_name to get (if empty, get the list of all the filter names)
var filter_name = "";
//XML generation (user parameter = "" to get back to the list the filters of one user only)
var xml = '<xml v... | [
"getFilters() {\n let cats = _.uniq(_.map(users, function(item){\n return item[filterBy];\n }));\n\n userFilterTitle = `PICK A ${filterBy.toUpperCase()}`;\n userFilters = [{ label: 'ALL', value: 'all', checked: true}];\n cats.forEach(function(cat){\n userFilters.push({\n value: cat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start a dramatic task with the given difficulty and task length// TODO: Move this to a module, this shouldn't be in a macro | async function startDramaticTask(taskDifficulty, taskLength) {
const SCOPE = "world";
const PROGRESS_KEY = "taskProgress";
const TILE_ID_KEY = "dramaticTaskID";
const TASK_DIFFICULTY_KEY = "taskDifficulty";
const TASK_LENGTH_KEY = "taskLength";
const TASK_ROUNDS_LEFT_KEY = "roundsLeft";
const DRAMATIC_TASK_CONT... | [
"run (start, end, options={}) {\n\n let delay = options.delay || 0; // initial delay\n const duration = options.duration;\n let resolution = options.resolution || beat;\n const tonic = options.tonic || start;\n const mode = options.mode;\n const descending = end < start;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates the number of rendering passes required for this filter. Subclasses must override this method if the number of passes is not 1. | get numPasses() {
return 1
} | [
"get numberOfResultsIsValid() {\n return this._isPositiveNumber(this.state.numberOfResults);\n }",
"size() {\n\t\treturn this._filters.length;\n\t}",
"function getNumberOfLayers() {\r\n\tvar desc = getDocumentPropertyDescriptor(TID.numberOfLayers);\r\n\tvar numberOfLayers = desc.getInteger(TID.numberO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copyright (C) 19982017 by Northwoods Software Corporation. All Rights Reserved. A custom Tool for dragging a segment of an orthogonal link. This OrthogonalLinkReshapingTool class allows for a Link's path to be modified by the user via the dragging of a tool handle along the link segment, which will move the whole segme... | function OrthogonalLinkReshapingTool() {
go.LinkReshapingTool.call(this);
this.name = "OrthogonalLinkReshaping";
} | [
"function DragLinkingTool() {\n go.DraggingTool.call(this)\n this.isGridSnapEnabled = false\n this.isGridSnapRealtime = false\n this.gridSnapCellSize = new go.Size(240, 1)\n this.gridSnapOrigin = new go.Point(5.5, 0)\n }",
"updateTempConnector(self) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
compose query for updating permissions to Documents, Projects, Groups (ResID) on behalf of Users or Groups (entID) | function update_perms(entType, entID, resType, resID, perm) {
return db.prepare(`UPDATE Perms SET Permissions=? WHERE ${entType}=? AND ${resType}=?;`).run(perm, entID, resID)
} | [
"function grantPermission(resType, resID, perm, access_list, granter) {\n list = typeof(access_list) == 'string' ? [] + access_list : access_list\n for (var i = 0; i < access_list.length; i++) { //iterate over each email address\n // console.log(\"access_list[i]: \", access_list[i])\n if(access_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get's veteran object with corresponding veteran ID | getVeteran(id) {
return this.veteransMapping[id];
} | [
"async show ({ params, request }) {\n const find = await Vagas.find(params.id)\n\n return find\n }",
"async getVeterans() {\n const route = APIRoutes.veteransPath();\n try {\n let { json, headers } = await BaseRequester.get(route);\n this.setState({ veterans: json });\n this.veteransMa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates checkbox using model property. Used in modelLoadedCallback. Make sure that this function is only called when: a) model is loaded, b) checkbox is bound to some property. | function updateCheckbox() {
setCheckbox(model.get(propertyName));
} | [
"function updateRadio() {\n if (component.property !== undefined) {\n var value = model.get(component.property);\n\n for (var i = 0, len = options.length; i < len; i++) {\n if (options[i].value === value) {\n $inputs[i].attr(\"checked\", true);\n $options[i].addClass('checked')... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
changeTeams : when a date or time has been changed, update 'Home Team', 'Home Score', 'Away Team', and 'Away Score' | function changeTeams() {
var gameNum = $('#time option:selected').data('game');
var week = $('#week').val();
$('#gameNum').val(GAMES[week-1][gameNum].game);
$('#homeTeam').val(GAMES[week-1][gameNum].home);
$('#awayTeam').val(GAMES[week-1][gameNum].away);
$('#homeScore').val(GAMES[week-1][gameNum].homeScore);
$('... | [
"setGroupTeams(state, teams) {\n\t\tstate.teams = teams\n\t}",
"async function updateChangedGames(seMaster, sePrimaryLeague, seSecondaryLeague, tsGames){\n //Games in teamsnap, but validate label/league origin, location, date/time. If UID is not set, set it.\n for (let tsGame of tsGames){\n if (!tsG... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load the predefined panorama | function loadPredefinedPanorama( ) {
var evt=window.event;
evt.preventDefault();
var div = document.getElementById('container');
var PSV = new PhotoSphereViewer({
panorama: 'house.jpg',
container: div,
time_anim: false,
navbar: true,
size: {
width: '45%',
height: '400px'
}
});
} | [
"function changePanorama () {\n krpanoViewer.changePanorama('782949e8-c37a-4171-a004-54c76937135c', () => {\n console.log('loaded')\n })\n}",
"preloadPanorama(panorama) {\n if (this.viewer.adapter.supportsPreload(panorama)) {\n return this.viewer.adapter.loadTexture(panorama);\n } else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds torch to the inventory | function takeTorch(){
if(x===0&&y===-2){
inventory[0]="torch";
var msg=("You pick up a torch. Though it does not seem to illuminate your way");
updateText(msg);
}
} | [
"function addToInventory(toAdd) {\n inventory.push(toAdd)\n console.log('You have added ' + toAdd)\n}",
"function placeTorch(){\r\n\t\t\tif(currentLocation===\"skeletonRoom\" && inventory[0]===\"torch\"){\r\n\t\t\t\tvar msg=(\"You put the torch in the skeleton's hands. A door to the west opens up. \")\r\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the readline interface and adds keypress listener for process.stdin This sets things up so we can use the cursor to move around board, and space key to select a letter | setupReadline() {
this.rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
this.cursorPos = { col: 0, row: this.gridSize };
this.rl.input.on('keypress', this.onKeyPress);
} | [
"static createReadLine() {\r\n iface = rl.createInterface({\r\n input: process.stdin, output: process.stdout\r\n });\r\n //@ts-ignore\r\n iface.on(\"SIGINT\", () => process.emit(\"SIGINT\") );\r\n }",
"function addOnKeyPressedListener(interpreter) {\n $(document).keypr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reconnects the live stream | function privateReconnectStream(){
config.active_song.src = config.active_metadata.url;
config.active_song.load();
} | [
"reconnect() {\n\t\tsetTimeout(() => {\n\t\t\tif (this.ws.readyState <= WebSocket.OPEN) return;\n\n\t\t\tconsole.log(\"Trying to reconnect\", this.ws.readyState); // debug\n\n\t\t\t// Connect to the WebSocket server.\n\t\t\tthis.connect();\n\n\t\t\t// Ensure that the connection has been made.\n\t\t\tthis.reconnect(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit a parse tree produced by PlSqlParserpipe_row_statement. | visitPipe_row_statement(ctx) {
return this.visitChildren(ctx);
} | [
"visitFor_each_row(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitReturn_rows_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitData_manipulation_language_statements(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"visitSeq_of_statements(ctx) {\n\t return this.visitChildren(ctx);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
alignCenter by JoeSimmons Instructions: Supply an id string or node element as a first argument | function alignCenter(e) {
var node = (typeof e=='string') ? document.getElementById(e) : ((typeof e=='object') ? e : false);
if(!window || !node || !node.style) {return;}
var style = node.style, beforeDisplay = style.display, beforeOpacity = style.opacity;
if(style.display=='none') style.opacity='0';
if(style.disp... | [
"function $Center(elemId){\n\n var elem = $O(elemId);\n\n var elemDimensions = size(elem);\n var elemWidth = parseInt(elemDimensions.width) || parseInt(getStyleValue(elem, 'width')); \n var elemHeight = parseInt(elemDimensions.height) || parseInt(getStyleValue(elem, 'height'));\n var bDimensions = Br... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the deployment status of all pipeline elements | function setAllPipeElementsStatuses(status) {
status = status.toLowerCase();
RED.nodes.eachNode(function(node) {
node.deployStatus = status;
node.dirty = true;
});
} | [
"function updateDeployedState(state) {\n $deploymentStateParent.attr('class', 'list-group-item');\n\n if (state === 'deploy') {\n $deploymentState.text('Deploying');\n $deploymentCompletion.text(0);\n $deploymentStateParent.addClass('list-group-item-warning');\n\n $deploy.addClass('disable... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Analyse sound and display scene in fact of frequency | function analyze() {
raf = requestAnimationFrame(analyze);
var stream = audioAnalyzer.getFrequencyAnalysis();
if(false === stream) {
onEnd();
return;
}
var a = utils.average(stream),
id;
// Glitch on clap
if (a > 100.5 && a < 102.5) {
if(Date.now() - lastGli... | [
"function visualize() {\n\n visualizer.updatePitchChart(audioProcessor.getPitches(), audioProcessor.getTimestamps());\n visualizer.updateRateChart(audioProcessor.getVibratoRates(), audioProcessor.getTimestamps());\n visualizer.updateWidthChart(audioProcessor.getVibratoWidths(), audioProcessor.getTimestamps... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the rules of sudoku, 19 only once in rows, columns and 3x3 squares | function sudokuVerifier(grid) {
let columns = [];
let squares = [];
//Grabbing columns
for(let i = 0; i < 9; i++){
let tempColumn = [];
for(let j = 0; j < 9; j++){
tempColumn.push(grid[j][i]);
}
columns.push(tempColumn);
}
//grabbing squares, the... | [
"function sudokuCheck (boardStr) {\n let storage = [{}, {}, {}]\n var solved = true;\n let board = boardStr.split('\\n');\n var result = 'solved';\n reset(storage);\n\n board.forEach(function (row, rowIndex) {\n\n \tif (rowIndex % 3 === 0 && rowIndex !== 0) {\n\n \t\tstorage.forEach(function (sudoku) {\n \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function draws the % Income graph for the math explaination as an SVG. | function drawPercentIncomeGraphForExplain(medianIncome){
console.log("drawing graph");
var data = [500,medianIncome];
//draw top tooltip
$("#mapPopupModal #explain-chart #explain-chart-text").append("<b class='blue-2'>$" + (Math.round(data[1]/10)*10) + "</b> median household income per day.");
//d... | [
"function drawPercentIncomeGraph(popupId,percentIncome,medianIncome){\n var data = [500,medianIncome,percentIncome];\n //draw top tooltip\n $(\"#map-popup-\" + popupId + \" #map-popup-graphic #median_income_graph_text\").append(\"<b>$\" + (Math.round(data[1]/10)*10) + \"</b> <a href='#' id='median_househol... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets how many points there need to be to win | setWinPoints(points){
this.PointsToWin=points;
} | [
"incrementWins() {\n this.wins += 1; \n }",
"function setMinesNegsCount(board) {\r\n var currSize = gLevels[gChosenLevelIdx].SIZE;\r\n for (var i = 0; i < currSize; i++) {\r\n for (var j = 0; j < currSize; j++) {\r\n var cell = board[i][j];\r\n var count = calcu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes a hinged door. | closeHingedDoor() {
var hingedDoorSlot = this.getHingedDoorSlot(this.hingedDoor);
if (this.doesSlotHaveOpenDrawers(hingedDoorSlot)) {
let aux = function (context, closeFunction) { return function () { closeFunction(context); } }
this.waitingDoors.push(aux(this, this.closeHingedDoorAnimation));
... | [
"function unlock() {\n red.off();\n servo.min();\n green.on();\n knocks = 0;\n locked = false;\n\n console.log( 'The door is unlocked' );\n }",
"function OnTriggerExit (other: Collider){\n\tif(other.gameObject.tag == \"Player\"){\n\t\tDoor.SendMessage(\"CloseDoor\");\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
swap image src with alt_arc value to create animation affect. swap back when clicked again. | function imageSwitch() {
tmp = $(this).attr('src');
$(this).attr('src', $(this).attr('alt_src'));
$(this).attr('alt_src', tmp);
} | [
"function imageClicked() {\n var currentSource = $(this).attr('src');\n var altSource = $(this).attr('data-src');\n $(this).attr('src', altSource);\n $(this).attr('data-src', currentSource);\n }",
"function motionToggle() \n{\n // if the image clicked is currently still, toggle it to anima... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CODE accepts text and optionally index (default 1) returning the character code. | function CODE() {
var text = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
var index = arguments.length <= 1 || arguments[1] === undefined ? 1 : arguments[1];
if (index < 1) return error$2.na;
if (text.length < index) return error$2.value;
return text.charCodeAt(index - 1);
} | [
"function getCodeFromLetter(str){\n return str.charCodeAt(0)-96;\n}",
"function returnACharacter(string, index) {\n return string[index];\n}",
"function getLetterFromCode(num){\n return String.fromCharCode(num+96);\n}",
"getChar(pos) {\n return this.document.getText(new vscode.Range(pos, pos.tra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
push enter key, to run bot function. | function pressKey(event) {
if (event.which == 13) {
bot();
questionNum++ // increase questionNum count by 1
}
} | [
"function submitToBot(event) {\r\n\tif(event && event.keyCode != 13){\r\n\t\treturn false;\r\n\t}\r\n\tvar v = textInput.value.trim();\r\n\tif(v.length > 0) {\r\n\t\tnewInput(v);\r\n\t}\r\n}",
"_keyPressLogin(e){if(13==e.keyCode){//Enter\nthis._login();return!1}}",
"function keyPressed(ev) {\n if (ev.key... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a constant representing the browser the user is using. | function getBrowser() {
var browserObj = $.browser;
if (browserObj.hasOwnProperty("chrome")) {
return Browsers.CHROME;
} else if (browserObj.hasOwnProperty("mozilla")) {
return Browsers.FIREFOX;
} else if (browserObj.hasOwnProperty("msie")) {
return Browsers.INTERNET_EXPLORER;
} else {
return ... | [
"function getUserBrowser()\n{\n\tvar agent = navigator.userAgent.toLowerCase ();\n\n var browser = \"Unknown browser\";\n if (agent.search (\"msie\") > -1) {\n browser = \"Internet Explorer\";\n }\n else {\n if (agent.search (\"firefox\") > -1) {\n browser = \"Firefox\";\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
negation function Description: increments global token pointer for each negation, calling the quant function after these negations Parameters: none Returns: nothing | function negation(){
while (globalTP < tokens.length && tokens[globalTP] == "neg"){
globalTP+=1;
}
quant();
} | [
"function evaluateNeg(assignment){\n var myString = \"\";\n while (globalMarker < assignment.length && assignment[globalMarker] == \"neg\"){\n globalMarker += 1;\n myString += \"!\"\n }\n myString += evaluateParen(assignment);\n return eval(myString);\n}",
"function equality(){\n negation();\n if (gl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sample reservoir update function | function update(t) {
var p, idx;
if (res.length < num) {
res.push(t);
} else {
idx = ~~((cnt + 1) * exports.random());
if (idx < res.length && idx >= cap) {
p = res[idx];
if (map[tupleid(p)]) out.rem.push(p); // eviction
res[idx] = t;
}
}
++cnt;
} | [
"update_sample(state, { sampleId, data }) {\n let index = -1;\n\n if (sampleId) {\n index = state.samples.findIndex((sample) => sample.id === sampleId);\n }\n\n // For new samples we depend on an internal timestamp\n if (index === -1) {\n index = state.samples.findIndex(\n (sample) =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Presented with the integer n, find the 0based position of the second rightmost zero bit in its binary representation (it is guaranteed that such a bit exists), counting from right to left. Return the value of 2position_of_the_found_bit. Example For n = 37, the output should be secondRightmostZeroBit(n) = 8. 37(10) = 10... | function secondRightmostZeroBit(n) {
return 2 ** (Number([...n.toString(2)].reverse().map((el, i) => {
if (Number(el) === 0) {
return i;
}
}).join("")[1]));
// return ~(n |= -~n) & -~n;
} | [
"function ifevenorzero(n){\n if (n == 0){\n return 1\n }\n\n else{\n if(n % 2 == 0 ){\n return 1;\n }\n else{\n return 0;\n }\n }\n}",
"function getByteN(value, n) {\n return ((value >> (8 * n)) & 0b11111111);\n}",
"function getNthUglyNo(n)\n {\n return findUgly(n, 1, 1);\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The change event is associated with the respondee response drop down list. This event will only be triggered when the security request has progressed to a settlement booked stage. This event will call a web service to extract the registered respondee types for the security request and populate the drop down list with t... | function OnResponseTypesChange(ddl) {
try {
var isInternetExplorer11OrAbove = !!(navigator.userAgent.match(/Trident/) && !navigator.userAgent.match(/MSIE/));
var ddlResponseTypes = ((ddl === undefined) || (ddl == null)) ? getRespondeeControl('divRespondeeResponse', 'ddlResponseTypes') : ddl;
... | [
"function OnRespondeeTypeChange(ddl) {\n\n try {\n\n var ddlRespondeeType = ((ddl === undefined) || (ddl === null)) ? getRespondeeControl('ddlRespondeeType') : ddl;\n\n if (ddlRespondeeType == null) {\n return;\n }\n\n // get the drop down list selection for the respondee t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the gravity at a specific distance from a planet's surface. Returns a number. distance: Distance from the planet's surface maxDist: Maximum distance for the gravity well. Yes I know that's not how gravity works surfaceGrav: Gravity at the planet surface. | function getGravity(distance, maxDist, surfaceGrav) {
if (distance > maxDist) {
return 0;
}
if (distance <= 0) {
return surfaceGrav;
}
// Lame linear function because I'm lazy and it works gameplay wise!
// TODO: experiment with more fun gravity algorithms
return ((-(1 / (m... | [
"calculateGravity(){\n this.gravity = new Vector(0, 0);\n var range = 1;\n for(var tileX = -range; tileX <= range; tileX++){\n for(var tileY = -range; tileY <= range; tileY++){\n var currTileX = Math.floor(this.position.x) + tileX;\n var currTileY = Math... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes unprintable characters from a string. | function sanitize(aStr) {
let unprintableRE = new RegExp("[\\x00-\\x1F\\x7F]" ,"gi");
return aStr.replace(unprintableRE, "");
} | [
"function stripAnsi(str) {\n if (str.length === 0) return str;\n return str.replace(/[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '');\n}",
"function cleanup_zwj(inputText) {\r\n return inputText.replace(/\\u200C|\\u200D/g, '');\r\n}",
"function removeSpecialChars(str) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update all links on the page for the given layer. | function setLinksForLayer(layer) {
// Update the direct download link in the layers list
jQuery(`input[type=radio][value=${layer.id}]`)
.parents("li")
.find(".downloadButton")
.attr("href", createDownloadLink(layer.parameters))
// Update the permalink
jQuery(".permalink").text(cr... | [
"function updateFeedLink() {\n var bounds = map.getPixelBounds(),\n nwTilePoint = new L.Point(\n Math.floor(bounds.min.x / markers.options.tileSize),\n Math.floor(bounds.min.y / markers.options.tileSize)),\n seTilePoint = new L.Point(\n Math.floor(bounds.max.x / markers.options.til... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the UTF8 byte count of `str` | function utf8size(str) {
return unescape(encodeURIComponent(str)).length;
} | [
"function lengthBytesUTF8(str) {\n var len = 0;\n for (var i = 0; i < str.length; ++i) {\n // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.\n // See http://unicode.org/faq/utf_bom.html#utf16-3\n var c ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds notification, or returns false if it already exists | async addNotification(subscriptionId, notification) {
const exists = await this.db.notifications.get(notification.id);
if (exists) {
return false;
}
try {
// sw.js duplicates this logic, so if you change it here, change it there too
await this.db.notifications.add({
...notifica... | [
"function addNotification (notification) {\n notification.$$id = guid();\n $rootScope.$$notifications = $rootScope.$$notifications || [];\n $rootScope.$$notifications.push(notification);\n }",
"function isNotificationAvailable() {\n return (\"Notification\" in window);\n}",
"function show_notifi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders array of wallets in n x n grid | function WalletsGrid({ wallets, columns }) {
const getRow = (_wallets, row) => (
<div className={styles.walletRow} key={`wallet-row-${row}`}>
{_wallets.map((wallet) => (
<WalletTile {...wallet} key={wallet.id} />
))}
</div>
);
const rows = Math.ceil(wallets.length / columns);
const ... | [
"function View({ players, name }) {\n const playersPerRow = 4;\n\n // Render a row of players (1-4)\n function playerColumns(key, players) {\n return (\n <div>\n <div className=\"row\" key={key}>\n {Array.from(Array(playersPerRow - players.length + 1).keys()).map(() =>\n <div c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Collection of increasing dogecoins that gives more dogecoins the more fedoras you have, controls how many dogecoins you get. | function increaseDogeCoins(){
if(counter % doge.happiness === 0){dogecoins++;}
document.getElementById("dogecoinValue").innerHTML = "Dogecoins:" + " " + dogecoins;
window.requestAnimationFrame(increaseDogeCoins);
} | [
"getNumberOfCoins() {\n let numberOfCoins = 120000 + (this.numberOfBlocks) * 100;\n return numberOfCoins;\n }",
"function nonConstructibleChange(coins) {\n // Sort array\n const sortedCoins = coins.sort((a, b) => (a - b));\n let change = 0;\n // Find smallest sum that does not exist in array\n // Algo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the beerType object with the default beer type selected. | function getDefaultBeerType(stats) {
return stats.beerType.options[0]
} | [
"function buildBeerSelector(brewery, selectedBeer) {\n // Build out brewery if other\n if(brewery === 'Other'){\n $('#otherBrewery').val('')\n $('#otherBrewery').css('display', 'block')\n $('#beerSelector').empty()\n $('#beerSelector').append('<option>Other</option>')\n $('#... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[[Seq]] iterating over an array in reverse. O(1) to create. | function reverse(array) {
return new seq_1.Seq(function* () {
for (let i = array.length - 1; i >= 0; i--)
yield array[i];
});
} | [
"function returnReversed(arr) {\n var temp;\n for (var i = 0; i < arr.length / 2; i++) {\n temp = arr[arr.length - 1 - i];\n arr[arr.length - 1 - i] = arr[i];\n arr[i] = temp;\n }\n return arr;\n}",
"function arrayAsList(inputArray){\n \n return reverseList( \n inputArray.reduce(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set overrides the value of the bucket | set(name, value) {
this.bkts[this.bucketFor(name)] = value
} | [
"insert(key, value) {\n // const strKey = typeof key === 'number' ? key.toString() : key;\n const index = getIndexBelowMax(key, this.limit);\n const bucket = this.storage;\n\n if (bucket.get(index) === undefined) { // No bucket at index yet\n bucket.set(index, [[key, value]]); // Create... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List Syndication Feeds by filter with paging support. | static listAction(filter = null, pager = null){
let kparams = {};
kparams.filter = filter;
kparams.pager = pager;
return new kaltura.RequestBuilder('syndicationfeed', 'list', kparams);
} | [
"function _getTrendFeeds() {\n\n let query = {\n tag: 'steemovie',\n limit: 21,\n };\n\n steem.api.getDiscussionsByTrending(query, function (err, result) {\n app.trend_feeds = result;\n\n // Rendering process of image image\n trend_renderingImagePaths(result)\n });\n\n}",
"function _getNewFeeds... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Format UI information for the user using the current Class selected | function formatClass(value) {
setCardOverview('class');
currentClassSelected = value;
console.log(value);
document.getElementById('currentClassName').innerHTML = currentClassSelected.name;
document.getElementById('hitDie').innerHTML = currentClassSelected.hit_die;
document.getElementById('profic... | [
"function initDisplayClasses ()\n {\n\tshowByClass('type_occs');\n\tshowByClass('taxon_reso');\n\tshowByClass('advanced');\n\t\n\thideByClass('taxon_mods');\n\thideByClass('mult_cc3');\n\thideByClass('mult_cc2');\n\t\n\thideByClass('type_colls');\n\thideByClass('type_taxa');\n\thideByClass('type_ops');\n\thideBy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes all actions associated with currently held keys | executeHeldActions() {
Object.entries(this.heldActions).forEach(([key, action]) => {
const keyData = this.keyStates[key];
if(this.isHeld(key)) action(keyData ? keyData.event : null);
});
} | [
"update( )\r\n {\r\n\r\n for ( let key in this.pressed_keys )\r\n this.pressed_keys[ key ] = false\r\n\r\n for ( let key in this.mouse_clicked )\r\n this.mouse_clicked[ key ] = false\r\n\r\n }",
"loadKeysToActions() {\n // Clear beforehand in case we're reloading.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add a new bee to the bee house | function addnewbee() {
var s = new L8_Inheritance.Honeybee(635, 310);
L8_Inheritance.bees.push(s);
count += 1;
console.log("new bee added");
} | [
"function addBeerToCollection() {\n _store2.default.dispatch((0, _beerActions.addBeer)());\n return;\n}",
"add(candy, row, col, spawnRow, spawnCol) {\n //Your code here\n \n let vm = this;\n let state = vm.getState();\n if(state == 'FINAL'){\n let candy = candy;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of output booleans for the gate given the current simulation state. | function getOutputs (gate, state) {
return gate.outputs.map((pin) => state.outputs[pin.id])
} | [
"function getInputs (gate, state) {\n return gate.inputs\n .map((pin) => (state.outputs[pin.connections[0]] ^ pin.isInverted) === 1)\n}",
"annual_outputs(state) {\n return state.annual_outputs;\n }",
"getOutputs (gate) {\n if (!outputSubjects.has(gate.id)) {\n const gatePinSubjects = g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
model : container for parts (arms, torso, head, legs) | function Model (name, price, sizeCategory) {
this.name = name;
this.price = price;
this.sizeCategory = sizeCategory;
this.head = new BodyPart();
this.torso = new BodyPart();
this.leftArm = new BodyPart();
this.rightArm = new BodyPart();
this.leftLeg = new LeftLeg();
this.rightLeg = new RightLeg();
... | [
"createModel () {\n var model = new THREE.Object3D()\n var loader = new THREE.TextureLoader();\n var texturaOvo = null;\n\n var texturaEsfera = null;\n \n //var texturaGrua = new THREE.TextureLoader().load(\"imgs/tgrua.jpg\");\n this.robot = new Robot({});\n this.robot.scale.set(3,3,3);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
make aliens stop appearing as aquamarine | function unScareAlien(){
aliens.forEach(alien => alien.isScared = false)
} | [
"handleUnderline(){\n this.sliceString();\n this.post.value = this.beg + \"__\" + this.selection + \"__\" + this.end;\n }",
"function textWiggle() {\n var timelineWiggle = new TimelineMax({repeat:-1, yoyo:true}); \n for(var j=0; j < 10; j++) {\n ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increase value for opacity data attribute by 10 (percent) Param: currentTile tile element (div) | function increaseOpacity(currentTile) {
let currentOpacity = parseInt(currentTile.data('opacity'));
if (currentOpacity <= 90) {
let newOpacity = currentOpacity + 10;
currentTile.data('opacity', newOpacity);
}
} | [
"function addOpacityClass(currentTile) {\n currentTile.addClass('opacity-' + currentTile.data('opacity'));\n }",
"function decreaseOpacity(currentTile) {\n let currentOpacity = parseInt(currentTile.data('opacity'));\n if (currentOpacity >= 10) {\n let newOpacity = currentOpacity - 10;\n curren... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the linked list of a projection node, by appending another linked list. | function appendToProjectionNode(projectionNode, appendedFirst, appendedLast) {
ngDevMode && assertEqual(!!appendedFirst, !!appendedLast, 'appendedFirst can be null if and only if appendedLast is also null');
if (!appendedLast) {
// nothing to append
return;
}
var projectionNodeData = pro... | [
"function updateNodeReferenceData() {\n draggableNodes = getDraggableNodes();\n if (setParentListDataAttribute) {\n listParentNode.setAttribute('data-list-data', getDraggableNodeListData(draggableNodes));\n }\n }",
"append(node) {\n\n // Checks if argument is a node:\n if (node instanceof Yng... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an event handler function to extract the tip from each button | function handleBtnTip(event) {
// Compute the percent of the string selected
const percentStr = parseInt(event.currentTarget.innerText);
const percent = percentStr / 100;
// Update the value of the inputs object tip with percent
inputs.tip = percent;
// Determine if output can be computed
canCompute(inp... | [
"function onTipButtonClick() {\n\tvar tipButton = document.querySelector('.tip-button');\n \ttipsFinishedButton.style.display = 'none';\n\ttipButton.addEventListener('click', function() {\n\t\ttipLimit = tipLimit - 1;\n\t\tif (tipLimit >= 0) {\n\t\t\tgenerateTip();\n\n\t\t\tif (tipLimit === 0) {\n\t\t\t\ttipButton... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[Jenks natural breaks optimization]( Implementations: [1]( (python), [2]( (buggy), [3]( (works) Depends on `jenksBreaks()` and `jenksMatrices()` | function jenks(data, n_classes) {
if (n_classes > data.length) return null;
// sort data in numerical order, since this is expected
// by the matrices function
data = data.slice().sort(function (a, b) { return a - b; });
// get our basic matrices
var matrices = jenksMa... | [
"gaussJordanEliminate() {\n // Simplify all rows\n let cells = this.cells = this.cells.map(Matrix.simplifyRow);\n // Compute row echelon form (REF)\n let numPivots = 0;\n for (let i = 0; i < this.numCols; i++) {\n // Find pivot\n let pivotRow = numPivots;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Debug Objects firstRover = createRoverObj('First', 0, 0, 0, 'North'); secondRover = createRoverObj('Second', 1, 4, 180, 'South'); New Rover Functions | function createRoverObj(name, x, y, state, facingDirection) {
var newRover = new roverObject(name, x, y, state, facingDirection);
allRoversObjArray.push(newRover);
} | [
"function displayPosition() {\r\n\tconsole.log(\"Rover Current Position: [\" + myRover.position[0] + \", \" + myRover.position[1] + \"]\");\r\n}",
"function move(currentorder)\n\n/** \n * Every if of the function, checks the value of the objetct direction(string). First step is check where is looking the Rover.\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
environ returns the value of a named environment variable, if it exists, or returns the default value otherwise. | function environ(variable, defaultValue) {
return process.env.hasOwnProperty(variable) ?
process.env[variable] : defaultValue;
} | [
"function mandatoryEnvVar(envVarName) {\n const value = process.env[envVarName]\n if (!value) {\n throw new Error(`environment variable ${envVarName} is mandatory`)\n }\n return value\n}",
"function getEnv() {\n\tvar store = JSON.parse(localStorage.getItem(\"AtmosphereEnv\"));\n\tif ((store !== undefined) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End the robot simulation. | stopRobotSimulation() {
this.status = false;
} | [
"endGame()\r\n {\r\n this.gameInProgress = false;\r\n game.arrowPosition = [];\r\n\r\n this.interface.gameOptions.open();\r\n this.interface.gameMovie = this.interface.gui.add(this, 'ViewGameFilm');\r\n }",
"endPeriod(){\n for(let i=0,l=this.agents.length;i<l;i++)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[android] request enable of bluetooth from user | requestEnable() {
BluetoothSerial.requestEnable()
.then(res => {
BluetoothActions.setIsEnabled(true);
})
.catch(err => console.log(err.message));
} | [
"enable() {\n BluetoothSerial.enable()\n .then(res => {\n this.initializeBluetooth();\n BluetoothActions.setIsEnabled(true);\n })\n .catch(err => console.log(err.message));\n }",
"disable() {\n BluetoothSerial.disable()\n .... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create measure overlay DIV's for measures between 'start' and 'end'. Return an array. | function getDIVrange(start, end) {
var arr = Array(end - start + 1).fill().map((_, idx) => {
var el = $("#" + ANNO_ID + (start + idx));
el.css('border-top', '1px dashed #000');
el.css('border-bottom', '1px dashed #000');
el.css('background-color', 'lightblue');
el.css('opacit... | [
"function _split(startTime, endTime, durationPerMeasure) {\n const res = [];\n let currStartTime = startTime;\n while (true) {\n const cutoffTime = location.nextMeasureTime(currStartTime, durationPerMeasure);\n const currEndTime = cutoffTime.lessThan(endTime) ? cutoffTime : endTime;\n res.push({\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We need to wait until any miner has included the transaction in a block to get the address of the contract | function waitGetContractAddr(contract, cName) {
while (true) {
let receipt = web3.eth.getTransactionReceipt(contract.transactionHash);
if (receipt && receipt.contractAddress) {
log(cName + " has been deployed at " + receipt.contractAddress);
return receipt.contractAddress;
}
log("Waiting a... | [
"function getTransactionsByAccount() {\n var account = document.getElementById(\"trxAccount\").value;\n var startBlockNumber = document.getElementById(\"startBlock\").value;\n var endBlockNumber = document.getElementById(\"endBlock\").value;\n \n if (endBlockNumber == \"\") {\n endBlockNumber = we... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create a horizontal circle | function makeHorizontalCircle( part, x, y, z, radius, color ) {
const step = 5 / radius;
const maxAngle = $('#showPartially').prop('value');
for ( let angle = 0; angle < maxAngle; angle += step ) {
let degree = angle * 360 / 8 / Math.PI;
if ( angle > Math.PI ) degree = 360/4 - degree;
col... | [
"function makeHorizontalCircle( part, x, y, z, radius, color ) {\n const step = 5 / radius;\n const maxAngle = $('#showPartially').prop('value');\n\n for ( let angle = 0; angle < maxAngle; angle += step ) {\n const degree = angle * 360 / 2 / Math.PI;\n color = 'hsla( ' + degree + ',100% ,50%, 0.6... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to generate discount code | function generate_discount_code() {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 10; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return "#" + text;
} | [
"calDiscount(){\n this._discount = this._totalCharged * (10/100) ;\n }",
"calcDiscount() {\n if (this.discount != 0 || this.discount != null) {\n this.discPrice = (1 - this.discount / 100) * this.totalPrice;\n }\n }",
"function calcAmount(cost, discount) {\n return cost - discount;\n}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the value is a number 0 | function zero (x) {
return typeof x === 'number' && x === 0
} | [
"function hasZeros(val) {\r\n return /[^.]\\.|^-*0+[0-9]/.test(val);\r\n}",
"isZero() {\n\t return this.getNorm() === 0;\n\t}",
"function hasAZero(num){\n return num.toString().split('').some(function(num){\n return num === '0';\n })\n}",
"function number (thing) {\n return typeof thing ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
put initial cupcakes on page. | async function showInitialCupcakes() {
const response = await axios.get(`${BASE_URL}/cupcakes`);
for (let cupcakeData of response.data.cake) {
let newCupcake = $(CupcakeHTML(cupcakeData));
$("#cupcakes-list").append(newCupcake);
}
} | [
"async function getCupcakes() {\r\n cupcakes = await Cupcake.fetchAllCupcakes();\r\n $(\".cupcake_list\").html(\"\");\r\n if (cupcakes) {\r\n for (let cupcake of cupcakes) {\r\n showCupcake(cupcake);\r\n }\r\n addEditClick();\r\n }\r\n window.scrollTo(0, 0);\r\n }",
"function... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders the Items. The items are "left", "center" and "right" At any point of time, only three items are there in the viewport and also on DOM | function renderCarouselItems() {
/**
* Takes a look at the index of the and compares it with the currentItemIndex
* to determine wether the index "on left" or "center" or "on right" of the currentItemIndex
* It returns the classname to be applied to that item
* @param {Number} index index of the item
*... | [
"function viewItems () {\n\t//location variables for each bin \n\tlet landfillX = 900;\n\tlet landfillY = 160;\n\tlet compostX = 400;\n\tlet compostY = 160;\n\tlet recycleX = 400;\n\tlet recycleY = 450;\n\n\t//bin indexes used for sorting and organizing the layout of the bins. \n\tlet landfillIndex = 0;\n\tlet recy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
stores the final mailing option and pushes to the ReviewOrder page. | handleReviewOrder(){
this.props.orderStore.deliveryInfo = this.props.orderStore.currentOrder.deliveredPrices[this.state.mailingOptions];
browserHistory.replace("/revieworder");
} | [
"function afterSubmit_sendEmailWhenPOisApproved(stType)\n{\t\n\tvar stLoggerTitle = 'afterSubmit_sendEmailWhenPOisApproved';\n\t\t\n\tnlapiLogExecution('DEBUG', stLoggerTitle, 'Entered After Submit.');\n \n try\n {\n \tvar oldRec = nlapiGetOldRecord();\n \tvar stOldStatus = oldRec.getFieldValue('appr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If cropping was skipped, apply the image data directly to the setting. | onSkippedCrop() {
const attachment = this.frame.state().get('selection').first().toJSON()
this.setImageFromAttachment(attachment)
} | [
"function applyCropping(obj){\n\t\tobj.on(\"mousedblclick\", () => {\n\t\t\tobj.cropPhotoStart()\n\t\t\tobj.activeCrop.initEventListeners()\n\t\t})\n\t\tobj.initEventListeners()\n\t\tobj.setFitting(\"cover\");\n\t}",
"function applyCropping() {\n\t// Setup options for this rack.\n\tvar options = {\n\t\t'scene-nam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add ukrainian keyboard elements to DOM | function keyboardDomUkr(keyboardElements){
for (let i = 0; i < keyboardElements.length; i++) {
let keyboardRow = document.createElement("div");
keyboard.appendChild(keyboardRow);
keyboardRow.classList.add("keyboard-row");
for (let j = 0; j < keyboardElements[i].length; j++) {
... | [
"function virtual_keyboard_set_up() {\r\n\t//populate all key buttons array\r\n\tfor (i = 0; i < 46; i++) {\r\n\t\tkey_array[i] = document.getElementsByClassName(\"key_button_and_name\")[i];\r\n\t\tkey_button_array[i] = document.getElementsByClassName(\"key_button\")[i];\r\n\t}\r\n\t//populate alphanumeric_puncutat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
je suprime la map | function PuplishMap(){} | [
"function tercer() {\n let nom = \"CESAR\";\n let array = [];\n let contador;\n // Creamos el objeto map.\n let aMap = new Map();\n //Introduce en la array los carácteres del string 1 a 1.\n array = nom.split(\"\");\n let i;\n let j;\n //Recorre el array con \n for (i = 0; i < array... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
event handler for when associated trigger groups need to be repositioned | _handleTriggerPositionChange() {
this.updateTriggerGroupPositions();
this._sceneObjects.forEach(scene => {
if (scene._indicator) {
scene._indicator._updateBounds();
}
});
} | [
"disableGroupAdjustmentWhenFrameChanges() {\n this._adjustGroupWhenFrameChanges++;\n }",
"disableFrameAdjustmentWhenGroupChanges() {\n this._adjustGroupWhenFrameChanges++;\n }",
"enableChildrenAdjustmentWhenGroupChanges() {\n this._adjustChildrenWhenGroupChanges--;\n }",
"groupSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Expands all panels, if `[closeOthers]` is `false`. If `[closeOthers]` is `true`, it will expand the first panel, unless there is already a panel opened. | expandAll() {
if (this.closeOtherPanels) {
if (this.activeIds.length === 0 && this.panels.length) {
this._changeOpenState(this.panels.first, true);
}
}
else {
this.panels.forEach(panel => this._changeOpenState(panel, true));
}
} | [
"_expandPanel(panel) {\n panel.expanded = true;\n }",
"_collapsePanel(panel) {\n panel.expanded = false;\n }",
"function boxific_expand_all(){\n\t$('.boxific-rule').each(function(){\n\t\tvar rule = $(this);\n\t\tvar collapsed = rule.find('.boxific-rule-collapsed');\n\t\tvar fieldset = rule.find(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to begin the game by displaying the score table | function beginGame() {
//hides the begin game & add player forms and makes visible the scoring table and add extra row button
$('#beginGame').addClass('hidden');
$('#newPlayerForm').addClass('hidden');
$('#scoreTable').removeClass('hidden');
$('#additionalRowButton').removeClass('hidden');
$('#... | [
"function displayLeaderboard() { \n hideAll();\n clearTable();\n displayElement(leaderboardPageDiv);\n\n if (leaderboardArr.length > 0) {\n // sorts the leaderboardArr from highest \n // to lowest by score\n leaderboardArr.sort((a, b) => b.score - a.score);\n\n var rank = 1;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Paginaged version of outgoingTransactions request | outgoingTransactionsPaginated(address, params) {
if (params === undefined)
params = {};
return new OutgoingTransactionsPageable_1.OutgoingTransactionsPageable(this, address, params);
} | [
"static async getEthTransactions() {\n const walletAddress = await this.getWallet().then(wallet =>\n wallet.getAddressString(),\n );\n\n return fetch(\n `https://api.ethplorer.io/getAddressTransactions/${walletAddress}?apiKey=freekey`,\n )\n .then(response => response.json())\n .then... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Style for white bold label. | static set whiteBoldLabel(value) {} | [
"static set boldLabel(value) {}",
"static set miniBoldLabel(value) {}",
"static set whiteLabel(value) {}",
"static set whiteMiniLabel(value) {}",
"function bold(msg) {\n return `<strong>${msg}</strong>`\n }",
"label(text, size = -1) {\n //TODO\n }",
"function return_normal() {\n c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo para guardar las zonas ZIPP | function saveZonaZipp(req, res){
var zonazapp = new ZonaZipp();
var params = req.body;
if(params.address){
//zonazipp.country = params.country;
zonazapp.city = params.city;
zonazapp.address = params.address;
zonazapp.number_spaces = params.number_spaces;
zonazapp.price = params.price;
zonazapp... | [
"function saveZipCodeData() {\n var zipCode = homeControllerVM.homeZipCode;\n localStorage.setItem('selectedZipCode', zipCode); \n }",
"function store_zip(zip,callback) {\n var postURL = \"/\";\n var postRequest = new XMLHttpRequest();\n\n postRequest.open('POST',postURL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function subtracts TShirt for W_W&I by 1 | function countTshirtWwiMinus() {
if(instantObj.noOfTshirtWWI > 0) {
instantObj.noOfTshirtWWI = instantObj.noOfTshirtWWI - 1;
countTotalBill();
}
} | [
"function countShirtWwiMinus() {\n\t\t\tif(instantObj.noOfShirtWWI > 0) {\n\t\t\t\tinstantObj.noOfShirtWWI = instantObj.noOfShirtWWI - 1;\n\t\t\t\tcountTotalBill();\n\t\t\t}\n\t\t}",
"function countShirtWwfMinus() {\n\t\t\tif(instantObj.noOfShirtWWF > 0) {\n\t\t\t\tinstantObj.noOfShirtWWF = instantObj.noOfShirtWW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send benefit to parent | sendBenefit(benefit) {
this.emitBenefit.emit(benefit);
} | [
"insertCredit(person, amount) {\n person.takeMoney(amount)\n this.credits += amount\n if(this.credits>0){\n this.status = 'credited'\n }\n }",
"function jqChangeParentWeight() {\n $('#pId').parent().css({ 'font-weight': 'bold' });\n}",
"takeIceBath(){\n console.log(\"this the wim hof... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an AEAD cipher delegate used to decrypt packet fragments. | function createDecipher(algorithm) {
const decipherParams = AEADCipherParameters[algorithm];
const ret = ((packet, keyMaterial, connEnd) => {
const ciphertext = packet.fragment;
const sourceConnEnd = (connEnd === "client") ? "server" : "client";
// find the right decryption params
... | [
"function createCipher(algorithm) {\n const cipherParams = AEADCipherParameters[algorithm];\n const ret = ((packet, keyMaterial, connEnd) => {\n const plaintext = packet.fragment;\n // find the right encryption params\n const salt = (connEnd === \"server\") ? keyMaterial.server_write_IV :... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A blog post inherits from an article object via the classical pattern 1 | function BlogPost() {} | [
"function BlogObj(SEARCH_PATH) {\n var articles = []\n , ARTICLES_PATH = SEARCH_PATH;\n \n /**\n * Clear the list of articles\n * @method clearArticles\n */\n this.clearArticles = function () {\n articles = [];\n \n return this;\n }\n /**\n * Returns the number of... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a proxied toString() method pointing to the current version's toString(). | function proxyToString(name) {
// Wrap to always call the current version
return function toString() {
if (typeof current[name] === 'function') {
return current[name].toString();
} else {
return '<method was deleted>';
}
};
} | [
"toString() {\n return `${this.constructor.name}( ${this._stack\n .map((rc) => rc.toString())\n .join(', ')} )`;\n }",
"toString() {\n return `${changelogTitle}\n${changelogDescription}\n\n${stringifyReleases(this._releases, this._changes)}\n\n${stringifyLinkReferenceDefinitions(this._repoUrl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retourne vrai si la partie est toujours en cours | enCours() {
return !this.estGagne() && !this.estPerdu();
} | [
"function isTournamentCompleted(tournament){\n console.log(tournament.tournament.progressMeter);\n return tournament.tournament.progressMeter == 100\n}",
"calcNbJoursActivite(facture, dureeForfait) {\n\n // si tout le mois est payé au forfait\n if (dureeForfait == null) {\n facture.nombreJoursActivit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SECTION I: Other Funcs To be Catergorized draw program structre heading at top of page | function drawProgStructHead() {
var pO = CurProgObj;
var fO = CurFuncObj;
var sO = CurStepObj;
var com_opt = "style='float:left' ";
var com_id = getCommentHtmlId(CommentType.StepTitle, 0);
var comment = getCommentStr('div', com_id, com_opt, sO.stepComment);
// STEP: Span that is... | [
"function drawIntro(){\n\t\n}",
"function drawbasiclayout()\n {\n points = []; // for storng title area points inorder\n linepoints = []; // for storing linegap points in discription area\n dispoints = []; // for storng title area points inorder\n\n // Initially titlearea and discr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remote ids are used to avoid duplication. | getRemoteIds() {
return this.wrapped.remoteIds;
} | [
"addRemoteId(remoteId) {\n if (this.wrapped.remoteIds == null) {\n this.wrapped.remoteIds = [];\n }\n if (remoteId) {\n this.wrapped.remoteIds.push(remoteId);\n }\n return this;\n }",
"tileToRemoteId(tile) {\n // tile contains [zoomLevel, xPos, yPos]\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetch role by TITLE and delete Return success message on delete | deleteOne(req, res) {
if (process.env.NODE_ENV === 'production') {
res.status(403).send({ message: 'That action is not allowed!' });
} else {
Role.findById(req.params.title)
.then((role) => {
if (!role) {
res.status(404).send({ message: 'Role not found!' });
}... | [
"function deleteRole() {\n db.query(`SELECT * FROM role`, (err, data) => {\n if (err) throw err;\n\n const roles = data.map(({\n id,\n title\n }) => ({\n name: title,\n value: id\n }));\n //inquirer prompt that presents a list of roles to choose from\n inquirer.prompt([{\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Start function will process the texts that the user has entered and display it to the output panel. Launching the Start function will enable the Stop button while the input area that the user can provide text input will be disabled. | function start() {
// Disables the text area (place where the user provides input)
$("txtarea_input").disabled = true;
// Enables the Stop button & disables the Start button
disableBtn($("stop"), false);
disableBtn($("start"), true);
// Processes user i... | [
"function updateUI() {\n if (recorderReady && recognizerReady) startBtn.disabled = stopBtn.disabled = false;\n}",
"processStartButton() {\n\t\tclearTimeout(this.timer);\n\t\tthis.timer = null;\n\t\tthis.game.switchScreens('play');\n\t}",
"function stopAnimation() {\n $(\"start\").disabled = false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the dex pages for the pokemon whose dex numbers are in the dexNumbers input Inputs: $ reference to jQuery dexNumbers an array containing dex IDs Example: ["001", "002", "003", "004"]; progressBar a tag that will show how many of the IDs in 'dexNumbers' have been loaded progressSpan a tag that will contain text ab... | static loadDexPages($, dexNumbers, progressBar, progressSpan) {
const requests = [];
progressBar.value = 0;
progressSpan.textContent = 'Loading Pokedex info. Please wait until this is complete...';
for(let d = 0; d < dexNumbers.length; d++) {
/*
... | [
"static getPokemonDexPage($, id) {\n return $.get('https://pokefarm.com/dex/' + id);\n }",
"static getMainDexPage($) {\n return $.get('https://pokefarm.com/dex');\n }",
"static loadFormPages($, ownerDocument, firstFormHTML, progressBar, progressSpan) {\n const requ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the path to the worker files on this instance. | function setWorkerPath(newPath) {
workerPath = newPath;
} | [
"function updateFilePaths() {\n\tvar resourcePrefs = jQM.Utils.prefStrings.resourceStrings;\n\n\t//Set prefs to correspond with CSS type.\n\tsetPrefStrings(settings.cssType);\n\t\t\n\t//Update file paths.\n\tsettings.JQMJS_LOCATION_FIELD.value = dw.getPreferenceString(PREF_SECTION, resourcePrefs.jsDestPref, jqmDir+... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Terminates any existing ChefWorkers and sets up a new worker | setupChefWorker() {
for (let i = this.chefWorkers.length - 1; i >= 0; i--) {
this.removeChefWorker(this.chefWorkers[i]);
}
this.addChefWorker();
this.setupDishWorker();
} | [
"dispose () {\n\n for ( let taskWorker of this.workers.instances ) {\n\n taskWorker.terminate();\n\n }\n\n }",
"initWorker(worker) {\r\n worker.setRetryTime(FATUS_EQ_RETRY_TIME);\r\n worker.setMaxAttempts(FATUS_WRK_RETRY_ATTEMP);\r\n worker.setStackProtection(FATUS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a new texture test, go over all of the models, and see if it can match one of their textures. Matches are replaced with this texture. | function tryToLoadCustomTexture(textureTest) {
for (let modelTest of eachModelTest()) {
const model = modelTest.resource;
for (let i = 0, l = model.textures.length; i < l; i++) {
const modelTexture = model.textures[i];
// If the texture failed to load, check if it matches the name.
if (!mo... | [
"function tryToInjectCustomTextures(modelTest) {\n let model = modelTest.resource;\n let parser = modelTest.parser;\n\n for (let textureTest of eachTextureTest()) {\n for (let i = 0, l = model.textures.length; i < l; i++) {\n const texture = model.textures[i];\n\n texture.whenLoaded().then(() => {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Args to send a proposal to claim governance on the Aave strategy. | async function proposeClaimAaveStrategyArgs() {
const aaveStrategyProxy = await ethers.getContract("AaveStrategyProxy");
const args = await proposeArgs([
{
contract: aaveStrategyProxy,
signature: "claimGovernance()",
},
]);
const description = "Claim aave";
return { args, description };
} | [
"async function proposeProp14Args() {\n const mixOracle = await ethers.getContract(\"MixOracle\");\n const chainlinkOracle = await ethers.getContract(\"ChainlinkOracle\");\n\n const args = await proposeArgs([\n {\n contract: mixOracle,\n signature: \"registerTokenOracles(string,address[],address[])\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
import ReactRefs from './ReactRefs' | function RefIndex() {
return (
<div>
{/* <ReactRefs /> */}
{/* <FocusInput /> */}
<ForwardingRef />
</div>
)
} | [
"constructor(props) {\n super(props);\n this.inputElementRef = React.createRef();\n }",
"onRef (ref) {\n this.childComponentFunctions = ref\n }",
"componentDidMount() {\n this.setState({ mapRef: this.mapRef });\n }",
"function App() {\n return (\n <div className=\"App\">\n <TopBar/>\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes question via index | removeQuestion(index) {
prev = index - 1; // Splice requires 2 numbers
this.questions.splice(prev, index); // Removes anything between prev and index
} | [
"function removeQuestion() {\n removeQuestionID = questions.indexOf(selectedQuestion);\n questions.splice(removeQuestionID, 1);\n answerList.splice(removeQuestionID, 1);\n}",
"handleRemoveQuestion(e, position) {\n const newState = {questions: this.state.questions.slice()};\n console.log('Removing q... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calls fetchWeather. Called after the component has mounted itself to the DOM. | function postMount() {
fetchWeather().then(response => {
$$invalidate('weather', weather = response.currently);
$$invalidate('weatherIcon', weatherIcon = weatherIcons[weather.icon] || 'fa-sun');
});
} | [
"getWeather (currentCity) {\n this.setState({ isLoading: ! this.state.isLoading })\n const apiKey = '1072dfe12c2f4f7e8ddfa30683df95ca';\n fetch(`https://api.weatherbit.io/v1.0/forecast/3hourly/geosearch?city=${currentCity}&days=1&key=${apiKey}`)\n .then( response => response.json())\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setup the menu for desktop view | function initDesktopMenu() {
if(window.desktopCapable) {
curScrollTop = window.pageYOffset;
if(window.responsiveState !== 'mobile' && $active.length) {
window.requestAnimationFrame(function () {
return setIndicator($active[0]);
});
}
$window.smartresize(function(){
se... | [
"function setAppMenu() {\n let menuTemplate = [\n {\n label: appName,\n role: 'window',\n submenu: [\n {\n label: 'Quit',\n accelerator: 'CmdorCtrl+Q',\n role: 'close'\n }\n ]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resets zoom level and map center point, on click or in response to resizing of browser window width | function reset() {
var browserWidth = $(window).width();
if(browserWidth <= 1000) {
map.setCenter(mapOptions.center);
map.setZoom(11);
} else if(browserWidth > 1000) {
map.setCenter(mapOptions.center);
map.setZoom(12);
}
} | [
"function resetZoom() {\n map.setCenter({lat: 24.789973, lng: 46.656051})\n map.setZoom(15)\n map.fitBounds(bounds)\n }",
"resetMapAndVars(){\n controller.infoWindow.close();\n model.map.setZoom(13);\n model.map.setCenter(model.athensCenter);\n }",
"function setZoomOnMarkerClic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a comma delimited string from the state and data | function createCSV(state, data) {
let string = stateToCSV(state) + '\n\n';
let keys = Object.keys(data);
for (let i = 0; i < keys.length; i++) {
string += keys[i] + ','
}
string = string.slice(0, string.length - 1) + '\n';
for (let i = 0; i < data[keys[0]].length; i++){
for (let ... | [
"_convert_state_format(state)\n\t{\n\t\treturn state.join();\n\t}",
"insertComma( idx ) {\n\n if( this.state.coaches === null ||\n typeof this.state.coaches === \"undefined\" ) {\n return \"\";\n }\n\n if( (idx < this.state.coaches.length - 1) ) {\n return \",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registering middleware store to the container | $registerMiddlewareStore() {
this.$container.bind('Adonis/Core/MiddlewareStore', () => MiddlewareStore_1.MiddlewareStore);
} | [
"register (middleware) {\n this.stack.add(middleware)\n }",
"register() {\n this._container.instance('expressApp', require('express')())\n\n //TODO: add Socket.io here @url https://trello.com/c/KFCXzYom/71-socketio-adapter\n\n this._container.register('httpServing', require(FRAMEWORK_PATH + '/lib/HTT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Synchronous access to File, loading blocks from the input type=file The whole file is loaded into memory during initialisation | function SyncFileBuffer(file)
{
var PART_SIZE = 4 << 20,
ready = false,
me = this;
this.byteLength = file.size;
if(file.size > (1 << 30))
{
console.log("Warning: Allocating buffer of " + (file.size >> 20) + " MB ...");
}
var buffer = new ArrayBuffer(file.size),
... | [
"FileLoader() {}",
"function caml_open_sync_raw(fileName, onSuccess, onFailure) {\n var f = caml_js_from_string(fileName);\n var data = new joo_global_object.Uint8Array([17, 211, 2]);\n\n var result = null;\n\n function onSuccess () {\n var res = new joo_global_object.Uint8Array(oReq.response);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the string representation of the Deck class | toString() {
let s = `${this.name}:\n`;
for (let i = 0; i < this.deck.length; i++) {
s += this.deck[i].toString() + '\n';
}
s += `${this.deck.length} cards total`;
return s;
} | [
"function toString ()\n{\n let baleString = \"\";\n let fieldNames = Object.keys(PROPERTIES);\n\n // Loop through the fieldNames and build the string \n for (let name of fieldNames)\n {\n baleString += name + \":\" + this[name] +\";\";\n }\n\n return baleString;\n}",
"toString() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reset is called prior to every render, and it resets figure numbers, equation numbers and such. | reset() {
this.number = this.props.index + 1
this.counters = {
figure: 0
}
// TODO: Incorporate equation numbers.
} | [
"function reset() {\n defaultRenderers_ = {};\n decoratorFunctions_ = {};\n}",
"reset(){\n this.setSpeed();\n this.setStartPosition();\n }",
"reset() {\n /**\n * The overall error.\n */\n this.globalError = 0;\n /**\n * The size of a set.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Render document in target path | function renderDocument(document, targetPath, level) {
var outputDocument = deepcopy(document);
//prepare relative url path
outputDocument.relativeUrlPath = (new Array(level+1)).join('../');
//prepare document menu
var documentMenu = deepcopy(documentationMenu);
markCurrentMenuItems(documentMe... | [
"generate() {\n if (!fs.existsSync(this.outputPath)) {\n fs.mkdirSync(this.outputPath);\n }\n\n fs.writeFile(`${ this.outputPath }/index.html`, this.report, (err) => {\n if (err) {\n return logger.error(err);\n }\n });\n }",
"function ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
game state shutdown callback: wraps up anything this state should do before being switched out | function shutdown() {
console.log('shutdown() for game state "' + game.state.current + '"');
console.log('\n');
} | [
"disposeState() {}",
"_terminate() {\n console.log(\"terminate\");\n /*if (this.state !== or === ? GameStates.Terminating) {\n return; //error\n }*/\n\n this.state = GameStates.Terminating;\n clearTimeout(this.tick);\n this._clearTurn();\n this.destroy()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getProductPriceFromTaoBao(wantedProduct, foundHandler, errorHandler, errorHandler); this is the async api written with promise | function getProductPriceFromTaoBaoP(productName) {
var rwPromise = new RWPromise();
setTimeout(function () {
var rate = Math.random();
if (rate >= 0.5) { //50/50 fail success rate
rwPromise.resolve(productName + " price from taobao is: " + (100 + Math.random() * 100));
} else... | [
"function searchProductsByPrice(price, difference) {\n let productsByPrice;\n \n productsByPrice = new Promise(function(resolve, reject) {\n let products = [];\n let minPrice = price - difference;\n let maxPrice = price + difference;\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
global initValueProviders / global resolveValueProviders / global initWidgets / global models / global animateFps / global spinner / global javascript | function init() {
createjs.Ticker.framerate = animateFps;
Promise.all([Promise.all(initValueProviders()), Promise.all(initAnimates())]).then(() => {
Promise.all([initWidgets()]).then(() => {
resolveValueProviders();
Object.entries(models).forEach(([, model]) => model.init());
javascript.onBefo... | [
"function init() {\n utilsService.addDropdownOptions('from-currency', availableCurrencies);\n document.getElementById('amount').value = defaultAmount;\n getRates(selectedBase);\n}",
"function init(){\n var countrySel = $('#sel-country');\n var categorySel = $('#sel-category');\n var genderSel = $('#se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |