query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
fromMultisigPreImgAddrs takes multisig parameters and returns a human readable Algorand address. This is equivalent to fromMultisigPreImg, but interfaces with encoded addresses.
function fromMultisigPreImgAddrs({version, threshold, addrs}) { const pks = addrs.map(addr => { return decodeAddress(addr).publicKey; }); return encodeAddress(fromMultisigPreImg({version, threshold, pks})); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromMultisigPreImg({version, threshold, pks}) {\n if (version !== 1 || version > 255 || version < 0) {\n // ^ a tad redundant, but in case in the future version != 1, still check for uint8\n throw INVALID_MSIG_VERSION;\n }\n if (threshold === 0 || pks.length === 0 || threshold > pks...
[ "0.65031075", "0.46250418", "0.40502387", "0.4045629", "0.40436062", "0.40374973", "0.39433995", "0.3941271", "0.3884268", "0.38810378", "0.38679773", "0.38345346", "0.3829268", "0.38221335", "0.37980443", "0.37957883", "0.3764063", "0.37548444", "0.37463978", "0.3744528", "0...
0.7400549
0
Opens a custom dialog
function openDialog(customDialog) { $(customDialog).dialog('open'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function open(dialog) {\n\t\n}", "function openDialog(dialogID, url, ancho, altura)\n{\t\n\tthis.dialogID = dialogID;\n\t//mostrar popup dhtml\n\tshowBox(dialogID, ancho, altura, url, true, true);\n}", "function openDialog()\n{\n\tif (inviteOrCall==\"invite\")\n\t{\n\t\t$.dialog.buttonNames= ['Invite', 'Cancel...
[ "0.7771015", "0.71050733", "0.69566935", "0.69405526", "0.6938675", "0.68455267", "0.68053997", "0.6804235", "0.6745867", "0.67272884", "0.67119396", "0.670496", "0.66718537", "0.6619504", "0.66112584", "0.6604447", "0.6577368", "0.6577368", "0.6557286", "0.6528922", "0.65212...
0.7908474
0
Closes a custom dialog
function closeDialog(customDialog) { $(customDialog).dialog('close'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeDialog() {\n setDialogOpen(false)\n }", "function handleClose() {\n setDialog(false);\n }", "function handleClose() {\n setDialog(false);\n }", "function closeDialog() {\n $mdDialog.hide();\n }", "function closeDialog(dialog) {\n\tif (dialog && dialog.closed != t...
[ "0.80207646", "0.7650692", "0.7650692", "0.7551669", "0.7463917", "0.74593925", "0.74562067", "0.74320275", "0.7417709", "0.73978144", "0.7357104", "0.73382115", "0.73382115", "0.7309558", "0.72990656", "0.72980607", "0.7262829", "0.7262829", "0.72380716", "0.72238684", "0.71...
0.79975593
1
Shows a small confirmation dialog to inform the user
function showConfirmationDialog() { confirmationDialog = generateDialog(language.data.account_deleted, '<p>' + language.data.account_del_successful + '</p><input class="input-button" type="submit" id="okay" value="' + language.data.okay + '" />'); openDialog(confirmationDialog); $('input#okay').click(function() {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function confirm() {\n\n showElement(mainContent);\n hideElement(formConfirm);\n}", "function ConfirmDialog(){\r\n\r\n \r\n \r\n }", "function confirmDeletion(){\n vex.dialog.open({\n message: \"Comment Has Been Deleted\",\n buttons:[\n $.extend({},v...
[ "0.78797424", "0.78728974", "0.7717088", "0.7599624", "0.75432736", "0.7528306", "0.7455329", "0.73657966", "0.7332241", "0.7302997", "0.72969604", "0.72968215", "0.7290819", "0.7283819", "0.72599137", "0.72520465", "0.7236912", "0.72069997", "0.7204525", "0.71868765", "0.713...
0.80734754
0
Check all cards to see if all have been matched.
function allCardsMatched() { let allMatched = true; for (let i = 0; i < cards.length; i++) { if (!cards[i].locked) { allMatched = false; } } return allMatched; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allMatch(){\n var allMatched = true; \n\t\tfor (var i =0; i< 24; i++){\n\t\t\t\tif(matched[i]==false){\n\t\t\t\t\tallMatched = false; \n\t\t\t\t} \n\t\t\t}\n\t\treturn allMatched; //return true when all cards were matched. \n}", "function allMatched() {\n if(matchedCards.length === 16) {\n ...
[ "0.8117191", "0.7520454", "0.73187256", "0.72677416", "0.7233198", "0.72109234", "0.71529603", "0.7115524", "0.70689136", "0.7052137", "0.7045804", "0.70057297", "0.700138", "0.69838816", "0.6974574", "0.69704115", "0.69654965", "0.69654673", "0.695111", "0.6897841", "0.68794...
0.8385845
0
Check what the star rating is.
function getStarRating() { if ($('#star-3').hasClass('fa-star')) { return 3; } else if ($('#star-2').hasClass('fa-star')) { return 2; } else { return 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function star_number(recruit_star) {\r\n return recruit_star.stars > 2;\r\n }", "function displayStarRating() {\n const userRating = document.querySelector(\".total-rating\").textContent;\n if (userRating < 10) {\n addProfileStars(1)\n }\n else if (userRating >= 10 && userRating <= 100) {\n a...
[ "0.7188024", "0.7030577", "0.70256835", "0.69902205", "0.6965611", "0.6917911", "0.67150885", "0.6702066", "0.6692088", "0.66130155", "0.6457904", "0.64548564", "0.6401306", "0.63708854", "0.6365333", "0.63366956", "0.6316111", "0.63155794", "0.6291798", "0.62912786", "0.6290...
0.7222826
0
Loop through list and match the postMessage source object to the iframe object, if so parse data, check for int of new height and adjust the target iframes height accordingly.
function resizeIframe(e){ iframes.forEach(item => { if( item.contentWindow === e.source ){ incomingData = JSON.parse(e.data); if( !isNaN(incomingData.height) ){ item.style.height = (incomingData.height + 'px'); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postMessageContentHeight() {\r\n if (top.location != location) {\r\n var currentHeight;\r\n currentHeight = $('body').height() // Get the body's height!\r\n var dfdoc_height = parseInt(currentHeight)+25;\r\n\t\tparent.postMessage(dfdoc_height,\"*\");//* allows this to post to any p...
[ "0.63818544", "0.62763166", "0.62063175", "0.6166024", "0.61658525", "0.60064566", "0.59464777", "0.5899117", "0.5816665", "0.5778363", "0.57567966", "0.5718531", "0.5707687", "0.5676848", "0.5609266", "0.55896556", "0.5550018", "0.55328953", "0.5442395", "0.53230083", "0.532...
0.7154292
0
Get the current report data, status and fetch message as required.
getReportState() { // Handle the Testplan report if it has been fetched. if (this.state.report === null) { // The Testplan report hasn't been fetched yet. return { report: null, reportStatus: null, reportFetchMessage: this.getReportFetchMessage(), }; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getReportFetchMessage() {\n if (this.state.loading) {\n return 'Fetching Testplan report...';\n } else if (this.state.error !== null){\n return `Error fetching Testplan report. (${this.state.error.message})`;\n } else {\n return 'Waiting to fetch Testplan report...';\n }\n }", "functi...
[ "0.68037516", "0.63178724", "0.62835306", "0.6283469", "0.6265026", "0.6135202", "0.60996723", "0.6061053", "0.6029329", "0.5925701", "0.58494115", "0.58458525", "0.5777901", "0.56335664", "0.5584914", "0.5556604", "0.5512314", "0.54891586", "0.54812825", "0.5479108", "0.5466...
0.6922979
0
Get a message relating to the progress of fetching the testplan report.
getReportFetchMessage() { if (this.state.loading) { return 'Fetching Testplan report...'; } else if (this.state.error !== null){ return `Error fetching Testplan report. (${this.state.error.message})`; } else { return 'Waiting to fetch Testplan report...'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getStatus() {\n\t\tif (this.inProgress()) {\n\t\t\treturn 'In Progress';\n\t\t}\n\t\treturn 'Completed';\n\t}", "toString(): string {\n const message = this.url != null ? this.url.url : \"\";\n return `${this.total} | ${this.progress} :: retrieving: ${message}`;\n }", "getProgressMessage(label...
[ "0.6208108", "0.5699736", "0.5695396", "0.5633625", "0.54814297", "0.5470776", "0.54504853", "0.5314609", "0.5307375", "0.52998155", "0.5289452", "0.52546626", "0.52145344", "0.52145344", "0.52145344", "0.52145344", "0.5211094", "0.52005017", "0.51959014", "0.5141272", "0.508...
0.74986404
0
availability_zones computed: true, optional: false, required: false
get availabilityZones() { return this.getListAttribute('availability_zones'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get availabilityZonesInput() {\n return this._availabilityZones;\n }", "get availabilityZonesInput() {\n return this._availabilityZones;\n }", "get availabilityZonesInput() {\n return this._availabilityZones;\n }", "get availabilityZone() {\n return this.getStringAttribut...
[ "0.69880825", "0.69880825", "0.69880825", "0.67247134", "0.64951843", "0.64951843", "0.6232363", "0.5907033", "0.5771835", "0.54824674", "0.5345338", "0.53348756", "0.5329283", "0.5255014", "0.5239695", "0.5164851", "0.51152843", "0.5108759", "0.5019699", "0.5018773", "0.5008...
0.72660726
1
max_iops_per_db_instance computed: true, optional: false, required: false
get maxIopsPerDbInstance() { return this.getNumberAttribute('max_iops_per_db_instance'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get minIopsPerDbInstance() {\n return this.getNumberAttribute('min_iops_per_db_instance');\n }", "get maxIopsPerGib() {\n return this.getNumberAttribute('max_iops_per_gib');\n }", "get iops() {\n return this.getNumberAttribute('iops');\n }", "fetchMaxSupply() {\n return 38853...
[ "0.7129901", "0.6674783", "0.59308475", "0.5694644", "0.5641645", "0.54384875", "0.5216019", "0.5187749", "0.5176641", "0.51405495", "0.51018906", "0.51018906", "0.51018906", "0.51018906", "0.50439996", "0.5033896", "0.50268805", "0.5013665", "0.49633008", "0.4946849", "0.494...
0.83602697
0
max_iops_per_gib computed: true, optional: false, required: false
get maxIopsPerGib() { return this.getNumberAttribute('max_iops_per_gib'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get minIopsPerGib() {\n return this.getNumberAttribute('min_iops_per_gib');\n }", "get maxIopsPerDbInstance() {\n return this.getNumberAttribute('max_iops_per_db_instance');\n }", "get iops() {\n return this.getNumberAttribute('iops');\n }", "get minIopsPerDbInstance() {\n ...
[ "0.6722703", "0.6471675", "0.6106161", "0.5526407", "0.54217434", "0.5355253", "0.5355124", "0.53522474", "0.5348698", "0.5347935", "0.53415865", "0.5308051", "0.5283019", "0.5273586", "0.5273586", "0.5273586", "0.5273586", "0.5273586", "0.5273586", "0.5273586", "0.5273586", ...
0.79114276
0
max_storage_size computed: true, optional: false, required: false
get maxStorageSize() { return this.getNumberAttribute('max_storage_size'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get MaxMediaStorageUsageInMB() {\n return this.maxMediaStorageUsageInMB;\n }", "get maxSizeInBytes() {\n return this._maxSizeInBytes;\n }", "get minStorageSize() {\n return this.getNumberAttribute('min_storage_size');\n }", "maxSize()\r\n {\r\n return this.#size;\r\n ...
[ "0.67583215", "0.67467713", "0.6722437", "0.66648835", "0.6620905", "0.6579077", "0.6475176", "0.6464274", "0.6414035", "0.63546175", "0.6316314", "0.6210477", "0.6166046", "0.6166046", "0.6158302", "0.6154891", "0.6101637", "0.6070827", "0.6070827", "0.6041497", "0.5945245",...
0.7968388
0
min_iops_per_db_instance computed: true, optional: false, required: false
get minIopsPerDbInstance() { return this.getNumberAttribute('min_iops_per_db_instance'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get minIopsPerGib() {\n return this.getNumberAttribute('min_iops_per_gib');\n }", "get maxIopsPerDbInstance() {\n return this.getNumberAttribute('max_iops_per_db_instance');\n }", "get iops() {\n return this.getNumberAttribute('iops');\n }", "min(cols=this.displayColumns) {\n ...
[ "0.64699256", "0.6328212", "0.5504902", "0.5429542", "0.5263107", "0.5219908", "0.51938385", "0.51104677", "0.5085141", "0.5047757", "0.5047757", "0.5047757", "0.5047757", "0.5047757", "0.5047757", "0.50382346", "0.49820647", "0.4980984", "0.4979363", "0.49663457", "0.4942372...
0.82074213
0
min_iops_per_gib computed: true, optional: false, required: false
get minIopsPerGib() { return this.getNumberAttribute('min_iops_per_gib'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get minIopsPerDbInstance() {\n return this.getNumberAttribute('min_iops_per_db_instance');\n }", "get maxIopsPerGib() {\n return this.getNumberAttribute('max_iops_per_gib');\n }", "function minimumBribes(q) {\n // \n}", "min() {}", "get iops() {\n return this.getNumberAttribut...
[ "0.6372106", "0.63703185", "0.6079623", "0.59175146", "0.57726985", "0.5767262", "0.5702098", "0.566127", "0.56048846", "0.55725926", "0.55307615", "0.5465564", "0.5405215", "0.5356607", "0.5353701", "0.53265727", "0.5266184", "0.5241818", "0.5231345", "0.5224475", "0.5213589...
0.7808707
0
min_storage_size computed: true, optional: false, required: false
get minStorageSize() { return this.getNumberAttribute('min_storage_size'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get minSizeInput() {\n return this._minSize;\n }", "get maxStorageSize() {\n return this.getNumberAttribute('max_storage_size');\n }", "async calculateStorageInfo() {\n const info = await utils.getDiskInfo(this.filesPath);\n const used = await this.getStorageTotalSize();\n co...
[ "0.6742977", "0.6485508", "0.6219829", "0.6192899", "0.6084855", "0.6084855", "0.60430056", "0.60134107", "0.60134107", "0.5995439", "0.59710467", "0.5968301", "0.5950163", "0.59387505", "0.58840746", "0.58681613", "0.5798778", "0.5796964", "0.5773637", "0.57609355", "0.57205...
0.81353885
0
multi_az_capable computed: true, optional: false, required: false
get multiAzCapable() { return this.getBooleanAttribute('multi_az_capable'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test_crosshair_op_azone_azure() {}", "get multiAzEnabledInput() {\n return this._multiAzEnabled;\n }", "function test_crosshair_op_azone_ec2() {}", "async function virtualMachineScaleSetVMSUpdateMaximumSetGen() {\n const credential = new DefaultAzureCredential();\n const client = createC...
[ "0.5868344", "0.5646868", "0.5584492", "0.5408851", "0.5404982", "0.53079486", "0.52698946", "0.516987", "0.5151679", "0.5138077", "0.5134637", "0.5124827", "0.50896376", "0.50429475", "0.5035025", "0.50303036", "0.5003", "0.49960387", "0.4990872", "0.49713957", "0.49364993",...
0.6657249
0
outpost_capable computed: true, optional: false, required: false
get outpostCapable() { return this.getBooleanAttribute('outpost_capable'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get required() { return !!this._required; }", "get required() { return !!this._required; }", "get required() {\n return true;\n }", "function FalseSpecification() {}", "toJson() {\n return {\n type: \"not\",\n constraint: this.constraint.toJson(),\n };\n }", "supportsBooleanVal...
[ "0.5707436", "0.5707436", "0.5637886", "0.55945766", "0.55537426", "0.5542084", "0.54849434", "0.54278225", "0.5355494", "0.5324937", "0.53227335", "0.5313582", "0.52963036", "0.528532", "0.5243943", "0.52198905", "0.521881", "0.5208976", "0.5191969", "0.51729274", "0.5168953...
0.6415061
0
read_replica_capable computed: true, optional: false, required: false
get readReplicaCapable() { return this.getBooleanAttribute('read_replica_capable'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get supportsReadReplica() {\n return this.getBooleanAttribute('supports_read_replica');\n }", "function commandSupportsReadConcern(command, options) {\n if (\n command.aggregate ||\n command.count ||\n command.distinct ||\n command.find ||\n command.parallelCollectionScan ||\n comman...
[ "0.77846754", "0.55942947", "0.55796945", "0.5429038", "0.53151286", "0.5239514", "0.5155825", "0.5113052", "0.5107264", "0.5107264", "0.5080807", "0.5048263", "0.49946785", "0.49652475", "0.49404544", "0.47967026", "0.47941136", "0.4778574", "0.47658032", "0.47599217", "0.47...
0.8025928
0
supported_engine_modes computed: true, optional: false, required: false
get supportedEngineModes() { return this.getListAttribute('supported_engine_modes'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get supportedModes() {\n return this.getListAttribute('supported_modes');\n }", "get engine() {\n return this.getStringAttribute('engine');\n }", "get engine() {\n return this.getStringAttribute('engine');\n }", "supportsPlatform() {\n return true;\n }", "function getMode(...
[ "0.6236108", "0.5922855", "0.5922855", "0.5777882", "0.57029516", "0.5487379", "0.5459785", "0.542049", "0.5379303", "0.5379303", "0.528836", "0.5283534", "0.5270872", "0.5262815", "0.52544296", "0.5243972", "0.5203806", "0.5166709", "0.51574564", "0.514789", "0.51329225", ...
0.74516153
0
calculates the users avg wpm
function avg_wpm() { let avg = 0; let wpm_cookie = document.getElementById("user_avg_wpm").innerHTML; avg = (user_wpm + wpm_cookie) / 2; document.getElementById("user_avg_wpm").innerHTML = avg; store_cookie('_avg_wpm_', avg, '365'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function meanWeek(){\n\tvar weekMean = weekTot/weekPop;;\n\treturn weekMean;\n}", "function averageFreeHoursPerWeek() {\n var numerator = 0;\n var meters = 0;\n for (var i = 0; i < dataArray.length; i++) {\n numerator += totalFreeHours(i);\n meters++;\n }\n return numerator / meters;...
[ "0.66275764", "0.6533692", "0.6421075", "0.63060504", "0.6294139", "0.62111855", "0.58770055", "0.58672005", "0.58494675", "0.5828647", "0.58225995", "0.57870823", "0.5741314", "0.5708633", "0.5708467", "0.57039124", "0.5703235", "0.5702495", "0.5695376", "0.56701535", "0.566...
0.7898483
0
Creates a label for the current problem
function problem_label() { document.getElementById("problem_label").innerHTML = current_problem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createLabel(question,parent,num){\n\n var label = document.createElement('label');\n label.innerHTML = question;\n \n parent.appendChild(label);\n dynamicBreakline(parent, num);\n return true;\n}", "function crearLabel(forId, texto) {\n let label = document.createElement(\"LABEL\");\n label....
[ "0.69077575", "0.6876976", "0.6858343", "0.67420435", "0.6664522", "0.66086805", "0.6557147", "0.6557147", "0.6557147", "0.6557147", "0.65365374", "0.6535426", "0.6535426", "0.6531802", "0.6476357", "0.6475864", "0.6374869", "0.63684857", "0.63684857", "0.63684857", "0.636302...
0.7038609
0
Toggle membership (join or leave)
function toggleMembership() { if (vm.isLoading) { return; } vm.isLoading = true; // If user is not authenticated, redirect them to signup page if (!Authentication.user) { return tribeSignup(); } // Join tribe if (!vm.isMember) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function handleToggleMembership() {\n if (isUpdating) {\n return;\n }\n\n if (isMember) {\n setIsLeaving(true);\n } else {\n // updating starts\n setIsUpdating(true);\n\n // join\n const data = await api.join(tribe._id);\n // update the membership locally\n ...
[ "0.7342882", "0.6510845", "0.61291313", "0.60956514", "0.60882485", "0.6041693", "0.5988496", "0.5988496", "0.5918778", "0.57749885", "0.57540345", "0.5746922", "0.57428694", "0.5701417", "0.568318", "0.56367886", "0.5635532", "0.56341654", "0.56326175", "0.56326175", "0.5632...
0.75485784
0
get vendor event property name omitting `on` prefix.
function getEventProperty(prop, host) { var targetHost = host || document.body; if (!(('on' + prop) in targetHost)) { for (var i = 0; i < vendors.length; i++) { var vendorProp = vendors[i] + prop; if (('on' + vendorProp) in targetHost) { return vendorProp; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function propFromEvent(event) {\n var nativeEvent = mapNativeEventNames(event);\n return 'on' + String(nativeEvent[0].toUpperCase()) + String(nativeEvent.substring(1));\n}", "function propFromEvent(event) {\n var nativeEvent = mapNativeEventNames(event);\n return 'on' + String(nativeEvent[0].toUpperCase()) +...
[ "0.7410183", "0.73702854", "0.73702854", "0.73702854", "0.7193321", "0.71919096", "0.71779805", "0.71062094", "0.708179", "0.6859863", "0.6546143", "0.65058786", "0.6496806", "0.6493438", "0.6493438", "0.6493438", "0.6493438", "0.6493438", "0.6493438", "0.6493438", "0.6493438...
0.74536455
0
This function generates the HOC function that you'll use in order to impart onOutsideClick listening to an arbitrary component. It gets called at the end of the bootstrapping code to yield an instance of the onClickOutsideHOC function defined inside setupHOC().
function onClickOutsideHOC(WrappedComponent, config) { var _class, _temp2; return _temp2 = _class = function (_Component) { _inherits(onClickOutside, _Component); function onClickOutside() { var _temp, _this, _ret; _classCallCheck(this, onClickOutside); for (var _len = arguments.length...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onClickOutsideHOC(WrappedComponent, config) {\n\t var _class, _temp;\n\t\n\t return _temp = _class =\n\t /*#__PURE__*/\n\t function (_Component) {\n\t _inheritsLoose(onClickOutside, _Component);\n\t\n\t function onClickOutside(props) {\n\t var _this;\n\t\n\t _this = _Component.call(thi...
[ "0.8294876", "0.8136399", "0.8136399", "0.81158245", "0.81158245", "0.81158245", "0.81158245", "0.80517566", "0.80517566", "0.80020535", "0.80020535", "0.80020535", "0.799254", "0.79895383", "0.79754335", "0.79645765", "0.792393", "0.7834601", "0.74425983", "0.7203188", "0.71...
0.82853264
1
Validates that the variables of the register doesn't empty.
function validate() { if (!$scope.id.length || !$scope.pass.length || !$scope.name.length || !$scope.group.length || !$scope.email.length || !$scope.phone.length || !$scope.workplace.length || !($scope.informed.email.length || $scope.informed.facebook.length || $scope.in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valueChecker(variable) {\r\n\tif(variable.length > 0) {\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "emptyVariableSize() {\n\t\tlet num = 0;\n\t\tfor (const v of this._vars) {\n\t\t\tif (v.isEmpty()) num++;\n\t\t}\n\t\treturn num;\n\t}", "function isFilled() {\r\n\r\n /*\r\n ...
[ "0.6469755", "0.6187948", "0.59720033", "0.5958418", "0.59509724", "0.59493285", "0.59365404", "0.59284544", "0.59086585", "0.5898236", "0.5893165", "0.58931565", "0.5882507", "0.5858316", "0.58384097", "0.5837196", "0.5835302", "0.5819766", "0.5813528", "0.58120406", "0.5806...
0.66506946
0
Concat the selected options for the user in population variable.
function concatPopulation() { var string = ''; var array = [$scope.population.elementary, $scope.population.highSchool, $scope.population.higherEducation, $scope.population.other ]; array.forEach(function(value) { if (value !== '') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get selectedValues() {\n return this.value.join(', ');\n }", "function addToSelect(values) {\nvalues.sort();\nvalues.unshift('None'); // Add 'None' to the array and place it to the beginning of the array\nvalues.forEach(function(value) {\n var option = document.createElement(\"option\");\n option.tex...
[ "0.6062017", "0.59463793", "0.5889178", "0.5874542", "0.584048", "0.58370167", "0.5780964", "0.5777732", "0.57559186", "0.5746605", "0.5740607", "0.5734585", "0.57049036", "0.5684645", "0.56820214", "0.5671447", "0.5663739", "0.5650579", "0.564248", "0.5639699", "0.56068087",...
0.6335926
0
Decrements the capacity of a group.
function decrementCapacity() { var data = { action: "decrement", group: $scope.group }; // Calls the decrement capacity method in the registration factory. RegistrationFactory.decrementCapacity(data) .then(function(response) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteGroup(group) { group.dispose(); }", "decrementAvailability() {\n this.slotsAvailability--;\n }", "function decreaseSupply() {\n shiftSupply([-1, 1]);\n }", "clear() {\n this.groups = this.groups.slice(-1);\n this.groups[0].clear();\n this.emit('update');\n }", "function ...
[ "0.5802198", "0.57953054", "0.5726389", "0.5567141", "0.5535565", "0.55091226", "0.5488241", "0.5409979", "0.5374792", "0.53553504", "0.53213793", "0.52272815", "0.51132596", "0.5107887", "0.5072728", "0.5055545", "0.50058144", "0.5003067", "0.49843565", "0.49642864", "0.4897...
0.6563838
0
Validates that a group still have capacity and doen't empty.
function validateGroup() { $scope.errorGroup = false; if($scope.group !== '') { var data = { action: "validateGroup", group: $scope.group }; // Calls the validate group method in the registratio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ensureGroupData() {\n var combinations = group.all();\n if (!shouldCheckGroups) return;\n for (var i = combinations.length - 1; i > -1; i--) {\n var values = combinations[i].key;\n for (var j = values.length - 1; j > -1; j--) {\n if (groupData[values[j]] == null) {\n ...
[ "0.57701576", "0.575476", "0.5625041", "0.5579336", "0.5269118", "0.5258316", "0.52496314", "0.5233608", "0.523144", "0.5118047", "0.5108957", "0.508176", "0.50787795", "0.5052778", "0.5051296", "0.50496614", "0.5043198", "0.5003497", "0.49890986", "0.49804536", "0.4969371", ...
0.6422727
0
The user can request a specific output format via `options.type` TODO ImageBitmap vs HTMLImage depends on worker threads...
function getImageOutputFormat(options = {}) { const imageOptions = options.image || {}; const type = imageOptions.type || 'auto'; switch (type) { case 'imagebitmap': case 'html': case 'ndarray': // Check that it is actually supported if (!isImageTypeSupported(type)) { throw new Er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async convert(type,options={}){\n\t\tlet utils = global.slashr.utils();\n\t\t//if(! this._isImageInitialized()) await this._initImage();\n\t\tswitch(type){\n\t\t\tcase this.TYPE_JPEG:\n\t\t\t\tthis._metadata.image.jpeg(options);\n\t\t\tbreak;\n\t\t\tcase this.TYPE_PNG:\n\t\t\t\tthis._metadata.image.png(options);\n...
[ "0.678577", "0.62648207", "0.61865634", "0.5865656", "0.5814079", "0.56561273", "0.5606314", "0.5559594", "0.55085635", "0.54750377", "0.5433112", "0.5376252", "0.5347547", "0.5338392", "0.5321243", "0.53207594", "0.5295749", "0.52874196", "0.52787125", "0.52497673", "0.52362...
0.7292929
0
$elements with 'name' attributes have not been generated dynamically and considered 'Stable'
function isStable($el) { return typeof $el.attr('name') != 'undefined'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "nameElements() {\n for (const propName in this) {\n const propValue = this[propName];\n if (propValue instanceof UiElement) {\n propValue.setName(propName);\n }\n }\n }", "static get observedAttributes() {return ['name']; }", "static get observedAttributes() {return ['name']; }", ...
[ "0.60592854", "0.6002075", "0.6002075", "0.59287375", "0.5873418", "0.5811286", "0.5709766", "0.5702956", "0.5683208", "0.5626293", "0.556867", "0.54560655", "0.54437274", "0.5443715", "0.5442568", "0.5421235", "0.54163724", "0.5412108", "0.53747404", "0.532894", "0.5325671",...
0.719504
0
Selects the toggle field from the provided input $el
function getToggleField($el) { return $el.parent().find('> input[type="checkbox"].toggle'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setToggleField($el, v) {\n var $chkbx = getToggleField($el);\n $chkbx.prop('checked', v);\n}", "function toggleSelect(event) {\n // remove .active\n document.querySelectorAll(\".button-select button\").forEach(function (button) {\n button.classList.remove(\"active\");\n }); // same as === .f...
[ "0.7271921", "0.60573727", "0.6053868", "0.60405165", "0.6022896", "0.60045236", "0.59484833", "0.5906047", "0.5881436", "0.5839311", "0.58285457", "0.5793401", "0.57810086", "0.57575834", "0.5754463", "0.57498103", "0.5748569", "0.57456315", "0.5743828", "0.5740747", "0.5740...
0.7245725
1
Get the accompanying $ul list of Unstable fields, either at 1 or 2 levels of depth from the main .row
function getUl(el, level) { var $row = $(el).closest('.row') , nest_level = arguments[1] || $row.data('ul-level'); if (nest_level == 2) return $row.find('> ul ul'); return $row.find('> ul'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createMyList(data,_pre){\n var _this=this,cLen=0;\n data.map(function(i){\n cLen=0;\n i.child.map(function(data){\n if(data.folderName){\n cLen++;\n }\n });\n _this.state.displayList.push({child:cLen,folder:i...
[ "0.54214996", "0.5267348", "0.52260864", "0.5223753", "0.52105224", "0.5167608", "0.51506823", "0.51247823", "0.5119756", "0.5111209", "0.50950366", "0.50909454", "0.5069511", "0.50473976", "0.5030521", "0.5018941", "0.49607858", "0.4929105", "0.49135935", "0.49100325", "0.48...
0.66601926
0
Parse text field on blur, activating Stable fields if value is nonempty or run appropriate method parsing on Unstable fields.
function parseField(e) { e.stopPropagation(); var $el = $(this); if (isStable($el)) { var active; if ($el.is('input')) active = $el.val().length > 0; else if ($el.is('select')) active = $el.val() != ''; else { /* TODO: throw error, unhandled field */ }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function blurHandler() {\n\n var type;\n\n //If the input value is the empty string, apply the placeholder and its associated styles\n if (this.value === \"\") {\n this.className = this.className + \" \" + settings.className;\n this.value = this.getAttribute(\"placeholder\");\n\n // Check i...
[ "0.60318154", "0.5962508", "0.59592646", "0.59592646", "0.57106763", "0.5701092", "0.56840706", "0.5546735", "0.5490449", "0.5476168", "0.5460234", "0.5443084", "0.5439232", "0.540791", "0.540497", "0.5378182", "0.537088", "0.5317888", "0.53012294", "0.5257392", "0.5247687", ...
0.6529142
0
Add a row of Unstable fields to the $ul, these can either be for a list (Array), or keyvalue (Object). The appropriate html template is retrieved based on this.
function addFieldRow(e) { e.stopPropagation(); var $ul = getUl(this) , id = $ul.attr('id') , $tgl = getToggleField($ul); $ul.append(getTemplate(id)); focusInput($ul); if (!isChecked($tgl)) { setToggleField($(this), true); $ul.addClass('visible'); } render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formUnivNameList() {\n for (var i = 0; i < vm.universityList.length; i++) {\n vm.univList.push({\n unitId: vm.universityList[i].unitId,\n universityName: vm.universityList[i].universityName\n })\n }\n }", "f...
[ "0.58464825", "0.57683337", "0.5750212", "0.5725643", "0.56511027", "0.5632999", "0.5621995", "0.56148857", "0.55747753", "0.5519155", "0.5519155", "0.54870135", "0.54437107", "0.543758", "0.5434277", "0.54207367", "0.5420631", "0.5363419", "0.53598833", "0.5318864", "0.53030...
0.59100175
0
Remove a row of Unstable fields from the $ul
function remFieldRow(e) { e.stopPropagation(); var btn = this , $ul = getUl(btn); $(btn).parent().remove(); if ($ul.children().length == 0) { setToggleField($ul, false); $ul.removeClass('visible'); emptyStableVar($ul); } else { refreshStableVar(getName($ul)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeList(){\n global_gff3.extra_showing = false;\n global_gff3.extra_details = null;\n d3.selectAll('.extra_tr').remove();\n d3.selectAll('.featureList').remove()\n }", "function removeColum(){\n $('#Colums-inputs').removeChild($('#Colums-inputs').lastChild);\n}", "function ...
[ "0.6615963", "0.640067", "0.64001197", "0.62988895", "0.629491", "0.6292507", "0.62752044", "0.62394905", "0.6233526", "0.6224167", "0.61778134", "0.61463916", "0.6141291", "0.6124712", "0.61230475", "0.60960805", "0.6087173", "0.6081", "0.60709006", "0.6070228", "0.6063807",...
0.70777965
0
Checks if a $checkbox is checked or not
function isChecked($chkbx) { return $chkbx.is(':checked'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verificaCheckboxes(checkbox){\n\treturn checkbox == true;\n}", "function isCheckoxCheck(Checkbox) {\n if (!Checkbox.checked) {\n showErrorOrOK(Checkbox, \" AGB!!!\", false);\n return true;\n } else {\n showErrorOrOK(Checkbox, \" \", true);\n retu...
[ "0.79843074", "0.7454738", "0.7389127", "0.71979696", "0.71457374", "0.7081552", "0.705041", "0.6935683", "0.68978196", "0.68608016", "0.6792968", "0.67863864", "0.6688091", "0.6635593", "0.6607978", "0.6572182", "0.6528446", "0.64688164", "0.6447041", "0.6434817", "0.6407717...
0.7555218
1
Render the actual Override json file contents A property on the json object will only be rendered if the toggle checkbox is active
function renderOverride() { o = {}; if (isChecked($main_tgl)) o.main = $main.val(); if (isChecked($dependencies_tgl) && !$.isEmptyObject(dependencies)) o.dependencies = dependencies; if (isChecked($format_tgl)) o.format = $format.val(); if (isChecked($directories_tgl)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleEnableCreate(event) {\n if (okitJsonModel) {\n Object.values(okitJsonModel).filter((v) => Array.isArray(v)).forEach((v) => v.forEach((r) => r.read_only = false));\n okitJsonModel.title = `${okitJsonModel.title} - Read/Write Copy`;\n okitJsonView = OkitCompartmentJsonView.newV...
[ "0.5629038", "0.5436961", "0.53414524", "0.53058153", "0.5204758", "0.5145858", "0.5144944", "0.5110263", "0.51076496", "0.5094495", "0.50911486", "0.5060091", "0.50586367", "0.50282514", "0.50075877", "0.49894202", "0.49610785", "0.4958917", "0.49586987", "0.4933552", "0.492...
0.6372016
0
Render the entry which needs to go into the registry.json file, over at
function renderRegistry() { var reg = $('input[name="endpoint"]:checked').val() , pkg = $package.val() , out = reg + ':' + pkg; out = syntaxHighlight(out); $registry_out.html(out); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderDirectory() {\n var reg = $('input[name=\"endpoint\"]:checked').val()\n , pkg = $package.val()\n , ver = $version.val()\n , out = 'jspm/registry/package-overrides/' + reg + '/' + pkg;\n out += '@' + ver + '.json';\n out = syntaxHighlight(out);\n $directory_out.html(out);\n...
[ "0.59557927", "0.5687419", "0.56873703", "0.5545919", "0.5501708", "0.5387787", "0.5331593", "0.5303526", "0.5250862", "0.5249511", "0.52144104", "0.5163996", "0.5162524", "0.51577276", "0.51551527", "0.51396173", "0.5093915", "0.50812054", "0.5071951", "0.50581044", "0.50567...
0.60715294
0
Render the path of the Override file which needs to be created, A subfolder of
function renderDirectory() { var reg = $('input[name="endpoint"]:checked').val() , pkg = $package.val() , ver = $version.val() , out = 'jspm/registry/package-overrides/' + reg + '/' + pkg; out += '@' + ver + '.json'; out = syntaxHighlight(out); $directory_out.html(out); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get templateFullPath() {\n return path.join(this.assembly.directory, this.templateFile);\n }", "function renderOverride() {\n o = {};\n\n if (isChecked($main_tgl))\n o.main = $main.val();\n if (isChecked($dependencies_tgl) && !$.isEmptyObject(dependencies))\n o.dependencies = dep...
[ "0.60775304", "0.5866581", "0.5817603", "0.5768017", "0.57617825", "0.5659521", "0.55987", "0.5596431", "0.5596431", "0.5574651", "0.5574651", "0.5570114", "0.5530369", "0.5490098", "0.5454023", "0.5421943", "0.541249", "0.54082793", "0.53904283", "0.53567046", "0.535116", ...
0.61060864
0
run on document ready Set the column containing the rendered code to be fixed, allowing it to remain in view when scrolling through the input fields.
function setRenderColumnFixed() { var $code = $('#code') , $input = $('#input') , left = $input.offset().left + $input.outerWidth() , height = $(window).height(); $code.css('left', left); $code.css('height', height); $input.css('height', height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static updateColumns() {\n if (ftables.length === 0) {\n return;\n }\n for (const column of ftables[0]._columns.children) {\n if (column.value === \"\") {\n continue;\n }\n ftables[0]._tables.querySelectorAll(`.${column.value}`)\n .forEach(e => e.style.display = column....
[ "0.5580235", "0.5416473", "0.5411987", "0.540064", "0.5356931", "0.5356931", "0.53518975", "0.5334574", "0.5334574", "0.5327751", "0.5299535", "0.5291413", "0.5282645", "0.52672523", "0.52519715", "0.5237095", "0.5214549", "0.5212478", "0.5204914", "0.5201647", "0.51985174", ...
0.82263756
0
Parse data from textarea
function parseData() { return JSON.parse(document.getElementsByTagName('textarea')[0].value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseTypografAnswer(text) {\r\n var re = /<ProcessTextResult>\\s*((.|\\n)*?)\\s*<\\/ProcessTextResult>/m;\r\n var response = re.exec(text);\r\n response = RegExp.$1;\r\n response = response.replace(/&gt;/g, '>');\r\n response = response.replace(/&lt;/g, '<');\r\n response = response.repl...
[ "0.6099105", "0.608944", "0.59877926", "0.586298", "0.5846711", "0.5767532", "0.57028395", "0.5675086", "0.56539917", "0.56539917", "0.5639808", "0.56231767", "0.56231767", "0.55818", "0.55588794", "0.5530566", "0.55051005", "0.5488297", "0.5467895", "0.5437368", "0.54239273"...
0.76770556
0
Turn on / off chart interactions
function toggleInteractions() { scObj.interactions.enable(document.getElementById("enableInteractions").checked); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleAxes() {\n if(this.options.axes){\n this.yAxisElement.style(\"opacity\", \"0\");\n this.xAxisElement.style(\"opacity\", \"0\");\n } else {\n this.yAxisElement.style(\"opacity\", \"1\");\n this.xAxisElement.style(\"opacity\", \"1\");\n }\n\n ...
[ "0.6328864", "0.611855", "0.60653293", "0.601668", "0.5993763", "0.5968189", "0.5932442", "0.5922796", "0.5922796", "0.58430415", "0.58264875", "0.58023316", "0.57903886", "0.57709736", "0.57709736", "0.57709736", "0.57655644", "0.5757111", "0.5754248", "0.57415754", "0.57113...
0.6495269
0
Highlight chart by key
function highlightByKey(k) { var preserve = document.getElementById('preserve-previous-highlights').checked; var lock = document.getElementById('lock-highlights').checked; scObj.interactions.highlightRibbonByKey(k, preserve, lock); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function kb_highlightKey(keyId) {\n\n kb_lastHighlightedKeyId = keyId;\n\n var key = kb_keys[keyId];\n\n // add highlight css class to key element\n $(\"#\" + keyId).addClass(key.highlightClass);\n\n // draw connection from parent key to key\n var color = kb_getColorFromClass(key.highlightClass)\n kb_drawCo...
[ "0.66190916", "0.6579846", "0.62568176", "0.61946297", "0.6180444", "0.61743546", "0.6167912", "0.6127954", "0.61134964", "0.6068031", "0.59388995", "0.5926546", "0.587823", "0.587153", "0.58584404", "0.5840749", "0.5828278", "0.5813247", "0.5748841", "0.57455045", "0.5733132...
0.70469016
0
To ensure player doesn't go outside the canvas
outsideCanvas() { if(this.y > 400){ this.y = 380; } if(this.x > 400){ this.x = 400; } else if(this.x < 0){ this.x = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkPlayerBounds() {\n\t\t\t// Check bounds\n\t\t\tif(sprite.playerXPos < 64) {\n\t\t\t\tsprite.playerXPos = 64;\n\t\t\t}\n\t\t\telse if(sprite.playerXPos > canvas.width - 120) {\n\t\t\t\tsprite.playerXPos = canvas.width - 120;\n\t\t\t}\n\n\t\t\tif(sprite.playerYPos < 64) {\n\t\t\t\tsprite.playerYPos = 6...
[ "0.73008513", "0.7172279", "0.7091317", "0.7081175", "0.6967795", "0.69088733", "0.68719614", "0.68305516", "0.6760471", "0.67584956", "0.67337614", "0.67336833", "0.67314726", "0.6671353", "0.66536427", "0.66263026", "0.6537807", "0.6528364", "0.6522101", "0.6469989", "0.645...
0.74047184
0
Outcome must be SAFE or UNKNOWN
function assertIsSafeOrUnknown (outcome) { const isOK = outcome === vulnRegexDetector.responses.safe || vulnRegexDetector.responses.unknown; assert.ok(isOK, `outcome ${outcome} should be safe|unknown`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertIsVulnerableOrUnknown (outcome) {\n\tconst isOK = outcome === vulnRegexDetector.responses.vulnerable ||\n\t\toutcome === vulnRegexDetector.responses.unknown;\n\tassert.ok(isOK, `outcome ${outcome} should be vulnerable|unknown`);\n}", "function assertIsOK (outcome) {\n\tconst isOK = outcome === vul...
[ "0.6131143", "0.6033864", "0.6017212", "0.6006458", "0.58219576", "0.57490504", "0.5676935", "0.5633401", "0.56212467", "0.5605416", "0.5567236", "0.5530837", "0.54870236", "0.539944", "0.53906137", "0.53906137", "0.53906137", "0.53906137", "0.53906137", "0.53906137", "0.5390...
0.68595433
0
Outcome must be VULNERABLE or UNKNOWN
function assertIsVulnerableOrUnknown (outcome) { const isOK = outcome === vulnRegexDetector.responses.vulnerable || outcome === vulnRegexDetector.responses.unknown; assert.ok(isOK, `outcome ${outcome} should be vulnerable|unknown`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get outcome () {\n\t\treturn this._outcome;\n\t}", "get outcome() {\n\t\treturn this.__outcome;\n\t}", "function assertIsOK (outcome) {\n\tconst isOK = outcome === vulnRegexDetector.responses.vulnerable ||\n\t\toutcome === vulnRegexDetector.responses.safe ||\n\t\toutcome === vulnRegexDetector.responses.unknown...
[ "0.6822227", "0.6753025", "0.6473722", "0.6277654", "0.60825145", "0.6015791", "0.58958364", "0.5878613", "0.57878876", "0.57387674", "0.5708398", "0.57018703", "0.5673485", "0.5622276", "0.55927515", "0.55121845", "0.5486903", "0.54693", "0.5466102", "0.5418323", "0.54138726...
0.6865511
0
calcUserSummary provides the total count of owned and sharedwith narratives.
function calcUserSummary(narratives) { if (!narratives) { return 0; } var sharingCount = 0; for (var i = 0; i < narratives.length; i++) { var nar = narratives[i]; if (nar.permissions.length > 0) { sharing...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTotalUsers(counts) {\n return Object.keys(counts).reduce(\n (a, b) => a + (this.foci[b] && !this.foci[b].showTotal ? 0 : counts[b]),\n 0\n );\n }", "function SumSummary(name) {\n let [userIndex, userMovements] = findUser(name);\n let sumIn = 0;\n let sumOut = 0;\n userMovements.forEach((e...
[ "0.64544046", "0.6039025", "0.58932996", "0.577394", "0.5520347", "0.5497854", "0.5382075", "0.53392804", "0.53346163", "0.5331778", "0.52612513", "0.52106535", "0.5210167", "0.51868707", "0.51858044", "0.51616544", "0.513052", "0.51279175", "0.51121145", "0.5104467", "0.5102...
0.762718
0
Using the JavaScript language, have the function ChangingSequence(arr) take the array of numbers stored in arr and return the index at which the numbers stop increasing and begin decreasing or stop decreasing and begin increasing. For example: if arr is [1, 2, 4, 6, 4, 3, 1] then your program should return 3 because 6 ...
function ChangingSequence(arr) { // Check if first two numbers form an increasing sequence let increasing = arr[1] > arr[0] ? true: false; for (let i = 2; i < arr.length; i++) { let seq = arr[i] > arr[i - 1]; if ( increasing != seq) { return i - 1; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChangingSequence(arr) {\n//Is it increasing? If so, then pass arr to the increaseArr function.\n if ((arr[1] - arr[0]) > 0) {\n return increaseArr(arr);\n }\n//Is it decreasing? If so, then pass arr to the decreaseArr function.\n if ((arr[1] - arr[0]) < 0) {\n return decreaseArr(arr);\n }\n\...
[ "0.88197654", "0.85272765", "0.814436", "0.79233295", "0.7604726", "0.7420551", "0.6847944", "0.6557866", "0.64564997", "0.64557856", "0.64061296", "0.6386087", "0.6370086", "0.6325694", "0.6310517", "0.6288944", "0.62536454", "0.61863065", "0.6144338", "0.6107084", "0.605305...
0.86675704
1
Display the help text
function displayHelpText() { console.log(); console.log(' Usage: astrum figma [command]'); console.log(); console.log(' Commands:'); console.log(' info\tdisplays current Figma settings'); console.log(' edit\tedits Figma settings'); console.log(); }
{ "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.76472604", "0.76472604", "0.75795734", "0.75658655", "0.7537017", "0.7519669", "0.74558717", "0.74162334", "0.73856133", "0.7361186", "0.72931486", "0.7266475", "0.723133", "0.72305876", "0.72295225", "0.7216505", "0.7208194", "0.72050595", "0.7182391", "0.71145815", "0.70...
0.8001151
0
Display the current Figma settings
function displayFigmaSettings() { console.log("Your Figma Personal Access Token is: " + chalk.green(utils.$data.figma.token)); console.log("Your Figma file URL is: " + chalk.green(utils.$data.figma.url)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editFigmaSettings() {\n // we want the default values to be the current settings, if they exist\n var defaultToken = '';\n var defaultURL = '';\n if (utils.$data.figma) {\n defaultToken = utils.$data.figma.token;\n defaultURL = utils.$data.figma.url;\n }\n\n inquirer.prompt([\n {\n ...
[ "0.66736084", "0.6640586", "0.6557576", "0.6373583", "0.6355633", "0.620487", "0.62034786", "0.6173014", "0.6095384", "0.60492885", "0.6038886", "0.5976233", "0.5831093", "0.5816508", "0.58145463", "0.58145463", "0.58048004", "0.5799297", "0.57896715", "0.57862425", "0.575496...
0.8478531
0
Edit the current Figma settings
function editFigmaSettings() { // we want the default values to be the current settings, if they exist var defaultToken = ''; var defaultURL = ''; if (utils.$data.figma) { defaultToken = utils.$data.figma.token; defaultURL = utils.$data.figma.url; } inquirer.prompt([ { name: 'token'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayFigmaSettings() {\n console.log(\"Your Figma Personal Access Token is: \" + chalk.green(utils.$data.figma.token));\n console.log(\"Your Figma file URL is: \" + chalk.green(utils.$data.figma.url));\n}", "function openSettings() {\n let cfg = getConfigObject(true);\n $(\"#txtChannel\").val(...
[ "0.6749524", "0.60596097", "0.5985728", "0.59478265", "0.59407765", "0.59188586", "0.59036386", "0.5895477", "0.58301103", "0.5814569", "0.5783164", "0.57697105", "0.57422096", "0.5718415", "0.570334", "0.5695714", "0.5689884", "0.56795585", "0.56729966", "0.56502026", "0.563...
0.8106149
0
Pull the File key from the Figma URL
function getFileKey(pageUrl) { // console.log(pageUrl); // pageUrl = pageUrl.replace(/https:\/\/www.figma.com\/file\//, '').replace(/\/.*/,''); // console.log(pageUrl); return pageUrl.replace(/https:\/\/www.figma.com\/file\//, '').replace(/\/.*/,''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readBlobKeyFromURl() {\n var blobKey = getParameterByName(\"blob-key\");\n console.log(\"Parameter blobKey: \" + blobKey);\n return blobKey;\n}", "function getFileURL() {\n return urlVars['file'];\n}", "static getSHAKey(exportUrl, name, source_code, callback, errCallback) {\n var filename...
[ "0.657625", "0.63701713", "0.6211677", "0.5996357", "0.59546494", "0.59546494", "0.5897671", "0.5882794", "0.5840735", "0.58344287", "0.5806632", "0.5720241", "0.5670649", "0.56200564", "0.5617661", "0.5615943", "0.5594684", "0.5594684", "0.5594684", "0.5594684", "0.5594684",...
0.70363766
0
Fetch the Figma components from the existing URL
async function fetchFigmaComponents() { if (utils.$data.figma) { var componentArray = []; await apiRequest('/files/' + getFileKey(utils.$data.figma.url)) .then(function (apiResponse) { // console.log(apiResponse); for (nodeID in apiResponse.components) { let component = {}; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetch(url, value, component, cb) {\n cb(null, []);\n }", "function get(url){return axios__WEBPACK_IMPORTED_MODULE_0___default.a.get(url);}", "FAPI_Get(_url){\n return new Promise((resolve, reject)=>{\n\t\t\tvar https = require('https');\n\t\t\thttps.get(_url, (response)=>{\n\t\t\t\tvar resStri...
[ "0.58710504", "0.58179927", "0.5697144", "0.56145436", "0.557296", "0.55668217", "0.55122834", "0.5498845", "0.54911244", "0.5463549", "0.5440456", "0.54175115", "0.53665507", "0.5365262", "0.53517324", "0.5343381", "0.53327596", "0.53173804", "0.530148", "0.530025", "0.53001...
0.66297424
0
Function setPage() adjusts the height and width of rightofpage and the height of lefttofpage.
function setPage() { var winH = $(window).height(); var winW = $(window).width(); var winName = location.pathname. substring(location.pathname.lastIndexOf("/") + 1); $('#restofpage').css('height', winH-90); $('#restofpage').css('width', winW); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPage()\n{\n var winH = $(window).height();\n var winW = $(window).width();\n var winName = location.pathname.\n substring(location.pathname.lastIndexOf(\"/\") + 1);\n $('#rightofpage').css('height', winH-90);\n $('#rightofpage').css('width', winW-135);\n if(winName === \"board18Map.php\"...
[ "0.68166083", "0.6032181", "0.60114545", "0.5972697", "0.59341323", "0.583147", "0.5767379", "0.56206", "0.56008226", "0.559091", "0.5581909", "0.5579282", "0.55466217", "0.5525728", "0.55187005", "0.55146384", "0.5422932", "0.53847605", "0.5363502", "0.5325251", "0.53222585"...
0.6775636
1
Compile the query to determine if a column exists in a table.
hasColumn(tableName, columnName) { let sql = 'select * from information_schema.columns where table_name = ? and column_name = ?'; const bindings = [tableName, columnName]; if (this.schema) { sql += ' and table_schema = ?'; bindings.push(this.schema); } else { sql += ' and table_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasColumn(tableName, column) {\n this.pushQuery({\n sql: `show columns from ${this.formatter.wrap(tableName)}`,\n\n output(resp) {\n return (0, _lodash.some)(resp, row => {\n return this.client.wrapIdentifier(row.Field) === this.client.wrapIdentifier(column);\n });\n }\n\n ...
[ "0.7413851", "0.65859866", "0.5774488", "0.55304176", "0.5497283", "0.5289375", "0.527951", "0.52206314", "0.51882106", "0.5132741", "0.511788", "0.50442606", "0.50374454", "0.5013854", "0.4985026", "0.4981764", "0.49742347", "0.49331176", "0.4919628", "0.48943377", "0.488257...
0.7388186
1
Compile a rename table command.
renameTable(from, to) { this.pushQuery( `alter table ${this.qualifiedTableName( from )} rename to ${this.formatter.wrap(to)}` ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renameTable(tableName, to) {\n this.pushQuery(`rename table ${this.formatter.wrap(tableName)} to ${this.formatter.wrap(to)}`);\n }", "renameColumn(from, to) {\n const table = this.tableName();\n const wrapped = `${this.formatter.wrap(from)} to ${this.formatter.wrap(\n to\n )}`;\n\n this.push...
[ "0.7018525", "0.5932127", "0.589496", "0.5796824", "0.56905377", "0.5640603", "0.55400944", "0.54658467", "0.5320163", "0.5291945", "0.52421075", "0.514942", "0.5145034", "0.5013184", "0.5013051", "0.50061065", "0.49908787", "0.49383572", "0.48856586", "0.4871454", "0.4847622...
0.6967489
1
create both ldap settings grid and ldap groups grid
_createGrids() { this.settingsGridOption = this.artifactoryGridFactory.getGridInstance(this.$scope) .setColumns(this._getSettingsColumns()) //.setMultiSelect(this.) .setDraggable(this.reorderLdap.bind(this)) .setButtons(this._getSettingsActions()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setUpGroups() {\n this['providerGroups'] = [];\n this['searchOptionsGroups'] = {};\n this['searchOptionsNoGroup'] = [];\n\n const proGroups = /** @type {!Object<!Array<string>>} */ (Settings.getInstance().get('providerGroups', {}));\n const copiedOptions = googArray.clone(this['searchOptions']);\n\n...
[ "0.6123138", "0.5848648", "0.58305925", "0.55274683", "0.5444925", "0.54049236", "0.53474075", "0.5326017", "0.5325993", "0.53191584", "0.5210076", "0.50928867", "0.50928545", "0.50857353", "0.50688684", "0.50270146", "0.5019402", "0.5013863", "0.5011514", "0.5005592", "0.498...
0.7122568
0
Settings Grid get the columns for the settings grid
_getSettingsColumns() { return [ { name: "Settings Name", displayName: "Settings Name", field: "key", cellTemplate: '<div class="ui-grid-cell-contents"><a ui-sref="^.ldap_settings.edit({ldapSettingKey: row.entity.key})">{{ COL_FIELD }}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get _columnDefinitions() {\n return (this._grid && this._grid.getColumns) ? this._grid.getColumns() : [];\n }", "get _columnDefinitions() {\n return (this._grid && this._grid.getColumns) ? this._grid.getColumns() : [];\n }", "get _columnDefinitions() {\n return (this._grid && this._g...
[ "0.6810594", "0.6810594", "0.6810594", "0.6743095", "0.67107725", "0.6613438", "0.6596236", "0.6586837", "0.65593517", "0.64983636", "0.6391224", "0.6340225", "0.63112396", "0.62950873", "0.62691593", "0.62473434", "0.6224922", "0.6207661", "0.61940473", "0.6193603", "0.61887...
0.7229721
0
get the actions for the settings grid
_getSettingsActions() { return [ /*{ icon: 'icon icon-angle-double-up', tooltip: 'Move Up', visibleWhen: row => this.canMove(row.key,'up'), callback: row => this.moveLdapSetting(row.key,'up') }, { icon: 'icon ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_actions() {\n return this.element().getDriver().actions();\n }", "get _availableActions() {\n // get menu actions available by plugins configuration\n const currentRoute = this.currentRouter().app._route;\n const extensionMenuActions = getApplicableExtensionEnhancements(this.$rootState, Exten...
[ "0.6663001", "0.6484539", "0.63867825", "0.62092865", "0.6084863", "0.60761315", "0.6075061", "0.6024601", "0.598124", "0.5969419", "0.5968181", "0.5952015", "0.59146136", "0.58812875", "0.57714844", "0.57631564", "0.568781", "0.56767523", "0.56311303", "0.559421", "0.5579439...
0.78868806
0
get the index of the ldap settings (key) in this.ldapSettingsData
_indexOf(key) { var data = this.ldapSettingsData; var index = -1; for (var i = 0; i < data.length; i++) { if (data[i].key === key) { index = i; break; } } return index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getIndex() {\n return this.getConfig()[\"index\"];\n }", "function getIndexOfSettingsUser(uuid) {\n if (settings.users.length) {\n var index = settings.users.map(function (item) {\n return item.uuid;\n }).indexOf(uuid);\n return index;\n }\n...
[ "0.6249207", "0.5942809", "0.5868001", "0.5843336", "0.5778204", "0.57749474", "0.571336", "0.5590311", "0.5488855", "0.5488692", "0.5457905", "0.5457475", "0.5457475", "0.5438345", "0.53920656", "0.53816825", "0.5367764", "0.53540283", "0.5342471", "0.5342471", "0.52926487",...
0.8078278
0
swap the order of two ldap settings
_swapSettings(index1, index2) { var data = this.ldapSettingsData; var temp = data[index2]; data[index2] = data[index1]; data[index1] = temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "moveLdapSetting(key, dir) {\n var data = this.ldapSettingsData;\n var index = this._indexOf(key);\n if (dir === 'up' && index > 0) {\n this._swapSettings(index, index - 1);\n }\n else if (dir === 'down' && index < data.length - 1) {\n this._swapSettings(inde...
[ "0.6390467", "0.58653724", "0.54945046", "0.53216326", "0.52086323", "0.5191474", "0.5005741", "0.49804595", "0.49276972", "0.48876226", "0.4857431", "0.48141718", "0.48141718", "0.47821814", "0.47821814", "0.47821814", "0.47490075", "0.47382626", "0.4730868", "0.4691183", "0...
0.73393875
0
TODO move this stuff to some utility that can transform query data in other formats suitable for other components The timeline is drawn based on the configured date field facet
prepareTimeline(queryId, queryOutput, dateField) { const timelineData = []; for (const key in queryOutput.aggregations) { if (key.indexOf(dateField) != -1) { const buckets = queryOutput.aggregations[key][dateField].buckets; buckets.forEach((bucket) => { const year = parseInt(bucket.key); if (!(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawVisualization() {\n var e = document.getElementById('mytimeline');\n var action = e.getAttribute(\"data-action\");\n var ind = e.getAttribute(\"data-value\");\n timeline_data = [];\n timeline_data_changed = [];\n function turnToDate(date) {\n var lst = date.split(\"-\");\n return new Date(...
[ "0.58205557", "0.5814684", "0.5795309", "0.5681648", "0.5681648", "0.5658864", "0.564163", "0.5614786", "0.55866235", "0.54852754", "0.5475385", "0.5444091", "0.5435906", "0.54225165", "0.5418743", "0.5414492", "0.54086035", "0.53340137", "0.53241277", "0.52928346", "0.525681...
0.66294086
0
reset the UI back to the way it was when gadget initially loaded
function resetUi () { // show initial training div $("#training").show(); // hide the test $("#evaluation").hide(); // hide any results $("#result").hide(); // fix gadget height gadgets.window.adjustHeight() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n $('#locator-loader').show();\n $('.sidebar-js-button').removeClass('active');\n $('.result-body').hide();\n $('.legend-inner-container').hide();\n $('.legend-body').html('');\n $('#result-list').html('');\n $('.result-dropdown select').html('');\n }", "function resetUI(...
[ "0.68304783", "0.6722357", "0.6714757", "0.6602745", "0.65872675", "0.6569158", "0.6556878", "0.6547591", "0.65289044", "0.6464275", "0.6457372", "0.6457372", "0.64330035", "0.64261323", "0.6401111", "0.6394538", "0.6374464", "0.63680583", "0.6366871", "0.633912", "0.6311483"...
0.7705089
0
Function to add width to graph parent container when window width less than 767px.
function addWidth() { if (window.innerWidth <= 767) { $('.about-graph').width(window.innerWidth - 100); } else { $('.about-graph').removeAttr('style'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chartWidth() {\n\t\tif (window.innerWidth < 1200){\n\t\t\tdynamicWidth = ((window.innerWidth/100) * 95);\n\t\t\tdynamicMargin = {top: 0, right: 0, left: 0, bottom: 0};\n\t\t} else {\n\t\t\tdynamicWidth = (((window.innerWidth/100) * 95) - 670);\n\t\t\tdynamicMargin = {top: 0, right: 30, left: 30, bottom: 0...
[ "0.69113195", "0.6761803", "0.6525546", "0.64705944", "0.6444602", "0.63411456", "0.6334753", "0.6255088", "0.6241144", "0.6221856", "0.6218897", "0.6218897", "0.61806285", "0.6176476", "0.6164911", "0.61338335", "0.61304146", "0.6130018", "0.6108833", "0.6105495", "0.6105095...
0.83842695
0
Ajout d'un assignment (POST)
function postAssignment(req, res) { let assignment = new Assignment(); assignment.id = req.body.id; assignment.nom = req.body.nom; assignment.description = req.body.description; assignment.dateDeRendu = req.body.dateDeRendu; assignment.rendu = req.body.note > 0 ? true : req.body.rendu; assignment.professe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAssignment() {\n if (link === '') {\n return;\n } //we don't want to post an assignment with no links.\n const newAssignment = {\n fileName: title,\n link: link,\n dueDate: dueDate,\n type:\n uploadType === 'UPLOAD'\n ? getFilenameAndExtension(upload...
[ "0.635995", "0.63348633", "0.5833817", "0.56628597", "0.5627924", "0.55759585", "0.55519783", "0.55435294", "0.5528696", "0.5517434", "0.54840434", "0.536386", "0.53616154", "0.53520006", "0.5347817", "0.534104", "0.5312804", "0.5300671", "0.5300671", "0.5298968", "0.5292938"...
0.73271775
0
Update d'un assignment (PUT)
function updateAssignment(req, res) { req.body.dateUpdate = new Date(); Assignment.findByIdAndUpdate( req.body._id, req.body, { new: true }, (err, assignment) => { if (err) { console.log(err); res.send(err); } else { console.log(req.body._id, "updated"); r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateAssignment(req, res) {\n Assignment.findByIdAndUpdate(req.body._id, req.body, { new: true }, (err, assignment) => {\n if (err) {\n console.log(err);\n res.send(err)\n } else {\n res.json({ message: 'updated' })\n }\n\n // console.log('u...
[ "0.7103544", "0.6645215", "0.6645215", "0.6645215", "0.6440906", "0.634145", "0.63016427", "0.6268139", "0.61977845", "0.6170625", "0.6087012", "0.60833967", "0.60464096", "0.6042965", "0.6036633", "0.6036633", "0.6036633", "0.6036633", "0.6036633", "0.6036633", "0.6036633", ...
0.6742715
1
group db names by siid
function group_dbs(all_dbs) { const ret = {}; for (let i in all_dbs) { const db_full_name = all_dbs[i]; const siid = get_siid(db_full_name); const db_type = get_db_type(db_full_name); if (!ret[siid]) { // safe init ret[siid] = {}; } if (!ret[siid].types) { ret[siid].types = []; } if (!ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllStoreNames(db) {\n\t return new Promise$1(function (resolve, reject) {\n\t db.transaction(function (t) {\n\t t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n\t var stor...
[ "0.5267387", "0.51857567", "0.51167864", "0.5110246", "0.5095566", "0.5069353", "0.5069353", "0.5069353", "0.5069353", "0.5069353", "0.5069353", "0.5025545", "0.49862984", "0.4983874", "0.49669936", "0.48736477", "0.48573002", "0.47534597", "0.4742592", "0.47111204", "0.46884...
0.7574858
0
get service instance id from db name
function get_siid(db_name) { if (typeof db_name === 'string') { if (db_name.indexOf('db-') === 0) { const pos = db_name.lastIndexOf('-'); return db_name.substring(3, pos); } } return 'unknown-siid'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function databaseInstanceType(instanceType) {\n return 'db.' + instanceType.toString();\n}", "function getInstanceID()\n{\n\treturn getDCCAddrAndMotorSubAddr(this.normalRouteID);\n}", "get dbInstanceIdentifierInput() {\n return this._dbInstanceIdentifier;\n }", "static get DATABASE_NAME() {\r\n ...
[ "0.6026005", "0.5932842", "0.5913475", "0.588927", "0.5789375", "0.5675099", "0.5655676", "0.5606739", "0.5606739", "0.5606739", "0.5606739", "0.5606739", "0.5606739", "0.5585892", "0.5491801", "0.5447832", "0.5383052", "0.53678477", "0.5349488", "0.5329174", "0.53057605", ...
0.62681025
0
get db type from the db name
function get_db_type(db_name) { if (typeof db_name === 'string') { if (db_name.indexOf('db-') === 0) { const pos = db_name.lastIndexOf('-'); return db_name.substring(pos + 1); } } return 'unknown'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function databaseInstanceType(instanceType) {\n return 'db.' + instanceType.toString();\n}", "function DBToStandardName(name = '') {\n const result = game_types.find(game => game.database_name.toLowerCase() === name);\n return result === undefined ? name : result.standard_name;\n}", "function dwscripts_ge...
[ "0.755449", "0.6340905", "0.6246708", "0.6183491", "0.61337954", "0.5967078", "0.5930711", "0.58679336", "0.5828776", "0.5798756", "0.57657206", "0.5752532", "0.5741132", "0.5722021", "0.57160324", "0.5599489", "0.558022", "0.55662584", "0.554663", "0.5518937", "0.5493437", ...
0.89028335
0
Draw a texture to the canvas, with an optional width and height to scale to. If no width and height are given then the original texture width and height are used.
function draw(texture, width, height) { if (!this._.isInitialized || texture._.width != this.width || texture._.height != this.height) { initialize.call(this, width ? width : texture._.width, height ? height : texture._.height); } texture._.use(); this._.texture.drawTo(function() { Shad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateTexture() {\n var canvas = this.canvas;\n if (this._style.trim) {\n var trimmed = CanvasSettings_1.CanvasSettings.trimCanvas(canvas);\n if (trimmed.data) {\n canvas.width = trimmed.width;\n canvas.height = trimmed.height;\n this...
[ "0.6467546", "0.6241795", "0.6179263", "0.58458745", "0.5744135", "0.56915057", "0.5674638", "0.56722593", "0.56305176", "0.5597332", "0.5528283", "0.552758", "0.54888713", "0.5463349", "0.54518676", "0.5414661", "0.54062533", "0.54035544", "0.5403423", "0.53536904", "0.53478...
0.6965803
1
Get a Uint8 array of pixel values: [r, g, b, a, r, g, b, a, ...] Length of the array will be width height 4.
function getPixelArray() { var w = this._.texture.width; var h = this._.texture.height; var array = new Uint8Array(w * h * 4); this._.texture.drawTo(function() { gl.readPixels(0, 0, w, h, gl.RGBA, gl.UNSIGNED_BYTE, array); }); return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toRGB({ width, height, rgbaBytes }) {\n const pixCount = width * height;\n const pixels = new Array(pixCount * 3);\n\n for (let iRGBA = 0, iPix = 0; iPix < pixels.length; iRGBA += 4, iPix += 3) {\n pixels[iPix] = rgbaBytes[iRGBA];\n pixels[iPix + 1] = rgbaBytes[iRGBA + 1];\n pixels[iPix + 2] =...
[ "0.6841653", "0.6804762", "0.650766", "0.6480975", "0.63710886", "0.6354846", "0.632614", "0.62544", "0.62311673", "0.61955845", "0.6173237", "0.6160863", "0.6098959", "0.60799533", "0.6071813", "0.6065933", "0.6062775", "0.6053749", "0.6051105", "0.6027495", "0.5986173", "...
0.81712574
1
Shorthand PrimitiveIdentifier constructor for more concise code
function pid(name) { return new models.PrimitiveIdentifier(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function strtoid(name) {\n return new js.Identifier(name);\n}", "function Const(){ return Identifier.apply(this,arguments) }", "function setID (identifier) {\n if (identifier.longname) {\n identifier.id = identifier.longname\n }\n if (identifier.kind === 'constructor') {\n identifier.id = identifie...
[ "0.69117445", "0.6557189", "0.6301968", "0.62135196", "0.6213518", "0.6199311", "0.6123915", "0.60882723", "0.5935449", "0.5850285", "0.57328606", "0.5709739", "0.57009923", "0.5656221", "0.5623751", "0.5620514", "0.5577948", "0.55769145", "0.5567174", "0.5564016", "0.5562119...
0.7030547
0
Adds a data elements to the specs, for use in the test case
function add(...dataElements) { for (const de of dataElements) { _specs.dataElements.add(de); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addSpec(spec_name, spec_data){\n\t\tvar _this = this;\n\t\t// generate set of preprocesses at defaults\n\t\tvar pp = [];\n\t\tfor(var p in this.preprocs){\n\t\t\tpp.push(new this.preprocs[p]);\n\t\t}\n\t\tvar sc = new SpecConfig(this.cur_spec_id, spec_name, spec_data, pp);\n\t\tthis.cur_spec_id++; // make sure eac...
[ "0.6062198", "0.59970176", "0.5848214", "0.58278185", "0.58278185", "0.58278185", "0.576257", "0.57595736", "0.57431984", "0.5628509", "0.56206644", "0.56206644", "0.5572383", "0.55605567", "0.5553554", "0.5549661", "0.5539864", "0.5525872", "0.55132157", "0.5491596", "0.5485...
0.7871121
0
Expands the current specs and stores results in _result
function doExpand(...exporters) { _result = expand(_specs, {}, ...exporters); /********************************************************************************************************************* * HORRIBLE, HORRIBLE, AWFUL, NO-GOOD, YOU-SHOULD-BE-ASHAMED-OF-YOURSELF HACK! * This code clears all of the Cons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showExpandedResult() {\n var showExpandedResult = document.getElementById('result-expanded');\n showExpandedResult.classList.remove('hidden');\n var expandButton = document.getElementById('expand-button');\n expandButton.classList.add('hidden');\n}", "expandAll() {\n this.expansionMod...
[ "0.5215175", "0.5191974", "0.5191974", "0.51708937", "0.50915486", "0.50715244", "0.4990055", "0.49748647", "0.49509904", "0.49424765", "0.48781374", "0.48717478", "0.48614436", "0.4794118", "0.47892964", "0.47631934", "0.47397992", "0.47185278", "0.4705842", "0.47032443", "0...
0.6276738
0
Crea la tabla vacia inicial
function createEmptyTable() { let rows = Number($("#rows").val()); let cols = Number($("#cols").val()); if (isNaN(rows) || isNaN(cols) || rows === 0 || cols === 0) alert("Introduzca los datos correctamente"); else { titles = []; content = []; $("table").remove(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initTable() {\r\n\r\n const TaskTable = document.getElementById('task-table'); //recupero tabella da svuotare, attarverso il suo id\r\n \r\n TaskTable.innerHTML = ''; //svuoto la tabella, e poi inserisco nulla('')\r\n\r\n }", "function iniciarTablaHistorial(tx) {\n\ttx.executeSql('CREATE TABLE...
[ "0.7007349", "0.6979079", "0.69069356", "0.6831753", "0.6812329", "0.6785824", "0.6755732", "0.67033994", "0.66863203", "0.6659132", "0.6650673", "0.66485184", "0.66474444", "0.66341156", "0.66243404", "0.6616764", "0.6614761", "0.659934", "0.6574539", "0.6571449", "0.6568457...
0.7528901
0
Crea la tabla desde un fichero
function createTableFromFile(titles, content) { let rows = Number(content.length / titles.length + 1); //+1 por los titulos let cols = Number(titles.length); if (isNaN(rows) || isNaN(cols) || rows === 0 || cols === 0) alert("Introduzca los datos correctamente"); else { $("table").remove...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTable()\n{\n \n\tfilesDB.transaction(\n function (transaction) {\n transaction.executeSql('CREATE TABLE IF NOT EXISTS files(id VARCHAR NOT NULL PRIMARY KEY, LastModified TIMESTAMP NOT NULL, name TEXT NOT NULL, json BLOB NOT NULL DEFAULT \"\");', [], nullDataHandler, killTransaction);\n ...
[ "0.6889194", "0.65335625", "0.6479718", "0.643257", "0.63922966", "0.63068885", "0.6232222", "0.6229516", "0.620723", "0.61951125", "0.6129573", "0.61219585", "0.6121149", "0.6103543", "0.6101657", "0.6095037", "0.6088744", "0.60737574", "0.60712653", "0.60688406", "0.6043371...
0.7409259
0
Destroy the copy element for credits
function destroyFirstCredit(){ var credits = $(".CreditRows:first"); credits.remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clean(){\n this.htmlBuilder.deleteCard();\n delete this.htmlBuilder;\n }", "removeCard() { this.df = null; }", "function clearCopied() {\n copyStatus.innerHTML = \"\";\n}", "static destruct() {\n // this.musicalScores.src = ''\n this.buttonsWrapper.innerHTML = ''\n this.goBack.remo...
[ "0.6262833", "0.6217016", "0.60083294", "0.5853111", "0.5851859", "0.5826997", "0.5799665", "0.5780253", "0.5742958", "0.57218885", "0.57169956", "0.5712278", "0.56991255", "0.56942856", "0.5683319", "0.5669523", "0.5637173", "0.56259614", "0.56082094", "0.56023026", "0.55960...
0.6218045
1
register urban airship push service after APN is registered successfully
function pushRegisterUAPush(deviceToken, host, appKey, appSecret) { window.plugins.pushNotification.log("Registering with Urban Airship."); var request = new XMLHttpRequest(); // open the client and encode our URL request.open('PUT', host + 'api/device_tokens/' + deviceToken, true, appKey, appSecret);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushRegister() {\n\t console.log('Ionic Push: Registering user');\n\n\t // Register with the Ionic Push service. All parameters are optional.\n\t $ionicPush.register({\n\t canShowAlert: true, //Can pushes show an alert on your screen?\n\t canSetBadge: true, //Can pushes updat...
[ "0.68441904", "0.66058487", "0.6580251", "0.65340924", "0.6510907", "0.6497049", "0.6455688", "0.6357639", "0.6282651", "0.62354314", "0.6106679", "0.60772216", "0.6065162", "0.605399", "0.6045462", "0.6033761", "0.60279214", "0.60149616", "0.6007308", "0.5971797", "0.5965325...
0.7050642
0
========================================================================== create an integer hash from a string (used to create safe ID attributes)
function stringToIntegerHash(str) { var hash = 0; if (str.length == 0) return hash; for (i = 0; i < str.length; i++) { char = str.charCodeAt(i); hash = ((hash << 5) - hash) + char; hash = hash & hash; // Convert to 32bit integer } return hash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hashCode (str) {\n return str.split('').reduce((prevHash, currVal) =>\n (((prevHash << 5) - prevHash) + currVal.charCodeAt(0)) | 0, 0)\n }", "function stringToHash(string) {\n //Escribe tu codigo aqui\n}", "hash(str) {\n const len = str.length;\n let hash = 0;\n if (len === 0) return h...
[ "0.78224564", "0.7680714", "0.761088", "0.7561061", "0.7550706", "0.75485605", "0.7546763", "0.75430346", "0.75430346", "0.7514331", "0.74958754", "0.7482326", "0.7482326", "0.7478028", "0.7477048", "0.7472256", "0.7453407", "0.74267083", "0.7419095", "0.739638", "0.73945224"...
0.79139334
0
wave[0]: wave amplitudes at last time step wave[1]: current time step wave[2]: next time step wave[3]: Store a new wave shape as dictated by user input
function shapeWave(x, y) { for (var i = -Math.floor(canvas.width/8)+1; i < canvas.width/8; i++) { if ((x + i) > 0 && (x + i) < canvas.width - 1) wave[3][x+i] = y*Math.exp(-1.0*i*i/(Math.sqrt(2.0)*canvas.width/30.0)**2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function qwave(controlpoints, samplenum){\r\n\tvar starttime = Date.now();\r\n\tvar wave = []; if(samplenum<1){ return wave; }\r\n\tfor(var i=0; i<samplenum; i++){\r\n\t\twave[i] = qspl(controlpoints,i/samplenum);\r\n\t}// End of sample loop\r\n\treturn wave;\r\n}// End of qwave()", "update(waveform) {\n // c...
[ "0.61247694", "0.59489346", "0.594643", "0.59361625", "0.5929732", "0.5885476", "0.5791092", "0.57796234", "0.5754251", "0.5740166", "0.5736363", "0.57286924", "0.57014984", "0.567576", "0.56749356", "0.5664871", "0.56643385", "0.56632024", "0.560051", "0.5599744", "0.55438",...
0.6133469
0
Make a pair of Duplex streams what's written to clientSide is readable from serverSide and viceversa
function makeDuplexPair() { var clientCallback, serverCallback; const clientSide = new Duplex; clientSide._read = function _read(){ if(!clientCallback) return; var callback = clientCallback; clientCallback = null; callback(); }; clientSide._write = function _write(chunk, enc, callback){ if(serverCallback...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toObjectDuplex(stream) {\n\n //// Write Stream (Server -> Client)\n\n // Create a write stream that accepts objects\n // and spits out JSON, newline separated\n var objectWriteStream = JSONStream.stringify();\n\n // Pipe the stream to the client\n objectWriteStream.pipe(stream);\n\n\n //// Read Str...
[ "0.6741962", "0.63354325", "0.6287671", "0.61174065", "0.5908234", "0.58023757", "0.5789125", "0.5789125", "0.5783923", "0.57801676", "0.5774507", "0.57671595", "0.57671595", "0.57671595", "0.57671595", "0.5758442", "0.5758442", "0.57444805", "0.57444805", "0.57444805", "0.57...
0.751928
0
This function generates very simple loops analogous to how you typically traverse arrays (the outermost loop corresponds to the slowest changing index, the innermost loop to the fastest changing index) TODO: If two arrays have the same strides (and offsets) there is potential for decreasing the number of "pointers" and...
function innerFill(order, proc, body) { var dimension = order.length , nargs = proc.arrayArgs.length , has_index = proc.indexArgs.length>0 , code = [] , vars = [] , idx=0, pidx=0, i, j for(i=0; i<dimension; ++i) { // Iteration variables vars.push(["i",i,"=0"].join("")) } //Compute scan d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loopTheLoop(firstSize, secondSize) {\n // not n^2 because of different inputs\n for (let i = 0; i < firstSize; i++) {\n for (let j = 1; j < secondSize; j++) {\n console.log(i, j);\n }\n }\n}", "function innerFill(order, proc, body) {\r\n var dimension = order.length\r\n , nargs = proc....
[ "0.61390644", "0.5941542", "0.5941542", "0.5941542", "0.5941542", "0.59225935", "0.59225935", "0.59225935", "0.58168125", "0.58168125", "0.55257344", "0.55016446", "0.5497182", "0.54922116", "0.5455689", "0.5452755", "0.54517114", "0.54517114", "0.54517114", "0.54517114", "0....
0.5961583
1
Creates a texture from an ndarray
function createTextureArray(gl, array) { var dtype = array.dtype var shape = array.shape.slice() var maxSize = gl.getParameter(gl.MAX_TEXTURE_SIZE) if(shape[0] < 0 || shape[0] > maxSize || shape[1] < 0 || shape[1] > maxSize) { throw new Error('gl-texture2d: Invalid texture size') } var packed = isPacked...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTextureArray(gl, array) {\n var dtype = array.dtype || ndarray.dtype(array)\n var shape = array.shape\n var packed = isPacked(array)\n var type = 0\n if(dtype === \"float32\") {\n type = gl.FLOAT\n } else if(dtype === \"float64\") {\n type = gl.FLOAT\n packed = false\n dtype = \"fl...
[ "0.7357744", "0.73427653", "0.73427653", "0.72505116", "0.72505116", "0.72505116", "0.66068494", "0.63810366", "0.6349093", "0.6293738", "0.626663", "0.6260185", "0.6260185", "0.6216004", "0.6170147", "0.6103749", "0.6039818", "0.6009363", "0.60076046", "0.60048544", "0.59925...
0.73689204
0
Get all the entries (files or subdirectories) in a directory by calling readEntries until it returns empty array
async function readAllDirectoryEntries(directoryReader) { let entries = []; let readEntries = await readEntriesPromise(directoryReader); while (readEntries.length > 0) { entries.push(...readEntries); readEntries = await readEntriesPromise(directoryReader); } return entries; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readEntriesAsync(rootEntry) {\n // https://wicg.github.io/entries-api/#dir-reader\n var reader = rootEntry.createReader(),\n entriesArr = [];\n \n return new Promise((resolve, reject) => {\n reader.readEntries((entries) => {\n for (let i = 0; i ...
[ "0.7166577", "0.71417654", "0.71141267", "0.6960136", "0.68471664", "0.6801087", "0.6801087", "0.66998225", "0.6678552", "0.66476685", "0.65781575", "0.65126806", "0.64930713", "0.64749223", "0.6447072", "0.64024717", "0.6397515", "0.6396032", "0.6395665", "0.6316109", "0.630...
0.77954006
1
Wrap readEntries in a promise to make working with readEntries easier
async function readEntriesPromise(directoryReader) { try { return await new Promise((resolve, reject) => { directoryReader.readEntries(resolve, reject); }); } catch (err) { console.log(err); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readEntriesAsync(rootEntry) {\n // https://wicg.github.io/entries-api/#dir-reader\n var reader = rootEntry.createReader(),\n entriesArr = [];\n \n return new Promise((resolve, reject) => {\n reader.readEntries((entries) => {\n for (let i = 0; i ...
[ "0.7165884", "0.70628285", "0.6746043", "0.6605831", "0.6437201", "0.63818157", "0.630765", "0.62112576", "0.61062235", "0.6076091", "0.5928747", "0.58988136", "0.5848129", "0.5843532", "0.5843532", "0.5749742", "0.5704168", "0.569433", "0.5683344", "0.5671897", "0.5647622", ...
0.7491218
1
adds file at `path` to ipfs calls back (err, hash)
function addToIpfs (path, cb) { return exec(`ipfs add -q ${path} | tail -n1`, (err, hash) => { if (hash) hash=hash.trim() cb(err, hash) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "saveToIpfs (file) {\n let ipfsId\n const fileStream = fileReaderPullStream(file)\n this.ipfsApi.add(fileStream, { progress: (prog) => console.log(`received: ${prog}`) })\n .then((response) => {\n console.log(response)\n ipfsId = response[0].hash\n console.log(ipfsId)\n thi...
[ "0.6376901", "0.6275911", "0.6105803", "0.6101464", "0.5991051", "0.5981392", "0.59697485", "0.5909359", "0.5787546", "0.57173926", "0.56214255", "0.55373156", "0.5513021", "0.5484238", "0.5426814", "0.5407241", "0.53958464", "0.5320365", "0.52490467", "0.52313596", "0.521752...
0.78511834
0
adds db entry with hash `h` and metadata `m`
function _dbEntry (h, m) { return { ipfsHash: h, metadata: m, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addLevelDBData(key,value){\n db.put(key, value, function(err) {\n if (err) return console.log('Block ' + key + ' submission failed', err);\n })\n}", "function addLevelDBData(key,value){\n db.put(key, value, function(err) {\n if (err) return console.log('Block ' + key + ' submission failed', err...
[ "0.6350736", "0.6350736", "0.6224524", "0.6177449", "0.61033225", "0.59067017", "0.5827411", "0.58141977", "0.5808933", "0.5780309", "0.5763747", "0.57254237", "0.57221127", "0.5720799", "0.5682902", "0.5662045", "0.5647475", "0.5643721", "0.56411815", "0.56329954", "0.562056...
0.7603096
0
basic logging filter, adds a timestamp and the loglevel This tiny filter was moved here from lib/filterbasic.
function BasicFilter( ) { this.filter = function filter(message, loglevel) { var timestring = timestamps.formatBasicDate(); // var timestring = timestamps.formatJsonDate(); return timestring + " [" + QLogger.LEVELNAMES[loglevel] + "] " + message; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addFilterTrace(filter) {\n\n // We add line number for grokparsefailures\n\n if (!filter.includes(\"tag_on_failure\")) {\n var re = /grok\\s*{/g\n\n filter = filter.replace(re, function(match, index) {\n var sub = filter.substring(0, index) + match\n var currentLi...
[ "0.612682", "0.5727619", "0.5693105", "0.5549741", "0.55158144", "0.5432314", "0.5376032", "0.5369245", "0.5293799", "0.5263151", "0.52099264", "0.5179178", "0.5175915", "0.51223373", "0.5044091", "0.5043906", "0.5038161", "0.49997368", "0.49728295", "0.496439", "0.49554014",...
0.761305
0
Insert if not exists; messagecapcode links
function insertMessageCapcodeLink(p2000MessageId, capcodeId, connection, docSequence, isNum, endNum, capcodeInsertedCallback){ //if(debug) console.log('Item: ' + isNum + ', ' + endNum); // Check if the link between the message and the capcode already exists var query = connection.query('SELECT * FROM message_has_ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert(message, callback, parentId){//callback takes one arg, returns true or false whether or not it all worked out\n//we're going to have a static parentId right now - we'll make code to get a list of all parent id's later, but a parentId at the moment is like a table\n\ttry {\n\t\tmessage = JSON.parse(...
[ "0.5681079", "0.55925876", "0.55900985", "0.53960776", "0.5381172", "0.5163788", "0.5122353", "0.5122353", "0.5122353", "0.5074432", "0.5074432", "0.5066862", "0.50157124", "0.50156593", "0.5011792", "0.49990618", "0.49904016", "0.4977917", "0.49644953", "0.49574193", "0.4949...
0.70640737
0
Function to find a number in a row
function findInRow(num, puzzle, row){ let isInRow = false; let arr = puzzle[row]; for(let i=0; i<9; i++){ if(arr[i] == num){ isInRow = true; i = 9; } } return isInRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rowLookup(sheet, value, column) {\n var columnValues = sheet.getRange(1,column,sheet.getLastRow()).getValues();\n for (var i=0; i<columnValues.length; i++) {\n if (columnValues[i] == value) {\n var rowNum = i+1;\n return rowNum;\n }\n }\n return columnValues;\n}", "function findCell(...
[ "0.7239486", "0.69841915", "0.68201005", "0.6763816", "0.6648429", "0.65651953", "0.654472", "0.6544008", "0.6466306", "0.6458459", "0.6446687", "0.63998324", "0.63938487", "0.6385618", "0.63644683", "0.63580745", "0.6302264", "0.6289286", "0.62789404", "0.62531024", "0.62446...
0.7044373
1
Function to find in which square a set of coordinates is
function whichSquare(coordinates, grid){ // Initialize variable that will hold the square number of the coordinates // Start with invalid value, in case coordinates are incorrect let squareIn; // Create string version of coordinates to look inside each grid let coorStr = JSON.stringify(coordinates); /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSquareByCoords(coords) {\n return squares.find((square) => {\n let box = square.tbox();\n\n return box.x == coords.x && box.y == coords.y;\n });\n }", "function getCoords(square) {\n\tif(String(square).slice(0, 2) == \"sq\") {\n\t\tsquare = square.substr(2);\n\t...
[ "0.6990073", "0.67498237", "0.6666758", "0.65977305", "0.65512", "0.64050436", "0.63898057", "0.63767904", "0.63201326", "0.628328", "0.6266679", "0.62365675", "0.62339616", "0.6197791", "0.6188135", "0.6168718", "0.6149515", "0.61364967", "0.6120922", "0.6100401", "0.6036473...
0.74361604
0
Function to find a number in a square
function findInSquare(num, square, puzzle){ let isInSquare = false; let x; let y; let numInSquare; for(let i=0; i<3; i++){ for(let j=0; j<3; j++){ x = square[i][j][0]; y = square[i][j][1]; numInSquare = puzzle[x][y]; if(numInSquare == num){ isInSqu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function squareofNumber(square) {\n return square*square;\n }", "function findNextSquare(sq) {\n console.log(sq)\n function isSquare(n){\n return n > 0 && Math.sqrt(n) % 1 === 0\n };\n\n if(!isSquare(sq)){\n return -1;\n }\n\n var nextSq = sq+1;\n for (var i = nextSq; i <= nextSq*2; i++ ){\...
[ "0.73079324", "0.72230947", "0.7176771", "0.70075196", "0.69135785", "0.69076836", "0.67800826", "0.67799795", "0.67703533", "0.6756665", "0.6746574", "0.6730681", "0.67269844", "0.670565", "0.6601436", "0.6567445", "0.6561555", "0.65431476", "0.6526155", "0.6512594", "0.6508...
0.7372516
0
Function to create a Sudoku grill, based on the starting coordinates
function createGrid(startX, startY){ let x = startX; let y; let finalArr = []; let tempArr = []; for(let i=0; i<3; i++){ y = startY; tempArr = []; for(let j=0; j<3; j++){ let coor = [x, y]; tempArr.push(coor); y++; } x++; finalArr.push(tempArr); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setInitialCoordinates(gridNum){\n let startCoordinates = []; \n switch(gridNum){\n case 1:\n startCoordinates = [0,0];\n break;\n case 2:\n startCoordinates = [0,3];\n break;\n case 3:\n startCoordinates = [0,6];\n break; \n case 4:\n startCoordinates = [...
[ "0.6490576", "0.64245826", "0.641587", "0.6408018", "0.6387811", "0.6383517", "0.6321487", "0.62994605", "0.6213755", "0.61848915", "0.6140876", "0.6139265", "0.6128086", "0.6097927", "0.60972303", "0.6072089", "0.6056622", "0.6048926", "0.60345465", "0.6023479", "0.60228556"...
0.64742285
1
Function to set the initial coordinates for each square in a Sudoku puzzle
function setInitialCoordinates(gridNum){ let startCoordinates = []; switch(gridNum){ case 1: startCoordinates = [0,0]; break; case 2: startCoordinates = [0,3]; break; case 3: startCoordinates = [0,6]; break; case 4: startCoordinates = [3,0]; break;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initial() {\n //add sets for empty cell\n for (let i = 0; i < 9; i++) {\n solved[i] = [];\n for (let j = 0; j < 9; j++) {\n solved[i][j] = matrix[i][j];\n if (solved[i][j] == 0)\n solved[i][j] = new Set([1, 2, 3, 4, 5, 6,...
[ "0.6772188", "0.65560126", "0.65387833", "0.65228677", "0.6497095", "0.64753664", "0.6380832", "0.6379935", "0.63769674", "0.63647705", "0.63211304", "0.6304657", "0.63032395", "0.6278337", "0.62709886", "0.621594", "0.61980915", "0.61578214", "0.6153446", "0.61189884", "0.61...
0.69070756
0
Smalltalk package creation. To add a Package, use smalltalk.addPackage()
function pkg(spec) { var that = new SmalltalkPackage(); that.pkgName = spec.pkgName; that.properties = spec.properties || {}; return that; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pkg(spec) {\n\t\tvar that = new SmalltalkPackage();\n\t\tthat.pkgName = spec.pkgName;\n\t\tthat.properties = spec.properties || {};\n\t\treturn that;\n\t}", "function kawiCreateKawiPackage() {\n kawiPackage = getKawi().generateKawiPack();\n \n //Evaluar resultado obtenido del applet\n ...
[ "0.7296538", "0.58954126", "0.5885547", "0.5726345", "0.57234055", "0.56195915", "0.5449755", "0.54483354", "0.5369315", "0.53474706", "0.5335729", "0.5309027", "0.5308096", "0.5285315", "0.5280279", "0.5245952", "0.52343667", "0.51857316", "0.51709336", "0.5164465", "0.51598...
0.7361055
0
Handles dnu: and JavaScript method calls. if the receiver has no klass, we consider it a JS object (outside of the Amber system). Else assume that the receiver understands doesNotUnderstand:
function messageNotUnderstood(receiver, selector, args) { /* Handles JS method calls. */ if(receiver.klass === undefined || receiver.allowJavaScriptCalls) { return callJavaScriptMethod(receiver, selector, args); } /* Handles not understood messages. Also see the Amber counter-part Object>>doesNotUnder...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _isVjoType(clz,excludeMixin) {\r\n\t\tif (clz && clz.vj$ && clz.vj$._vjType) {\r\n\t\t\tif (_isFn(clz)) return true;\r\n\t\t\telse if (clz.vj$._vjType === 'mtype' && !excludeMixin) return true\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function c(e){return null!==e&&\"object\"==typeof e}", "function NilC...
[ "0.53587705", "0.5259862", "0.51982325", "0.51982325", "0.51982325", "0.51982325", "0.5147419", "0.5129195", "0.51023877", "0.50508595", "0.5030753", "0.5023563", "0.49864438", "0.49860007", "0.49845055", "0.4956519", "0.49453524", "0.49308753", "0.4929889", "0.4926165", "0.4...
0.55662155
1
Call a method of a JS object, or answer a property if it exists. Else try wrapping a JSObjectProxy around the receiver. If the object property is a function, then call it, except if it starts with an uppercase character (we probably want to answer the function itself in this case and send it new from Amber). Converts k...
function callJavaScriptMethod(receiver, selector, args) { var jsSelector = selector._asJavaScriptSelector(); var jsProperty = receiver[jsSelector]; if(typeof jsProperty === "function" && !/^[A-Z]/.test(jsSelector)) { return jsProperty.apply(receiver, args); } else if(jsProperty !== undefined) { if(args[0]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callGetter(obj, propertyName) {\n if(language == 'objc') {\n return obj[propertyName];\n } else if(language == 'cs') {\n propertyName = propertyName.charAt(0).toUpperCase() + propertyName.slice(1);\n return obj[propertyName];\n }\n // Else, call a getter function\n var ...
[ "0.5696462", "0.5685066", "0.5602916", "0.53501177", "0.52355695", "0.50021154", "0.48879406", "0.48793805", "0.47323772", "0.4708307", "0.47078288", "0.46788707", "0.46697304", "0.46597353", "0.46597353", "0.46597353", "0.46218497", "0.46207052", "0.46024948", "0.4599764", "...
0.63763386
1
Operate in Strict mode such that variables must be declared before used! / InteractiveBound takes a renderableObj (which had better be a TextureRenderable)
function InteractiveBound(renderableObj, moveBounds = [], reportObject = null ) { InteractiveObject.call(this, renderableObj); this.mWidth = 15; this.mHeight = 15; this.mDrawClones = false; this.mMoveBounds = moveBounds; this.mReportObject = reportObject; this.mClones = []; this.mMarkers...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InteractiveBound(bTexture) {\n // Set up texture renderable for interactive bound\n TextureRenderable.call(this, bTexture);\n Renderable.prototype._setShader.call(this, gEngine.DefaultResources.getSpriteShader());\n}", "function ObjectOrientedRenderer3(){}", "renderObject(o:IRenderable, since...
[ "0.6757961", "0.5877348", "0.5838046", "0.5678609", "0.5678609", "0.5678609", "0.5596952", "0.5492405", "0.5492405", "0.5487912", "0.5435988", "0.5414279", "0.53635997", "0.5342135", "0.53413504", "0.53413504", "0.53413504", "0.53413504", "0.52966684", "0.5254912", "0.5218901...
0.610316
1
Increment a repeating event
incrementRepeating(event) { event.count++; // the web audio spec doesn't allow buffer source nodes to be reused const dummySource = this.audioCtx.createBufferSource(); dummySource.buffer = event.source.buffer; dummySource.connect(this.audioCtx.destination); dummySource.onended = () => { ev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "increment() {\n this.counter += 2;\n this.clicks++;\n }", "onInc() {\n this.count++;\n }", "function increment(){\n\t\tsetCount(prevCount=>prevCount+1)\n\t}", "function create_incremental_event(counter) {\n var event = create_base_event(counter);\n event.type = \"inc\";\n return event;\n}...
[ "0.6982755", "0.67178535", "0.6678453", "0.6520478", "0.64507854", "0.6426336", "0.6375008", "0.63447464", "0.63221896", "0.6304296", "0.62962383", "0.62864727", "0.62805516", "0.6261473", "0.62367785", "0.6216679", "0.6210249", "0.6125666", "0.61218685", "0.61035097", "0.610...
0.7517846
0