Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
onClickMarker open a report for selected item
function onClickMarker(title, attributes) { var attributes = eval("(" + attributes + ")"); View.getOpenerView().siteId = attributes.values['bl.site_id']; View.getOpenerView().blId = title View.getOpenerView().openDialog('ab-msds-rpt-drawing.axvw', null, false, null, null, 1200, 600); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openMarker(i) {\n GEvent.trigger(gmarkers[i], \"click\");\n}", "handleClick(item){\n var markTitle=item.innerText;\n var markers=this.props.markers;\n var element=markers.filter((marker)=>(marker.title===markTitle));\n this.props.openInfoWindow(element[0]);\n }", "function showMarkerSele...
[ "0.68151474", "0.64737177", "0.636574", "0.6248492", "0.6223616", "0.6216233", "0.6195222", "0.61751086", "0.61707133", "0.6089333", "0.6044651", "0.6036878", "0.60079104", "0.60056376", "0.5995638", "0.5959537", "0.5947044", "0.5944301", "0.589314", "0.5872602", "0.5839173",...
0.6968541
1
Combine two already sorted multiset arrays into an array containing the sorted set intersection of the two. Only the shared values between the two arrays, deduped (without duplicates). input: [1,2,2,2,7], [2,2,6,6,7] output: [2,7]
function intersection(arr1, arr2) { var newObj1 ={}; var newObj2 = {}; var newArr = []; for (val in arr1) { newObj1[arr1[val]] =arr1[val]; } // {1:1, 2: 2, 7: 7} console.log(newObj1); for (val in arr2) { newObj2[arr2[val]] = arr1[val]; } // {2:2, 6:?, 7:?} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function union(array1, array2) {\r\n return set(array1.concat(array2));\r\n}", "function union(arr1, arr2) {\n const newArr = arr1.concat(arr2);\n console.log ([...new Set(newArr)]);\n return [...new Set(newArr)];\n}", "function mergeWithoutDuplicates(arr1, arr2) {\n return [... new Set([...arr1, ...a...
[ "0.7443392", "0.7407118", "0.73674524", "0.73420274", "0.7337501", "0.7179368", "0.7167696", "0.71663123", "0.71564126", "0.7148594", "0.71421915", "0.713322", "0.71307147", "0.7125967", "0.7120442", "0.70914614", "0.70569265", "0.70137376", "0.69136333", "0.690397", "0.68763...
0.6385909
77
Functions This function functionality is migrated to appendUsers()
function appendIssues(issues) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUsernames() {\n //io.sockets.emit('get users', users);\n\n if (nConnections > 4) {\n \n var nUsersInRoom = nConnections%4;\n var startPos = nConnections - nUsersInRoom;\n var tempUsers = users;\n var subsetOfU...
[ "0.71017736", "0.6846067", "0.6837814", "0.6823642", "0.67996323", "0.6795374", "0.6738774", "0.6736024", "0.6640604", "0.6607535", "0.6605647", "0.65710354", "0.65710354", "0.65509725", "0.6537387", "0.65012723", "0.649124", "0.6486827", "0.6460497", "0.64560825", "0.6454351...
0.0
-1
This function triggers a queryRequest function and populates the GUI with data
function appendUsers() { queryRequest(uniqueProjectUsers); usersWithNumberOfIssues.length = 0; uniqueProjectUsers.forEach(function (user) { var numberOfIssues = 0; issuesOfProject.forEach(function (issue) { if (issue.assignee == user) { numberOfIssues++; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function do_query(){\r\n\t\t\tthat.qh.handler(service, query, add_label);\r\n\t\t\tbtn.innerText = \"hide\" + enlbl;\r\n\t\t}", "function askQuery() {\nquery=$(\"queryString\").value;\n\tnew Ajax.Updater('showQuery','http://bioinf3.bioc.le.ac.uk/~ss533/cgi-bin/ask3.cgi', {\n\tparameters : {query:query,session:se...
[ "0.6838509", "0.6437449", "0.62745535", "0.62506026", "0.6242564", "0.6228122", "0.6186619", "0.61639774", "0.6073778", "0.6060608", "0.6006894", "0.5972437", "0.5936859", "0.5890891", "0.5865042", "0.586033", "0.5859303", "0.5849201", "0.5849068", "0.5829276", "0.58262044", ...
0.0
-1
This function builds a Google Pie Chart
function buildPieChart() { google.charts.load('current', { 'packages': ['corechart'] }); google.charts.setOnLoadCallback(drawChart); function drawChart() { const data = new google.visualization.DataTable(); data.addColumn('string', 'User'); data.addColumn('number', 'Number of Issu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawChart() {\n\n// Create the data table.\nvar data = new google.visualization.DataTable();\ndata.addColumn('string', 'Topping');\ndata.addColumn('number', 'Slices');\ndata.addRows([\n ['A, 5', 5],\n ['B, 3', 3],\n ['C, 6', 6],\n ['D, 9', 9],\n ['E, 2', 2],\n ['F, 2', 2],\n ['G, 1', 1]\n]);\n\n// ...
[ "0.776498", "0.7704523", "0.7661958", "0.7619212", "0.75984347", "0.75948167", "0.7589774", "0.75699073", "0.7560077", "0.7505643", "0.7482641", "0.7449078", "0.74461585", "0.741909", "0.74125165", "0.7409138", "0.74079037", "0.74018246", "0.73964584", "0.73830146", "0.737910...
0.0
-1
This function hides the data when it is restricted by the user
function switchViews(){ $("#hoverMessageProject").show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onClick() {\n setShowData(false);\n }", "function showHide(data) {\n var limit = 0;\n var storageID;\n // check how many storage restrictions user have\n for (var i = 0; i < data.transferRestriction.length; i++) {\n limit = limit + 1;\n }\n // if he has less than 2 restricti...
[ "0.6417787", "0.63326746", "0.6252775", "0.62290907", "0.62178874", "0.6190196", "0.6184114", "0.61796635", "0.61796105", "0.6157288", "0.6142536", "0.6080292", "0.6065602", "0.6042896", "0.6011127", "0.60070366", "0.59671396", "0.59648156", "0.5926743", "0.59228104", "0.5907...
0.0
-1
FUNCIONES PARA LOS CLIENTES
function getClientData() { $("#info").removeAttr("style"); hideForm(); $.ajax({ dataType: 'json', url: "http://158.101.116.78:8080/api/Client/all", type: "GET", success: function (response) { console.log(response); if(response.length == 0){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostrarServicios(){\n\n //llenado de la tabla\n cajas_hoy();\n cajas_ayer() ;\n}", "function carterasFunction(){\n console.log(\"SeleccionaCliente\");\n SeleccionaCliente();\n console.log(\"getipoCartera\");\n getipoCartera();\n console.log(\">>>>>>>>>\");\n}", "function limpiarCapa...
[ "0.6469468", "0.6463079", "0.6453615", "0.6438424", "0.642239", "0.6378553", "0.62998617", "0.62863696", "0.6245288", "0.6245288", "0.6242502", "0.6241333", "0.6180879", "0.615849", "0.6157345", "0.6114454", "0.60551554", "0.60470396", "0.604312", "0.60101694", "0.59698355", ...
0.0
-1
For Doc Type Start
function createDocTypes() { $.ajax({ type : "GET", url : "docTypes/goCreateDoctype", cache : false, success : function(data) { $("#dynamicContent").html(data); $('#doctypeLists').dataTable({ "bJQueryUI" : true, "sPaginationType" : "full_numbers", "iDisplayLength" : 25, "sScrollY" : "390px...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get type () { return this._doc.type; }", "addDefaultDeclarations() {\n sources_1.addTypeDocOptions(this);\n }", "getDocType(file) {\n this._docType = file.Templates.map(template => template.DocumentType + template.SubDocumentType);\n }", "extendToWordStart() {\n this.extendToWordSt...
[ "0.68264174", "0.59832346", "0.5932597", "0.5930776", "0.5885497", "0.5760851", "0.57009614", "0.5677391", "0.56208354", "0.55813503", "0.555904", "0.5527451", "0.54899967", "0.5479291", "0.5472165", "0.5451651", "0.5451651", "0.5451651", "0.5451651", "0.5451651", "0.54479593...
0.0
-1
End Doc Type Start Attributes
function attributesCreation() { var attr1 = $('#attr1').val(); var attr2 = $('#attr2').val(); var attr3 = $('#attr3').val(); var attr4 = $('#attr4').val(); if (attr1 == "" || attr2 == "" || attr3 == "" || attr4 == "") { // alert("All fields are mandatory"); dialogTemplateLinks("Attributes", "All fields are man...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get type () { return this._doc.type; }", "function AttributeExtras() {}", "function Attribute$1(){}", "getAttributes() {}", "_createPart(){return new AttributePart(this)}", "_createPart(){return new AttributePart(this)}", "constructor(start, end, fullStart = start, details = null) {\n this.start...
[ "0.5394945", "0.5386329", "0.534964", "0.522913", "0.5217144", "0.5217144", "0.5210092", "0.5210092", "0.5198003", "0.5198003", "0.51566976", "0.5128097", "0.51273125", "0.51189244", "0.5071789", "0.50394106", "0.50149626", "0.50148994", "0.50065094", "0.49521452", "0.4947492...
0.0
-1
End Attributes Start Attribute Values
function createAttributeValues() { // alert("ins"); var id = "-1"; $.ajax({ type : "GET", url : "attributeValues/goCreateAttributeValues?" + "id=" + id, cache : false, success : function(data) { $("#dynamicContent").html(data); // alert(data); } }); // var url = // "attributeValues/goCreateAttribu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onattributevalue(token) {\n var attributes = currentTag.attributes\n var attribute = attributes[attributes.length - 1]\n\n attribute.value = parseEntities(slice(token, 1, 1), parseEntitiesOptions)\n attribute.position.end = point(token.end)\n }", "static get observedAttributes() {return ['w...
[ "0.5916509", "0.5850236", "0.5814353", "0.5803206", "0.5715579", "0.5624843", "0.56236327", "0.5586468", "0.55565464", "0.5552641", "0.55510753", "0.55352074", "0.55352074", "0.55352074", "0.55151343", "0.549773", "0.5448918", "0.5363812", "0.5356122", "0.53355384", "0.531059...
0.0
-1
End Attribute Values For Grp
function showGroups() { $.ajax({ type : "GET", url : "groups/goShowGroups", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#groupLists').dataTable({ "bJQueryUI" : true, "sPaginationType" : "full_numbers", "iDisplayLength" :...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GetEndProperty() {}", "_attributeEnded() {\n if (this.attName.length > 0) {\n const attr = new Attribute(\n this.attName,\n this.attValue,\n this.quoteChar,\n this.line,\n this.column,\n );\n this.attributes.push(attr);\n this.attName = '';\n this.qu...
[ "0.5825768", "0.57780063", "0.57646644", "0.57271296", "0.56629705", "0.5622781", "0.56180227", "0.5600864", "0.5578212", "0.55730176", "0.5501541", "0.548152", "0.5463446", "0.53820163", "0.53421533", "0.53421533", "0.53421533", "0.53017557", "0.5281382", "0.5281382", "0.527...
0.0
-1
End of Group Start Roles
function showRoles() { $.ajax({ type : "GET", url : "roles/goShowRoles", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#roleLists').dataTable({ "bJQueryUI" : true, "sPaginationType" : "full_numbers", "iDisplayLength" : 25, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGroup() {\n command_1.issue(\"endgroup\");\n }", "function endGroup() {\n command.issue('endgroup');\n}", "function endGroup() {\n command.issue('endgroup');\n}", "function endGroup() {\n command_1.issue('endgroup');\n}", "function endGroup() {\n command_1.issue('endgrou...
[ "0.66558003", "0.6522852", "0.6522852", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", "0.6437082", ...
0.0
-1
End Roles Start Sec Groups
function showSecurityGroups() { $.ajax({ type : "GET", url : "secGroup/goShowSecGroups", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#secGroupLists').dataTable({ "bJQueryUI" : true, "sPaginationType" : "full_numbers", "iD...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGroup() {\n command_1.issue(\"endgroup\");\n }", "function endGroup() {\n command.issue('endgroup');\n}", "function endGroup() {\n command.issue('endgroup');\n}", "function endGroup() {\n command_1.issue('endgroup');\n}", "function endGroup() {\n command_1.issue('endgrou...
[ "0.6358095", "0.62562656", "0.62562656", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593", "0.61923593",...
0.0
-1
End Sec Groups Template Management Start
function showTemplates() { $.ajax({ type : "GET", url : "template/goShowTemplates", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#templateLists').dataTable({ "bJQueryUI" : true, "sPaginationType" : "full_numbers", "iDispla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newTemplate () {\n $(\"#templateGeneratorMain ul li\").remove();\n $scope.elementList = [];\n $scope.gridsterCont = 0;\n }", "function newTemplate () {\n $(\"#templateGeneratorMain ul li\").remove();\n $scope.elementList = [];\n $s...
[ "0.60201746", "0.60201746", "0.59996736", "0.5984303", "0.5984303", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", "0.5945077", ...
0.0
-1
Template Management End Start Model Combo
function showModelCombo() { $.ajax({ type : "GET", url : "workflowMap/goShowModels", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#modelComboLists').dataTable({ "bJQueryUI" : true, "sPaginationType" : "full_numbers", "iDis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetCombo() {\n this.startCombo = 0;\n }", "init(model, context) {\n\n this.name = \"gapminder-timeslider\";\n this.template = this.template || require(\"./timeslider.html\");\n this.prevPosition = null;\n //define expected models/hooks for this component\n this.model_expects = ...
[ "0.5576347", "0.5560553", "0.54682684", "0.54682684", "0.5268721", "0.51303214", "0.50853217", "0.5072528", "0.50011706", "0.4974073", "0.49544203", "0.4908621", "0.49049148", "0.490405", "0.4893008", "0.48918968", "0.48888895", "0.48874003", "0.4840279", "0.48371467", "0.483...
0.45583427
81
End Model Combo User Management Start
function showUsers() { $.ajax({ type : "GET", url : "user/goShowUsers", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#userLists').dataTable({ "bJQueryUI" : true, "sPaginationType" : "full_numbers", "iDisplayLength" : 25, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initComboUsers() {\n console.log(\"CALL: initComboUsers\");\n var obj = null;\n for (var i = 0; i < 50 && i < users.length; i++ )\n {\n obj = users[i];\n DomUtil.addOptionValue($cmbUsers, obj.user, obj.sum);\n }\n $cmbUsers.selectpicker('refr...
[ "0.61313725", "0.57160026", "0.56135416", "0.5483782", "0.5413315", "0.540363", "0.53318155", "0.53313076", "0.531355", "0.53109974", "0.5303543", "0.5302043", "0.5297525", "0.526142", "0.526142", "0.52536213", "0.5246788", "0.5243465", "0.5219091", "0.5211709", "0.5205089", ...
0.0
-1
User Management End Feature Management Start
function showFeatures() { $.ajax({ type : "GET", url : "features/goShowFeatures", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#featureLists').dataTable({ "bJQueryUI" : true, "sPaginationType" : "full_numbers", "iDisplayLe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user()\n {\n\n }", "function start(){\r\n helloUser();\r\n }", "function userSetMode(){\n // remove the sensitive list and add the user list to websiteMap\n removePreloadListFromBlacklist();\n preloadUserSet();\n saveMode(\"userset\")\n}", "enterNewEntityUsesFeatures(ctx) {\n\t}"...
[ "0.601385", "0.59842056", "0.5919", "0.57229006", "0.56533164", "0.5651665", "0.56153864", "0.55858475", "0.5549828", "0.55009174", "0.549817", "0.54427445", "0.5439974", "0.5431622", "0.54053676", "0.5396979", "0.5396946", "0.53960085", "0.5383152", "0.5379584", "0.5376133",...
0.0
-1
Feature Management End Delete Document Start
function removeProgress() { $('#ProgressBarDialog').dialog('destroy').remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteDocument() {\n\tif (selectedDocument == null) {\n\t\ttoggleWarning(\"error_selection\", true, \"Kein Dokument ausgewählt! \");\n\t\ttogglePopup(\"document_del\", false);\n\n\t\treturn;\n\t}\n\t// alert(\"/hiwi/Admin/js/deleteDocument?uid=\" + selectedDocument);\n\tconnect(\"/hiwi/Clerk/js/deleteDocu...
[ "0.6694652", "0.63942015", "0.62814856", "0.6046731", "0.59882116", "0.5981966", "0.59753156", "0.5905947", "0.59005874", "0.5841657", "0.58240354", "0.5757572", "0.57493335", "0.5720114", "0.5718704", "0.5654663", "0.56535447", "0.5645131", "0.5633354", "0.56070805", "0.5599...
0.0
-1
Delete Document End Admin Module Workflow Adminstration Unpick Document Start
function showPickedSteps() { // alert("inside"); loadProgress(); $.ajax({ type : "GET", url : "adminTemplate/goPickedSteps", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#unpickSteps').dataTable({ "bJQueryUI" : true, "sPagin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteDocument() {\n\tif (selectedDocument == null) {\n\t\ttoggleWarning(\"error_selection\", true, \"Kein Dokument ausgewählt! \");\n\t\ttogglePopup(\"document_del\", false);\n\n\t\treturn;\n\t}\n\t// alert(\"/hiwi/Admin/js/deleteDocument?uid=\" + selectedDocument);\n\tconnect(\"/hiwi/Clerk/js/deleteDocu...
[ "0.6103555", "0.604193", "0.57855415", "0.5711898", "0.56941086", "0.558903", "0.5577331", "0.5576922", "0.5527702", "0.55108005", "0.54671305", "0.54568225", "0.54480296", "0.5416875", "0.53636146", "0.53606737", "0.5333073", "0.53299296", "0.5294049", "0.5265054", "0.524267...
0.0
-1
Unpick Document End Reassign User Start
function showAssignedUserTasks() { // alert("Inside Reassign"); $.ajax({ type : "GET", url : "adminTemplate/getUsers", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $("#trayLabelDiv").hide(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEnd( end )\n{\n script.api.manualEnd = true;\n script.api.end = end;\n}", "onUserInteractionEnd() {\n this.resetRestitution_();\n }", "function setRollbackDocuments() {\n\trbDocuments = swDocuments.slice(0);\n}", "function resetIndex() {\n PropertiesService.getDocumentProperties().se...
[ "0.56012875", "0.5377487", "0.535826", "0.5271825", "0.51193225", "0.51092726", "0.50893223", "0.5087768", "0.5026002", "0.5000821", "0.49884683", "0.4982576", "0.4979897", "0.49696803", "0.49582183", "0.49520817", "0.49385282", "0.4934422", "0.49279028", "0.491245", "0.49073...
0.0
-1
Reassign User End Reassign Owner Start Region
function showReassignOwnerDocs() { loadProgress(); $.ajax({ type : "GET", url : "adminTemplate/showPublishedDocs", cache : false, success : function(data) { $("#showDynamicContent").html(""); $("#dynamicContent").html(data); $('#documentListReassignOwnerDtbl').dataTable({ "bJQueryUI" : true, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setOwnershipForInsight()\n{\n\tvar delegated_user_length = document.getElementById(\"ProductDeligatedTo\").length;\n\tvar insight_status_length = document.getElementById(\"ProductInsightStatus\").length;\n\tdocument.getElementById(\"HdnDelegatedTo\").value=current_user_id;\n\tdocument.getElementById(\"Hdn...
[ "0.5481659", "0.5461653", "0.5457807", "0.533294", "0.5276787", "0.52303237", "0.52185994", "0.5183765", "0.514542", "0.5124044", "0.5062236", "0.49631733", "0.49629453", "0.49499273", "0.49303305", "0.49097386", "0.49041432", "0.48914203", "0.48843563", "0.4878611", "0.48700...
0.0
-1
Reassign Owner End Region Admin Module End Forms Module Start
function formDefinitionClicked(formDefinitionId) { $ .ajax({ type : "GET", url : "forms/formsDefinition" + "?formDefinitionId=" + formDefinitionId, cache : false, success : function(data) { $("#dynContent").html(data); $('#csvDownloadSearch').hide(); $("#header3").show(); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endEdit(){\n // Reset task form and update UI\n displayTaskForm();\n updateUI()\n}", "function resetEditMenuForm(){\r\n EMenuNameField.reset();\r\n EMenuDescField.reset();\r\n EMStartDateField.reset();\r\n EMEndDateField.reset();\r\n\t\t\t\t\t \r\n }", "UpdateRegion() {\n\n ...
[ "0.61456347", "0.5655755", "0.5495764", "0.5492742", "0.54695535", "0.5429152", "0.54090834", "0.5400715", "0.538732", "0.5355983", "0.53502196", "0.53314805", "0.53125024", "0.5309358", "0.53056973", "0.5303006", "0.5300507", "0.5282821", "0.52673954", "0.5254108", "0.525256...
0.0
-1
For Forms Workflow Actions Trigger
function goActionFormsClickedA(modelName, path, docName, popUpNeeded) { var defaultValue = $("#actions").val(); if (defaultValue == -1) { dialogTemplate("Alert", "Please select a valid action before selecting Next"); return false; } var valText = document.getElementById("jsonvals").value; var data = eval(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleButtonEditWorkflow()\n {\n Radio.channel('rodan').trigger(RODAN_EVENTS.EVENT__WORKFLOWBUILDER_SELECTED, {workflow: this.model});\n }", "_handleButtonRunWorkflow()\n {\n Radio.channel('rodan').trigger(RODAN_EVENTS.REQUEST__WORKFLOWBUILDER_CREATE_WORKFLOWRUN, {workflow: this.model});\...
[ "0.64823014", "0.63549167", "0.63390887", "0.6181152", "0.6091524", "0.60681576", "0.6052897", "0.58796674", "0.5767717", "0.571559", "0.5689183", "0.5668042", "0.5654145", "0.5650993", "0.56169665", "0.5610987", "0.55977505", "0.5587676", "0.55835056", "0.55805206", "0.55786...
0.0
-1
firstToMaybe : First a > Maybe a firstToMaybe : (a > First b) > a > Maybe b
function firstToMaybe(first) { if(isFunction(first)) { return function(x) { var m = first(x) if(!isSameType(First, m)) { throw new TypeError('firstToMaybe: First returing function required') } return applyTransform(m) } } if(isSameType(First, first)) { return applyTr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByFirstVal(a, b) {\n if (a[0] < b[0]) return -1;\n if (a[0] > b[0]) return 1;\n return 0;\n }", "function andForMaybe(a, b) {\n if (Maybe_1.isNotNullAndUndefined(a)) {\n return b;\n }\n return a;\n}", "function firstToAsync(left, first) {\n if(isF...
[ "0.5829405", "0.5694065", "0.5677214", "0.56140155", "0.5552455", "0.5552455", "0.553796", "0.5496861", "0.5439013", "0.53994167", "0.5325586", "0.5262833", "0.52167696", "0.5182078", "0.5171914", "0.51663464", "0.51661354", "0.51620126", "0.51427376", "0.51179504", "0.511110...
0.7338849
0
SUM OF ARRAY ITEMS
function sum(arr){ if(arr.length==0) return 0 else return arr[arr.length-1]+sum(arr.slice(0,arr.length-1)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumArr(array){\n\n}", "function arraySum(data) {\n\t\treturn data.reduce(function(a, b) {\n\t\t\treturn a + b;\n\t\t}, 0);\n\t}", "function sum_array(total, sum){\n \t\t\treturn total + sum;\n }", "function sum(arry) {\n\t\t\tvar total = 0;\n\t\t\tfor (i in arry) total += arry[i];\n\t\t\tretu...
[ "0.7299545", "0.72009027", "0.71680915", "0.707992", "0.6985116", "0.6922122", "0.6917712", "0.6914484", "0.68637735", "0.684821", "0.6844967", "0.68341374", "0.683341", "0.68295854", "0.68205947", "0.68084615", "0.6799112", "0.67866474", "0.6771269", "0.6765792", "0.67595124...
0.0
-1
FIND MAX NUMBER IN LIST
function max(arr){ if(arr.length==2) //BASE CASE return arr[0]>arr[1]?arr[0]:arr[1] else // { arr[1]=arr[0]>arr[1]?arr[0]:arr[1] return max(arr.splice(1,arr.length-1)) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findMax(ar)\r\n{\r\n\tvar maxnum = ar.reduce((cur,item) =>{\r\n\t\tif(item > cur)\r\n\t\t\treturn item;\r\n\t\treturn cur;\r\n\t},0)\r\n\treturn maxnum;\r\n}", "function findMax (list) {\n let index = 0;\n let max = 0;\n for (let i = 0; i < list.length; i++) {\n if (list[i] > max) {\n ...
[ "0.7487828", "0.7179293", "0.7138097", "0.7128661", "0.7017714", "0.697554", "0.691523", "0.6905605", "0.6878939", "0.68650913", "0.68504053", "0.6788181", "0.67858946", "0.6772524", "0.675804", "0.67452776", "0.6734983", "0.67325974", "0.6726055", "0.67125857", "0.6708624", ...
0.0
-1
BINARY SEARCH USING RECURSION
function binary(arr,key){ let start=0,end=arr.length; mid=Math.floor((start+end)/2) console.log('KEY : '+key," ARR[MID]: "+arr[mid],"MID : "+mid) console.log(`ARR: ${arr}`) if(arr[mid]==key) { return x.indexOf(arr[mid]) } else if(start==end){ return } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "find(input) {}", "function doubleSearch () {}", "function find() {}", "function rBinarySearch(array, num ) {\n\n}", "function BN_search (BN, a_matchStr, matchRegExp, isRegExp, isTitleSearch, isUrlSearch, a_result, is_recur = true) {\r\n if (BN_match(BN, a_matchStr, matchRegExp, isRegExp, isTitleSearch, is...
[ "0.67036974", "0.64938146", "0.62331635", "0.6210324", "0.5930102", "0.58266765", "0.5817437", "0.58153635", "0.57656187", "0.57622796", "0.5724537", "0.5704718", "0.5695366", "0.56871414", "0.56713575", "0.56526756", "0.56295174", "0.552471", "0.55127347", "0.54949605", "0.5...
0.0
-1
calculate daily caloric needs
function calculateDCN(BMR, activityLevel) { var userDCN = 0; if (activityLevel == 1) { userDCN = BMR * 1.2 } else if (activityLevel == 2) { userDCN = BMR * 1.375 } else if (activityLevel == 3) { userDCN = BMR * 1.55 } else if (activityLevel == 4) { userDCN = BMR * 1.7...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateDaysUsed(){\n\t \n\t /*Get today's date*/\n\t const todayDate = new Date();\n\n\t /*loop through each element/object in the cases array calculating the days between the last status change and the current day. This number is assign to the cases daysUsed attribute of cases object.*/\n\t cases.forEach(f...
[ "0.6402042", "0.6161244", "0.6085622", "0.5969398", "0.5916207", "0.5904066", "0.58479655", "0.5813022", "0.5781969", "0.57658947", "0.5760643", "0.5759747", "0.57454896", "0.5723718", "0.57144576", "0.57100475", "0.5681428", "0.56597716", "0.5651464", "0.56432164", "0.563738...
0.0
-1
Find the element in data0 that joins the highest preceding element in data1.
function findPreceding(i, data0, data1, key) { var m = data0.length; while (--i >= 0) { var k = key(data1[i]); for (var j = 0; j < m; ++j) { if (key(data0[j]) === k) return data0[j]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFollowing(i, data0, data1, key) {\n const n = data1.length, m = data0.length;\n while (++i < n) {\n const k = key(data1[i]);\n for (let j = 0; j < m; ++j) {\n if (key(data0[j]) === k) return data0[j];\n }\n ...
[ "0.65767753", "0.6561862", "0.64936036", "0.6075085", "0.6056045", "0.5953061", "0.5942382", "0.58435816", "0.580655", "0.578874", "0.56866455", "0.56690645", "0.55760086", "0.55760086", "0.55760086", "0.55760086", "0.55760086", "0.55760086", "0.55496794", "0.55496794", "0.55...
0.6060897
4
Find the element in data0 that joins the lowest following element in data1.
function findFollowing(i, data0, data1, key) { var n = data1.length, m = data0.length; while (++i < n) { var k = key(data1[i]); for (var j = 0; j < m; ++j) { if (key(data0[j]) === k) return data0[j]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPreceding(i, data0, data1, key) {\n var m = data0.length;\n while (--i >= 0) {\n var k = key(data1[i]);\n for (var j = 0; j < m; ++j) {\n if (key(data0[j]) === k) return data0[j];\n }\n }\n }", "function findPreceding(i,...
[ "0.6843151", "0.6836998", "0.68197364", "0.6653641", "0.66046256", "0.6601556", "0.6103273", "0.5928294", "0.59196913", "0.58493936", "0.5804313", "0.57950467", "0.5773792", "0.57481474", "0.572788", "0.5723627", "0.57190585", "0.56288064", "0.55935806", "0.5592605", "0.55925...
0.6555407
6
creating a new function for arg4 to give me the right result to use it in the performConsole function
function convertToNumberN(x) { let number = Number(x); return number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myFunction4(arg){\n return arg[1]; \n }", "function yourFunctionRunner() {\n\tvar returnValues = [];\n\tfor (var i=0; i<arguments.length; i++) {\n\t\treturnValues.push(arguments[i]());\n\t}\n\treturn returnValues.join('');\n}", "function argsFor() {\n\n}", "function args() {\n\n}", "func...
[ "0.64597315", "0.6445316", "0.6207247", "0.6171945", "0.60952866", "0.60822564", "0.60810065", "0.603348", "0.59724224", "0.5915746", "0.5907616", "0.59008014", "0.5897846", "0.58658266", "0.5861841", "0.58410615", "0.5835384", "0.58346254", "0.5829792", "0.5805455", "0.58041...
0.0
-1
region Call SVG animation based on currently visible slide index
function startCountryAnimationFromSlider(eventCountryIndex) { for (var i = 0; i < allSvgGraphsArray.length; i++) { if (eventCountryIndex == i) { if (allSvgGraphsArray[i].shortName == 'albania') { svgAnimate_albania(); } else if (allSvgGraphsArray[i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToSlide(nIndex) {\n nIndex = nIndex < slide.length ? nIndex : 0;\n var currentSlide = slide[currentIndex];\n var nextSlide = slide[nIndex];\n var tl = new TimelineLite();\n slideDot[currentIndex].classList.remove('is-active');\n slideDot[nIndex].classList.add('is-active');...
[ "0.65754676", "0.64913875", "0.643754", "0.6384112", "0.633762", "0.6316932", "0.6316932", "0.6307722", "0.61543876", "0.6133155", "0.6103833", "0.60836995", "0.6076656", "0.6073694", "0.60607386", "0.6059825", "0.6058587", "0.6050236", "0.6037865", "0.60191554", "0.59833205"...
0.61926866
8
endregion Call SVG animation based on currently visible slide index / endregion Swiper Slider initialize / region We are calling animation for country
function startCountryAnimation(event) { var eventCountryIndex = event.currentTarget.countryIndex; //console.log('keyss: ' + Object.keys(event.currentTarget)); for (var i = 0; i < allSvgGraphsArray.length; i++) { if (eventCountryIndex == i) { if (allSvgGraphsAr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startCountryAnimationFromSlider(eventCountryIndex) {\n for (var i = 0; i < allSvgGraphsArray.length; i++) {\n if (eventCountryIndex == i) {\n if (allSvgGraphsArray[i].shortName == 'albania') {\n svgAnimate_albania();\n } else if (allSvgGra...
[ "0.714324", "0.65757173", "0.57713866", "0.57562864", "0.5700577", "0.5580483", "0.5572144", "0.555746", "0.5533292", "0.5517453", "0.55040675", "0.5495368", "0.54902196", "0.548307", "0.54697824", "0.5463776", "0.54596823", "0.5416054", "0.5410976", "0.5406949", "0.5404016",...
0.64684075
2
endregion ALL ANIMATIONS FINISHED / region Animate color of People
function animatePeopleColor() { for (var i = 0; i < elementsToColor.length; i++) { var animDelay = delayNumber * i; TweenMax.to(elementsToColor[i], 0.75, { fill: "#F4777C", ease: Back.easeOut.config(1.7), delay: animDelay, onComplete: count...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animcompleted() {\n\t\t\t\t\t\t}", "function colorMate() {\n var colour = pickColor()\n $('body').animate({\n \"background-color\": colour\n }, 2000);\n $('html').animate({\n \"background-color\": colour\n }, 2000);\n $('html').animate({\n \"background-color\": colour\n }, 2000);\n}", ...
[ "0.67278725", "0.67055875", "0.6611412", "0.6360844", "0.63049453", "0.6265467", "0.6203593", "0.6183506", "0.61679894", "0.61538047", "0.61102104", "0.60924184", "0.6037633", "0.60016465", "0.59880215", "0.59724915", "0.59706175", "0.59701467", "0.5939976", "0.5924373", "0.5...
0.75038475
0
=================================== // ===== Code to call both blocks ==== // ===================================
function init() { getConferences(); getPastConferences(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async handleBlocks() {\n await this.api.rpc.chain.subscribeNewHeads(async (header) => {\n if (header.number % 100 == 0) {\n console.log(`Chain is at block: #${header.number}`);\n\n // Unconditionally recalculate validators every 10 minutes\n this.createValidatorList(); // do not await\...
[ "0.61428076", "0.606357", "0.5938593", "0.5893328", "0.5573708", "0.55021596", "0.54269403", "0.5424055", "0.5422191", "0.54134464", "0.54042804", "0.5385247", "0.53491086", "0.5287493", "0.52595997", "0.52133566", "0.52011037", "0.5169395", "0.51616853", "0.5156419", "0.5143...
0.0
-1
We can call the iterator explicitly.
function callIterator() { var iterator = eachWithIndex($('div')); var next = iterator.next(); while (!next.done) { var value = next.value; console.log(value); value.item.style.backgroundColor = 'light' + value.item.id; value.item.textContent = value.index; next = iterator.next(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetIterator() {}", "[Symbol.iterator]()\n {\n return this._iterate({ wrapPoint:false, includeEmpty:false });\n }", "function iterator(item, cb){\n cb();\n }", "function iterator(item, cb){\n cb();\n }", "[Symbol.iterator]() {\n this._...
[ "0.745306", "0.7288952", "0.7186436", "0.7186436", "0.69202495", "0.6841263", "0.6740739", "0.6740739", "0.6740739", "0.6740739", "0.6740739", "0.6732373", "0.6726029", "0.6726029", "0.66783464", "0.66783464", "0.6639575", "0.6623295", "0.66036534", "0.66036534", "0.66036534"...
0.0
-1
...or we can call it from a for loop, using the new 'of' keyword.
function loopIterator() { for (var value of eachWithIndex($('div'))) { console.log(value); value.item.style.backgroundColor = value.item.id; value.item.textContent = value.index; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forof() {\n \n for (var day of wkArray)\n {\n console.log(day + '\\n');\n }\n}", "function forOf(iterable) {\n if (iterable[Symbol.iterator] == undefined) {\n throw new Error(`${iterable} is not an iterable`);\n }\n\n const it = iterable[Symbol.iterator]();\n let result = it.ne...
[ "0.669484", "0.6665377", "0.65037894", "0.6425222", "0.6409826", "0.63979447", "0.63623637", "0.61488307", "0.59684503", "0.59668714", "0.59601015", "0.5949427", "0.5869742", "0.58452535", "0.5792251", "0.57762986", "0.5741272", "0.5729679", "0.5686502", "0.5686502", "0.56614...
0.0
-1
But writing the iterator was pretty cumbersome. What I really want to write is something like this...
function easierEachWithIndex(array) { return turnThisIntoAnIteratorSomehow(function() { for (var i = 0; i != array.length; ++i) { yield({ index: i, item: array[i] }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "[Symbol.iterator]()\n {\n return this._iterate({ wrapPoint:false, includeEmpty:false });\n }", "*[Symbol.iterator]() {\n let i = 0\n while (i < this.size()) {\n yield this.get(i)\n i++\n }\n }", "[Symbol.iterator]() {\n //we need to set the starti...
[ "0.6905664", "0.68362254", "0.6641611", "0.66198564", "0.6617396", "0.65694505", "0.65694505", "0.6543995", "0.6486933", "0.64412427", "0.64331585", "0.6432488", "0.6427557", "0.6427557", "0.6427557", "0.6427557", "0.6427557", "0.6427557", "0.6427557", "0.6427557", "0.6427557...
0.0
-1
AES decryption function for given encryptionKey and iv
function decrypt(reqHeader) { const crypto = require('crypto'); var encryptionKey = '1234567890123456'; var iv = '1234567890123456'; console.error(reqHeader); var decipher = crypto.createDecipheriv('aes128-cbc', Buffer.from(encryptionKey, 'utf8'), Buffer.from(iv, 'utf8')); decipher.update(reqHea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aesDecrypt(ciphertext, key, iv) {\n\tvar encryptedBytes = aes.utils.hex.toBytes(ciphertext);\n\tvar buffer = Buffer.from(key);\n\tvar aesCTR = new aes.ModeOfOperation.ctr(buffer, iv);\n\tvar decryptedBytes = aesCTR.decrypt(encryptedBytes);\n\tvar decryptedText = aes.utils.utf8.fromBytes(decryptedBytes);\n...
[ "0.78512734", "0.78139925", "0.779561", "0.71560246", "0.686041", "0.6701163", "0.6616331", "0.6532319", "0.6532136", "0.6425354", "0.63922304", "0.6370776", "0.6369251", "0.62919784", "0.6258466", "0.6240991", "0.6236701", "0.62303466", "0.620281", "0.6172048", "0.61701006",...
0.54326046
71
Insulin On Board (IOB) calculations. IOB is also known as "Bolus on Board", "Active Insulin", or "Insulin Remaining" Released under MIT license. See the accompanying LICENSE.txt file for full terms and conditions THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMIT...
function iobCalc(treatment, time, dia) { var diaratio = dia / 3; var peak = 75 * diaratio; //var sens = profile_data.sens; if (typeof time === 'undefined') { var time = new Date(); } if (treatment.insulin) { var bolusTime=new Date(treatment.date); var minAgo=(time-bolusT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "computeIBI () {\n if (this.value > this.adaptativePulseThreshold) {\n this.beat.record()\n this.ibi = this.beat.ibi\n } else this.beat.stop()\n }", "generateIobPips(pin, tile, direction, pad) {\n let kin = [];\n let k = [];\n let o = [];\n let i = [];\n let t = [];\n ...
[ "0.6115242", "0.5723681", "0.5418088", "0.53515345", "0.5329534", "0.5322569", "0.529208", "0.525676", "0.52198625", "0.5197644", "0.5191536", "0.5166412", "0.51498127", "0.51430917", "0.5133165", "0.5119185", "0.50677055", "0.5067441", "0.50641626", "0.5035406", "0.502485", ...
0.515524
12
TODO: optimize get messages
function get_messages(a){ $("#messages").empty(); //elemento con texto concatenado console.log("Voy a traer los mensajes"); //console.log(a); //console.log($(a).text()); //user_to=$(a).text(); //formato jquery user_to=$(a).attr('attr-id'); //formato jquery let parent = $('#users'); let hijos = parent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMessages() {\n \tvar transaction = db.transaction(['osMsgStore'], 'readonly'),\n \t\tobjectStore = transaction.objectStore('osMsgStore'),\n \t\tcursor = objectStore.openCursor(),\n isAdmin = document.getElementsByTagName('body')[0].className === 'admin' ? true : false;\n\n \tcur...
[ "0.7623288", "0.7490587", "0.7490587", "0.741662", "0.7317237", "0.7236054", "0.7216365", "0.71109855", "0.71109855", "0.70233494", "0.7020755", "0.7018615", "0.7012229", "0.70080614", "0.6944889", "0.6872259", "0.68711334", "0.6864277", "0.68345827", "0.68191725", "0.6784241...
0.0
-1
is the task of finding a contiguous subarray with the largest sum. e.g. [4, 6, 3, 5, 2, 1] Add all elements and the sum is 11, but at one point earlier in that process the maxSum reached 12.
function maxSum(array) { let currentSum = 0; let currentHighest = array[0]; // Initialize this with array[0] instead of 0 in case we have an array with all negative numbers array.forEach(number => { currentSum += number; if (currentSum > currentHighest) { currentHighest = curren...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function largest_contiguous_subsum2(arr){\n\n let max_so_far = arr[0];\n let curr_max = arr[0];\n\n for (i=1; i<arr.length; i++){\n curr_max = Math.max(arr[i], curr_max+arr[i]);\n max_so_far = Math.max(max_so_far, curr_max);\n }\n return max_so_far;\n}", "function largest_contiguous_subsum1(a...
[ "0.844509", "0.78230864", "0.78204745", "0.7818844", "0.77850205", "0.7775447", "0.7706688", "0.7687043", "0.76660293", "0.76535606", "0.76467896", "0.76467466", "0.76409906", "0.7630541", "0.7628152", "0.7617422", "0.7612263", "0.7609641", "0.76090944", "0.76026547", "0.7602...
0.0
-1
Call the world bank api to get the data for female employment
function femEmployment(){ console.log('calling the function'); $.ajax({ url: 'http://api.worldbank.org/v2/en/countries/WLD/indicators/IC.FRM.FEMM.ZS?&MRV=1&format=json', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); }, success: function(respons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGender(sex) { // API request function\n\n $.ajax({\n url: `https://data.novascotia.ca/resource/emf8-vmuy.json?`,\n type: \"GET\",\n data: {\n \"$limit\": 10000,\n \"$$app_token\": \"whW6hkBV9XeQn2RtJhqKb9pzA\",\n \"sex\": sex\n }\n\n })...
[ "0.5826846", "0.5729531", "0.5617981", "0.56173325", "0.55922663", "0.5515095", "0.5507632", "0.5432593", "0.5431557", "0.5405392", "0.53985417", "0.5363615", "0.53172004", "0.52876157", "0.5281162", "0.527557", "0.52414346", "0.52347475", "0.52002144", "0.51983654", "0.51910...
0.6105199
0
Call the world bank api to get the data for women in parliament
function femParliament(){ console.log('calling the function femParliament'); $.ajax({ url: 'http://api.worldbank.org/v2/en/countries/WLD/indicators/SG.GEN.PARL.ZS?&MRV=1&format=json', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); }, success: fu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDenials(params) {\n return Resource.get(this).resource('Store:getDenials', params)\n .then(denials => {\n this.displayData.denials = denials.data;\n });\n }", "function GetAvalibleDistricts(){\n var url = config.api.url + \"wijk?ex={'k':'beschikbaar', 'v':'true'}\";\n $http({\n ...
[ "0.58220786", "0.56774247", "0.5662226", "0.55908585", "0.5574254", "0.5547733", "0.55404776", "0.5526668", "0.55143285", "0.55005604", "0.54598904", "0.5438839", "0.54186684", "0.54058605", "0.53995174", "0.539314", "0.5384449", "0.5371965", "0.5351842", "0.5340355", "0.5312...
0.51245743
45
Call the world bank api to get the data for women in ministerial positions
function femMinistries(){ console.log('calling the function femMinistries'); $.ajax({ url: 'http://api.worldbank.org/v2/en/countries/WLD/indicators/SG.GEN.MNST.ZS?&MRV=1&format=json', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); }, success: fu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateWorld() {\n\n // update player data\n\n TemplateService.inject( Templates.STATS_DISPLAY, container, {\n money: Player.money,\n radius: Player.radius\n });\n\n // retrieve all venues\n\n police = [], banks = [], gas = [];\n\n // a bit of a Promise pyramid which could b...
[ "0.55458736", "0.55316806", "0.5407685", "0.538417", "0.5380538", "0.5361293", "0.531954", "0.5317505", "0.53032774", "0.52999157", "0.52961415", "0.5285306", "0.5259123", "0.52542824", "0.5243315", "0.52295697", "0.521201", "0.51907337", "0.5164598", "0.51562256", "0.5138127...
0.5691989
0
Call the world bank api to get the data for girls not in elementary school
function femGirlsSchool(){ $.ajax({ url: 'http://api.worldbank.org/v2/en/countries/WLD/indicators/SE.PRM.UNER.FE?&MRV=1&format=json', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); }, success: function(response) { console.log(response); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetAvalibleDistricts(){\n var url = config.api.url + \"wijk?ex={'k':'beschikbaar', 'v':'true'}\";\n $http({\n url: url,\n method: 'GET'\n }).success(function(data, status, headers, config) {\n $scope.avalibleWijken = data;\n console.log(\"Wi...
[ "0.6221731", "0.62210226", "0.6014073", "0.5940738", "0.5925666", "0.59135616", "0.58586985", "0.5761527", "0.56708246", "0.5666935", "0.5626845", "0.5624596", "0.56119233", "0.5599595", "0.55903316", "0.5580684", "0.55612946", "0.55486566", "0.5547791", "0.55208385", "0.5517...
0.5619752
12
Firms with female participation in ownership (%of firms)
function femOwners(){ $.ajax({ url: 'http://api.worldbank.org/v2/en/countries/WLD/indicators/IC.FRM.FEMO.ZS?&MRV=1&format=json', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); }, success: function(response) { console.log(response); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFamilyMembers() {\n $scope.fullFamilyDetails = [];\n\n //I decided to use the word as I don't have to worry about converting to a string and back to a usable number\n\n $scope.familyDice = \"eight\";\n $scope.FamilyFactory.getNumber($scope.familyDice).then(function() {\n ...
[ "0.5655962", "0.5620853", "0.5554277", "0.5510393", "0.5497689", "0.54603505", "0.5425207", "0.5424924", "0.54221886", "0.5420407", "0.54203993", "0.53489184", "0.53218246", "0.5271323", "0.5240444", "0.522028", "0.51965517", "0.51936823", "0.51688755", "0.5163913", "0.516021...
0.4740393
87
Countries with legislation againsts child or early marriage
function femEarlyMarriage(){ $.ajax({ url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/childmarriage!B223?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCountries() {\n var countryChoices = [\n {\n \"abbr\":\"\",\n \"name\":\"(not applicable)\"\n },\n {\n \"abbr\":\"AF\",\n \"name\":\"Afghanistan\"\n },\n {\n \"abbr\":\"AX\",\n \"name\":\"Akrotiri\"\n },\n {\n \"abbr\":\"AL\",\n \"name\":\"A...
[ "0.611496", "0.56658614", "0.5662992", "0.56581104", "0.56368536", "0.5617006", "0.5597341", "0.5508053", "0.5502409", "0.54595816", "0.5457501", "0.54318833", "0.54120946", "0.5399152", "0.53507143", "0.53473085", "0.53089654", "0.530501", "0.5303981", "0.53024036", "0.52822...
0.0
-1
Average hours spent on domestic work
function femDomWork(){ $.ajax({ url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/domesticwork!A319:E319?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calcAvgTotalHrs() {\n let sum = this.data.map(currentData => {\n return currentData.hoursSlept\n }).reduce((acc, hoursSlept) => acc + hoursSlept);\n\n return sum / this.data.length;\n }", "function averageFreeHoursPerWeek() {\n var numerator = 0;\n var meters = 0;\n for (var i = 0; i < da...
[ "0.7395965", "0.6373736", "0.6368059", "0.62869036", "0.6254093", "0.625019", "0.6235537", "0.61793715", "0.6020838", "0.59976", "0.59731406", "0.59469837", "0.5938022", "0.58891666", "0.5885158", "0.58366114", "0.58190745", "0.5811634", "0.58046156", "0.58027494", "0.5784237...
0.0
-1
Countries with legislation againsts domestic violence
function femDomViolence(){ $.ajax({ url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/domesticviolence!B234?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCountries() {\n var countryChoices = [\n {\n \"abbr\":\"\",\n \"name\":\"(not applicable)\"\n },\n {\n \"abbr\":\"AF\",\n \"name\":\"Afghanistan\"\n },\n {\n \"abbr\":\"AX\",\n \"name\":\"Akrotiri\"\n },\n {\n \"abbr\":\"AL\",\n \"name\":\"A...
[ "0.63416004", "0.58433586", "0.582622", "0.5747183", "0.5743597", "0.572296", "0.56939954", "0.5665907", "0.5636699", "0.561984", "0.56158835", "0.55879533", "0.55846304", "0.5561911", "0.5541937", "0.55327994", "0.5511872", "0.5511515", "0.55112433", "0.54996324", "0.5495984...
0.0
-1
Countries with Gender parity index for terciary education below 1
function femTercEduc(){ $.ajax({ url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/genderparityterciary!B191?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc', type: 'GET', failure: function(err){ return alert ("Could not get the Data");...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGender(){\n var name = getName();\n if (baby.Gender.length == 0) return 0;\n var index = baby.Name.indexOf(name);\n var gender = baby.Gender[index]\n // solved problem: when I add a baby using the dropdown I get Male/Female, not 1/2.\n if (gender == \"Female\") {\n gender = 2;\n } else if (ge...
[ "0.55162954", "0.5424229", "0.5390707", "0.5334385", "0.5313127", "0.5299953", "0.52958786", "0.5266204", "0.5252887", "0.5242351", "0.52256995", "0.52061534", "0.5190919", "0.5182922", "0.5179278", "0.51727575", "0.5144352", "0.5118689", "0.5110781", "0.508857", "0.5050479",...
0.0
-1
Proportion of females amongs tertiary education teachers and professors
function femProf(){ $.ajax({ url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/womenProfessors!B193?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); },...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createpercentagestudents(){\n return numberOfstudents * 100 / numberofpeople;\n}", "function averageSalaryNonFreeLancer(employees) {\nlet nonfree= employees.filter(a=>a.freelancer==false)\nlet sal= nonfree.reduce((a,b)=>a+b.salary,0)\nreturn sal/nonfree.length\n}", "function getBonusPercentage( som...
[ "0.6530495", "0.6297252", "0.62637955", "0.6232256", "0.6101866", "0.5996055", "0.59852403", "0.59581864", "0.5947784", "0.59004414", "0.5896851", "0.5894129", "0.5884638", "0.5882022", "0.58780646", "0.58714414", "0.5860938", "0.58534706", "0.5835483", "0.5832117", "0.582246...
0.0
-1
Share of female police officers
function femPolice(){ $.ajax({ url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/womenpolice!B101?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "engage(male, female) {\n male.partner = female;\n female.partner = male;\n }", "function femProf(){\n\t\n\t\n\t$.ajax({\n\t url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/womenProfessors!B193?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc'...
[ "0.59869486", "0.57101816", "0.56865644", "0.55730164", "0.54863703", "0.5377983", "0.5314712", "0.52953666", "0.52614856", "0.5220164", "0.5208947", "0.5137447", "0.5129464", "0.5111661", "0.50842834", "0.50800747", "0.50719726", "0.5045391", "0.50199527", "0.5019789", "0.50...
0.6003487
0
Proportion of everpartnered women (aged 1549) subjected to physical and/or sexual violence by a current or former intimate partner in the last 12 months
function femPartnerViolence(){ $.ajax({ url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/partnerviolence!B83?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc', type: 'GET', failure: function(err){ return alert ("Could not get the Data")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function promedioPorcentaje(democrats, republicans, independents) {\n app.statistics.votesWithPartyD = promedio(democrats);\n app.statistics.votesWithPartyR = promedio(republicans);\n app.statistics.votesWithPartyI = promedio(independents);\n}", "function createpercentagementors(){\n return numberOfm...
[ "0.640281", "0.6239727", "0.60251325", "0.59887844", "0.59692585", "0.5929215", "0.57683843", "0.5768058", "0.57571125", "0.5756643", "0.56999815", "0.56695473", "0.56637", "0.56617767", "0.56388265", "0.562625", "0.5615977", "0.5615977", "0.56012374", "0.5588786", "0.5588072...
0.0
-1
share of female judges
function femJudges(){ $.ajax({ url: 'https://sheets.googleapis.com/v4/spreadsheets/1xY7elAOUiwUk4_-hQeAAEyIrjjGEs9m4YwN8y4Hvoq4/values/femjudges!B90?key=AIzaSyBPUCBgHVylsVn7WQB9yvJmqEMoy5b17jc', type: 'GET', failure: function(err){ return alert ("Could not get the Data"); }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "engage(male, female) {\n male.partner = female;\n female.partner = male;\n }", "function getSurvivorsByGender(data, gender) {\n\treturn data.filter(p => p.fields.sex === gender && p.fields.survived === 'Yes').length\n}", "isMale (person) { return this.equals(person.gender, 'male'); }", "func...
[ "0.6204177", "0.54746836", "0.53821325", "0.53454614", "0.5342319", "0.53283197", "0.52900374", "0.5186766", "0.5180936", "0.5166794", "0.51604563", "0.5158408", "0.5062885", "0.50596917", "0.5040803", "0.5031081", "0.5016711", "0.49999285", "0.49906898", "0.49790144", "0.497...
0.5140183
12
Create the card to append to the DOM
function addCard(variabel, htmlToAppend){ return $('#card-holder').prepend(htmlToAppend); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createCard() {\n\n $(\"#card-div\").empty();\n\n $(\"#card-div\").html(\n \"<div class='card'>\" +\n \"<h5 class='card-header' id='event'></h5>\" +\n \"<div class='card-body'>\" +\n \"<h5 class='card-title' id='venue'></h5>\" +\n \"<p class='card-text' id='description'></p>\...
[ "0.7957045", "0.7880948", "0.7817441", "0.77489865", "0.7723439", "0.7650707", "0.76411676", "0.7640145", "0.7631413", "0.7621114", "0.7598828", "0.7542676", "0.7509551", "0.7478228", "0.7436157", "0.743592", "0.7420763", "0.7419498", "0.7407714", "0.7406379", "0.73801523", ...
0.7254185
40
function to clear everything before adding new data
function deleteCards(){ document.getElementById("card-holder").innerHTML = " "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear() {\n\t\t\tconsole.log(\"clear()\");\t\t\n\t\t\tresetData();\n refreshTotalCount();\n\t\t\tsetFocus();\n\t\t\taddAdbRow();\n\t\t\tconsole.log(\"done clear()\");\n\t\t}", "function clearDataList() {\n\t\t\tlastItemDataRefId = 0;\n\t\t\tdataArray = [];\n\t\t}", "function cle...
[ "0.7740506", "0.7661726", "0.7656835", "0.7538336", "0.75220996", "0.7457063", "0.74071366", "0.73978573", "0.73932105", "0.73749745", "0.73169565", "0.7305442", "0.7291806", "0.7261767", "0.7261415", "0.724002", "0.7210897", "0.71941566", "0.7184995", "0.71800494", "0.716116...
0.0
-1
funRet2(); funRet3(); funRet4(); funRet5(); funRetExtra1(); funRetExtra2();
function funRet1() { /* Skriv en metod "superImportant" som returnerar stjärnor och texten med stora bokstäver. Om den anropas såhär: let text = superImportant("Itch"); console.log(text); Så ska följande skrivas ut: ****** ITCH ****** */ func...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fun3(a,b){\n return \n\n}", "function fun1( /*parametros opcionais*/ ){ /*retorno opcional*/ }", "function callFunctions(){\n addition(10, 20);\n subtraction(30, 10);\n}", "function call3Times(fun) {\n fun();\n fun();\n fun();\n }", "function fun1(){} //toda a função de js retor...
[ "0.6501956", "0.63611734", "0.63012064", "0.6249084", "0.6234824", "0.6229506", "0.6154707", "0.61449647", "0.6066152", "0.600236", "0.59972125", "0.5967478", "0.5967478", "0.5958793", "0.5958793", "0.59520835", "0.5936659", "0.5936659", "0.5936659", "0.5936659", "0.5936659",...
0.0
-1
need to remove mock
mounted() { this.loadedflag = true; if (this.globals.getIsLoggedIn()) { this.getAddressesRequest(); } else { this.isGuest = true; this.getGuestAddressesRequest(); } this.palletShipment(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeMockModule() {\n console.log('removeMockModule is no longer supported as of version 1.0.0, and will be removed in future versions');\n }", "off() {\n this.mocking = false;\n this.clear();\n }", "function addMockModule() {\n console.log('addMockModule is no longer supporte...
[ "0.7282715", "0.66388756", "0.65989614", "0.62614894", "0.625804", "0.6246569", "0.6240591", "0.6220186", "0.62063235", "0.6110119", "0.6108523", "0.6108523", "0.6108523", "0.6108523", "0.60301036", "0.6015526", "0.59690744", "0.5945201", "0.594188", "0.5933292", "0.5876504",...
0.0
-1
get all addresses generate request
isAddressExists() { const splitEntries = []; this.existingSavedAddresses = []; this.allEntries.map((entry) => { if (entry.splitEntries && entry.splitEntries.length === 0) { this.isNewProductAdded = true; this.isEditable = true; } }); for (let i = 0; i < ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addresses() {\n return __awaiter(this, void 0, void 0, function* () {\n return api_1.addresses(this);\n });\n }", "getUserAddresses() {\n return __awaiter(this, void 0, void 0, function* () {\n let response = yield request({\n method: 'get',\n ...
[ "0.7338626", "0.7323346", "0.7263723", "0.6905529", "0.6741987", "0.63965976", "0.6394924", "0.6394924", "0.6331742", "0.63287896", "0.6307455", "0.6284602", "0.6193138", "0.6191393", "0.60961866", "0.6078391", "0.6038243", "0.5991574", "0.59866077", "0.59697276", "0.59580684...
0.0
-1
get all addresses response
handleGetAddressResponse(response) { this.$refs.spinner.hideSpinner(); this.savedAddresses = response.data.addresses; // disable ship to multiple link if the user is L2/L3 and doesnt have any saved address if (!this.userLevel && this.savedAddresses.length === 0) { this.disableShipToMulti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addresses() {\n return __awaiter(this, void 0, void 0, function* () {\n return api_1.addresses(this);\n });\n }", "getAddresses() {\n this.node.logger.silly(`Get adresses: ${this.id.addresses}`)\n return this.id.addresses\n }", "getAddresses(): Promise<Array<AddressRecord>> {...
[ "0.7733628", "0.75482404", "0.74590623", "0.73246443", "0.70552963", "0.661126", "0.65472454", "0.65121764", "0.64993227", "0.6470262", "0.6470262", "0.6435823", "0.63211584", "0.62444186", "0.6208094", "0.62076837", "0.6200786", "0.6174538", "0.61545324", "0.61436707", "0.61...
0.585314
39
configure any arg type
custom(type) { if (type) { if (typeof type.withParent === 'function') type.withParent(this.name); if (typeof type.validateConfig === 'function') type.validateConfig(this.utils); this.types.push(type); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n const { type } = argv;\n this.type = type || '';\n }", "function oneOf(args) { }", "function validateOptionalArgType(functionName,type,position,argument){if(argument!==undefined){validateArgType(functionName,type,position,argument);}}", "function argsDataType() {\n\n}", "arg(name, type, d...
[ "0.5901917", "0.57195187", "0.552652", "0.55081445", "0.54713196", "0.543517", "0.54295874", "0.5402738", "0.5334104", "0.53262514", "0.5316504", "0.5264354", "0.5204019", "0.52024245", "0.5192289", "0.50951415", "0.5085654", "0.508145", "0.5062421", "0.50506884", "0.5048925"...
0.0
-1
specify 'type' (as string) in opts
option(flags, opts) { //@ts-ignore return this._addOptionType(flags, opts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setType(type) { }", "set type(value) {}", "get type() {\n return this.options.type;\n }", "function setOption(name, value, type) {\r\n if (typeof value !== type) {\r\n throw new TypeError(\"'\"+ name +\"' must be of type '\"+ type + \"'\");\r\n } \r\n ioConfig[name] = value;\r\n ...
[ "0.66302925", "0.62875426", "0.6157656", "0.6130032", "0.59821635", "0.5948606", "0.5948606", "0.59055334", "0.58884495", "0.588664", "0.58841544", "0.58150953", "0.57473725", "0.572645", "0.5653152", "0.5632281", "0.56044364", "0.55982727", "0.55651546", "0.55651546", "0.556...
0.58292913
11
TODO more types lifecycle hook
check(handler) { //@ts-ignore this._checkHandler = handler; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Type() {\n this.hooks = [];\n }", "getType(){return this.__type}", "get type() { return this._type; }", "get type() { return this._type; }", "get type() { return this._type; }", "createTypes(){\n }", "function Type() {}", "function Type() {\r\n}", "getType() {}", "get type()...
[ "0.6830725", "0.67610997", "0.67466044", "0.67466044", "0.67466044", "0.6745694", "0.6733969", "0.672806", "0.672265", "0.66226834", "0.6575985", "0.6543102", "0.6501975", "0.6367506", "0.63415587", "0.63415587", "0.63288474", "0.6318032", "0.63043004", "0.6268573", "0.626633...
0.0
-1
parse and exit if there's output (e.g. help text) or a nonzero code; otherwise resolves to argv useful for standard CLIs
async parseAndExit(args, state) { const context = await this._parse(args, state); const result = context.toResult(); if (result.output) { // note that we want context.helpRequestedImplicitly to output to stderr, not stdout const level = ((context.helpRequested || context....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseArgv() {\n if (process.argv.length <= 2)\n throw help(\"missing command (e.g., 'run')\");\n\n const firstArg = process.argv[2];\n if (firstArg === \"help\" || firstArg === \"--help\" || firstArg === \"-h\") {\n help();\n return null;\n }\n\n if (firstArg.indexOf(\"...
[ "0.6149515", "0.5930286", "0.5913202", "0.56792134", "0.5582069", "0.55313826", "0.5505087", "0.5489152", "0.54235566", "0.53968686", "0.537911", "0.5372175", "0.53179985", "0.52650815", "0.526095", "0.5217878", "0.5204525", "0.5179922", "0.5175636", "0.51590186", "0.51487565...
0.6244313
0
parse and resolve to a context result (never exits) useful for chatbots or checking results
async parse(args, state) { const context = await this._parse(args, state); return context.toResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "evaluate(context)\n {\n if (this.isCached())\n {\n let parsed = this.parsed_cache.evaluate(context);\n return parsed;\n }\n\n let parser = new ExpressionParser(this.clean());\n this.parsed_cache = parser.parse();\n return this.evaluate(context);\n ...
[ "0.59012353", "0.57736397", "0.5626107", "0.5471015", "0.54378295", "0.54378295", "0.54375935", "0.5390916", "0.5390916", "0.5379531", "0.5372703", "0.5364669", "0.5351375", "0.53243047", "0.52956903", "0.528538", "0.5265267", "0.52491134", "0.5239872", "0.52359146", "0.52020...
0.61578363
0
recursive, meant to be used internally
async parseFromContext(context) { // first complete configuration for special types let hasCommands = false; let hasDefaultCommand = false; this.types.forEach(type => { //@ts-ignore if (type.needsApi) type.configure({ api: this.newChild(type.aliase...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recusion() {\n // some serious code\n recusion();\n}", "function recursion(some) {\n return some[0] + recursion(some.slice(1));\n //keep breaking it smaller and returning\n }", "function TypeRecursion() {}", "depthFirstForEach(cb) {\n\n }", "recursive(node) {\n if (node ...
[ "0.65929276", "0.63160855", "0.6135342", "0.61001015", "0.60639673", "0.6049418", "0.6048323", "0.6015882", "0.5968996", "0.5968248", "0.59646463", "0.5882129", "0.58782953", "0.5869723", "0.5828859", "0.57572085", "0.5744265", "0.5739228", "0.5727321", "0.56904423", "0.56880...
0.0
-1
clear as mud? this predicts the future, essentially the inverse of conditions found in parse after parseFromContext and also the conditions that would make the showHelpByDefault command run basically, we don't want to run the custom check handler if help text or version will be output
shouldCoerceAndCheck(context) { return !context.helpRequested && !context.helpRequestedImplicitly && !context.versionRequested && !(context.messages && context.messages.length) && (!this._magicCommandAdded || context.explicitCommandMatch(this.name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_helpAndError() {\n this.outputHelp();\n // message: do not have all displayed text available so only passing placeholder.\n this._exit(1, 'commander.help', '(outputHelp)');\n }", "_helpAndError() {\n this.outputHelp();\n // message: do not have all displayed text available so only passing placeh...
[ "0.5981796", "0.5981796", "0.57506615", "0.5734527", "0.56430525", "0.55985916", "0.5583102", "0.5571206", "0.5565372", "0.55601096", "0.55408126", "0.5492567", "0.54781514", "0.5463626", "0.5440047", "0.5423454", "0.54226726", "0.54060537", "0.5391715", "0.5377758", "0.53540...
0.5769493
2
Builds and returns a new User.
function createNewUser(id) { var name = NAMES[Math.round(Math.random() * (NAMES.length - 1))] + ' ' + NAMES[Math.round(Math.random() * (NAMES.length - 1))].charAt(0) + '.'; return { id: id.toString(), name: name, progress: Math.round(Math.random() * 100).toString(), color...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constructUser(user) {\n var salt;\n var hashed;\n\n //generate salt for password hash\n return accountService.generateSalt()\n .then(function (_salt) {\n salt = _salt;\n\n //generate hashed password\n return accountService.hashPassword(user.password, s...
[ "0.65590125", "0.6513307", "0.6513307", "0.65036786", "0.6455037", "0.643708", "0.6384117", "0.6377226", "0.6346263", "0.63361204", "0.6332566", "0.6319321", "0.63167965", "0.62827575", "0.62649554", "0.624714", "0.62291634", "0.6208056", "0.6205752", "0.61778736", "0.6164511...
0.0
-1
Update player velocity in state based on key code
function handleKeydown(keyCode) { const roomID = clientRooms[client.id]; // Look for client ID in clientRooms keys if (!roomID) return; try { keyCode = parseInt(keyCode); } catch (error) { console.error(error); return; } const vel = getUpdatedVelocity(keyCode); if (vel) { state[roomID].play...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePlayer(map){\n if(map[16]){ //Shift\n self.terminal=5;\n }else{\n self.terminal=1;\n }\n setPlayerVelocity(map); // Set the player velocity based on key presses\n self.look=[Math.cos(theta)*Math.sin(phi),Math.cos(phi),Math.sin(theta)*Math.sin(phi)]; // 3D Polar coordinat...
[ "0.72014815", "0.71838427", "0.71463764", "0.69008607", "0.68636745", "0.6843686", "0.6800455", "0.6792349", "0.678505", "0.6710028", "0.6685936", "0.6643925", "0.66252697", "0.66101044", "0.66039145", "0.6587428", "0.6564193", "0.65537566", "0.6550853", "0.652373", "0.65192"...
0.69953007
3
Initialize game loop with interval while checking for a winner
function startGameInterval(roomID) { const intervalId = setInterval(() => { const winner = gameLoop(state[roomID]); if (!winner) { emitGameState(roomID, state[roomID]); } else { emitGameOver(roomID, winner); state[roomID] = null; clearInterval(intervalId); } }, 1000 / FRAME_RATE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startOpponentCheckTimer() {\n nIntervId = setInterval(checkForOpponent, 5000);\n }", "checkWin() {\n // If computer or player 2 wins\n if (this.score1 >= 50) {\n // Clear the interval\n clearInterval(this.timeInterval);\n // Change the page state to the winning state\n this...
[ "0.6958919", "0.67797595", "0.6750691", "0.65817213", "0.6571345", "0.6515362", "0.651386", "0.65110624", "0.64957875", "0.64809686", "0.64731175", "0.6471954", "0.6408443", "0.6377334", "0.6375923", "0.63643456", "0.63566583", "0.6356404", "0.63358605", "0.63305557", "0.6323...
0.6312077
23
Emit 'gamestate' event with gamestate data
function emitGameState(roomID, state) { io.sockets.in(roomID).emit('gamestate', JSON.stringify(state)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitGameState(gamePhase){\n _.each(players, function(player){\n player.socket.emit('gameState', {players: getPlayers(), dealer: getDealer(), gamePhase: gamePhase});\n })\n }", "function sendUpdate() {\n var gameState = galaxy; //gameState\n sio.emit('gameState', gameSta...
[ "0.69529223", "0.68140954", "0.6454813", "0.6382128", "0.62122947", "0.6117663", "0.60740215", "0.605622", "0.6007361", "0.59494036", "0.5947207", "0.5934903", "0.5884861", "0.5792529", "0.5782862", "0.57767", "0.57634336", "0.5759892", "0.57498014", "0.5717593", "0.5716108",...
0.7214979
0
Emit 'gameover' event with winner number
function emitGameOver(roomID, winner) { io.sockets.in(roomID).emit('gameover', JSON.stringify({ winner })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function game_over() {\n if(model.winner == 0) {\n alert(\"Game over, it is a tie!\");\n model.winner = 1;\n } else {\n if(this.turn === \"x\") {\n // alert(\"Player 1 Won!\");\n } else {\n // alert(\"Player 2 Won!\");\n ...
[ "0.742147", "0.72930497", "0.7182796", "0.7004167", "0.69727767", "0.69694245", "0.69520307", "0.6925344", "0.6909451", "0.6889384", "0.68439496", "0.6842464", "0.6831794", "0.6814617", "0.6795695", "0.67865485", "0.67800444", "0.6772205", "0.67716634", "0.67683", "0.67602026...
0.7636669
0
Required dependencies for the component.
dependencies() { return ['@babel/preset-react']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get requires() {\n return {\n 'JQX.ProgressBar': 'jqxprogressbar.js'\n }\n }", "static get dependencies() {\n return [];\n }", "static get requires() {\n return {\n 'JQX.Button': 'jqxbutton.js',\n 'JQX.ProgressBar': 'jqxprogressbar.js'\n ...
[ "0.7453458", "0.7452525", "0.7393489", "0.7134648", "0.7125477", "0.70684105", "0.7060798", "0.7005003", "0.6989663", "0.69709325", "0.69005734", "0.6826023", "0.68260145", "0.68069595", "0.6796998", "0.66802174", "0.6637874", "0.66009885", "0.65976244", "0.6569573", "0.65098...
0.0
-1
Babel config to be merged with Blender's defaults.
babelConfig() { return { presets: ['@babel/preset-react'] }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "config(cfg, data) {\n if (cfg.hasFilesystemConfig()) {\n // Use the normal config\n return cfg.options;\n }\n\n const presetOptions = data.customOptions.presetOptions; // We set the options for default preset using env vars\n // So that you can use our default preset in your own b...
[ "0.6925979", "0.6761235", "0.6705115", "0.6705115", "0.64822906", "0.61014754", "0.6072038", "0.60695237", "0.603291", "0.58644927", "0.5859127", "0.5829232", "0.5808673", "0.57982516", "0.5631265", "0.5600213", "0.5530658", "0.551385", "0.5418733", "0.53709066", "0.5300886",...
0.57860345
14
This is the search component, when clicking on the search button or enter it's doing the search with the api. This will help us find the movies that we type in.
constructor(props) { super(props); this.state = { searchInput: '', searchResult: [], resultShow: false }; this.handleUpdate = this.handleUpdate.bind(this); this.searchMovie = this.searchMovie.bind(this); this.onBlur = this.onBlur.bind(this); this.focusOnSearch = this.focusOnSearch.bind(this); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chargeMovies(e) {\n e.preventDefault();\n const textSearch = document.getElementById('search').value;\n consultApi(textSearch);\n}", "function searchMovie(value) {\n\n const path = '/search/movie';\n\n const url = generateUrl(path) + '&query=' + value;\n\n const render = renderMovies.bind({t...
[ "0.78094935", "0.7804878", "0.7694124", "0.76043624", "0.75914454", "0.75685143", "0.74909115", "0.74736977", "0.7473595", "0.74591845", "0.7423967", "0.7418295", "0.73406017", "0.7338982", "0.7287001", "0.7279777", "0.7262911", "0.72547394", "0.7251736", "0.7244064", "0.7195...
0.6699375
80
Add a mapping for a simple singlefield index
addSimpleField(index, name) { this[index.name] = value => `${encodeURIComponent(name)}=${encodeURIComponent(value)}`; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(index_def) {\n\n this.index_def = index_def;\n this.map_records = []; \n\n\n\n\n\n }", "async function createIndex() {\n const body = {\n settings: {\n analysis: {\n filter: {\n autocomplete_filter: {\n type: 'ngram',\n min_gram: 1,\n ...
[ "0.6142344", "0.6137663", "0.60390425", "0.568512", "0.5666109", "0.56142515", "0.55931383", "0.55555755", "0.5554034", "0.55058944", "0.55031914", "0.54218733", "0.5351219", "0.53184426", "0.5298755", "0.5296477", "0.5293434", "0.5293434", "0.5293434", "0.5293434", "0.529343...
0.5662159
5
Find an object by its unique key
find(key) { debug('find', key); return this._doGet( this._singleResourceURI(key), result => this.type.fromJSON(result)) .then(debugInline('find - returns')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find(key) {\r\nreturn this.datastore[key];\r\n}", "function findObjectFromKey(upperObject,key){\n //get appropriate object\n\n len = Object.keys(upperObject).length\n var sub = \"\";\n for (var i = 0; i < len; i++) {\n sub = Object.keys(upperObject)[i]\n if (upperObject[sub].hasOwnProperty(key...
[ "0.6882668", "0.66878337", "0.6559335", "0.6542582", "0.6525776", "0.64677095", "0.64677095", "0.64677095", "0.64677095", "0.64677095", "0.64677095", "0.64677095", "0.64677095", "0.64677095", "0.6425311", "0.641904", "0.6378933", "0.6341315", "0.6335725", "0.6325906", "0.6322...
0.65688634
2
Update or add an object in the store.
update(object) { debug('update', object); return this._doPut(this._singleResourceURI(object.uid), object); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItemToStore(object) {\n // Push new item object to datastore\n STORE.push(object);\n}", "_addToTransaction(objectStore, version) {\n let data = this.obj.toModel();\n if (data[objectStore.keyPath] != this.key) {\n throw \"Update should not change key.\";\n }\n\n switch (this.state) ...
[ "0.66325206", "0.64779913", "0.64469063", "0.64469063", "0.64469063", "0.58605665", "0.58488965", "0.5827882", "0.5827882", "0.5822961", "0.581597", "0.57900965", "0.5740184", "0.57283884", "0.5728118", "0.57186997", "0.5712973", "0.56949615", "0.56798834", "0.5661086", "0.56...
0.6406953
5
Remove an object from the store.
remove(key) { debug('remove', key); return this._doDelete(this._singleResourceURI(key)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove(key) {\n delete this.store[key];\n }", "removeObject(object) {\n //loop goes through array and finds the object to delete it\n numObjects = this.objects.size()\n for (a = 0; a < numObjects; a++) {\n if (this.objects[a] == object) {\n this.objects.pop(a)\n...
[ "0.64935255", "0.64598227", "0.6406566", "0.6394854", "0.6365692", "0.63409", "0.63387865", "0.63258207", "0.63258207", "0.63258207", "0.63258207", "0.63258207", "0.62895", "0.62185293", "0.62185293", "0.6213138", "0.6212819", "0.61605465", "0.6072281", "0.6051098", "0.604485...
0.0
-1
Utility function for creating bearer authoriztion Http header (e.g. for use with JWT)
static getBearerAuthHeader(token) { return { Authorization: 'Bearer ' + token }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getApiAuthHeader() {\n return {'authorization': `bearer ${Auth.getToken()}`};\n }", "getAuthorizationHeader() {\n const accessToken = this.getState(\"tokenResponse.access_token\");\n\n if (accessToken) {\n return \"Bearer \" + accessToken;\n }\n\n const {\n username,\n ...
[ "0.77415246", "0.72986025", "0.72755665", "0.71389073", "0.7072937", "0.7050952", "0.6917541", "0.69065", "0.6877164", "0.68405116", "0.6792937", "0.675678", "0.6672844", "0.6625072", "0.6582558", "0.6580965", "0.65429246", "0.6508121", "0.6441071", "0.6415258", "0.6405062", ...
0.7622652
1
Update request headers New headers are merged with existing headers.
updateHeaders(headers) { Object.assign(this.headers, headers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addHeaders(request) {\n request.headers = new Headers(this.headers);\n return request;\n }", "resetRequestHeaders() {\n headers = Object.assign({}, this.options.defaultHeaders);\n }", "_cleanRequestHeaders() {\n if (this.options.resetHeaders) {\n headers = Object.assign({}, this.o...
[ "0.7386766", "0.726071", "0.7070902", "0.7058591", "0.68565446", "0.68565446", "0.6787916", "0.6596398", "0.6562143", "0.64978004", "0.63973325", "0.6390288", "0.63637817", "0.6332811", "0.62906307", "0.62877613", "0.62874806", "0.6239649", "0.62306094", "0.62187934", "0.6168...
0.8179146
0
Add headers to a request
_addHeaders(request) { request.headers = new Headers(this.headers); return request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addUserAgentHeader(request) {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n if (!request.headers.get(this.headerKey) && this.headerValue) {\n request.headers.set(this.headerKey, this.headerValue);\n }\n }", "addUserAgentHeader(request)...
[ "0.725762", "0.725762", "0.69760156", "0.6945112", "0.6895402", "0.6895402", "0.6895402", "0.6895402", "0.6895402", "0.6895402", "0.6895402", "0.6895402", "0.6895402", "0.67795783", "0.6762857", "0.6710052", "0.6695741", "0.66843635", "0.6608348", "0.65560144", "0.64794505", ...
0.8091727
0
Add body to a request
_addBody(request, body) { debug('_addBody', body); request.body = typeof body === 'string' ? body : JSON.stringify(body); return request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToBody() {\n\t state.body = state.body || {};\n\t // ignore if we already have a value\n\t if (state.body[key] == null) {\n\t if (key === 'query' && _.isString(val)) {\n\t val = { query_string: { query: val } };\n\t }\n\n\t state.body[key] = va...
[ "0.7307514", "0.7215166", "0.7064245", "0.70281917", "0.70131785", "0.6610031", "0.6610031", "0.6610031", "0.63770574", "0.63770574", "0.63484114", "0.6273097", "0.6098726", "0.5948137", "0.5926359", "0.5921849", "0.5917718", "0.58877194", "0.58769137", "0.58019775", "0.57989...
0.8311954
0
When the user clicks on the button, toggle between hiding and showing the dropdown content
function myFunction() { document.getElementById("myDropdown").classList.toggle("show"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropDownShowClick(){\n document.getElementById(\"forDropDown\").style.display=\"block\";\n document.getElementById(\"dropDownShowBtn\").style.display=\"none\";\n document.getElementById(\"dropDownHideBtn\").style.display=\"block\";\n}", "function btn_show() {\n document.getElementById(\"drop...
[ "0.7808903", "0.76712316", "0.7491627", "0.7389992", "0.73501384", "0.73457855", "0.7331835", "0.72641844", "0.7262275", "0.7242421", "0.7212266", "0.7211125", "0.71749496", "0.7171419", "0.7154918", "0.71503764", "0.71455204", "0.71223384", "0.7103016", "0.70978487", "0.7093...
0.66840017
89
drag and drop function below specify what should happen when the element is dragged.
function dragstart_handler(ev) { // Add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.dataTransfer.setData("text/html", ev.target.id); ev.dataTransfer.dropEffect = "move"; // this will add EL to the main element let canvasElement ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_drop() {\n if (!this.element || !this.$()) { return; }\n\n let element = this.get('handle') ? this.$(this.get('handle')) : this.$();\n this._preventClick(element);\n\n this.set('isDragging', false);\n this.set('isDropping', true);\n\n this._tellGroup('update');\n\n this._waitForTransition()\n...
[ "0.72919315", "0.72688454", "0.72522837", "0.7245796", "0.71437985", "0.71067923", "0.7064085", "0.70606583", "0.7025986", "0.7025484", "0.7023649", "0.69562495", "0.6953106", "0.69515616", "0.6934094", "0.69214", "0.69130737", "0.6908573", "0.69032854", "0.6901773", "0.68878...
0.0
-1
Go to the signup page
goToSignup(){ this.props.navigator.push({ component: Signup }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goSignUp() {\n \n body.innerHTML = renderSignupDiv(first, \n last, email1, pass1, '', message1);\n assignListener('signup2');\n }", "function signUp() {\r\n var newLocation = \"#signUpPage\";\r\n window.location = newLocation;\r\n}", "goToSignupPage() {\n Linking....
[ "0.7642658", "0.7593729", "0.75570136", "0.7499816", "0.7416505", "0.73902667", "0.73561263", "0.7178734", "0.7143558", "0.7030209", "0.700264", "0.700264", "0.688653", "0.6847134", "0.681092", "0.68066305", "0.6796661", "0.6768156", "0.67665666", "0.6763703", "0.6748334", ...
0.62821436
68
route middleware to check login
function isLoggedIn(req, res, next) { if(req.isAuthenticated()) { return next(); } res.redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isUserlogin(req,res,next)\n{\n if(req.isAuthenticated())\n return next();\n res.redirect(\"/login\");\n}", "requiresLogin(req, res, next) {\n if (req.isAuthenticated()) {\n next();\n } else {\n res.status(401).send({\n error: 'User is not logged in'\n });\n }\n }", ...
[ "0.76238936", "0.7622815", "0.75446385", "0.7542481", "0.7498857", "0.7494492", "0.7451282", "0.74072856", "0.7393017", "0.73776", "0.73763484", "0.7354687", "0.73318255", "0.73298216", "0.7322688", "0.7317478", "0.7312911", "0.7301844", "0.7301637", "0.7293511", "0.7289578",...
0.0
-1
helper: format a single value count
function $value_count_markup(value, count, selected) { var label = value || '...'; return $('<div class="' + (selected ? 'value selected' : 'value') + '">' + '<div class="count">' + count + '</div>' + '<div class="label">' + label + '</div></div>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formatCount() {\n // Nitpicking count out of this.state; destructuring\n const { value: count } = this.props.counter;\n\n return count === 0 ? \"0\" : count;\n }", "formatCount(){\n const { value } = this.state;\n return value === 0 ? \"Zero\": value;\n }", "formatCount() {\n cons...
[ "0.7554294", "0.7380387", "0.7238131", "0.6370851", "0.63455135", "0.6314501", "0.6314501", "0.62354076", "0.6140064", "0.6131132", "0.6100856", "0.6052197", "0.6008536", "0.6000885", "0.5950711", "0.59422034", "0.58919966", "0.57956827", "0.5771905", "0.57682973", "0.5767146...
0.65856665
3
maps the positions of the rooms helper to iterate through the rooms if it exists
function roomLoop(array, item){ for (var i = 0; i < array.length; i++) { if(array[i][0] == item){ return array[i][1]; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PopulateMapRooms() {\n\trNW = Dice(3) - 11 + Dice(3) * 10; // NW room\n\tgridArr[rNW].open = 1;\n\tgridArr[rNW].room = \"NW\";\n\trNE = Dice(3) - 4 + Dice(3) * 10; // NE room\n\tgridArr[rNE].open = 1;\n\tgridArr[rNE].room = \"NE\";\n\trCN = Dice(2) + 33 + Dice(2) * 10; // Central room\n\tgridArr[rCN].open...
[ "0.71277064", "0.66353893", "0.65273833", "0.65024805", "0.6365066", "0.63442725", "0.6228129", "0.6211925", "0.61974543", "0.6190623", "0.6147764", "0.60954887", "0.60809", "0.60629386", "0.6048399", "0.5995629", "0.59944034", "0.5982044", "0.5971787", "0.5961391", "0.595980...
0.5581634
42
This callback runs when a new Socket.IO connection is established. emits updated user list
function updateUsers(){ //send just the usernames. Just like an Array –Followed Online io.sockets.emit('getUsers', Object.keys(users)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUsersConnected() {\n //Quantidada de usuarios\n io.sockets.emit('qtdUsers', { \"qtdUsers\": usersConnected });\n\n //retorna os nomes dos usuarios\n io.sockets.emit('listaUsuarios', Object.keys(listUsers));\n}", "function updateUsernames(){\r\n io.sockets.emit('get users', users);\r\n}",...
[ "0.7280674", "0.7218189", "0.71772045", "0.7173546", "0.7092394", "0.70818335", "0.70640606", "0.7002705", "0.69027704", "0.6878318", "0.68662053", "0.6842764", "0.6821948", "0.678006", "0.6775275", "0.6770552", "0.6739401", "0.6735291", "0.6682291", "0.66103464", "0.656225",...
0.6544094
22
Could match something like ')//comment', do not lose the prefix to comment.
function commentReplace(match, singlePrefix) { return singlePrefix || ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inComment (stream, state) {\n if (stream.match(/^.*?#\\}/)) state.tokenize = tokenBase\n else stream.skipToEnd()\n return \"comment\";\n }", "function parseComment() {\n expect(\"-\");\n expect(\"-\");\n for (;;) {\n if (curChar > \">\")\n ...
[ "0.6514016", "0.62969184", "0.62656695", "0.62656695", "0.62656695", "0.62656695", "0.62650144", "0.6263271", "0.6222474", "0.621314", "0.6206724", "0.61831135", "0.61821026", "0.6179723", "0.6163808", "0.6163149", "0.598979", "0.5948954", "0.59471107", "0.5921312", "0.592038...
0.73801255
3
Helper function for iterating over an array. If the func returns a true value, it will break out of the loop.
function each(ary, func) { if (ary) { var i; for (i = 0; i < ary.length; i += 1) { if (ary[i] && func(ary[i], i, ary)) { break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function every(arr, func)\n{\n\tvar result = true;\n\tif (arr.length == 0) return result;\n\tfor (var i = 0; i < arr.length; i++)\n\t{\n\t\tif (!func(arr[i], i, arr))\n\t\t{\n\t\t\tresult = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn result;\n}", "function some(arr, callback){\n\n //It iterates through every v...
[ "0.743612", "0.73192894", "0.72261333", "0.71921736", "0.7163344", "0.70891124", "0.7002531", "0.7002531", "0.6992295", "0.6928379", "0.6900729", "0.68906", "0.68747383", "0.68579614", "0.68266314", "0.67999935", "0.6747619", "0.67294955", "0.67248803", "0.6722067", "0.671712...
0.75464106
17
Helper function for iterating over an array backwards. If the func returns a true value, it will break out of the loop.
function eachReverse(ary, func) { if (ary) { var i; for (i = ary.length - 1; i > -1; i -= 1) { if (ary[i] && func(ary[i], i, ary)) { break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eachReverse(ary, func) {\n if (ary) {\n var i;\n for (i = ary.length - 1; i > -1; i -= 1) {\n if (ary[i] && func(ary[i], i, ary)) {\n break;\n }\n }\n }\n }", "function eachReverse(ary, func) {\n if (ary) {\n var i;\n for (i = ary.length - 1; i >...
[ "0.79654604", "0.79654604", "0.6871412", "0.6848345", "0.6788119", "0.66909415", "0.66319996", "0.6621571", "0.65907097", "0.646242", "0.64476645", "0.6422198", "0.63687116", "0.6360932", "0.62674576", "0.6266425", "0.6235632", "0.62002236", "0.61998016", "0.6191705", "0.6150...
0.78303814
22
Cycles over properties in an object and calls a function for each property value. If the function returns a truthy value, then the iteration is stopped.
function eachProp(obj, func) { var prop; for (prop in obj) { if (hasProp(obj, prop)) { if (func(obj[prop], prop)) { break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eachProp(obj, func) {\n var prop;\n for (prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n if (func(obj[prop], prop)) {\n break;\n }\n }\n }\n }", "function eachProp(obj, func) {\n var prop;\n f...
[ "0.75507104", "0.75507104", "0.752176", "0.70245516", "0.6922195", "0.67217416", "0.6566123", "0.63712984", "0.63610023", "0.63572466", "0.6323887", "0.63051945", "0.63051945", "0.63051945", "0.63051945", "0.62824893", "0.62824893", "0.62824893", "0.6138867", "0.6128825", "0....
0.7527562
17
Simple function to mix in properties from source into target, but only if target does not already have a property of the same name.
function mixin(target, source, force, deepStringMixin) { if (source) { eachProp(source, function (value, prop) { if (force || !hasProp(target, prop)) { if (deepStringMixin && typeof value === 'object' && value && !isArray(value) && !isFunct...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}", "function fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOw...
[ "0.7793657", "0.7793657", "0.7793657", "0.7793657", "0.7793657", "0.7793657", "0.7793657", "0.7793657", "0.7793657", "0.779327", "0.77816206", "0.77816206", "0.77816206", "0.77701175", "0.775158", "0.77423936", "0.7735765", "0.7735765", "0.7735765", "0.7735765", "0.74622214",...
0.0
-1
Similar to Function.prototype.bind, but the 'this' object is specified first, since it is easier to read/figure out what 'this' will be.
function bind(obj, fn) { return function () { return fn.apply(obj, arguments); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bind(fn, thisObj) {\n return fn.bind ? fn.bind(thisObj) : function () {\n return fn.apply(thisObj, arguments);\n };\n }", "function bind(fn, thisArg) {\n return function () {\n return fn.apply(thisArg, arguments);\n };\n ...
[ "0.7810938", "0.7346137", "0.7333347", "0.7281743", "0.7266394", "0.72340864", "0.7225235", "0.71745163", "0.71745163", "0.71658957", "0.71658957", "0.71581715", "0.7155612", "0.7120077", "0.7111837", "0.7063871", "0.70429444", "0.70126915", "0.69684845", "0.69527644", "0.692...
0.70466685
33
Allow getting a global that is expressed in dot notation, like 'a.b.c'.
function getGlobal(value) { if (!value) { return value; } var g = global; each(value.split('.'), function (part) { g = g[part]; }); return g; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGlobal(e){if(!e)return e;var t=global;return each(e.split(\".\"),function(e){t=t[e]}),t}", "function resolveGlobalNamespace(s) {\n s = s.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n s = s.replace(/^\\./, ''); // strip a leading dot\n var a = s.split('.');\n ...
[ "0.66453743", "0.6590453", "0.6494406", "0.5978254", "0.57638365", "0.56898946", "0.56234705", "0.55962336", "0.5524991", "0.5499704", "0.5499704", "0.5499704", "0.549303", "0.5487344", "0.5487344", "0.54462683", "0.5443804", "0.5443804", "0.5443804", "0.5443804", "0.5443804"...
0.6980224
17
Turns a plugin!resource to [plugin, resource] with the plugin being undefined if the name did not have a plugin prefix.
function splitPrefix(name) { var prefix, index = name ? name.indexOf('!') : -1; if (index > -1) { prefix = name.substring(0, index); name = name.substring(index + 1, name.length); } return [prefix, name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitPrefix(name){var prefix,index=name?name.indexOf('!'):-1;if(index > -1){prefix = name.substring(0,index);name = name.substring(index + 1,name.length);}return [prefix,name];} //Creates a parts array for a relName where first part is plugin ID,", "function build_plugin_names() {\n const args = Norma(...
[ "0.60904014", "0.55151916", "0.54946274", "0.5431846", "0.53961116", "0.5209729", "0.5209729", "0.5179424", "0.5127351", "0.5110234", "0.5010931", "0.49946257", "0.48808867", "0.48765403", "0.4876287", "0.47690463", "0.47450075", "0.4707783", "0.4705271", "0.47006458", "0.468...
0.0
-1
Internal method to transfer globalQueue items to this context's defQueue.
function takeGlobalQueue() { //Push all the globalDefQueue items into the context's defQueue if (globalDefQueue.length) { each(globalDefQueue, function(queueItem) { var id = queueItem[0]; if (typeof id === 'string') { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function takeGlobalQueue() {\n //Push all the globalDefQueue items into the context's defQueue\n if (globalDefQueue.length) {\n //Array splice in the values since the context code has a\n //local var ref to defQueue, so cannot just reassign the one\n ...
[ "0.8258989", "0.8258989", "0.8258989", "0.8248082", "0.82426697", "0.82426697", "0.82426697", "0.82426697", "0.82426697", "0.82426697", "0.82426697", "0.82426697", "0.82426697", "0.82426697", "0.82407975", "0.7049199", "0.6392844", "0.636831", "0.5989492", "0.59776306", "0.59...
0.82395566
19