query stringlengths 9 14.6k | document stringlengths 8 5.39M | metadata dict | negatives listlengths 0 30 | negative_scores listlengths 0 30 | document_score stringlengths 5 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Updates the view after a signin or signout. | function updateView() {
var authenticationResponseViewBox = document.getElementById("authentication-response");
var idTokenHeaderViewBox = document.getElementById("id-token-header");
var idTokenPayloadViewBox = document.getElementById("id-token-payload");
var loggedInView = document.getElementById("logg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateSigninStatus(isSignedIn) {\n var signInView = getSignInView();\n console.log('sign in view: ', signInView);\n var homeView = getHomeView();\n console.log('home view: ', homeView);\n if (isSignedIn) {\n signInView.style.display = 'none';\n homeView.style.display = 'block';\n console.log... | [
"0.6914245",
"0.6425586",
"0.6352703",
"0.6232417",
"0.6210611",
"0.6203163",
"0.6136802",
"0.6128717",
"0.61246496",
"0.6112296",
"0.6103118",
"0.6100121",
"0.60899407",
"0.6089875",
"0.60887384",
"0.6076431",
"0.6071511",
"0.60556614",
"0.60523045",
"0.60458523",
"0.6044072... | 0.64875114 | 1 |
parent, args, ctx, info | greeting(parent, args){
return `my name is ${args.name}. I am a ${args.job}`
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"enterParenthese(ctx) {}",
"enterAddSub(ctx) {}",
"visitParent(ctx) {\n\t return this.visitChildren(ctx);\n\t}",
"exitParenthese(ctx) {}",
"greeting(Parent, args, ctx, info) {\n if (args.name) return `Welcome ${args.name}!`;\n return 'Welcome!';\n }",
"enterShowGlobalInfo(ctx... | [
"0.742526",
"0.5971044",
"0.59168196",
"0.5916569",
"0.5916047",
"0.58876675",
"0.5767946",
"0.57286453",
"0.568822",
"0.56656075",
"0.56117064",
"0.55934",
"0.5558435",
"0.55429816",
"0.5532124",
"0.5531385",
"0.550764",
"0.5486263",
"0.5466723",
"0.546302",
"0.54350513",
... | 0.60473126 | 1 |
get action channel from payload | function getChannelId(payload){
// update channel id for message api
if(payload.channel_id){
message.channel = payload.channel_id;
}
else{
message.channel = payload.channel.id;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get channel() {\n return this.interaction.channel;\n }",
"function getChannelName(channel) {\n // Your code here\n return channel.name\n}",
"function getChannel() {\n\t\treturn localStorage.getItem('selected_channel');\n\t}",
"channel(channel) {\n return this.connector.channel(channel);\n ... | [
"0.6467396",
"0.59808064",
"0.5782081",
"0.57484424",
"0.57484424",
"0.57230884",
"0.5563763",
"0.5563763",
"0.5563763",
"0.5563763",
"0.5548098",
"0.5534259",
"0.5534259",
"0.551298",
"0.55044997",
"0.5499142",
"0.5462754",
"0.5462754",
"0.5457317",
"0.54444385",
"0.54444385... | 0.62609345 | 1 |
returns a new basic slack message with attachments | function slackMessage(title, channel, attachments){
var message = {
"text": title,
"username": staticProps.appName,
"icon_url": staticProps.iconUrl,
"replace_original": true,
"attachments": attachments,
channel = channel
}
// stringify attachments array
message.attachString = JSON.stringify... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function prepareSlackMessage (message) {\n var text = '*' + message.eventName + '*' +\n ' performed by *' + message.userIdentity.type +\n '/' + ((message.userIdentity.type === 'IAMUser') ? message.userIdentity.userName : message.userIdentity.principalId) + '*' +\n ' via *'... | [
"0.6937494",
"0.6424176",
"0.62923074",
"0.6266378",
"0.6230585",
"0.6087876",
"0.60678977",
"0.5979468",
"0.5928643",
"0.58816236",
"0.5803245",
"0.57251227",
"0.5619739",
"0.55611825",
"0.5519486",
"0.550305",
"0.5478319",
"0.545922",
"0.54081166",
"0.53887725",
"0.53849095... | 0.7841362 | 0 |
sends a new templated slack message w title and attachments to channel used in action | function sendNewBasicSlack(payload, user, title, attachments, joinButtons, title, time){
var fullTitle = title.replace(TITLE_UID, getNameRef(user));
if(time.general){
fullTitle = fullTitle.replace(TITLE_TIME, time.general);
} else if (time.specific){
getTimeFromObj(time);
var msFormat = "<!date^"+time.sp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function slackMessage(title, channel, attachments){\n\t\tvar message = {\n\t\t\t\"text\": title,\n\t\t\t\"username\": staticProps.appName,\n\t\t\t\"icon_url\": staticProps.iconUrl,\n\t\t\t\"replace_original\": true,\n\t\t\t\"attachments\": attachments,\n\t\t\tchannel = channel\n\t\t}\n\t\t\n\t\t// stringify attach... | [
"0.7336219",
"0.691789",
"0.6645579",
"0.6429822",
"0.64271575",
"0.64193296",
"0.6414693",
"0.638477",
"0.63297737",
"0.6276196",
"0.62708366",
"0.62515163",
"0.6212901",
"0.6145153",
"0.6122976",
"0.6112903",
"0.60958976",
"0.6059373",
"0.6004748",
"0.59628326",
"0.5953231"... | 0.703106 | 1 |
send a "getting on at..." message can be result of specific time buttons or result of cache menu responses | function sendGettingOn(payload, user){
var time_day = "Sometime In the Future";
if(imon_cache[payload.user.id] && payload.actions[0].selected_options){
time_day = imon_cache[payload.user.id] + " " + payload.actions[0].selected_options[0].value;
}else{
time_day = payload.actions[0].value;
}
imon_cache[pa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"askTimingsToClients() {\n this.sendMessageToAllClients({\n command: 'timingsPlz'\n });\n }",
"function sendAskGetOn(payload, user){\n\t\tsendNewBasicSlack(payload, user, \n\t\t\t\"*\" + TITLE_UID + \":* \" +\"_Is anyone getting on Destiny *\" + TITLE_TIME + \"*?_\", \n\t\t\tgetJoinAtt... | [
"0.63612753",
"0.63456124",
"0.6039977",
"0.59135395",
"0.58266014",
"0.58182144",
"0.56573653",
"0.5656184",
"0.56526375",
"0.5631604",
"0.5580175",
"0.5573671",
"0.5569099",
"0.55569583",
"0.5552503",
"0.5541589",
"0.553964",
"0.5535392",
"0.55350405",
"0.55323505",
"0.5519... | 0.6461404 | 0 |
send a "anyone getting on?" message | function sendAskGetOn(payload, user){
sendNewBasicSlack(payload, user,
"*" + TITLE_UID + ":* " +"_Is anyone getting on Destiny *" + TITLE_TIME + "*?_",
getJoinAttachment(getNameRef(user), false, user, null, [joinButtons.imon, joinButtons.illgeton]),
[joinButtons.imon, joinButtons.illgeton],
{general: ti... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ping(greet){\n emitter.publish({\n key: 'LoD3PKxDVsNrruAGdnwbZVH4E8ZPqrJN',\n channel: 'user-ping/v1/',\n message: JSON.stringify({\n token: getPersistentVisitorId(),\n greet: greet\n })\n });\n}",
"function sendGettingOn(payload, user){\n\t\tvar t... | [
"0.6682006",
"0.6218157",
"0.6043983",
"0.59134257",
"0.5861972",
"0.5848815",
"0.5834586",
"0.5821798",
"0.58185184",
"0.580922",
"0.58075356",
"0.5790824",
"0.578946",
"0.5764058",
"0.57465297",
"0.5732194",
"0.5719887",
"0.5712637",
"0.56926376",
"0.5638936",
"0.5632935",
... | 0.69969213 | 0 |
the "poll results" attachment with fields | function getJoinPollAttachment(fieldArray){
return {
"callback_id": callbackIds.joinPoll,
"fallback": "Join Poll",
"color": staticProps.message.publicColor,
"fields": fieldArray
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getPollResults() {\n\tvar result = $.ajax({\n\t\ttype: 'GET',\n\t\turl: root_url + \"/getPollResults/\" + presID + \"/\" + currentSlide,\n\t\tdataType: \"json\",\n\t\tasync: false,\n\t});\n\t\n\tresult = result.responseJSON;\n\t\n\tvar rS = document.getElementsByClassName(\"r\");\n\t\n\tfor(var i = 0; i <... | [
"0.56914914",
"0.5535191",
"0.5429831",
"0.53156364",
"0.52679473",
"0.52601683",
"0.51926374",
"0.5188921",
"0.51564425",
"0.5116328",
"0.5061213",
"0.50517225",
"0.5048176",
"0.50337005",
"0.5029408",
"0.49923417",
"0.49905363",
"0.49767393",
"0.49757108",
"0.49148884",
"0.... | 0.58097184 | 0 |
handle add join poll action | function handleAddJoin(payload){
debug("handleAddJoin...");
var ts = payload.actions[0].value;
debug(messageCache[ts]);
var messageClass = messageCache[ts];
var message = messageClass.orginalMessage;
messageClass.messageData.join.hasJoin = true;
messageClass.dateModified = Date.now();
// set... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleJoin(payload){\n\t\t//debug('payload: \\n' + JSON.stringify(payload, null, 2));\n\t\t// get message as original message\n\t\tvar messageClass = messageCache[payload.message_ts];\n\t\t\n\t\t// add user to choice area, remove from others\n\t\taddAndRemove(payload.user, messageClass, payload.actions[0]... | [
"0.6974427",
"0.6530346",
"0.6228686",
"0.5995625",
"0.5993079",
"0.5892345",
"0.5884114",
"0.58657205",
"0.5817147",
"0.5767664",
"0.5753089",
"0.5747976",
"0.57371116",
"0.5731949",
"0.56701475",
"0.56011456",
"0.5588888",
"0.5580734",
"0.55695313",
"0.5526861",
"0.5520616"... | 0.6721109 | 1 |
handle remove join poll action | function handleRemoveJoin(payload){
debug("handleRemoveJoin...");
var ts = payload.actions[0].value;
debug(messageCache[ts]);
var messageClass = messageCache[ts];
var message = messageClass.orginalMessage;
messageClass.messageData.join.hasJoin = false;
messageClass.dateModified = Date.now();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"unjoin({gameId,role,userId,userName}) { this.$publish('unjoin', {gameId,role,userId,userName})}",
"unjoin_result({callerId,error,msgId,payload}) { this.$publish('unjoin_result', {callerId,error,msgId,payload})}",
"function handleDelete(workoutPlan){\n fetch(`http://localhost:3000/workout_plans/${workout... | [
"0.6310683",
"0.6280779",
"0.5937621",
"0.59322727",
"0.5922268",
"0.55742085",
"0.5572759",
"0.55304945",
"0.5522976",
"0.5497385",
"0.5486307",
"0.5449932",
"0.543475",
"0.540206",
"0.53564453",
"0.5355344",
"0.53478736",
"0.5336807",
"0.5335485",
"0.53282547",
"0.5307718",... | 0.71416545 | 0 |
the join poll result field array | function getJoinResultFields(message){
var fieldsArray = [];
// get all the button types' keys
var buttonKeys = Object.keys(joinButtons);
for(var i = 0; i < buttonKeys.length; i++){
var key = buttonKeys[i];
// add new field if message has this button
if(message.data.join.buttons[key]){
fieldsArr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getJoinPollAttachment(fieldArray){\n\t\treturn {\n\t\t\t\"callback_id\": callbackIds.joinPoll,\n\t\t\t\"fallback\": \"Join Poll\",\n\t\t\t\"color\": staticProps.message.publicColor,\n\t\t\t\"fields\": fieldArray\n\t\t};\n\t}",
"function joinArray(arr, delimiter) {\n\t// var result = toNumberTypeArray(ar... | [
"0.5880455",
"0.5389099",
"0.5280512",
"0.52579665",
"0.52579665",
"0.5246714",
"0.5246714",
"0.52466863",
"0.5154379",
"0.50202173",
"0.49922046",
"0.49153447",
"0.49067557",
"0.48466828",
"0.4786391",
"0.47731254",
"0.4753342",
"0.4733699",
"0.471825",
"0.471773",
"0.470913... | 0.59831464 | 0 |
handles join action for all join attachments join poll becomes second attachment to all messages contains the names of users who clicked yes, no, maybe | function handleJoin(payload){
//debug('payload: \n' + JSON.stringify(payload, null, 2));
// get message as original message
var messageClass = messageCache[payload.message_ts];
// add user to choice area, remove from others
addAndRemove(payload.user, messageClass, payload.actions[0].value);
// build p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleAddJoin(payload){\n\t\tdebug(\"handleAddJoin...\");\n\t\t\n\t\tvar ts = payload.actions[0].value;\n\t\tdebug(messageCache[ts]);\n\t\t\n\t\tvar messageClass = messageCache[ts];\n\t\tvar message = messageClass.orginalMessage;\n\n\t\tmessageClass.messageData.join.hasJoin = true;\n\t\tmessageClass.dateM... | [
"0.69705504",
"0.6557104",
"0.6106105",
"0.606625",
"0.58695006",
"0.5779472",
"0.56892115",
"0.5635387",
"0.56102294",
"0.5472969",
"0.54583627",
"0.5417478",
"0.54105926",
"0.53689116",
"0.5294538",
"0.5276256",
"0.52737325",
"0.52537036",
"0.5251619",
"0.5242366",
"0.52344... | 0.74490845 | 0 |
CALCULATOR OBJECT DEFINITIONS // ///////////////////////////////////////////////////////////////////// / Constructs a new calculator object. inputObj a cache for the intput object in the DOM outputObj a cache for the screen object in the DOM | function Calculator(inputObj,outputObj) {
/* Private Members */
var screen = 0;
var that = this;
var updateScreen = function() {
that.output.innerHTML = screen.toString();
that.clearInput();
}
/* Public Members */
this.input = inputObj;
this.output = outputObj;
/* Privilleged Methods */
this.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Calculator(){\n this.result = 0; //the result of calculation\n this.op1 = null; //operand 1\n this.op2 = null; //operand 2k\n this.operation = null; //the operation to be performed\n this.sequence = ''; //the sequence entered\n}",
"function Calculator(displayID) {\n this.displayID = displayID;\n ... | [
"0.68851703",
"0.6718849",
"0.65328586",
"0.65096384",
"0.65081865",
"0.6506652",
"0.6470565",
"0.6399577",
"0.638896",
"0.6321255",
"0.6320435",
"0.62677544",
"0.6257831",
"0.62460667",
"0.62415594",
"0.6234276",
"0.6228686",
"0.620815",
"0.6204832",
"0.6187564",
"0.61489177... | 0.77237654 | 0 |
when one of the notes are clicked, d is data for that old data | function handleNoteClick(d){
console.log("in handleNoteClick(d), selection " + d.selection + ",instrument: " + d.inst);
//a note was clicked
//if some sound is selected in the first place TODO no hardcoding
if((!!selSound&&selSound.soundSource==d.soundSource)|| selSound.sound==... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleShowNote( event ){\n event.preventDefault();\n const id = event.currentTarget.id;\n console.log( `[handleShowNote] two ways: id='${id}' dataset: `, event.currentTarget.dataset )\n // setting active note to the note clicked\n activeNote = {\n id,\n title: event.currentTarget.dataset.title,... | [
"0.66330296",
"0.63174224",
"0.63032573",
"0.61692584",
"0.60293233",
"0.5981178",
"0.5919859",
"0.59146625",
"0.5880765",
"0.5856924",
"0.5820001",
"0.58023036",
"0.57978755",
"0.57919675",
"0.57855827",
"0.5781374",
"0.5779687",
"0.57640505",
"0.57536036",
"0.5748437",
"0.5... | 0.7849233 | 0 |
param evenOrOddBackgroundColor: color distinction for different instruments param horPos: horizontal position return color for | function evenOrOddColor(evenOrOddBackgroundColor, horPos){
var r,g,b;
if(evenOrOddBackgroundColor==1){
r=235;
g=235;
b=140;
}
else if (evenOrOddBackgroundColor==0){
r=135;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _getHeaderBackgroundColor() {\n return scrollY.interpolate({\n inputRange: [0, 140],\n outputRange: ['rgba(0,0,0,0.0)', AppStyles.color.HEADER_COLOR],\n extrapolate: 'clamp',\n useNativeDriver: true,\n });\n }",
"function getBgColorForRow(i) {\n if (i % 2 == 0) return '#fff... | [
"0.59013766",
"0.55789346",
"0.5384428",
"0.53753126",
"0.5361075",
"0.53138834",
"0.528536",
"0.5285241",
"0.52330935",
"0.5230612",
"0.5221491",
"0.5219413",
"0.515837",
"0.51438713",
"0.51438713",
"0.51401156",
"0.5107564",
"0.5104629",
"0.5103132",
"0.50958407",
"0.509272... | 0.8257445 | 0 |
fetch mane oi link theke tule Ana ,then json e turn kre then console log kre fetch(' .then(response => response.json()) .then(json => console.log(json)) 1st button | function loaddata(){
fetch('https://jsonplaceholder.typicode.com/todos/1')
// link theke string golo stringify hisave ase
.then(response =>response.json())
.then(data =>console.log(data))
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ButtonClick()\r\n{\r\nfetch(URL).then(function(response) {\r\n\t\tresponse.json().then(function(text) {\r\n\t\t\t\tcats(text);\r\n\t\t});\r\n});\r\n}",
"function prueba(){\n fetch(\"/rutas.\")\n .then(res => res.json())\n .then(data=>{\n console.log(data)\n })\n }",
"_get... | [
"0.70416415",
"0.68549293",
"0.6836788",
"0.67781234",
"0.6744042",
"0.664164",
"0.66343206",
"0.66022277",
"0.6581551",
"0.65669334",
"0.65638703",
"0.6538884",
"0.65041894",
"0.64982086",
"0.6493665",
"0.6493053",
"0.6483963",
"0.6478498",
"0.6447503",
"0.6422576",
"0.64048... | 0.7094669 | 0 |
===================================================================== P1 common substrings ===================================================================== | function common_substrings(s1, s2) {
var len1 = s1.length;
var len2 = s2.length;
if (len1 = 0)
return "";
var str1 = s1.split('');
str1.map( function(char1, index) {
console.log(index + ": CHAR -- " + char1);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function p1() {\n console.log(\"RUNNING P1\");\n stringList.map((stringPair) => {\n let [str1, str2] = stringPair;\n\n common_substrings(str1, str2);\n });\n}",
"function commonsubstring(str1, str2) {\n if (!str1 || !str2) {\n return {\n index: 0,\n commonstring: \"\"\n };\n }\n var i... | [
"0.6932008",
"0.67002046",
"0.6378584",
"0.6322568",
"0.6300203",
"0.62732404",
"0.62410635",
"0.61848253",
"0.6135341",
"0.6033618",
"0.6029596",
"0.6025714",
"0.60158443",
"0.60005635",
"0.59731513",
"0.5940784",
"0.59325916",
"0.5918074",
"0.5892618",
"0.58593357",
"0.5851... | 0.75099975 | 0 |
===================================================================== P2 sum list of numbers (recursion) ===================================================================== | function sum_rec(nums) {
if (nums.length > 1){
return nums.pop() + sum_rec(nums);
} else {
return nums.pop();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sum(list) {\n\n}",
"function recursiveSum(numsArr) {\n if (!numsArr.length) return 0;\n return numsArr[0] + recursiveSum(numsArr.splice(1));\n}",
"function betterSum(list) {\n // 👍\n // accumulator\n function go(acc, xs) {\n if (xs.length === 0) return acc\n return go(acc + frist(xs), re... | [
"0.73381793",
"0.72284895",
"0.7105554",
"0.7033851",
"0.70098686",
"0.69648933",
"0.6960589",
"0.69076556",
"0.69042695",
"0.68985564",
"0.6852752",
"0.6834865",
"0.67717886",
"0.67588866",
"0.67492086",
"0.6738849",
"0.6733756",
"0.6714333",
"0.6709252",
"0.67044646",
"0.66... | 0.73904586 | 0 |
===================================================================== P1 TEST COMMON_SUBSTRINGS ===================================================================== | function p1() {
console.log("RUNNING P1");
stringList.map((stringPair) => {
let [str1, str2] = stringPair;
common_substrings(str1, str2);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function common_substrings(s1, s2) {\n var len1 = s1.length;\n var len2 = s2.length;\n\n if (len1 = 0)\n return \"\";\n\n var str1 = s1.split('');\n\n str1.map( function(char1, index) {\n console.log(index + \": CHAR -- \" + char1);\n });\n}",
"substrings(prefix, limit) {\n let str = '';\n ... | [
"0.6699848",
"0.62019444",
"0.60810435",
"0.578882",
"0.57831854",
"0.569693",
"0.56330186",
"0.5612362",
"0.55797315",
"0.55685467",
"0.5563679",
"0.5501188",
"0.5410723",
"0.5400151",
"0.53901714",
"0.53415704",
"0.5330237",
"0.532635",
"0.5308885",
"0.5306548",
"0.52947766... | 0.63368696 | 1 |
===================================================================== P5 TEST VALIDIP ===================================================================== | function p5() {
console.log("RUNNING P5 - isValidIp");
ipList.map( function(ipStr) {
console.log(ipStr + ": " + isValidIp(ipStr));
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function record_valid_ip(error, resp, body) {\n active_conn -= 1;\n if (!error) {\n var ip = resp.request.uri.href;\n console.log('valid: ', ip);\n fs.appendFile('validips', ip + '\\n', function (err) {\n if (err) throw err;\n });\n send_post(ip);\n }\n}",
"... | [
"0.6429101",
"0.6309101",
"0.62865037",
"0.62284046",
"0.60902715",
"0.60824186",
"0.60448444",
"0.6035598",
"0.60283834",
"0.60161984",
"0.60033077",
"0.5989154",
"0.5934158",
"0.59139204",
"0.5913481",
"0.5881156",
"0.58594614",
"0.58376443",
"0.5791234",
"0.5747154",
"0.57... | 0.8152791 | 0 |
===================================================================== P6 TEST sumFile ===================================================================== | function p6() {
console.log("RUNNING P6 - sum_of_file");
numFilelist.map( function(numList, index) {
console.log("index: " + numList);
console.log("SUM -- " + sumFile(numList));
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sumFromFile(filename) {\n \n}",
"function main() {\n const ws = fs.createWriteStream(process.env.OUTPUT_PATH);\n\n const arCount = parseInt(readLine(), 10);\n\n const ar = readLine().split(' ').map(arTemp => parseInt(arTemp, 10));\n\n let result = aVeryBigSum(ar);\n\n ws.write(result + \"\\n\");\n... | [
"0.7318458",
"0.6147675",
"0.6075243",
"0.595345",
"0.5918969",
"0.58610725",
"0.5797782",
"0.5665276",
"0.56185985",
"0.55564195",
"0.55364096",
"0.55364096",
"0.55364096",
"0.55364096",
"0.55364096",
"0.55364096",
"0.55364096",
"0.55364096",
"0.55258924",
"0.547106",
"0.544... | 0.6765331 | 1 |
/ Get InGame Odds by Date / / The date of the game(s). Examples: 20181120, 20181123. | getInGameOddsByDatePromise(date){
var parameters = {};
parameters['date']=date;
return this.GetPromise('/v3/cbb/odds/{format}/LiveGameOddsByDate/{date}', parameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getPreGameOddsByDatePromise(date){\n var parameters = {};\n parameters['date']=date;\n return this.GetPromise('/v3/cbb/odds/{format}/GameOddsByDate/{date}', parameters);\n }",
"getAlternateMarketPreGameOddsByDatePromise(date){\n var parameters = {};\n parameters['date']=date... | [
"0.70254666",
"0.66054136",
"0.6531076",
"0.64960426",
"0.6354144",
"0.5643853",
"0.5619265",
"0.5531218",
"0.544642",
"0.5407564",
"0.535032",
"0.5338387",
"0.53007984",
"0.52282846",
"0.51993096",
"0.51778764",
"0.5149696",
"0.51333475",
"0.51324546",
"0.5130027",
"0.512494... | 0.74899614 | 0 |
/ Get InGame Odds Line Movement / / The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776 | getInGameOddsLineMovementPromise(gameid){
var parameters = {};
parameters['gameid']=gameid;
return this.GetPromise('/v3/cbb/odds/{format}/LiveGameOddsLineMovement/{gameid}', parameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getPreGameOddsLineMovementPromise(gameid){\n var parameters = {};\n parameters['gameid']=gameid;\n return this.GetPromise('/v3/cbb/odds/{format}/GameOddsLineMovement/{gameid}', parameters);\n }",
"getAlternateMarketPreGameOddsLineMovementPromise(gameid){\n var parameters = {};\n ... | [
"0.6439155",
"0.5922979",
"0.5334025",
"0.5219226",
"0.51417255",
"0.5116945",
"0.50623274",
"0.5043931",
"0.5043931",
"0.49713576",
"0.4952274",
"0.4952274",
"0.49482986",
"0.4920571",
"0.49186316",
"0.48923212",
"0.4881535",
"0.48662907",
"0.48435783",
"0.48025346",
"0.4762... | 0.6818713 | 0 |
/ Get PreGame Odds by Date / / The date of the game(s). Examples: 20181120, 20181123. | getPreGameOddsByDatePromise(date){
var parameters = {};
parameters['date']=date;
return this.GetPromise('/v3/cbb/odds/{format}/GameOddsByDate/{date}', parameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getAlternateMarketPreGameOddsByDatePromise(date){\n var parameters = {};\n parameters['date']=date;\n return this.GetPromise('/v3/cbb/odds/{format}/AlternateMarketGameOddsByDate/{date}', parameters);\n }",
"getInGameOddsByDatePromise(date){\n var parameters = {};\n parameter... | [
"0.66937184",
"0.66854095",
"0.6410721",
"0.6381417",
"0.59002364",
"0.577207",
"0.5693238",
"0.56015223",
"0.55256456",
"0.5335659",
"0.523713",
"0.51973104",
"0.51837265",
"0.51002413",
"0.5088572",
"0.5060887",
"0.5058139",
"0.5018793",
"0.50014806",
"0.49144393",
"0.49135... | 0.7384812 | 0 |
/ Get PreGame Odds Line Movement / / The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776 | getPreGameOddsLineMovementPromise(gameid){
var parameters = {};
parameters['gameid']=gameid;
return this.GetPromise('/v3/cbb/odds/{format}/GameOddsLineMovement/{gameid}', parameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getInGameOddsLineMovementPromise(gameid){\n var parameters = {};\n parameters['gameid']=gameid;\n return this.GetPromise('/v3/cbb/odds/{format}/LiveGameOddsLineMovement/{gameid}', parameters);\n }",
"getAlternateMarketPreGameOddsLineMovementPromise(gameid){\n var parameters = {};\n... | [
"0.5990105",
"0.59639704",
"0.5010511",
"0.4971905",
"0.4918926",
"0.48471242",
"0.48084563",
"0.48082304",
"0.47662434",
"0.47662434",
"0.47172666",
"0.47136584",
"0.47105607",
"0.47073787",
"0.47004423",
"0.4695116",
"0.4673419",
"0.46562716",
"0.4651979",
"0.46462825",
"0.... | 0.6675829 | 0 |
/ Get Alternate Market PreGame Odds by Date / / The date of the game(s). Examples: 20181120, 20181123. | getAlternateMarketPreGameOddsByDatePromise(date){
var parameters = {};
parameters['date']=date;
return this.GetPromise('/v3/cbb/odds/{format}/AlternateMarketGameOddsByDate/{date}', parameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getPreGameOddsByDatePromise(date){\n var parameters = {};\n parameters['date']=date;\n return this.GetPromise('/v3/cbb/odds/{format}/GameOddsByDate/{date}', parameters);\n }",
"getInGameOddsByDatePromise(date){\n var parameters = {};\n parameters['date']=date;\n retur... | [
"0.7121205",
"0.6688155",
"0.612505",
"0.6081314",
"0.5789206",
"0.544819",
"0.5413335",
"0.53632164",
"0.5304017",
"0.52680814",
"0.522043",
"0.50572526",
"0.49938846",
"0.49420702",
"0.49302965",
"0.49208128",
"0.4914678",
"0.4900382",
"0.4897131",
"0.48802578",
"0.48281056... | 0.7380197 | 0 |
/ Get Alternate Market PreGame Odds Line Movement / / The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776 | getAlternateMarketPreGameOddsLineMovementPromise(gameid){
var parameters = {};
parameters['gameid']=gameid;
return this.GetPromise('/v3/cbb/odds/{format}/AlternateMarketGameOddsLineMovement/{gameid}', parameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getPreGameOddsLineMovementPromise(gameid){\n var parameters = {};\n parameters['gameid']=gameid;\n return this.GetPromise('/v3/cbb/odds/{format}/GameOddsLineMovement/{gameid}', parameters);\n }",
"getInGameOddsLineMovementPromise(gameid){\n var parameters = {};\n parameters[... | [
"0.61311674",
"0.5620415",
"0.5125668",
"0.5053454",
"0.4971128",
"0.49106345",
"0.47951522",
"0.4793909",
"0.47751546",
"0.47751546",
"0.47650486",
"0.47650486",
"0.47647664",
"0.4754205",
"0.47064707",
"0.46887738",
"0.46791753",
"0.46776477",
"0.4672901",
"0.46704784",
"0.... | 0.6244702 | 0 |
/ Get Betting Trends By Matchup / / The abbreviation of the requested team. Examples: OU, UK. / The abbreviation of the requested opponent. Examples: OU, UK. | getBettingTrendsByMatchupPromise(team, opponent){
var parameters = {};
parameters['team']=team;
parameters['opponent']=opponent;
return this.GetPromise('/v3/cbb/odds/{format}/MatchupTrends/{team}/{opponent}', parameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getBettingTrendsByTeamPromise(team){\n var parameters = {};\n parameters['team']=team;\n return this.GetPromise('/v3/cbb/odds/{format}/TeamTrends/{team}', parameters);\n }",
"function getScoreFromTeamNamePair(awayTeam, homeTeam, data)\n{\n\tvar idx = getGameDataJsonFragment('LineScore', d... | [
"0.6254038",
"0.56813407",
"0.5642377",
"0.5623964",
"0.5620886",
"0.5546676",
"0.5527371",
"0.5501848",
"0.5492932",
"0.54854715",
"0.54837507",
"0.54402405",
"0.5407067",
"0.5405138",
"0.5404877",
"0.53901064",
"0.53724",
"0.53548515",
"0.5349986",
"0.5339465",
"0.53213966"... | 0.74512005 | 0 |
/ Get Betting Trends By Team / / The abbreviation of the requested team. Examples: OU, UK. | getBettingTrendsByTeamPromise(team){
var parameters = {};
parameters['team']=team;
return this.GetPromise('/v3/cbb/odds/{format}/TeamTrends/{team}', parameters);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getBettingTrendsByMatchupPromise(team, opponent){\n var parameters = {};\n parameters['team']=team;\n parameters['opponent']=opponent;\n return this.GetPromise('/v3/cbb/odds/{format}/MatchupTrends/{team}/{opponent}', parameters);\n }",
"async function getTeams(term, callback) {\n ... | [
"0.6249135",
"0.5629975",
"0.55026597",
"0.5373628",
"0.53257084",
"0.5272245",
"0.52337444",
"0.52287376",
"0.52231354",
"0.51940835",
"0.51862705",
"0.5175932",
"0.5155705",
"0.5119144",
"0.51032925",
"0.5087276",
"0.50764865",
"0.5046189",
"0.50272846",
"0.50012547",
"0.49... | 0.73176175 | 0 |
Create bullet chart with specified color type for background | function createBulletChart(parent, colorType) {
var colors = ["#24abe2", "#3af901", "#fefb01", "#FF6611", "#F90D1B"];
/* Create chart instance */
var chart = container.createChild(am4charts.XYChart);
chart.paddingRight = 25;
/* Add data */
chart.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"addBackground (color) {\n\t\tlet test = false;\n\t\tif (test) {\n\t\t\tlet style = {\n\t\t\t\tfill: '#00FF00'\n\t\t\t};\n\t\t\tlet testItem = new PIXI.Text('Background', style);\n\t\t\ttestItem.x = 0;\n\t\t\ttestItem.y = 50;\n\t\t\tthis.pixiRootContainer.addChild(testItem);\n\t\t}\n\t\telse {\n\t\t\tlet background... | [
"0.5807867",
"0.57796335",
"0.57668275",
"0.57154447",
"0.5712209",
"0.5436683",
"0.5395307",
"0.5353178",
"0.53016007",
"0.5292408",
"0.5291717",
"0.52670705",
"0.52530944",
"0.5208345",
"0.5184536",
"0.51820964",
"0.51797503",
"0.51630324",
"0.5161816",
"0.51609445",
"0.515... | 0.69605803 | 0 |
Sends index page with articles from the database to the client | function getRoot(req, res) {
Article.find(defaultArticleQueryConditions)
.sort({ datePublished: 'desc' })
.then(articles => articles.map(enrichArticle))
.then(articles => res.render('index', { articles }))
.catch(() => res.status(404).send('page unavailable'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async index ({ request, response, auth }) {\n const result = await ArticleService.getAll(request, auth);\n return response.status(result.status).send(result.data);\n }",
"function homePage(req, res) {\n let SQL = 'SELECT * FROM books;';\n client.query(SQL)\n .then(result => {\n res... | [
"0.70610726",
"0.6666797",
"0.6547837",
"0.65129393",
"0.64781475",
"0.6419144",
"0.6358834",
"0.6357183",
"0.6310871",
"0.6293828",
"0.6281928",
"0.62616056",
"0.625931",
"0.6241165",
"0.62071633",
"0.6185373",
"0.6178807",
"0.61502033",
"0.6085262",
"0.60205364",
"0.6011526... | 0.6818737 | 1 |
public returns the combo object for the Item Id | function igdrp_getComboById(itemId) {
var id = igdrp_comboIdById(itemId);
return igdrp_comboState[id];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function igdrp_getComboByItem(item){return igdrp_all[igdrp_comboIdById(item.id)];}",
"function igdrp_getComboByItem(item) {\r\n\tvar id = igdrp_comboIdById(item.id); \r\n\treturn igdrp_comboState[id];\r\n}",
"function igdrp_comboIdById(itemId){return itemId.split(\"_\")[0];}",
"function igdrp_comboIdById(it... | [
"0.81912166",
"0.78382605",
"0.7295398",
"0.7264297",
"0.6861185",
"0.6790095",
"0.66167516",
"0.65547246",
"0.6510004",
"0.625457",
"0.62217575",
"0.62215877",
"0.61625004",
"0.61506593",
"0.6133963",
"0.6050231",
"0.59952825",
"0.59247535",
"0.59021014",
"0.58985454",
"0.58... | 0.81035376 | 1 |
public returns the combo object from an Item element | function igdrp_getComboByItem(item) {
var id = igdrp_comboIdById(item.id);
return igdrp_comboState[id];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function igdrp_getComboByItem(item){return igdrp_all[igdrp_comboIdById(item.id)];}",
"function igdrp_getComboById(itemId) {\r\n\tvar id = igdrp_comboIdById(itemId); \r\n\treturn igdrp_comboState[id];\r\n}",
"function getComboBoxItem() {\n\t\tvar categories_NAME = $(\"#cboCategories\").val();\n\t\tvar url = ba... | [
"0.7578139",
"0.69785124",
"0.6599791",
"0.6396674",
"0.6293997",
"0.619401",
"0.6090196",
"0.6035499",
"0.5984216",
"0.59591156",
"0.5915188",
"0.59094036",
"0.5884839",
"0.588085",
"0.5864215",
"0.58360505",
"0.5819154",
"0.58024174",
"0.57503235",
"0.5734188",
"0.572571",
... | 0.7407828 | 1 |
public returns the combo Name from an itemId | function igdrp_comboIdById(itemId) {
var comboName = itemId;
var strArray = comboName.split("_");
return strArray[0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function igdrp_comboIdById(itemId){return itemId.split(\"_\")[0];}",
"function igdrp_getComboById(itemId) {\r\n\tvar id = igdrp_comboIdById(itemId); \r\n\treturn igdrp_comboState[id];\r\n}",
"function itemName(item) {\n return item.name;\n }",
"function igdrp_getComboByItem... | [
"0.7724122",
"0.7065624",
"0.69647586",
"0.6772526",
"0.6576779",
"0.6387307",
"0.6181012",
"0.60807514",
"0.60807514",
"0.60601646",
"0.600423",
"0.59509677",
"0.5904245",
"0.5899159",
"0.58388865",
"0.5737468",
"0.5689704",
"0.5667666",
"0.56099755",
"0.5586054",
"0.5572531... | 0.7834105 | 0 |
private initializes the combo object on the client | function igdrp_initCombo(comboId) {
var comboElement = igdrp_getElementById(comboId);
var oCombo = new igdrp_combo(comboElement,eval("igdrp_"+comboId+"_Props"));
igdrp_comboState[comboId] = oCombo;
ig_fireEvent(oCombo, oCombo.Events.InitializeCombo[0], oCombo, comboId);
if(ig.IsIE && oCombo.HideDr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function igdrp_initCombo(comboId)\r\n{\r\n var elem=igdrp_getElementById(comboId);\r\n var oCombo=new igdrp_combo(elem,eval(\"igdrp_\"+comboId+\"_Props\"));\r\n ig_fireEvent(oCombo,oCombo.Events.InitializeCombo[0],oCombo,comboId);\r\n if(ig_csom.IsIE && oCombo.HideDropDowns==true && igdrp_dropDowns==null)i... | [
"0.68083084",
"0.66446644",
"0.65308297",
"0.6488792",
"0.64757735",
"0.6475194",
"0.6442674",
"0.6365668",
"0.63634586",
"0.63339525",
"0.6327936",
"0.63163245",
"0.62996703",
"0.62992084",
"0.62791353",
"0.62781036",
"0.627292",
"0.62721837",
"0.6216038",
"0.6149757",
"0.61... | 0.6697244 | 1 |
private Obtains the proper source element in relation to an event | function igdrp_srcElement(evnt)
{
var se
if(evnt.target)
se=evnt.target;
else if(evnt.srcElement)
se=evnt.srcElement;
return se;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"eventSource(){\n\t\tconst target = window.event.target;\n\t\tif(target){\n\t\t\treturn Element.wrap(target,this);\n\t\t}\n\t\treturn null;\n\t}",
"function RadUtil_GetEventSource(e)\r\n{\r\n\tif (null == e)\r\n\t\treturn null;\r\n\r\n\tif (e.srcElement)\r\n\t\treturn e.srcElement;\r\n\telse if (e.target)\r\n\t\t... | [
"0.74091923",
"0.70417756",
"0.6988531",
"0.69107294",
"0.65147847",
"0.65039015",
"0.65039015",
"0.65018857",
"0.6418266",
"0.6362721",
"0.635775",
"0.6331419",
"0.6331419",
"0.6245097",
"0.6245097",
"0.61866575",
"0.6168077",
"0.6137794",
"0.61264235",
"0.6119169",
"0.60875... | 0.73110783 | 1 |
getTeam method, will print out all teams from each division. | getTeams() {
let result = `TEAMS ${View.NEWLINE()}`
result += `Premiership Division ${View.NEWLINE()}`
for (let aTeam of this.allPDTeams){
result += aTeam + `${View.NEWLINE()}`
}
result += `Championship Division ${View.NEWLINE()}`
for (let aTeam of this.allCDTeams){
result += aTeam + `${View.NEWLINE(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function findTeamsByDivision() {\n let teamsByDivision = [];\n $.getJSON(\"api/teams\", function (result) {\n let teams = result;\n let teamsLength = teams.length;\n\n for (let i = 0; i < teamsLength; i++) {\n if ($(\"#division\").val() == teams[i].League) {\n t... | [
"0.68002677",
"0.65781134",
"0.656299",
"0.6547427",
"0.6531333",
"0.6521416",
"0.64684516",
"0.646664",
"0.6456954",
"0.6401949",
"0.6385975",
"0.63811636",
"0.63718045",
"0.6369893",
"0.636691",
"0.63630176",
"0.6297684",
"0.62951726",
"0.6294561",
"0.6271191",
"0.62408274"... | 0.73001105 | 0 |
getCanterburyGames method, was thinking to call getGames as based on the teamName, my method will print out different result but pdf asks specific name for this method But still for futureproof, this method will receive variable called teamName which is a string, that we want to get result out of. | getCanterburyGames(teamName) {
// find the rank of the team we want, as I dont want to use magic number. futureproof
for (let aTeam of this.allTeams){
if (aTeam["name"] == teamName){
var aRank = aTeam["rank"]
}
}
// again, fufure proofing print line, instead of fixed string with Canterbury
let speci... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async function getTeamByName(team_name){\n let league_teams_list = []\n const teams_list = await axios.get(`${api_domain}/teams/search/${team_name}`, {\n params: {\n api_token: process.env.api_token,\n include: \"league\"\n },\n });\n \n teams_list.data.data.map((... | [
"0.6276278",
"0.62393343",
"0.62169236",
"0.6201358",
"0.61917675",
"0.61916536",
"0.60866606",
"0.60701597",
"0.6059977",
"0.60498965",
"0.60439664",
"0.6025633",
"0.59936726",
"0.5993177",
"0.59901816",
"0.59459525",
"0.5931361",
"0.5931136",
"0.5924352",
"0.5889811",
"0.58... | 0.79808855 | 0 |
getCrossOverGames method, to print out games thats between Premiership and Championship | getCrossOverGames() {
let crossovergames = "Will display crossover games" + `${View.NEWLINE()}`
// allGames will have multiple lists inside as there are more than one week of games
for (let eachWeek of this.allGames){
// and get each games from each week
for (let teamGame of eachWeek){
// as crossover i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printCommonGames() {\n players.forEach(function(player) {\n if(player.winningOutcomes.length == 0) {\n return;\n }\n for(var round = 0; round < correctPicks.length; round++) {\n for(var game = 0; game < correctPicks[round].length; game++) {\... | [
"0.6806539",
"0.64482355",
"0.640168",
"0.63531274",
"0.62639993",
"0.62537414",
"0.62293345",
"0.6197689",
"0.6179673",
"0.61766726",
"0.616775",
"0.61644244",
"0.6159516",
"0.6150761",
"0.6144797",
"0.6143001",
"0.6117276",
"0.6100194",
"0.6075805",
"0.60756636",
"0.6073255... | 0.85897326 | 0 |
ajax request to save url | function saveUrl(e) {
var url = $("#uglyUrl").val();
$(".shorten-area").removeClass("zoomIn");
e.preventDefault();
validUrlChecker();
// checks if url contiains `http`
if(url.substring(0,4) != "http") {
// assigns http to url
url = "http://"+ url;
}
// sending ajax post reque... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function saveToZenodo(url){\n \n $.ajax({\n url: \"http://localhost/action/saveurltoreturn\",\n type: \"POST\",\n data: {url:url},\n success : function(result) {\n window.location = \"myzenodosavewizard.html\";\n },\n error : function(result){\n ... | [
"0.71311784",
"0.6627852",
"0.6343408",
"0.63128936",
"0.62761945",
"0.6242734",
"0.62418115",
"0.6141786",
"0.61145824",
"0.6109735",
"0.60838914",
"0.6062575",
"0.60406315",
"0.5948459",
"0.5939679",
"0.59367234",
"0.5933523",
"0.59160763",
"0.5902008",
"0.5890437",
"0.5851... | 0.72009295 | 0 |
copies shorten url to clipboard | function copyShortenUrl() {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($("#shorten-url").text()).select();
document.execCommand("copy");
$temp.remove();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function copyUrlToClipboard(){\n var shortUrl = document.querySelectorAll(\"#urlList button\");\n for(var i = 0; i < shortUrl.length; i++){\n shortUrl[i].addEventListener(\"click\", function(){\n for(var j = 0; j < shortUrl.length; j++){\n if(shortUrl[j].textContent == \"Copied\"){\n shor... | [
"0.7922922",
"0.7641683",
"0.7523688",
"0.74944746",
"0.7487301",
"0.7459538",
"0.74373716",
"0.7319019",
"0.7300231",
"0.72307354",
"0.72022474",
"0.71918124",
"0.7155496",
"0.70932144",
"0.70277417",
"0.7013696",
"0.69925165",
"0.6974554",
"0.69197774",
"0.6912572",
"0.6900... | 0.8414905 | 0 |
copy shipping address to billing address | function copyBaddress(){
var address = $("#sh_address textarea")[0]
$("#b_address textarea").val(address.value)
var phone = $("#sh_phone input")[0]
$("#b_phone input").val(phone.value);
shipType = $("#shipping select")[0].selectedOptions[0].parentNode.label;
/*if(shipType=="Warehouse"){
var warehouse = alasql('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function CopyBillingAddress(){\r\n\t\tvar billing_address = document.getElementById(\"txt_bill_address\").value;\r\n\t\tvar billing_city = document.getElementById(\"txt_bill_city\").value;\r\n\t\tvar billing_pin = document.getElementById(\"txt_bill_pin\").value;\r\n\t\tvar billing_state = document.getElementById(\... | [
"0.75880885",
"0.7224334",
"0.7211787",
"0.6750282",
"0.6727784",
"0.638565",
"0.62826",
"0.6280679",
"0.6265622",
"0.6265622",
"0.6154592",
"0.60620224",
"0.60221815",
"0.5927814",
"0.57762915",
"0.5710039",
"0.56754583",
"0.56694007",
"0.5663177",
"0.5634347",
"0.5604494",
... | 0.7237529 | 1 |
when mouse event is over from the image, the user_retype_password type change into text type | function user_retype_password_visible(){
user_retype_password.type = 'text';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mouseoverPass(obj) {\r\n var obj = document.getElementById('password');\r\n obj.type = \"text\";\r\n }",
"function user_retype_password_invisible(){\n user_retype_password.type = 'password';\n}",
"function user_password_visible(){\n user_password.type = 'text';\n}",
"function versenha()... | [
"0.7490734",
"0.63831294",
"0.6312582",
"0.6280508",
"0.6253012",
"0.6188859",
"0.6164152",
"0.61576474",
"0.6100442",
"0.6086718",
"0.5980231",
"0.5954663",
"0.59507006",
"0.5935952",
"0.59337264",
"0.5930711",
"0.591339",
"0.5909292",
"0.58864903",
"0.5885743",
"0.5860954",... | 0.6732588 | 1 |
when mouse event is out from the image, the user_retype_password type change into password type | function user_retype_password_invisible(){
user_retype_password.type = 'password';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mouseoverPass(obj) {\r\n var obj = document.getElementById('password');\r\n obj.type = \"text\";\r\n }",
"function user_retype_password_visible(){\n user_retype_password.type = 'text';\n}",
"function handlePasswordVisibility() {\n // if right icon equals eye show password\n if (rightIc... | [
"0.68075114",
"0.66554767",
"0.64770174",
"0.6457358",
"0.6422671",
"0.6379928",
"0.63200057",
"0.62948745",
"0.61941266",
"0.61899847",
"0.6140404",
"0.6135487",
"0.610729",
"0.60925704",
"0.6073335",
"0.60596496",
"0.60225344",
"0.5981883",
"0.59742695",
"0.5962082",
"0.594... | 0.66679966 | 1 |
Removes headers added by addAuthorizer() | function removeAuthorizer() {
unUseHeader('Authorization');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function clearedAuthorizationHeader(config) {\n delete config.headers['x-api-key']\n return config\n }",
"function resetHeaders() {\n\tconfig.headers = {};\n}",
"removeJwtHeader() {\n this._axios.defaults.headers.common['Authorization'] = 'Bearer Dummy';\n }",
"removeAccessToken() ... | [
"0.72671324",
"0.6743488",
"0.6648927",
"0.6441417",
"0.6392645",
"0.59790903",
"0.5957157",
"0.5918",
"0.5893434",
"0.5852655",
"0.58270305",
"0.574855",
"0.5746392",
"0.5676574",
"0.5658976",
"0.5647941",
"0.56377995",
"0.5636243",
"0.5589198",
"0.556827",
"0.5559696",
"0... | 0.8418746 | 0 |
GET UI elements for a single participant (spell1, spell2, champion) | function getParticipantUI(participant) {
// preparing the array of promises to resolve
// in order to get all the elements
const elements = [
LolApi.Static.getSummonerSpellById(participant.spell1Id, options.spell),
LolApi.Static.getSummonerSpellById(participant.spell2Id, options.spell),
LolApi.Static.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getCharacter(whosClicked) { \n getData('https://www.dnd5eapi.co/api/classes/' + whosClicked, 'baseData');\n getData('https://www.dnd5eapi.co/api/races/', 'races')\n getData('https://randomuser.me/api/?inc=gender,name&&nat=us,dk,fr,gb,br,no', 'name');\n}",
"function getChampionName(){\n\n}",
... | [
"0.59733814",
"0.56636506",
"0.56428903",
"0.55967754",
"0.5510234",
"0.54880655",
"0.54715383",
"0.54044074",
"0.5385756",
"0.53085226",
"0.5301368",
"0.5276195",
"0.5271833",
"0.52353203",
"0.5227297",
"0.5192598",
"0.51895213",
"0.51758873",
"0.5160371",
"0.5156631",
"0.51... | 0.73218995 | 0 |
This is a very basic test for 4 corner pixels, with large tolerance. | function checkFourColorsFrame(video) {
const width = video.videoWidth;
const height = video.videoHeight;
let test_cnv = new OffscreenCanvas(width, height);
let ctx = test_cnv.getContext('2d');
ctx.drawImage(video, 0, 0, width, height);
const kYellow = [0xFF, 0xFF, 0x00, 0xFF];
const kRed = [0xFF, 0x00, 0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cornerCheck(x, y) {\n\t\treturn (y - y0) * (x1 - x0) - (x - x0) * (y1 - y0);\n\t}",
"function isEdgePixel(image, width, x, y) {\n try {\n var p = x*4 + y*4*width;\n \n var sides = 0;\n\n var p1 = image[p];\n var p2 = image[p + 1];\n var p3 = image[p + 2];\n\n var a = ... | [
"0.6685789",
"0.5825593",
"0.5796539",
"0.5754381",
"0.5727697",
"0.5693228",
"0.56813604",
"0.5656976",
"0.5656084",
"0.564739",
"0.5645277",
"0.56340593",
"0.56300867",
"0.56293786",
"0.56293786",
"0.5581202",
"0.55811447",
"0.55680704",
"0.55362403",
"0.55358064",
"0.55264... | 0.60725003 | 1 |
Create the class Mamifero | function Mamifero(n, g, p) {
Animal.call(this, n, 'mamífero');
this.genero = g;
this.pelos = p;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"constructor(marca, modelo, ano, motor, velocidade){\n this.marca = marca //THIS REPRESENTA O OBJETO SENDO CRIADO\n this.modelo = modelo\n this.ano = ano\n this.motor = motor\n this.velocidade = velocidade\n }",
"function CreateFator() {\n\n\t\tobj = this;\n\n\t\t// Pub... | [
"0.6123956",
"0.6019871",
"0.60148615",
"0.599237",
"0.5909042",
"0.58336174",
"0.58157676",
"0.5788057",
"0.57860565",
"0.5784118",
"0.57529837",
"0.57004285",
"0.56298465",
"0.55738086",
"0.55723864",
"0.5546462",
"0.5534535",
"0.55096066",
"0.55096066",
"0.55004525",
"0.54... | 0.6264177 | 0 |
Create the class Pessoa | function Pessoa(n, g, p, na, a) {
Mamifero.call(this, n, g, p);
this.nascionalidade = n;
this.altura = a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Pessoa(nome, sobrenome) {\n this.nome = nome;\n this.sobrenome = sobrenome;\n}",
"function criarPessoa() {\n return {\n nome: 'Ana',\n sobrenome: 'Silva'\n }\n}",
"function Produto(nome, preco) {\n this.nome = nome\n this.preco = preco;\n}",
"function Produto(nome, preco){\n this.... | [
"0.7815699",
"0.6975891",
"0.6917295",
"0.69112647",
"0.6895414",
"0.689316",
"0.6878244",
"0.687314",
"0.67109764",
"0.6646779",
"0.6602024",
"0.6596705",
"0.6565852",
"0.6526451",
"0.6525982",
"0.6503657",
"0.64675194",
"0.6376683",
"0.63480794",
"0.6345267",
"0.63145983",
... | 0.72124076 | 1 |
Service Impl // //////////////// Our implementation of the ContactService interface in "contact.idl" | function ContactService() {
this.contacts = {};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ContactService(){\n\tthis.contactList = [];\n\tthis.idCounter = 0;\n}",
"function ContactService() {\n this.idCounter = 1;\n this.contacts = [];\n // contacts: Array<Contact> = []; // TypeScript\n}",
"function Contact() {}",
"function onDeviceReady() {\n device_is_ready=true;\n contac... | [
"0.77846456",
"0.6876057",
"0.6169611",
"0.58583355",
"0.58545494",
"0.5851877",
"0.5850864",
"0.58319205",
"0.58089453",
"0.56740224",
"0.56453663",
"0.56453663",
"0.56453663",
"0.5621985",
"0.5610398",
"0.559575",
"0.5570941",
"0.5552856",
"0.55460626",
"0.55434513",
"0.549... | 0.73797107 | 1 |
utility function to read request body and enforce our MAX_POST limit | function readRequest(req, res, callback) {
var body = '';
req.on('data', function(chunk) {
if (body.length > MAX_POST) {
res.send("Max POST size exceeded", 413);
callback(null);
}
else {
body += chunk;
}
});
req.on('end', function() {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async function parseBody(req,limit){const contentType=(0,_contentType.parse)(req.headers['content-type']||'text/plain');const{type,parameters}=contentType;const encoding=parameters.charset||'utf-8';let buffer;try{buffer=await(0,_rawBody.default)(req,{encoding,limit});}catch(e){if(e.type==='entity.too.large'){throw... | [
"0.7680227",
"0.7437273",
"0.7342315",
"0.7342315",
"0.651483",
"0.6196117",
"0.6077534",
"0.6007727",
"0.5990964",
"0.5986258",
"0.5956229",
"0.5875359",
"0.58344245",
"0.5831792",
"0.57093734",
"0.5663076",
"0.56451774",
"0.55909884",
"0.55613565",
"0.5555271",
"0.5536412",... | 0.75201684 | 1 |
Treat all of the following functions as abstract methods spawn an obstacle | spawn () {
console.log("***WARNING: ObstacleManager:spawn(), an abstract method called");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"createObstacle() {\n this.obstacles = [\n new Obstacle(this.canvas, this.ctx, 'blueCar', -12),\n new Obstacle(this.canvas, this.ctx, 'pinkCar', -15),\n ];\n\n this.currentObstacle = this.obstacles[getRandomNum(this.obstacles.length)];\n }",
"function spawnObstacles() {\n var obstacle = Math.... | [
"0.67737114",
"0.6540475",
"0.64289784",
"0.64241207",
"0.62816286",
"0.62389576",
"0.62122196",
"0.6201976",
"0.61807793",
"0.6172856",
"0.6151471",
"0.61430866",
"0.6134549",
"0.6133788",
"0.6106659",
"0.60910755",
"0.6043972",
"0.6037459",
"0.596943",
"0.5966033",
"0.59565... | 0.7777455 | 0 |
Display Versions of Asset | function showVersions(assetId, filename) {
clearAllMessages();
selectedAsset = assetId;
var grid = $("#gridVersion").data("kendoGrid").dataSource;
grid.transport.options.read.data.assetId = selectedAsset;
grid.page(1);
grid.read();
var win = $("#winAssetVersions").data("kendoWindow");
$... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showVersions(){\n TweenMax.to(\"#version-sort-down\", 0.2, {rotation: 180, transformOrigin: \"6.5px 14px\", opacity: .5});\n $(\"#version-options\").css(\"display\", \"block\")\n }",
"function showVersionInfo() {\n return versionInfo\n}",
"showVersion(ele){\n retur... | [
"0.6931038",
"0.6632884",
"0.6424257",
"0.63298744",
"0.6122475",
"0.61181873",
"0.5922992",
"0.5822143",
"0.5711703",
"0.5680071",
"0.56447196",
"0.5621904",
"0.5607009",
"0.55723816",
"0.5514883",
"0.54979193",
"0.5494911",
"0.54817563",
"0.54639065",
"0.54582494",
"0.54500... | 0.7373787 | 0 |
refresh asset on version close | function onWinClose(e) {
if (_dataModified) {
refreshAssets();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"unload() {\n for (const asset of this.assets) {\n if (--asset.packageRefCount === 0) {\n AssetFactory.deleteAsset(asset.id);\n }\n }\n\n this.assets.length = 0;\n }",
"function closeCurrentFileRevision(){\n that.fileRevision = null;\n ... | [
"0.63975036",
"0.6306829",
"0.61638063",
"0.6129501",
"0.5887318",
"0.5869147",
"0.58057547",
"0.5683872",
"0.567923",
"0.5591865",
"0.55698335",
"0.5503992",
"0.54813147",
"0.5479378",
"0.54521304",
"0.54521304",
"0.5440439",
"0.5419184",
"0.54063505",
"0.5385673",
"0.536176... | 0.73285246 | 0 |
While there are unsolved partial problems, send them to the workers. TODO: when the worker fails, keep the partial problems somewhere | distributePartialProblems() {
if (this.partialProblems.length > 0) {
console.log('distributing partial problems ...');
let s = this.partialProblems[0].stringify();
console.log(s);
sock_dlr.send(s);
// this.partialProblems.forEach(p => {
// ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function distribute_problems () {\n var empty_problem_queue = false;\n\n log('Distributing problems. Available clients: ' + available_clients.num());\n\n while(failed_problem_queue.length && available_clients.num()) {\n var client = available_clients.get();\n if(client) {... | [
"0.69047314",
"0.57622504",
"0.55518365",
"0.5525145",
"0.5489809",
"0.5489721",
"0.54777443",
"0.5438821",
"0.5438821",
"0.5377635",
"0.5316033",
"0.5261519",
"0.5240371",
"0.5234079",
"0.5199336",
"0.5199336",
"0.51989555",
"0.519852",
"0.5191514",
"0.5184672",
"0.5183561",... | 0.72105783 | 0 |
Splits the Matrix to be solved, depending on the current row/column index | splitMatrixIntoTask(_matrix){
row = _matrix.getRow(splitIndexRow);
column = _matrix.getColumn(splitIndexColumn);
matrixTask = new MatrixTask(splitIndexRow,splitIndexColumn,row,column);
splitIndexRow++;
splitIndexColumn++;
return matrixTask;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function traverseSpirally (matrix) {\n \n}",
"function build_matrix(matrix,sizeX,sizeY) {\n var split_matrix=matrix.split(',');\n console.log(sizeX,sizeY);\n \n for (let i = 0; i < split_matrix.length; i++) {\n for (let j = 0; j < split_matrix[i].length; j++) {\n split_matrix[i][j]... | [
"0.5710509",
"0.56785905",
"0.56253594",
"0.5610879",
"0.55422574",
"0.53951865",
"0.5365271",
"0.5337515",
"0.53121185",
"0.5286288",
"0.52655596",
"0.5260121",
"0.5254515",
"0.52212816",
"0.5197237",
"0.51871824",
"0.51859224",
"0.5171922",
"0.51636666",
"0.5155911",
"0.513... | 0.6093901 | 0 |
Receives a client request from the frontend request contains frames: address,empty,matrixTask | getClientMatrix(){
if (items.pollin(frontendPollerId)) {
// Now get next client request, route to LRU worker
// Client request is [address][empty][request]
clientAddress = frontend.recvStr();
empty = frontend.recv();
assert (empty.length == 0);
matrixBytes = frontend.recv();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"_getRequest() {\n this._httpRequest.sendRequest()\n .then((serverData) => {\n this._renderNewMessages(serverData);\n })\n .catch((error) => {\n console.log(error);\n });\n }",
"_getRequest() {\n this._httpRequest.sendRequest()\n .then((serverData) => {\n this.... | [
"0.6180518",
"0.6180518",
"0.6073964",
"0.5771886",
"0.57398385",
"0.57247055",
"0.57241863",
"0.5706986",
"0.56497145",
"0.5640667",
"0.56034565",
"0.5599224",
"0.55928427",
"0.54983044",
"0.54906803",
"0.5483821",
"0.54502535",
"0.54370576",
"0.54107386",
"0.5396187",
"0.53... | 0.6251988 | 0 |
Sends a matrix task to a idle worker | sendMatrixTask(_matrixTask){
// Get the next worker from the queue
workerAddress = workerQueue.poll();
backend.sendMore(workerAddr);
backend.sendMore("");
// TODO:
// backend.sendMore(clientAddr);
// backend.sendMore("");
// backend.send(request);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function reassignWorker(worker)\n{\n var row = nextRow++;\n\n if (row >= canvas.height)\n {\n worker.idle = true;\n }\n else\n {\n var task = createTask(row);\n worker.idle = false;\n worker.postMessage(task);\n }\n}",
"function startWorkers()\n{\n generation++... | [
"0.5975907",
"0.58090645",
"0.5764139",
"0.5614879",
"0.5399827",
"0.53829014",
"0.532986",
"0.53101677",
"0.5226174",
"0.517357",
"0.50854975",
"0.5079491",
"0.50292116",
"0.49924177",
"0.49684513",
"0.4960713",
"0.49298304",
"0.48636422",
"0.4860634",
"0.48349413",
"0.47983... | 0.7549279 | 0 |
Makes a tag global. | *makeGlobal(tag, msg) {
// Get the tag.
const entry = yield this.getTag(tag, msg.server.id);
// If the tag doesn't exist, return.
if (!entry.get('content')) return this.bot.sendMessage(msg, Util.wrap('No such tag \'' + tag + '\''));
// Remove all local tags with the name.
yield this.Tag.remove({
'tag':... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function globalMehtod() {\n\n }",
"set tag(value) {}",
"function setTaggingEnvironment() {\n setVisible($('#btn_quit_study'));\n var mc = $('#main_container');\n\n var fun_array = [function () {\n getImage();\n setImageFlipper();\n }];\n var mst_params = {};\n\n // Set the tagg... | [
"0.61210054",
"0.60277677",
"0.5911468",
"0.56883025",
"0.5553456",
"0.55045444",
"0.54793096",
"0.5472827",
"0.5454097",
"0.5451689",
"0.54249483",
"0.54248065",
"0.53847533",
"0.5367857",
"0.5346459",
"0.52931535",
"0.52903724",
"0.5286318",
"0.52743673",
"0.52506894",
"0.5... | 0.6634716 | 0 |
Installs dependencies for the courtblink codebase. | async function setup() {
console.log('Installing Courtblink dependencies...')
// Ensure that yarn is installed before we continue.
const isYarnInstalled = await yarn.exists()
if (!isYarnInstalled) {
throw new Error('Yarn must be installed to continue')
}
console.log('Installing scripts dependencies...... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"install() {\n this.installDependencies({\n npm: true,\n bower: false,\n });\n }",
"function installAllDependencies() {\n console.log('Installing NodeJS Server Dependencies...');\n\n installDependencies().then(() => {\n console.log('* Move to angular application directo... | [
"0.67764723",
"0.64811075",
"0.6470749",
"0.61173266",
"0.607041",
"0.6035718",
"0.5973557",
"0.5936043",
"0.58617693",
"0.58607364",
"0.58572495",
"0.5784809",
"0.57605684",
"0.5758198",
"0.5734113",
"0.5715003",
"0.54738003",
"0.54364884",
"0.54234385",
"0.53805166",
"0.536... | 0.7524686 | 0 |
for loop over the numbers array check if the currNum is odd if so, add to sum variable return the sum | function oddSums(numbers) { // [3, 6, 8, 9, 1]
// this is where you code
let sum = 0;
for (let i = 0; i < numbers.length; i++) {
if (numbers[i] % 2 != 0) {
sum += numbers[i] // 3 + 9 + 1 = 13
}
}
return sum; // 13
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function SumOddNumber(arr) {\n let sum = 0;\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] % 2 !== 0) {\n sum = sum + arr[i];\n }\n }\n return sum;\n}",
"function SumOddNumber(num) {\n let result = 0;\n for (let i = 0; i < num.length; i++) {\n if (i % 2 !== 0);\n result += num[i];\n... | [
"0.76061",
"0.7604192",
"0.7546257",
"0.75436425",
"0.75366575",
"0.75303626",
"0.74547833",
"0.73925686",
"0.73329234",
"0.7319202",
"0.7296022",
"0.72368866",
"0.72196484",
"0.71251285",
"0.70562625",
"0.70370567",
"0.70116496",
"0.7010205",
"0.6996854",
"0.6996854",
"0.699... | 0.7890361 | 0 |
adds cards index to trunk in firebase | function addCardToTrunk(){
var user = firebase.auth().currentUser; //current user
var cardInd = document.getElementById("card-select").getAttribute("index"); //gets card index
db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to users uid
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"addNewCard(card, listIndex) {\n this.trelloDataStore.addNewCard(card, listIndex);\n this.refreshData();\n }",
"addAt(card, index){\r\n // Remove 0 items from the array at the index position, then insert\r\n this.cards.splice(index, 0, card);\r\n }",
"function addCardToDesire... | [
"0.6653534",
"0.6372647",
"0.63635623",
"0.6255996",
"0.6130234",
"0.6113391",
"0.6009305",
"0.58887327",
"0.58705705",
"0.5814807",
"0.5773629",
"0.5751128",
"0.57396567",
"0.57267135",
"0.5723129",
"0.57184887",
"0.5680199",
"0.5673767",
"0.5635593",
"0.56260073",
"0.562281... | 0.7569374 | 0 |
adds cards index to deck1 in firebase | function addCardToDeck1(){
var user = firebase.auth().currentUser; //current user
var cardInd = document.getElementById("card-select").getAttribute("index"); //gets card index
db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to users uid
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addCardToTrunk(){\n var user = firebase.auth().currentUser; //current user\n var cardInd = document.getElementById(\"card-select\").getAttribute(\"index\"); //gets card index \n db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to us... | [
"0.7252011",
"0.70250225",
"0.69806534",
"0.6804315",
"0.6640568",
"0.64348155",
"0.63821214",
"0.6307706",
"0.62852776",
"0.6279717",
"0.6251593",
"0.6246768",
"0.6195154",
"0.61686003",
"0.60837144",
"0.6072105",
"0.60647506",
"0.6018706",
"0.5950338",
"0.59315497",
"0.5871... | 0.7031354 | 1 |
adds cards index to desired in firebase | function addCardToDesired(){
var user = firebase.auth().currentUser; //current user
var cardInd = document.getElementById("card-select").getAttribute("index"); //gets card index
db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to users uid
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addCardToTrunk(){\n var user = firebase.auth().currentUser; //current user\n var cardInd = document.getElementById(\"card-select\").getAttribute(\"index\"); //gets card index \n db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to us... | [
"0.72372466",
"0.69325894",
"0.6725249",
"0.67231995",
"0.65810966",
"0.6534633",
"0.64495814",
"0.6448031",
"0.6359291",
"0.6357412",
"0.63467294",
"0.6323896",
"0.63070476",
"0.62998724",
"0.6165981",
"0.6122576",
"0.5976621",
"0.59764814",
"0.5867188",
"0.577619",
"0.57362... | 0.7329537 | 0 |
remove card index from firebase | function removeFromDeck2(){
var user = firebase.auth().currentUser; //current user
var cardInd = document.getElementById("card-select").getAttribute("index"); //gets card index
db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to users uid
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function removeFromDesired(){\n var user = firebase.auth().currentUser; //current user\n var cardInd = document.getElementById(\"card-select\").getAttribute(\"index\"); //gets card index \n db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to u... | [
"0.72553426",
"0.72210747",
"0.71854293",
"0.71767515",
"0.7039136",
"0.7027834",
"0.69590795",
"0.6824303",
"0.67945874",
"0.67357117",
"0.66975844",
"0.66479087",
"0.66412055",
"0.6538536",
"0.6503883",
"0.6494413",
"0.64310753",
"0.64096564",
"0.6401065",
"0.6292208",
"0.6... | 0.72324556 | 1 |
remove card index from firebase | function removeFromDesired(){
var user = firebase.auth().currentUser; //current user
var cardInd = document.getElementById("card-select").getAttribute("index"); //gets card index
db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to users uid
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function removeFromDeck2(){\n var user = firebase.auth().currentUser; //current user\n var cardInd = document.getElementById(\"card-select\").getAttribute(\"index\"); //gets card index \n db.collection('users').doc(`${user.uid}`).get().then((snapshot)=> { //gets the document corresponding to use... | [
"0.72324556",
"0.72210747",
"0.71854293",
"0.71767515",
"0.7039136",
"0.7027834",
"0.69590795",
"0.6824303",
"0.67945874",
"0.67357117",
"0.66975844",
"0.66479087",
"0.66412055",
"0.6538536",
"0.6503883",
"0.6494413",
"0.64310753",
"0.64096564",
"0.6401065",
"0.6292208",
"0.6... | 0.72553426 | 0 |
Updates Cards based on Search Filter and Type Filter | function updateFilter(search) {
//alert(search=="" || search==null); //Tester that returns true if the search bar is either empty or null
var zone = document.getElementById("selectCards");
//If allCards is selected as filter
if(zone.value == "allCards"){
//alert("You clicked allCards");
$("#cardImag... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"searchCards(filter) {\n\t\tconst url = `${BASE_URL}/cards/search/`+filter;\n \treturn fetch(url, httpOptions).then(this.processResponse);\n \t}",
"searchCards(filter) {\n\t\tconst url = `${BASE_URL}/cards/search/`+filter;\n \tconsole.log(\"Searched for cards with keyword \" + filter);\n \treturn fetch(... | [
"0.6348138",
"0.6335941",
"0.61651045",
"0.61552364",
"0.6142488",
"0.6064383",
"0.603332",
"0.6006039",
"0.5991215",
"0.598717",
"0.5889195",
"0.58709085",
"0.5855654",
"0.58290404",
"0.5805333",
"0.5748992",
"0.5705891",
"0.5684366",
"0.56807894",
"0.56623626",
"0.5661219",... | 0.6547526 | 0 |
Canon func move left and right the canon | function canonMove (step) {
canonX+=step;
canonRefresh ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function moveLeft()\n{\n\tapplyPositionToRobot();\n}",
"move() {\n switch (this.direction) {\n case 0:\n this.y--; //ARRIBA\n break;\n case 1:\n this.y++; //ABAJO\n break;\n case 2:\n this.x++; //DE... | [
"0.7092889",
"0.68867964",
"0.687922",
"0.67878693",
"0.67557603",
"0.6741185",
"0.6727911",
"0.6709947",
"0.6702928",
"0.66947335",
"0.6690533",
"0.6660266",
"0.66570246",
"0.6653605",
"0.66455996",
"0.66311693",
"0.66176987",
"0.6591313",
"0.65865487",
"0.6575054",
"0.65746... | 0.70593756 | 1 |
set the player back to the starting position of the game | resetPosition() {
this.xPos = playerStartX;
this.yPos = playerStartY;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"resetPlayer() {\n //setting x and y to starting position for player\n this.x = this.startX;\n this.y = this.startY;\n }",
"resetPlayerPosition() {\n this.x = 202;\n this.y = 404;\n }",
"resetPlayer() {\n this.startingX = 200;\n this.startingY = 380;\n this.x = ... | [
"0.8133991",
"0.78919315",
"0.78795457",
"0.7877306",
"0.7772976",
"0.7698388",
"0.7587813",
"0.7510947",
"0.7315503",
"0.72332454",
"0.7129196",
"0.712399",
"0.707358",
"0.6985594",
"0.6943874",
"0.69428927",
"0.6924702",
"0.683898",
"0.6802153",
"0.67942137",
"0.6787005",
... | 0.8094057 | 1 |
write or update document | async function pouchWriteDoc(db, doc_name, data) {
return db.get(doc_name)
.then(doc => {
db.put({
...data,
_id: doc_name,
_rev: doc._rev,
})
}).catch(err => {
db.put({
...data,
_id: d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function write () {\n self._ready(function () {\n self.writer.append(doc, function (err) {\n if (err) return cb(err)\n var version = self.writer.key.toString('hex') +\n '@' + (self.writer.length - 1)\n var deviceId = versionToDeviceId(version)\n var elm = Object.assign(... | [
"0.71667135",
"0.67810297",
"0.67606187",
"0.67606187",
"0.6702818",
"0.6702482",
"0.6695684",
"0.66289955",
"0.65604913",
"0.646845",
"0.6381227",
"0.63656116",
"0.6285358",
"0.6211527",
"0.6210913",
"0.6192167",
"0.6188752",
"0.6188647",
"0.6187118",
"0.61679256",
"0.616215... | 0.7064441 | 1 |
In this kata you need to check the provided array (x) for good ideas 'good' and bad ideas 'bad'. If there are one or two good ideas, return 'Publish!', if there are more than 2 return 'I smell a series!'. If there are no good ideas, as is often the case, return 'Fail!'. | function well(x){
var count = 0;
for(var i = 0; i< x.length; i++){
if(x[i] === 'good'){
count++
}
}
if (count > 2){
var answer = 'I smell a series!';
}else if ( count > 0 ){
var answer = 'Publish!';
}else{
var answer = 'Fail!';
}
return answer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function well(x) {\n var good = 0;\n for (let i = 0; i < x.length; i++) {\n if (x[i] === \"good\") {\n good++;\n }\n }\n if (!good) return \"Fail!\";\n if (good > 0 && good <= 2) return \"Publish!\";\n if (good > 2) return \"i smell a series!\";\n}",
"function well(x) {\n let g = 0;\n for (let... | [
"0.81804353",
"0.8160608",
"0.81470335",
"0.8084633",
"0.7962329",
"0.74698794",
"0.7235907",
"0.63334674",
"0.61216354",
"0.6028923",
"0.5930096",
"0.59259236",
"0.58421516",
"0.57472885",
"0.57328117",
"0.5680079",
"0.56704605",
"0.56432086",
"0.5626853",
"0.5618495",
"0.55... | 0.82179046 | 0 |
Given an ArrayList of Integers length 3, return an ArrayList with the elements "rotated left" so [1, 2, 3] yields [2, 3, 1]. | function rotateLeft3(ints) {
var temp = ints.shift();
ints.push(temp);
return ints;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function rotateLeftOneUnit(l){\n let temp = []\n temp = l.slice(1)\n temp.push(l[0])\n return temp\n}",
"function rotate(list, offset) {\n return list.map((_,i) => list[(i + offset + list.length) % list.length]);\n}",
"function rotLeft(a, d) {\n for (let i=0; i<d; i++){\n let first = a[0];\n ... | [
"0.67984825",
"0.6712018",
"0.66963106",
"0.6670689",
"0.6644451",
"0.6556645",
"0.6499762",
"0.6475634",
"0.6402721",
"0.636644",
"0.63622034",
"0.6316656",
"0.63016546",
"0.6241801",
"0.6220648",
"0.62112176",
"0.6190757",
"0.618194",
"0.61521435",
"0.61486644",
"0.6137745"... | 0.77150446 | 0 |
Modify and return the given HashMap as follows: if the key "a" has a value, set the key "b" to have that value, and set the key "a" to have the value "". Basically "b" is a bully, taking the value of "a". Implemented with Map() | function mapBullyMap(hash) {
//var newHash = new Map();
var newHash = hash;
if (newHash.has("a")) {
newHash.set("b", hash.get("a"));
newHash.set("a", "");
}
if (newHash.has("c")) {
newHash.delete("c");
}
return newHash;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mapAB(someMap){\n if(someMap.has('a') && someMap.has('b')){\n let tmp = someMap.get('a') + someMap.get('b');\n someMap.set('ab', tmp);\n }\n return someMap;\n}",
"function mapAB(hash) {\n if (hash.hasOwnProperty(\"a\")) {\n if (hash.hasOwnProperty(\"b\")) {\n hash... | [
"0.7050112",
"0.6252602",
"0.60764784",
"0.5865045",
"0.584934",
"0.57555246",
"0.568198",
"0.5648061",
"0.5646823",
"0.56242913",
"0.5527584",
"0.5508543",
"0.55055183",
"0.5497334",
"0.54090536",
"0.5401601",
"0.5365698",
"0.5313187",
"0.5290301",
"0.52768576",
"0.5153947",... | 0.7347588 | 0 |
Modify and return the given HashMap as follows: if the key "a" has a value, set the key "b" to have that same value. In all cases remove the key "c", leaving the rest of the map unchanged. | function mapShare(hash) {
if (hash.hasOwnProperty("a")) {
hash.b = hash.a;
}
if (hash.hasOwnProperty("c")) {
delete hash.c;
}
return hash;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mapBullyMap(hash) {\n //var newHash = new Map();\n var newHash = hash;\n\n if (newHash.has(\"a\")) {\n newHash.set(\"b\", hash.get(\"a\"));\n newHash.set(\"a\", \"\");\n }\n if (newHash.has(\"c\")) {\n newHash.delete(\"c\");\n }\n\n\n return newHash;\n}",
"funct... | [
"0.65691036",
"0.58394796",
"0.5642252",
"0.5362831",
"0.5356702",
"0.5260996",
"0.5108075",
"0.5009759",
"0.49134073",
"0.47070545",
"0.46964532",
"0.46712047",
"0.46433824",
"0.462169",
"0.46189904",
"0.46046907",
"0.46014017",
"0.4552748",
"0.45481843",
"0.453764",
"0.4507... | 0.6124205 | 1 |
Modify and return the given HashMap as follows: for this problem the HashMap may or may not contain the "a" and "b" keys. If both keys are present, append their 2 string values together and store the result under the key "ab". | function mapAB(hash) {
if (hash.hasOwnProperty("a")) {
if (hash.hasOwnProperty("b")) {
hash.ab = hash.a + hash.b;
}
}
return hash;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mapAB(someMap){\n if(someMap.has('a') && someMap.has('b')){\n let tmp = someMap.get('a') + someMap.get('b');\n someMap.set('ab', tmp);\n }\n return someMap;\n}",
"function mapBullyMap(hash) {\n //var newHash = new Map();\n var newHash = hash;\n\n if (newHash.has(\"a\")) {\n ... | [
"0.6850752",
"0.6198612",
"0.52395415",
"0.51124805",
"0.5103023",
"0.5081942",
"0.5065445",
"0.49549142",
"0.49410912",
"0.488639",
"0.4830208",
"0.48176113",
"0.4805297",
"0.4716979",
"0.47093496",
"0.4656004",
"0.4636219",
"0.46338642",
"0.4621522",
"0.45901734",
"0.456136... | 0.6232127 | 1 |
Given an ArrayList of strings, return a HashMap containing a key for every different string in the ArrayList, and the value is that string's length. | function wordLen(wordList) {
var hash = {};
for (var i = 0; i < wordList.length; i++){
if (!(hash.hasOwnProperty(wordList[i]))) {
hash[wordList[i]] = wordList[i].length;
}
}
return hash;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wordLengthsMap(string) {\n return map(string, function (word) {\n return words.length;\n })\n}",
"function wordFrequency(string_list){\n var word_dict = {}\n for (var i=0; i<string_list.length; i++){\n if (word_dict[string_list[i]] != undefined)\n {\n word_dict[string... | [
"0.6000146",
"0.590412",
"0.5858823",
"0.5832077",
"0.5756416",
"0.5733352",
"0.5648401",
"0.5641699",
"0.5612346",
"0.55993",
"0.55748737",
"0.5554447",
"0.5554447",
"0.5552882",
"0.55484515",
"0.5484295",
"0.5468362",
"0.5453269",
"0.54403806",
"0.5439244",
"0.5437018",
"... | 0.7329842 | 0 |
to check is referral engine is subscribed from marketplace | function getSubscriptionInfo() {
var response = practiceAndBillingDataLayer.getConfigurableData();
response.then(function (data) {
vm.isReferralExchange = data.RE.is_active;
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"isSubscribed(doc) {\n return (\n doc &&\n doc.contextParameters &&\n doc.contextParameters.subscribedNotifications &&\n doc.contextParameters.subscribedNotifications.length > 0\n );\n }",
"isSubscribed(channel, fct) {\n if (this._subscriptions[channel]) {\n if (this._subscripti... | [
"0.6754471",
"0.5989301",
"0.5871661",
"0.58702457",
"0.5837616",
"0.58243024",
"0.5730924",
"0.5723771",
"0.57043576",
"0.56929004",
"0.5643171",
"0.56270385",
"0.5559833",
"0.5555212",
"0.55378413",
"0.55089265",
"0.5492667",
"0.5468954",
"0.5439777",
"0.54280597",
"0.53923... | 0.64810395 | 1 |
Returns a namespaced name of the module to be used as a store getter | function getModuleName(module) {
if (!module._vmdModuleName) {
throw new Error("ERR_GET_MODULE_NAME : Could not get module accessor.\n Make sure your module has name, we can't make accessors for unnamed modules\n i.e. @Module({ name: 'something' })");
}
return "vuexModuleDecorators/" + mod... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get name() {\n return this._storeName;\n }",
"function id() {\n return \"SwfStore_\" + config.namespace.replace(\"/\", \"_\") + \"_\" + (counter++);\n }",
"get module(){\n\t\treturn Modules.getModule(this.location.module)\n\t}",
"static get name () {\n return 'pkg'\n }",
"fu... | [
"0.6321479",
"0.6197922",
"0.6145413",
"0.6121449",
"0.6104293",
"0.59219116",
"0.5868651",
"0.57743955",
"0.57299083",
"0.5729344",
"0.572319",
"0.57209134",
"0.5692501",
"0.5677081",
"0.5670507",
"0.5656547",
"0.5655979",
"0.5655234",
"0.56364626",
"0.56314826",
"0.56314826... | 0.65503323 | 0 |
Freeze a form in place by disabling its inputs and setting the value of its submit input to the given text | function freezeForm(form, submit_text) {
form.querySelectorAll('input,textarea').forEach(el => {
el.disabled = true;
});
const submit_input = form.querySelector('input[type="submit"]');
submit_input.dataset.original_value = submit_input.value;
submit_input.value = submit_text;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function disabledForm() {\n $(\"#btn-search\").attr(\"disabled\", true);\n $(\"#txt-city\").attr(\"disabled\", true);\n $(\"body\").css(\"cursor\", \"wait\");\n}",
"function deferFormSubmit(){\n\t\t\tautosubmit = true;\n\t\t\tsubmitBtn.set('disabled', true);\n\t\t\tdescArea.set('disabled', true);\n\t\t\... | [
"0.6645898",
"0.6537148",
"0.6509453",
"0.6455923",
"0.640634",
"0.63680005",
"0.62901926",
"0.6275614",
"0.6245681",
"0.6178923",
"0.6164482",
"0.61633843",
"0.6135418",
"0.61115056",
"0.61083263",
"0.61027294",
"0.6085189",
"0.6084544",
"0.6072945",
"0.60577816",
"0.6041593... | 0.8218635 | 0 |
Restore a frozen form by reenabling its inputs and restoring its submit input text | function restoreForm(form) {
form.querySelectorAll('input,textarea').forEach(el => {
el.disabled = false;
});
const submit_input = form.querySelector('input[type="submit"]');
submit_input.value = submit_input.dataset.original_value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function freezeForm(form, submit_text) {\n form.querySelectorAll('input,textarea').forEach(el => {\n el.disabled = true;\n });\n\n const submit_input = form.querySelector('input[type=\"submit\"]');\n submit_input.dataset.original_value = submit_input.value;\n submit_input.value = submit_text;... | [
"0.7349953",
"0.6520669",
"0.6468463",
"0.6291178",
"0.6261781",
"0.6238915",
"0.61949176",
"0.61325794",
"0.61222196",
"0.60836357",
"0.60816056",
"0.6044002",
"0.60104996",
"0.5990749",
"0.59725535",
"0.5958464",
"0.5948947",
"0.5948947",
"0.59391",
"0.5906167",
"0.5897631"... | 0.7612278 | 0 |
Returns a promise that is resolved with a captcha token | function checkCaptcha() {
return new Promise(resolve => {
grecaptcha.ready(function () {
// execute() returns a promise
resolve(grecaptcha.execute(GRECAPTCHA_SITE_KEY, { action: 'submit' }));
});
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getCaptchaToken() {\n $(\"#status\").html(\"<span class=\\\"fa fa-pulse fa-spinner\\\" aria-hidden=\\\"true\\\"></span>Sending...\");\n \n grecaptcha.ready(function() {\n grecaptcha.execute(\"6Lf0SsgZAAAAANKdy6bJsI0Mxk79XPPI5em_t46S\", \n {action: 'send_email... | [
"0.7320343",
"0.65924114",
"0.6570355",
"0.6433995",
"0.6383252",
"0.62129927",
"0.61244303",
"0.61125636",
"0.6058998",
"0.6057697",
"0.6043811",
"0.6038128",
"0.60240394",
"0.6008665",
"0.6004971",
"0.5969276",
"0.5925499",
"0.5889009",
"0.586372",
"0.5862778",
"0.58361953"... | 0.6604691 | 1 |
Midpoint Ellipse drawing algorithm | function drawEllipse(ctx, xc, yc, rx, ry)
{
var x = 0
var y = ry
var p = (ry * ry) - (rx * rx * ry) + ((rx * rx)/4);
while((2 * x * ry * ry)< (2 * y * rx * rx)) {
putPixel(ctx, xc + x, yc - y);
putPixel(ctx, xc - x, yc + y);
putPixel(ctx, xc + x, yc + y);
putPixel(ctx, xc - x... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function drawEllipse(ctx, x, y, w, h, lw, c, filled) {\n var kappa = 0.5522848,\n ox = (w / 2) * kappa, // control point offset horizontal\n oy = (h / 2) * kappa, // control point offset vertical\n xe = x + w, // x-end\n ye = y + h, // y-end\n ... | [
"0.68331337",
"0.6735689",
"0.6705457",
"0.6651893",
"0.6620684",
"0.6589905",
"0.65885717",
"0.65758413",
"0.6563097",
"0.6550568",
"0.6510989",
"0.6510989",
"0.6510989",
"0.6396727",
"0.6394912",
"0.63760966",
"0.6367844",
"0.6362784",
"0.6317961",
"0.63054675",
"0.62833804... | 0.6870662 | 0 |
Get full link object from its shortcut | function getFullLink(shortcut) {
for (let i=0; i < CONFIG.links.length; i++) {
if (shortcut == CONFIG.links[i].command) {
return CONFIG.links[i];
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function readShortcutLink(shortcutPath) {\n return new ShortcutDetails();\n }",
"get link() { return this._link; }",
"function link(hotel) {\n return hotel.url;\n }",
"get link () {\n\t\treturn this._link;\n\t}",
"function getObjectLink(node)\n {\n retu... | [
"0.6464233",
"0.63885826",
"0.6273039",
"0.6036588",
"0.5969921",
"0.59586954",
"0.59387106",
"0.59279495",
"0.58402",
"0.5825519",
"0.58156973",
"0.57955396",
"0.5775626",
"0.5775626",
"0.57516533",
"0.57465416",
"0.57355994",
"0.569152",
"0.5657322",
"0.56212777",
"0.560141... | 0.7814562 | 0 |
Import legacy links (custom commands) | function importLegacyLinks() {
let legacyLinks = JSON.parse(localStorage.getItem('customCommands'));
if (legacyLinks) {
CONFIG.links = legacyLinks;
saveConfig();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function loadLink(link) {\n \tshell.openExternal(\"https://\" + link)\n}",
"function setup_external_links() {\n\tvar link, links = document.links;\n\tfor (i = 0; i < links.length; i++) {\n\t\tlink = links[i];\n\t\tif (link.href.match(/^https?:/)) {\n\t\t\t// link.title = '⌘-click to open “' + link.href + '” in ... | [
"0.59424853",
"0.5889158",
"0.580633",
"0.5775597",
"0.57259554",
"0.5636694",
"0.56177974",
"0.55626184",
"0.5510295",
"0.54837334",
"0.5475993",
"0.542858",
"0.5398572",
"0.539396",
"0.5367287",
"0.534679",
"0.5323027",
"0.53170866",
"0.52973133",
"0.52625644",
"0.52521",
... | 0.82524633 | 0 |
Creates a Boolean vector with true values (except one) that can be used as the readonly vector n the length of the vector i the index of the value that's going to be false | function createROVector(n, i) {
var a = [];
while (n) {
a[--n] = true;
}
a[i] = false;
return a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createROVector(n, i) {\r\n var a = [];\r\n\r\n while (n) {\r\n a[--n] = true;\r\n }\r\n\r\n a[i] = false;\r\n return a;\r\n }",
"get( i ) {\n return !!(this._data[ this._index(i) ] & this._mask( i ));\n }",
"function falsy() {\n\n var a = [NaN, 0, 15, fals... | [
"0.78076375",
"0.60733354",
"0.576643",
"0.5697504",
"0.5647828",
"0.5554627",
"0.55515283",
"0.5534658",
"0.55249435",
"0.54972833",
"0.549537",
"0.5482695",
"0.54316103",
"0.53323305",
"0.5316957",
"0.5309194",
"0.5297895",
"0.5291397",
"0.5286258",
"0.5281958",
"0.52700585... | 0.7763033 | 1 |
Creates a labels vector, from values if they are defined, otherwise from numbers l the length of the vector | function generateLabels(l) {
var a = [],
i;
for (i = 0; i < l; i++) {
a[i] = s.labels && s.labels[i] ? s.labels[i] : i;
}
return a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createLabels(labels, done) {\r\n let acc = [];\r\n let width = (1 / labels.length) * 100;\r\n\r\n for (let i = 0; i < labels.length; i++) {\r\n acc.push(\r\n <SingleLabel done={done>i} step={i + 1} label={labels[i]} width={width + \"%\"} />\r\n );\r\n }\r\n return acc;\r\n}",
"function i... | [
"0.5917739",
"0.5859135",
"0.5698921",
"0.56004834",
"0.5473715",
"0.54551023",
"0.54551023",
"0.54455733",
"0.54092395",
"0.53517103",
"0.53517103",
"0.53517103",
"0.53100383",
"0.5271332",
"0.5271332",
"0.525224",
"0.5239053",
"0.52300817",
"0.52300817",
"0.5224389",
"0.520... | 0.68392015 | 0 |
Creates the wheel array from the vector provided wv wheel vector containing the values that should be selected on the wheels l the length of the wheel array | function generateWheelsFromVector(wv, l, index) {
var i = 0, j, obj, chInd,
w = [],
wtObjA = wa;
if (l) { // if length is defined we need to generate that many wheels (even if they are empty)
for (j = 0; j < l; j++) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function generateWheelsFromVector(wv, l, index) {\r\n var nextLevel,\r\n j,\r\n i = 0,\r\n hasChildren = true,\r\n w = [[]],\r\n wtObjA = wa;\r\n\r\n if (l) {\r\n // if length is defined we need to generate that many wheels (even if they are empty)\r\n ... | [
"0.7654894",
"0.68617976",
"0.61126333",
"0.5750051",
"0.5588791",
"0.5556466",
"0.54977405",
"0.54112",
"0.5404405",
"0.5396583",
"0.532938",
"0.5133181",
"0.5076388",
"0.5069469",
"0.49672088",
"0.49440715",
"0.49422356",
"0.4881517",
"0.48804277",
"0.48257077",
"0.48142838... | 0.7973849 | 0 |
Returns the first valid Wheel Node Object or its index from a Wheel Node Object Array getInd if it is true then the return value is going to be the index, otherwise the object itself | function getFirstValidItemObjOrInd(wtObjA, getInd) {
if (!wtObjA) {
return false;
}
var i = 0,
obj;
while (i < wtObjA.length) {
if (!(obj = wtObjA[i++]).invalid) {
return... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getFirstValidItemObjOrInd(wtObjA, getInd) {\r\n if (!wtObjA) {\r\n return false;\r\n }\r\n\r\n var i = 0,\r\n obj;\r\n\r\n while (i < wtObjA.length) {\r\n if (!(obj = wtObjA[i++]).invalid) {\r\n return getInd ? i - 1 : obj;\r\n }\r\n }\r\n\r\... | [
"0.67447263",
"0.590985",
"0.5790309",
"0.56407833",
"0.55339885",
"0.5504634",
"0.54614663",
"0.5447189",
"0.5436406",
"0.540485",
"0.5392638",
"0.5377403",
"0.537553",
"0.53706133",
"0.5341496",
"0.5332828",
"0.5331382",
"0.5327079",
"0.5323416",
"0.5316589",
"0.53088427",
... | 0.67039293 | 1 |
Hides the last i number of wheels i the last number of wheels that has to be hidden | function hideWheels(dw, i) {
$('.dwc', dw).css('display', '').slice(i).hide();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hideWheels(i) {\r\n if (inst._isVisible) {\r\n $$1('.mbsc-sc-whl-w', inst._markup).css('display', '').slice(i).hide();\r\n }\r\n }",
"function hide_current_visible_swatch(){\n\tvar shelf_div_id = [\"DomImage1\",\"DomImage2\",\"DomImage5\",\"DomImage10\",\"DomImage15\",\"DomImage20\",... | [
"0.8307423",
"0.6644752",
"0.65565723",
"0.6362813",
"0.63391113",
"0.6309492",
"0.6209615",
"0.6205473",
"0.6151019",
"0.6140831",
"0.61253446",
"0.6109837",
"0.60870594",
"0.608305",
"0.60483867",
"0.60341513",
"0.6021253",
"0.6006468",
"0.6000011",
"0.5981248",
"0.59672946... | 0.8346593 | 0 |
Calculates the level of a wheel vector and the new wheel vector, depending on current wheel vector and the index of the changed wheel wv current wheel vector index index of the changed wheel | function calcLevelOfVector2(wv, index) {
var t = [],
ndObjA = wa,
lvl = 0,
next = false,
i,
childName,
chInd;
if (wv[lvl] !== undefined && lvl <= index) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function calcLevelOfVector2(wv, index) {\r\n var childIdx,\r\n childName,\r\n i,\r\n level = 0,\r\n ndObjA = wa,\r\n next = true,\r\n t = [];\r\n\r\n while (next) {\r\n if (wv[level] !== undefined && level <= index) {\r\n i = 0;\r\n ... | [
"0.71708447",
"0.559538",
"0.55901873",
"0.5543631",
"0.55348366",
"0.54924357",
"0.54854167",
"0.54056346",
"0.5367809",
"0.535042",
"0.53042877",
"0.5223782",
"0.52235246",
"0.52207166",
"0.5213515",
"0.5169303",
"0.51493514",
"0.5113347",
"0.5113178",
"0.5107502",
"0.50813... | 0.6751594 | 1 |
Display galaxyx and iphonex object values | function displayObject() {
var output = Object.values(galaxyx) + "<br>" + Object.values(iphonex);
document.getElementById("displayobj").innerHTML=output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addMethod() {\n createMethod();\n output = galaxyx.display() + \"<br>\" + iphonex.display();\n document.getElementById(\"methoddiv\").innerHTML=output;\n}",
"showProperties() {\n console.log(\"Dimension :\", this._width, this._height);\n for (const s in this._params) {\n console.log(... | [
"0.5669622",
"0.56230736",
"0.5605911",
"0.5605911",
"0.55459684",
"0.54631144",
"0.5436219",
"0.52661943",
"0.5202315",
"0.51713604",
"0.51689583",
"0.51536536",
"0.5151003",
"0.5131544",
"0.51105165",
"0.5096066",
"0.5094044",
"0.5087501",
"0.50867945",
"0.5072631",
"0.5046... | 0.63852215 | 0 |
Perform ajax request to OMDB to find movie information | function get_movie_info_OMDB(film) {
var url = "http://www.omdbapi.com/?t=" + film["name"];
$.ajax({
"type": "GET",
"dataType": "JSON",
"url": url,
"success": function(result) {
display_movie_info(result);
},
"error": function(error) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getMovie(movieName) {\n\n var encodedMovieName = encodeURIComponent(movieName);\n\n $.ajax({\n 'url': 'http://www.omdbapi.com/?t=' + encodedMovieName,\n 'dataType': 'json',\n 'success': onMovieInfo\n });\n }",
"function getInfoOfSpecialMovie(){\n ... | [
"0.75774324",
"0.7402298",
"0.737932",
"0.7280237",
"0.7225906",
"0.72216237",
"0.71845764",
"0.7182335",
"0.714091",
"0.7126443",
"0.7080735",
"0.70717406",
"0.7068161",
"0.70680416",
"0.70594466",
"0.70503205",
"0.703756",
"0.7022219",
"0.70172596",
"0.70118594",
"0.6994697... | 0.79967916 | 0 |
helper function to order networks by fitness | orderByFitness(){
this.networks.sort((a, b) => {
return (b.adjustedFitness - a.adjustedFitness)
})
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function order(g){var maxRank=util.maxRank(g),downLayerGraphs=buildLayerGraphs(g,_.range(1,maxRank+1),\"inEdges\"),upLayerGraphs=buildLayerGraphs(g,_.range(maxRank-1,-1,-1),\"outEdges\"),layering=initOrder(g);assignOrder(g,layering);for(var bestCC=Number.POSITIVE_INFINITY,best,i=0,lastBest=0;4>lastBest;++i,++lastB... | [
"0.6130403",
"0.6103683",
"0.5990329",
"0.5970826",
"0.582538",
"0.582538",
"0.56680465",
"0.566714",
"0.566714",
"0.566714",
"0.566714",
"0.566714",
"0.566714",
"0.5663692",
"0.5648432",
"0.5603764",
"0.5600132",
"0.5597055",
"0.55135036",
"0.55027384",
"0.5474589",
"0.546... | 0.79268926 | 0 |
helper function to reset species | resetSpecies(){
//for each species we choose one network randomly
//we will use it to compare to other networks
for (var i = 0; i < this.species.length; i++){
var index = Math.floor(Math.random() * this.species[i].length)
var network = this.species[i][index]
this.species[i] = [network]
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static resetSpecies(){\n\n for(let sample of Neat.species){\n for(let player of sample.players){\n player.species = undefined;\n }\n sample.representative.species = sample;\n sample.players = [sample.representative];\n }\n }",
"reset() {... | [
"0.8192902",
"0.6471401",
"0.6354536",
"0.63389134",
"0.63302195",
"0.6290384",
"0.6285959",
"0.6267117",
"0.62659824",
"0.621407",
"0.62104535",
"0.61722684",
"0.61529166",
"0.61481816",
"0.61278766",
"0.6125248",
"0.6123394",
"0.60873944",
"0.60813874",
"0.6065872",
"0.6062... | 0.75510275 | 1 |
check gene with the rest of the population and give innovation number | getInnovationNumber(inputIndex, outputIndex){
//try to find inovation number
var i = 0
while (i < this.genes.length){
var gene = this.genes[i]
if (gene.inputIndex == inputIndex && gene.outputIndex == outputIndex){
//gene is found, return innovation number
return gene.innovationNumber
}
i++
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"speciate(genome) {\n\n\t}",
"function newGene() {\n generateGenePool();\n numberOfGenerations++;\n\n var fittest = getFittest();\n var totalTime = ((new Date().getTime() - beginTime) / 1000);\n var timePerGeneration = (totalTime / numberOfGenerations) * 1000;\n var timePerImprovment... | [
"0.58462536",
"0.5646834",
"0.5600655",
"0.55500966",
"0.54847026",
"0.53869945",
"0.5353774",
"0.53525853",
"0.53339654",
"0.5310009",
"0.52512574",
"0.52409685",
"0.5222214",
"0.521413",
"0.5211463",
"0.521143",
"0.5139291",
"0.5098567",
"0.5087324",
"0.5060908",
"0.5059917... | 0.63352793 | 0 |
compare network to get genetic difference | compare(net1, net2){
//we need three different values
var e = 0 //number of excess genes
var d = 0 //number of disjoint genes
var deltaW = 0 //sum of the difference of matching weight
var w = 0 //number of matching weight
var N = 1 //can be used for normalization of larger genomes
//we can use three co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"joinNetworks(parent1, parent2){\n\t\t//generate the child network\n\t\tvar child = new Neat(this, this.numberOfInputs, this.numberOfOutputs)\n\n\t\t//parent 1 has a higher fitness than parent 2\n\t\tif (parent1.fitness > parent2.fitness){\n\t\t\tvar p1 = parent1\n\t\t\tvar p2 = parent2\n\t\t} else {\n\t\t\tvar p1 ... | [
"0.61883974",
"0.61593205",
"0.6144058",
"0.6118389",
"0.564809",
"0.5644388",
"0.55904126",
"0.55827594",
"0.5375859",
"0.5375424",
"0.5373579",
"0.53610116",
"0.53447926",
"0.5344246",
"0.53298223",
"0.53213835",
"0.5306692",
"0.5303173",
"0.53021246",
"0.5236122",
"0.52259... | 0.73961914 | 0 |
Appointment scheduling: called from calendar component, user clicked a time slot | makeAppointment(desiredStart) {
console.log('makeAppointment', desiredStart);
//appointments are always one hour
const desiredEnd = desiredStart.clone().add(1, 'h');
//clone desired slot into another time bracket that is 1 minute shorter on both ends for comparing to availability slots
const desiredStartFor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function handleTimeSlotClick(event) {\n const eventFormElem = document.querySelector('.event-form');\n\n if (event.target.classList.contains('event') || event.target.closest('.event')) {\n // console.log('clicked');\n return;\n }\n\n const calendarDayElem = event.target.closest('.calendar__day');\n\n co... | [
"0.697988",
"0.664228",
"0.6433254",
"0.6417345",
"0.61861616",
"0.61546636",
"0.60257834",
"0.60020155",
"0.59430736",
"0.5921781",
"0.5907775",
"0.58944356",
"0.5877867",
"0.5875798",
"0.5872313",
"0.58194566",
"0.57868356",
"0.5785445",
"0.5784671",
"0.57756037",
"0.574558... | 0.6829167 | 1 |
clear the description box on click | function clear_it(){
if($('#project_description').val()=="sample description")
$('#project_description').val("");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var selector = this.getDisplayElement();\n var content = this.model.uiTexts[\"help\"].de;\n selector.innerHTML = content;\n }",
"function meetMyGuestMessageHide() {\n $('#description').attr('placeholder', '');\n\n }",
"function hideDescript(){\n\t\tdescription.styl... | [
"0.730488",
"0.695018",
"0.6929144",
"0.6796732",
"0.670797",
"0.6595265",
"0.6573939",
"0.65179884",
"0.6516791",
"0.65085924",
"0.64904165",
"0.6484911",
"0.6480862",
"0.6454847",
"0.6423523",
"0.64076775",
"0.64052135",
"0.6350317",
"0.63477683",
"0.63357204",
"0.63183403"... | 0.7155851 | 1 |
post project name selected in the list of existing projects called on clicking on submit project | function post_project_name(element_id) {
if(element_id == 'submit_project'){
var str = "";
var str = $('#select_project').find(":selected").text();
var ht = '<table><tr><td>Members Available</td><td>Members Added</td></tr></table>';
if(str!=""){
$('#table_header').html(ht);
$.ajax({
type: "POST",
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function projectSelection(project){\n activeProject = project;\n\n\n}",
"function setProjectList(projectList) {\n $(\"#project_list\").html(\"\");\n projectList.forEach(project => {\n $(\"#project_list\").append(`<a href=\"#\" class=\"list-group-item list-group-item-action\" id=\"project_list_${pro... | [
"0.71662164",
"0.69738096",
"0.68839204",
"0.6860534",
"0.6713562",
"0.6674056",
"0.66410595",
"0.66399103",
"0.661874",
"0.66159797",
"0.6601125",
"0.6554672",
"0.6543447",
"0.6540576",
"0.65183955",
"0.65048873",
"0.64697826",
"0.645767",
"0.6451807",
"0.642957",
"0.6428609... | 0.7053211 | 1 |
post the names of members that are selected to be added called on clicking the + button | function add_members(){$("#select_members option:selected").each(function () {$(this).remove().appendTo("#project_members");});} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addNewMemberToTask() {\r\n // Check if member is already there\r\n if (memberList.includes(createMemberInput.value)) return alert(createMemberInput.value + ' has already been selected.');\r\n\r\n // Add member to memberList array (to be added to task)\r\n memberList.push(createMemberInput.valu... | [
"0.68225175",
"0.6681894",
"0.6656177",
"0.6588339",
"0.65463626",
"0.6474528",
"0.64634097",
"0.64241356",
"0.64206564",
"0.6401713",
"0.62742025",
"0.62230873",
"0.61665195",
"0.6109485",
"0.6081414",
"0.6063811",
"0.60574955",
"0.60378706",
"0.58914554",
"0.58502805",
"0.5... | 0.71226007 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.