Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
update the legend with the corresponding visual type
function updateLegend(value) { let legendContainer = document.getElementById("collapseOne"); // create a color scale let legendContent = ""; let feature = roadDevelopment.toGeoJSON().features[0]; if(value == "status") { legendContent = getLegendContent(status, feature, "status", value);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function legend(types){\n\n //color guide\n colors[c].setAlpha(20);\n fill(colors[c]);\n colors[c].setAlpha(255);\n stroke(colors[c]);\n ellipse(width-40, h,20,20);\n\n //text\n fill('black');\n noStroke();\n text(types, width-60,h+5);\n c++;\n h+=25;\n}", "function displayCol...
[ "0.6844809", "0.67578787", "0.66393644", "0.66320056", "0.6460328", "0.64330745", "0.63878405", "0.6364604", "0.62860686", "0.62677795", "0.6264101", "0.62350273", "0.6147356", "0.61272544", "0.61165845", "0.61154795", "0.61065155", "0.6074302", "0.60736334", "0.6064399", "0....
0.6059908
20
funcion para validar los registros ingresados en el formulario
function validar() { // incio de validaci�n de espacios nulos if(document.registro.nombre.value.length==0) { alert("El nombre necesario"); document.registro.nombre.focus(); return 0; } if(document.registro.apellido.value.length==0) { alert("El apellido es necesario"); document...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validarFormulario(){\n var flagValidar = true;\n var flagValidarRequisito = true;\n\n if(txtCrben_num_doc_identific.getValue() == null || txtCrben_num_doc_identific.getValue().trim().length ==0){\n txtCrben_num_doc_identific.markInvalid('Establezca el numero de documento, p...
[ "0.7780708", "0.73891914", "0.73323995", "0.7292465", "0.72768724", "0.71497834", "0.7122191", "0.71212393", "0.7090104", "0.70774513", "0.70718926", "0.6969548", "0.6958392", "0.69293386", "0.69244885", "0.6913222", "0.69116396", "0.69065845", "0.68913424", "0.6882677", "0.6...
0.72534895
5
O(1) time | O(1) space
insertKeyValuePair(key, value) { if (!(key in this.cache)) { if (this.currentSize === this.maxSize) { this.evictLeastRecent(); } else { this.currentSize++; } this.cache[key] = new DoublyLinkedListNode(key, value); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "a (a a = 0; a < a.a; ++a) {N\n a a = a[a];N\n a (a.a == a) {N\n a a = aAaAaAa(a, a.a);N\n a (!a) a.a = aAa;N\n a a (aAa) a.a = a.a == a ? a : a.a + a;N\n }N\n }", "function example2(input) {\n let a = 5; // O(1)\n let b = 10; // O(1)\n let c = 50; // O(1)\n...
[ "0.58963597", "0.5773009", "0.56997454", "0.5678217", "0.5632634", "0.55526686", "0.5529421", "0.55288666", "0.55260557", "0.5502768", "0.54840946", "0.54433763", "0.5439919", "0.541413", "0.5363272", "0.5361449", "0.53528523", "0.5347562", "0.5334384", "0.5325698", "0.532474...
0.0
-1
O(1) time | O(1) space
getValueFromKey(key) { if (!(key in this.cache)) return null; this.updateMostRecent(this.cache[key]); return this.cache[key].value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "a (a a = 0; a < a.a; ++a) {N\n a a = a[a];N\n a (a.a == a) {N\n a a = aAaAaAa(a, a.a);N\n a (!a) a.a = aAa;N\n a a (aAa) a.a = a.a == a ? a : a.a + a;N\n }N\n }", "function example2(input) {\n let a = 5; // O(1)\n let b = 10; // O(1)\n let c = 50; // O(1)\n...
[ "0.5896532", "0.5772888", "0.56994814", "0.5679278", "0.56334513", "0.555237", "0.55305433", "0.5527666", "0.5527356", "0.55027413", "0.5485202", "0.5443168", "0.54402065", "0.54148716", "0.5362729", "0.5361359", "0.53531194", "0.5347456", "0.5335589", "0.5326401", "0.5325374...
0.0
-1
O(1) time | O(1) space
getMostRecentKey() { return this.listOfMostRecent.head.key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "a (a a = 0; a < a.a; ++a) {N\n a a = a[a];N\n a (a.a == a) {N\n a a = aAaAaAa(a, a.a);N\n a (!a) a.a = aAa;N\n a a (aAa) a.a = a.a == a ? a : a.a + a;N\n }N\n }", "function example2(input) {\n let a = 5; // O(1)\n let b = 10; // O(1)\n let c = 50; // O(1)\n...
[ "0.5896532", "0.5772888", "0.56994814", "0.5679278", "0.56334513", "0.555237", "0.55305433", "0.5527666", "0.5527356", "0.55027413", "0.5485202", "0.5443168", "0.54402065", "0.54148716", "0.5362729", "0.5361359", "0.53531194", "0.5347456", "0.5335589", "0.5326401", "0.5325374...
0.0
-1
optimized for a situation where an array is NEARLY sorted already. if an array is already sorted after a few iterations, no need ot keep going.
function optimized(array) { let noSwaps; for (let i = array.length; i > 0; i--) { noSwaps = true; for (let j = 0; j < i - 1; j++) { if (array[j] > array[j + 1]) { swap(array, j, j + 1); noSwaps = false; } } if (noSwaps) break; } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sort() {\n let a = this.array;\n const step = 1;\n let compares = 0;\n for (let i = 0; i < a.length; i++) {\n let tmp = a[i];\n for (var j = i; j >= step; j -= step) {\n this.store(step, i, j, tmp, compares);\n compares++;\n if (a[j - step] > tmp) {\n a[j] = a[j ...
[ "0.7239428", "0.7152367", "0.7111647", "0.7063362", "0.7019022", "0.6935939", "0.6855298", "0.6845212", "0.683609", "0.68279815", "0.67228496", "0.6708787", "0.6646946", "0.66445386", "0.6637366", "0.6598989", "0.6588099", "0.65729445", "0.65609324", "0.65296215", "0.65115845...
0.73683107
0
define the function init the variables for the data
function initData() { sensorTypes = {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initData() {\n initLtr_factor();\n initBosunit();\n initHero();\n initSelect25();\n initMS();\n}", "function initValues(){\n}", "function initData(){\n dynarexDataIsland.init();\n loadFunctionTimes();\n setEventListener();\n}", "function var_init() {\n function makeCalcVars(sizeFe...
[ "0.7627249", "0.70823383", "0.7033934", "0.70273155", "0.69545424", "0.6743981", "0.66507673", "0.6636795", "0.65980947", "0.6530505", "0.6493658", "0.6476729", "0.6475092", "0.64043105", "0.63946295", "0.63946295", "0.6389219", "0.63561726", "0.63172245", "0.63138354", "0.63...
0.60564595
52
10s get last time
function getSensorLastTime(timeKey) { if(!sensorID) { console.log('The sensor key is not gotten.'); } var categoryName = categories[0]; var categoryRef = db.ref(`/${SENSORDATA_TABLE}/${categoryName}/${sensorID}/series`); categoryRef.orderByChild('timestamp').limitToLast(1).once("value", function(snapshot) { sn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currTime(){\n let timeout = new Date();\n return timeout.toString();\n}", "function getTimeSinceLastRead() {\n if (lastSync == null) {\n return \"\";\n } else {\n var date = Date.now();\n return timeDifference(date, lastSync);\n }\n}", "function gettime() {\n //r...
[ "0.694904", "0.68758506", "0.68016297", "0.6774451", "0.6730998", "0.67131805", "0.6702831", "0.6702831", "0.66859066", "0.666943", "0.66481614", "0.66260934", "0.6623832", "0.6565186", "0.65301204", "0.65212375", "0.650168", "0.64989763", "0.64751786", "0.64667743", "0.64642...
0.0
-1
get the firebase data
function getFirebaseData() { // get sensorTypes getSensorsRef.orderByChild("serialNumber").equalTo(serialNumber).once("value", function(snapshot) { var sensorData = snapshot.val(); if(sensorData) { for (var key in sensorData) { sensorID = key; sensorTypeID = sensorData[sensorID]['sensorTypeId']; s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get() {\r\n database.ref('test/' + dev_name).on('value', function(snapshot) {\r\n var data = snapshot.val();\r\n console.log(data);\r\n console.log(data.siteName);\r\n console.log(data.developer);\r\n console.log(data.testNumber);\r\n console.log(data.lSitLangu...
[ "0.7369583", "0.7331226", "0.72101384", "0.7187341", "0.7178806", "0.7102275", "0.7030622", "0.70058393", "0.69830734", "0.6963241", "0.6925252", "0.6899609", "0.6850683", "0.6826986", "0.6820529", "0.6801981", "0.6796384", "0.6774565", "0.6745369", "0.6744054", "0.6728506", ...
0.64618367
34
send the sensor data to the firebase
function sendProgressData() { currentModalType = 0; // if(currentModalType) { var listenerSensorDeviceRef = db.ref(`/${SENSORCONFIGS_TABLE}/${sensorID}/${currentModalType}`); listenerSensorDeviceRef.update({ runNumber: 1, stepNumber: 1, runProgressPercent: 1, stepProgressPercent: 1, stepTotalTime: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendToFirebase() {\n dataRef.ref().push({\n\n trainName: trainName,\n destination: destination,\n firstTime: firstTime,\n frequency: frequency,\n tMinutesTillTrain: tMinutesTillTrain,\n nextTrainTime: nextTrainTime,\n date...
[ "0.8131074", "0.8014038", "0.7109165", "0.70306826", "0.682984", "0.67779654", "0.6683725", "0.64592177", "0.6457688", "0.64486265", "0.6442165", "0.6394561", "0.6360005", "0.628713", "0.6257047", "0.6242758", "0.6227607", "0.61794275", "0.6154235", "0.6133399", "0.61258554",...
0.555503
88
update csv url field of the firebase
function updateAnalyticalDataPath(path, storageUrl, fileSize) { getServerTime(); // var sensorCsvRef = db.ref(`/${RAWDATA_TABLE}/${sensorID}`); // sensorCsvRef.push({ // timestamp: admin.database.ServerValue.TIMESTAMP, // storagePath: path, // storageUrl: storageUrl, // fileSize: fileSize, // stepType: 'Sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSensorCsvPath(path, storageUrl, fileSize) {\n\tgetServerTime();\n\t// var sensorCsvRef = db.ref(`/${RAWDATA_TABLE}/${sensorID}`);\n\t// sensorCsvRef.push({\n\t// \ttimestamp: admin.database.ServerValue.TIMESTAMP,\n\t// \tstoragePath: path,\n\t// \tstorageUrl: storageUrl,\n\t// \tfileSize: fileSize,\...
[ "0.64955556", "0.6200983", "0.6099137", "0.60410684", "0.5852328", "0.584925", "0.5746406", "0.57146347", "0.5561724", "0.5423229", "0.5419859", "0.5403221", "0.54012454", "0.5308625", "0.5273344", "0.52477413", "0.52220756", "0.52128977", "0.51532006", "0.5141549", "0.513218...
0.5991426
4
upload csv file to the firebase storage
function uploadCSV() { var csv_file_path = './test.csv.gz'; gServerTime = admin.database.ServerValue.TIMESTAMP; const fileMime = mime.lookup(csv_file_path); var csv_file_name = path.basename(csv_file_path); var uploadTo = path.join(SENSORSTORAGES_TABLE, sensorCustomerID, sensorZoneID, sensorID, csv_file_name); co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uploadDealcsv() { }", "function createFile(){\n\n var reader = new FileReader();\n \n reader.readAsDataURL(blob)\n\n reader.onloadend = function () {\n\n var base64String = reader.result;\n\n // Remove the additional data at the front of the string\n\n ...
[ "0.70864666", "0.6412542", "0.63053954", "0.61854106", "0.6181541", "0.60704106", "0.6062957", "0.60605705", "0.6042", "0.60219145", "0.59990776", "0.5996304", "0.5991806", "0.59757465", "0.5943389", "0.5934994", "0.5931722", "0.5919915", "0.59017164", "0.5896043", "0.5882718...
0.7571525
0
upload debug file to the firebase storage
function clearDebug() { var promise = new Promise(function(resolve, reject) { db.ref(`/${DEBUG_DATA_TABLE}/${sensorID}`).once("value", function(debug) { var debugFileList = debug.val(); var promises = []; if(debugFileList) { for (key in debugFileList) { if(debugFileList[key] && debugFileList[ke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uploadFile(){\n\t\nvar filename = selectedFile.name;\n\nvar storageRef = firebase.storage().ref('/images/' + filename);\n\nvar uploadTask = storageRef.put(selectedFile);\n\nuploadTask.on('state_changed',function(snapshot){\n\n},function(error){\n\n},function() {\n // Handle successful uploads on complete...
[ "0.6954052", "0.67957014", "0.6752039", "0.6676497", "0.65986276", "0.6595325", "0.6595325", "0.6568596", "0.65635794", "0.65464747", "0.65114796", "0.64820457", "0.64794743", "0.6461166", "0.6458107", "0.6439833", "0.6418849", "0.6346277", "0.6343245", "0.6337678", "0.633270...
0.0
-1
get the csv file url for download
function createPublicFileURL(storageName) { return `http://storage.googleapis.com/${bucketName}/${encodeURIComponent(storageName)}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function downloadCSVFile(){\r\n\tlet data = getTableData();\r\n\r\n\t// Build the actual content of the csv file\r\n\tlet csv = buildCSVString(data);\r\n\r\n\t// Create the file and initiate the download\r\n\tlet downloadLink = buildDownloadLink(csv);\r\n\r\n\t// Force the client (the users browser) to click our h...
[ "0.74357545", "0.7362606", "0.7142768", "0.7026361", "0.7011918", "0.6913856", "0.68556786", "0.6844354", "0.6820098", "0.68112856", "0.68098056", "0.6782969", "0.67366856", "0.66980886", "0.6695947", "0.6634617", "0.65253747", "0.65242344", "0.65109485", "0.6428795", "0.6415...
0.0
-1
update csv url field of the firebase
function updateSensorCsvPath(path, storageUrl, fileSize) { getServerTime(); // var sensorCsvRef = db.ref(`/${RAWDATA_TABLE}/${sensorID}`); // sensorCsvRef.push({ // timestamp: admin.database.ServerValue.TIMESTAMP, // storagePath: path, // storageUrl: storageUrl, // fileSize: fileSize, // stepType: 'Samplin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateCSV(data) {\n if (this.anchor.href) window.URL.revokeObjectURL(this.anchor.href);\n this.csv = Papa.unparse(\n { fields: [\"name\", \"description\", \"score\"], data: data.sorted },\n paramExportCSV\n );\n const blob = new Blob([this.csv], { type: \"text/csv\" }),\n url = window.UR...
[ "0.6200983", "0.6099137", "0.60410684", "0.5991426", "0.5852328", "0.584925", "0.5746406", "0.57146347", "0.5561724", "0.5423229", "0.5419859", "0.5403221", "0.54012454", "0.5308625", "0.5273344", "0.52477413", "0.52220756", "0.52128977", "0.51532006", "0.5141549", "0.5132186...
0.64955556
0
set local variable back end data
function setSensorCategories(sensorTypeData) { if(!sensorTypeData) { writeLog('The sensorType data is not existed'); return; } for(var i=0; i<categories.length; i++) { var categoryName = categories[i]; if(sensorTypeData.hasOwnProperty(categoryName)) { sensorTypes[categoryName] = sensorTypeData[categoryN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setData() {}", "function setData (jsonData) { //we create a function to call later when the data is retrieved from the server in a new variable\n data = jsonData; // this is also called deserializing our JSON\n console.log(data);\n}", "set data(val) {\n this._data = val;\n }", "set(data) {\n ...
[ "0.6529307", "0.6462941", "0.64401853", "0.6342643", "0.62661034", "0.6138284", "0.6132692", "0.6114555", "0.6087379", "0.60327", "0.6028693", "0.5998975", "0.592386", "0.59053135", "0.5899487", "0.58963686", "0.58948594", "0.5870359", "0.5841717", "0.5833886", "0.58203274", ...
0.0
-1
write the error log to the log.txt
function writeLog(txt) { var dt = dateTime.create(); var log = dt.format('Y-m-d H:M:S'); log += '\n'; log += txt; log += '\n'; fs.appendFileSync('log.txt', log); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logErr(err) {\n\tlet d = new Date();\n\tlet errMsg = \"error occurred at \" + d + \": \" + err;\n\tfs.appendFileSync(\"Error_Log.txt\", errMsg, \"utf8\");\n}", "function logErr(err) {\n\tfs.appendFile('botErrors.log',err,function(err) {\n\t\tif (err) console.log(\"Error recording error: \",err);\n\t\tel...
[ "0.74946725", "0.7274442", "0.70160204", "0.69777477", "0.6939192", "0.68285364", "0.6617986", "0.638578", "0.63369715", "0.6308461", "0.6298517", "0.6282417", "0.62697256", "0.62484264", "0.6227945", "0.6227082", "0.62233835", "0.6215648", "0.6169883", "0.6116521", "0.610340...
0.66356844
6
send the sensor data to the firebase
function sendSensorData() { var basicData = []; // status basic data basicData[0] = { 'Status1': 'Normal', 'Power1': 'On', 'Voltage level1': 'Check', 'Temp1 (F)': 24.22, 'Humidity level1 (%)': 9, 'Barometer1 (in)': 100, 'Barometer1 (mb)': 8, 'Pump status1': 'Stopped', 'Last sample at1': '2017-4-17...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendToFirebase() {\n dataRef.ref().push({\n\n trainName: trainName,\n destination: destination,\n firstTime: firstTime,\n frequency: frequency,\n tMinutesTillTrain: tMinutesTillTrain,\n nextTrainTime: nextTrainTime,\n date...
[ "0.8131074", "0.8014038", "0.7109165", "0.70306826", "0.682984", "0.67779654", "0.6683725", "0.64592177", "0.6457688", "0.64486265", "0.6442165", "0.6394561", "0.6360005", "0.628713", "0.6257047", "0.6242758", "0.6227607", "0.61794275", "0.6154235", "0.6133399", "0.61258554",...
0.555222
89
check if the input value is followed by the template value type
function checkValueType(value, valueStructure) { if(valueStructure && valueStructure.hasOwnProperty('valueType')) { var result = false; switch(valueStructure['valueType']) { case valueTypes[0]: // option if(valueStructure.hasOwnProperty('defaultValue') && valueStructure['defaultValue'].length > 0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canUseAsIs(valueType) {\n return valueType === \"string\" ||\n valueType === \"boolean\" ||\n valueType === \"number\" ||\n valueType === \"json\" ||\n valueType === \"math\" ||\n valueType === \"regexp\" ||\n value...
[ "0.66646236", "0.63535607", "0.6321838", "0.6307817", "0.6278044", "0.6241317", "0.62410027", "0.6232016", "0.62281436", "0.62145466", "0.62137264", "0.61811703", "0.6176179", "0.6176179", "0.6176179", "0.61402076", "0.6134875", "0.61177295", "0.61177295", "0.61010635", "0.60...
0.6192748
11
get the sensor data field id with the name / params name: name value: data value template: field structure return id if id is existed for the value, null if not
function getTemplateID(name, value, template) { if(template && template.length > 0) { for(var i=0; i<template.length; i++) { if(name == template[i]['id']) { var result = checkValueType(value, template[i]); if(result) { return template[i]['id']; } else { return null; } } } } else {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _value_id(field_name, id) {\n return 'v' + id + '_' + field_name;\n}", "getById(id) {\r\n const f = new Field(this);\r\n f.concat(`('${id}')`);\r\n return f;\r\n }", "function getId(ele){\t// store the id value\r\n id_value = ele.id; \r\n}", "function ppom_get_field_met...
[ "0.7112298", "0.63188446", "0.578865", "0.5746341", "0.5712111", "0.56244546", "0.56214327", "0.55927366", "0.55540943", "0.5521438", "0.55204874", "0.5507364", "0.5503411", "0.54766935", "0.5432791", "0.5400064", "0.53646547", "0.5350519", "0.53299326", "0.53179914", "0.5293...
0.6201139
2
get primary id in the sensor type fields / params heads: params return primary key id
function getPrimaryID(heads) { if(heads && heads.length > 0) { for(var i=0; i<heads.length; i++) { if(heads[i].hasOwnProperty('primaryKey') && heads[i]['primaryKey']) { if(heads[i].hasOwnProperty('id')) { return heads[i]['id']; } else { writeLog('id is not existed.'); return null; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get primaryId() {\n return this.table.primary || DEFAULT_PRIMARY_ID;\n }", "getPrimaryKey ({ collections }, tableName) {\n let definition = collections[tableName].definition\n\n if (!definition._pk) {\n let pk = _.findKey(definition, (attr, name) => {\n return attr.primaryKey === true...
[ "0.652257", "0.61104065", "0.588628", "0.5831376", "0.57848424", "0.57285625", "0.57283175", "0.5716863", "0.56924194", "0.5642424", "0.56300706", "0.56197673", "0.55843383", "0.55720556", "0.5563781", "0.5560487", "0.550579", "0.55011284", "0.5499653", "0.5486495", "0.548538...
0.6066068
2
change the name keys to id ones / params data: the data should be sent to sensorData's category template: sensor category's template structure type: true if heads property is existed, false if not
function changeRowFieldKeys(data, template, type) { var changedData = {}; if(type) { // heads is existed var primaryKeyID = getPrimaryID(template['heads']); if(!primaryKeyID) { return; } for (rowKey in data ) { // rows var rowData = {}; for (headKey in data[rowKey] ) { // rows var headId = getT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dataTreatment(){\n\tconsole.log(\"New data. Weeeeee!\");\n\tvar name, status, data;\n\tObject.keys(tefDevicesData).forEach(function (key){\n\t\tconsole.log(key);\n\t\tconsole.log(JSON.stringify(tefDevicesData[key].deviceInfo));\n\t\tif(tefDevicesData[key].deviceInfo.deviceType == \"MultiSensor\"){\n\t\t\t...
[ "0.58599806", "0.56088215", "0.5419447", "0.54137087", "0.53683937", "0.5241774", "0.5184227", "0.51700693", "0.51630425", "0.5091002", "0.508536", "0.50320077", "0.5016878", "0.5005023", "0.4994154", "0.49790815", "0.4972774", "0.49632025", "0.49584347", "0.49310747", "0.492...
0.47533998
41
change the name to the id / params data: basic data of the sensor template: sensor field template return the data which is changed the name field to the id one
function changeHeadFieldKeys(data, template) { var primaryKeyID = getPrimaryID(template); if(!primaryKeyID) { return; } var changedData = {}; for (key in data ) { var id = getTemplateID(key, data[key], template); if(id) { changedData[id] = data[key]; } } changedData[primaryKeyID] = 'primaryKey';...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_name_and_id(element,value){\n input_value = element.value;\n element.value = input_value.replace(/ #.*$/,'');\n $(element.id.replace(/_names$/,'_ids')).value +=\n input_value.replace(/^.*#/,'') + ', ';\n}", "function changeNameDataStream(elem)\n{\n var id=elem.id;\n id=id.replace(/ |i...
[ "0.60910296", "0.59155345", "0.5852306", "0.5798364", "0.57469755", "0.5726523", "0.5657402", "0.55777043", "0.5547351", "0.55222934", "0.55207384", "0.5493622", "0.54585975", "0.54528886", "0.54476315", "0.5445073", "0.54248184", "0.541874", "0.5409754", "0.5393969", "0.5375...
0.49569097
89
get real data to send to the firebase with the basic sensor data / params value: basic data of the sensor categoryTemplate: category template return real data to send to the firebase
function getSendValue(value, categoryTemplate) { var result; if(categoryTemplate.hasOwnProperty('tableType')) { if(categoryTemplate['tableType'] === tableTypes[0]) { //row-header type if(categoryTemplate.hasOwnProperty('heads') && categoryTemplate['heads']) { result = changeRowFieldKeys(value, categoryTempl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFirebaseData() {\n\t// get sensorTypes\n\tgetSensorsRef.orderByChild(\"serialNumber\").equalTo(serialNumber).once(\"value\", function(snapshot) {\n\t\tvar sensorData = snapshot.val();\n\n\t\tif(sensorData) {\n\t\t\tfor (var key in sensorData) {\n\t\t\t\tsensorID = key;\n\t\t\t\tsensorTypeID = sensorDat...
[ "0.67253244", "0.6094705", "0.57290685", "0.56892425", "0.5666443", "0.56220806", "0.5612104", "0.55743307", "0.5509902", "0.5482769", "0.54600304", "0.54118687", "0.5401676", "0.5397469", "0.538797", "0.53821826", "0.5338335", "0.5332391", "0.52497154", "0.52444077", "0.5241...
0.0
-1
send real category data to the firebase for saving / params basicData: basic data which sensor get through device categoryID: 0: status, 1: vocAnalytics, 2: vocRaw, 3: processedData, 4: debug
function sendCategory(basicData, categoryID) { var categoryName = categories[categoryID]; var sendValue; if(sensorTypes.hasOwnProperty(categoryName)) { var categoryTemplate = sensorTypes[categoryName]; sendValue = getSendValue(basicData, categoryTemplate); } else { writeLog(`${categoryName} property is not e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendSensorData() {\n\tvar basicData = [];\n\n\t// status basic data\n\tbasicData[0] = {\n\t\t'Status1': 'Normal',\n\t\t'Power1': 'On',\n\t\t'Voltage level1': 'Check',\n\t\t'Temp1 (F)': 24.22,\n\t\t'Humidity level1 (%)': 9,\n\t\t'Barometer1 (in)': 100,\n\t\t'Barometer1 (mb)': 8,\n\t\t'Pump status1': 'Stopp...
[ "0.6150161", "0.58594114", "0.56845653", "0.5572353", "0.549958", "0.5381906", "0.53794605", "0.5341962", "0.5333886", "0.5318851", "0.5255085", "0.52343285", "0.52248764", "0.52011836", "0.5167374", "0.5159126", "0.51271594", "0.50965166", "0.50887674", "0.50605184", "0.5036...
0.7311873
0
fade nonhighlighted nodes and links
function fade(opacity) { return d => { node.style('stroke-opacity', function (o) { var thisOpacity = isConnected(d, o) ? 1 : opacity; this.setAttribute('fill-opacity', thisOpacity); return thisOpacity; }); li...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fadeUnConnected(g){\n\t\t\t\tvar thisLink = links2.selectAll(\".link\");\n\t\t\t\tthisLink.filter(function(d){ return d.source !==g && d.target !== g; })\n\t\t\t\t\t.transition()\n\t\t\t\t\t\t.duration(500)\n\t\t\t\t\t\t.style(\"opacity\", 0.05);\n\t\t\t}", "function fadeUnConnected(g){\n\t\t\t\tvar thi...
[ "0.64721197", "0.6463635", "0.6288334", "0.6250026", "0.6235494", "0.6147643", "0.60578954", "0.6047325", "0.60018104", "0.5989762", "0.5983014", "0.5927616", "0.59060484", "0.59059536", "0.5889064", "0.5888175", "0.5862085", "0.58412284", "0.5824847", "0.5813348", "0.5805343...
0.61331725
6
zoom in out functions
function zoom_actions(){ g.attr("transform", d3.event.transform) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "zoomOut () {}", "zoomIn () {}", "zoomOut() {\n this.zoom *= 0.8;\n }", "zoomIn() {\n this.zoom *= 1.25;\n }", "zoomIn(x, y){ return this.zoom(x, y, this.Scale.current + this.Scale.factor) }", "function zoomIn(){\n $(this).off('click', zoomIn);\n $(this).off('mouseove...
[ "0.8740835", "0.856025", "0.81357926", "0.7685426", "0.7612931", "0.75694984", "0.75477034", "0.7458413", "0.72341055", "0.7209767", "0.7186903", "0.71830237", "0.7181311", "0.713424", "0.7111423", "0.7104495", "0.71041876", "0.70899653", "0.7075139", "0.70396197", "0.7012457...
0.69235027
27
The path function take a node of the json as input, and return x and y coordinates of the line to draw for this node.
function path(d) { return d3.line()(dimensions.map(function(p) { return [x(p), y[p](d[p])]; })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getLinePath() {\n const graph = this.graph;\n const width = graph.getWidth();\n const height = graph.getHeight();\n const tl = graph.getPoint({\n x: 0,\n y: 0\n });\n const br = graph.getPoint({\n x: width,\n y: height\n });\n const cell = this.cell;\n const flooX = ...
[ "0.6866219", "0.66087294", "0.6524561", "0.65123963", "0.65123963", "0.6508384", "0.6508384", "0.647139", "0.6462794", "0.6457866", "0.6457866", "0.6456872", "0.6424157", "0.6406251", "0.63971204", "0.6367203", "0.6367203", "0.6358994", "0.6358994", "0.6345159", "0.6345043", ...
0.6480197
7
function that describes how mouseover works
function mouseover(d, position) { svg.classed("active", true); if (position < yCounter.source && position >= 0) { name = "source"; } else { name = "target"; } if (typeof d === "string") { projection.classed("inactive", function(p) { return p[name] !== d; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "e_mouseOver(e)\n\t{\n\n\t}", "function hovering() {\n\n}", "function mouseOver() {\n setMouseOver(true);\n }", "function mouseOver(x, y) {\r\n\t//debugOut(\"mouse over, x=\"+x+\" y=\"+y);\r\n\t\r\n\t//*** Your Code Here\r\n}", "hover() {}", "onMouseOver_() {\n if (this.isOpenable_()) {\n this...
[ "0.7900731", "0.76834774", "0.7630776", "0.7537821", "0.74414265", "0.7351", "0.71657175", "0.71283406", "0.711282", "0.70777303", "0.70719236", "0.7059272", "0.70587045", "0.6999024", "0.6993641", "0.6982314", "0.69688404", "0.6967834", "0.6950893", "0.6949161", "0.6924601",...
0.64164275
84
====================== BARCHART BELOW ======================
function barchart (source1) { var svg = d3.select('svg#barchart') var margin = {top: 20, right: 20, bottom: 150, left: 70}, width = +svg.attr("width") - margin.left - margin.right, height = +svg.attr("height") - margin.top - margin.bottom; var x0 = d3.scaleBand() .rangeRound([0, w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected internal function m252() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "transient private protected internal function m182() {}", "private public function m246() {}", "transient final protected i...
[ "0.6381113", "0.6319148", "0.582954", "0.58024925", "0.57582873", "0.574122", "0.56599015", "0.5562609", "0.5556702", "0.554421", "0.5539058", "0.547501", "0.54433435", "0.53509057", "0.53109825", "0.525467", "0.5243442", "0.52173907", "0.52173907", "0.52173907", "0.52173907"...
0.0
-1
Handle the data returned by LoginServlet
function handleSearchResult(resultDataString) { console.log("handle search response"); console.log(resultDataString) resultDataJson = resultDataString; //resultDataJson = JSON.parse(resultDataString); // Don't need this, jQuery does this for you. console.log(resultDataJson); // If login success, redire...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleLoginResponse(_event) {\n let xhr = _event.target;\n if (xhr.readyState == XMLHttpRequest.DONE) {\n if (xhr.response == \"Login information correct\") {\n console.log(\"Login completed\");\n loadUserPictureOverview();\n }\n ...
[ "0.67710036", "0.67273486", "0.6600515", "0.64485276", "0.64425325", "0.6409441", "0.6351647", "0.63399774", "0.6322016", "0.63172656", "0.6249665", "0.62154037", "0.6174559", "0.6160772", "0.61531883", "0.6114646", "0.6065337", "0.6039461", "0.60302144", "0.6011082", "0.5968...
0.5720616
58
Submit the form content with POST method
function submitForm(formSubmitEvent) { console.log("submit search form"); // Important: disable the default action of submitting the form // which will cause the page to refresh // see jQuery reference for details: https://api.jquery.com/submit/ formSubmitEvent.preventDefault(); jQuery...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formPOST(){\n\n\tthis.submit();\n\n}", "function form_submit()\n {\n /* Get reply form */\n var form = submit_btn.form;\n\n /* The fields we need when do a post */\n var fields = [\"followup\", \"rootid\", \"subject\", \"upfilerename\",\n \"username\", \"passwd\...
[ "0.7653703", "0.7393026", "0.7342635", "0.7323739", "0.7233916", "0.68513834", "0.67519915", "0.6732171", "0.6680481", "0.66108173", "0.6606948", "0.6594353", "0.6571123", "0.6550397", "0.65277034", "0.65268403", "0.65211535", "0.648921", "0.64862275", "0.6483011", "0.6475371...
0.0
-1
This is used for he alt text for images
function addIntroInputSpecial(container, message, data) { // Create the title const pageIntroInput_Title = document.createElement('p'); pageIntroInput_Title.classList.add('html-gen-instruction'); pageIntroInput_Title.innerText = message; // Create the input field const pageIntroInput_Field = d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetAlternateTextOnImages(element) {\n if ($(element).attr('src').length > 0) { //don't show this on the empty license image when we don't know the license yet\n var nameWithoutQueryString = $(element).attr('src').split(\"?\")[0];\n $(element).attr('alt', 'This picture, ' + nameWithoutQuer...
[ "0.7390866", "0.733183", "0.7169982", "0.7002705", "0.69919634", "0.67775106", "0.6728552", "0.6690848", "0.6550307", "0.6443136", "0.631858", "0.629241", "0.6258762", "0.6129235", "0.6115246", "0.6110541", "0.6041363", "0.60365975", "0.6028647", "0.6022253", "0.59946907", ...
0.0
-1
====== Add Resources Button (btnSectionAddInput) ======
function addResourcesInput(e) { e.preventDefault(); // Variables let pageElementContainer; let resourcesCount; let parentArray; /* This is the parentArray */ let pageResourcesInput_div; let pageResourcesInput_btn; let pageResourcesInput_input; let pageResourcesInput_textarea; le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSectionBtn(sectionObj) {\n let sectionButton = document.createElement('button');\n sectionButton.classList.add('btn', 'small-btn');\n sectionButton.id = 'section-button';\n\n if (addedSections.includes(sectionObj.sectionCode)) {\n sectionButton.textContent = '- Remove Section';\n ...
[ "0.61515176", "0.5984071", "0.5982989", "0.58160377", "0.5681092", "0.5628834", "0.5593539", "0.5527611", "0.55188936", "0.5512511", "0.5500401", "0.54797333", "0.5472116", "0.5465272", "0.54596215", "0.5441044", "0.53911656", "0.53874403", "0.53769636", "0.5351203", "0.53338...
0.6169565
0
================== // RESOURCES ================== /================== CHECKPOINT ==================
function createDocumentCheckpoint(e) { e.preventDefault(); /* ===Checkpoint=== */ // Create Section const pageSection = createSection('chapter', 'chapter-new', 'Video & PDF Button'); // Add checkpoint if approved createCheckpointItem(pageSection, e.target); // Create Section End createS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check(){\r\n\t// tracking disabilitato\r\n\t//requires(\"/tracking.js\");\r\n\t\r\n\t// funzione legacy\r\n\t_check();\r\n}", "function check_and_report() {\n \n }", "function checkDataFiles() {\n // TODO set up later\n}", "function test_candu_graphs_datastore_vsphere6() {}", "function ...
[ "0.6006143", "0.5980961", "0.5767887", "0.57399726", "0.57138187", "0.56900847", "0.56799746", "0.56073636", "0.55503327", "0.55005807", "0.5477785", "0.5424383", "0.5418436", "0.5404519", "0.5401336", "0.5386635", "0.5386605", "0.53749275", "0.5343018", "0.5315565", "0.53150...
0.0
-1
================== // CHECKPOINT ================== /================== CHAPTERS (= sections) ================== /====== Add Section Button (btnSectionAddInput) ======
function addSectionInput(e) { e.preventDefault(); addSectionInput_Form(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static addSection(p) {\n if (! p || ! (p.type || p.section)) {\n return;\n }\n\n if (p.index === undefined || p.index < 0 || p.index > this._sections.length) {\n return;\n }\n\n var newSectionJSON = p.section || {\n type: p.type\n };\n\n var newSection = app.ui.SectionFactory.cr...
[ "0.684539", "0.6675268", "0.66204333", "0.6491095", "0.64136976", "0.63515544", "0.63297945", "0.6324345", "0.6294935", "0.6271143", "0.62312275", "0.62222517", "0.62208134", "0.6213673", "0.62024385", "0.6195399", "0.6138216", "0.61038053", "0.60946465", "0.6093237", "0.6067...
0.7059298
0
====== CHAPTER: CREATE INPUT FORM Create the new sectionInputForm ======
function addSectionInput_Form() { /*====== Variables ======*/ let pageSectionInput_placeholder; let pageSectionInput_placeholderVideoDiv; let pageSectionInput_placeholderSelect; let pageSectionInput_placeholderSelect_div; let pageSectionInput_placeholderSelect_div_2; let htmlElementData; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addSectionInput(e) {\n e.preventDefault();\n addSectionInput_Form();\n}", "createInputSection() {\n let parent = document.getElementById('comparison-selector-container');\n\n // Clear previously created inputs\n this.clearChildNodes(parent);\n\n // Create container div\...
[ "0.69045293", "0.6752145", "0.6415196", "0.6393667", "0.63496727", "0.6184246", "0.60982364", "0.6044911", "0.60437036", "0.60068965", "0.599793", "0.59699637", "0.5963251", "0.59578687", "0.5926604", "0.5900194", "0.58871967", "0.58635306", "0.58173585", "0.58000726", "0.580...
0.679895
1
====== CHAPTER: UPDATE ARRAY DOCUMENT Create the preview document ======
function updateSectionElement_childContainer(type, id, id_2, parentArray, itemList, index) { let htmlElementObject = {}; htmlElementObject.type = type; htmlElementObject.id = id; if(id_2 !== "") { htmlElementObject.id_2 = id_2; } if(itemList !== "") { htmlElementObject.array = it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePreview() {\n\n // no preview desired? => abort\n if ( !my.preview ) return;\n\n // (re)render preview\n my.target.start( self.getValue(), instance => $.setContent( self.element.querySelector( '#preview' ), instance.root ) );\n\n }", "function updatePrevi...
[ "0.5932888", "0.5932888", "0.59118485", "0.57431036", "0.57216215", "0.56745946", "0.56731665", "0.5649476", "0.5649476", "0.5602968", "0.55923116", "0.5578746", "0.5557654", "0.5526242", "0.55107284", "0.5478513", "0.5477225", "0.5476786", "0.5430544", "0.5429182", "0.539898...
0.0
-1
====== CHAPTER: PREVIEW DOCUMENT Create the preview document ======
function createDocumentSection(e) { /*====== (1) Select the target button ======*/ // Iterate through the array for(let i=0; i<sectionElementArray.length; i++) { // Select only the childArray that belongs to the button clicked if(sectionElementArray[i].id === Number(e.target.dataset.btn)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generatePreview() {\n var ifrm = document.getElementById('preview');\n ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;\n ifrm.document.open();\n ...
[ "0.72694975", "0.6625103", "0.65303606", "0.65136933", "0.64782584", "0.6453377", "0.63728195", "0.6287253", "0.625652", "0.62471247", "0.62458646", "0.6163928", "0.61367613", "0.6122549", "0.6073048", "0.6050958", "0.60490686", "0.6039482", "0.6025857", "0.6022846", "0.60228...
0.0
-1
====== CHAPTER: VIDEO BUTTON Create the title / video buttons ======
function createSectionVideoBtn(item, parent) { // const index = item.findIndex(x => x.type === "h2"); // Create the div container const createSectionVideoBtn_onlyTitle = addSectionInput_Form_Elements('div', '', '', '', '', '', '', '') const createSectionVideoBtn_divContainer = addSectionInput_Form_Elem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pag_toggleVideo(button) {\n if (button.title == \"Disable video\") {\n button.title = \"Enable video\";\n document.getElementById(button.id + \"_image\").src =\n pag_context + \"/images/cameraDisabled.png\";\n document.pag_venueClientController.enableVideo(0);\n } els...
[ "0.7030031", "0.6686174", "0.6575529", "0.6512143", "0.64665926", "0.6463262", "0.6440032", "0.64327735", "0.64175314", "0.6400385", "0.6396046", "0.6366315", "0.63555634", "0.6354107", "0.6353496", "0.6299062", "0.6263051", "0.6247203", "0.622928", "0.62277365", "0.6215605",...
0.63528216
15
====== SUBCHAPTER: VIDEO BUTTON Create the title / video buttons ======
function createSubSectionVideoBtn(hasVideo, subchapterNr, item, parent) { console.log(hasVideo); console.log(item); console.log(parent); // Create the div container const createSectionVideoBtn_onlyTitle = addSectionInput_Form_Elements('div', '', '', '', '', '', '', '') const createSectionVideoB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pag_toggleVideo(button) {\n if (button.title == \"Disable video\") {\n button.title = \"Enable video\";\n document.getElementById(button.id + \"_image\").src =\n pag_context + \"/images/cameraDisabled.png\";\n document.pag_venueClientController.enableVideo(0);\n } els...
[ "0.7044198", "0.6627726", "0.6602982", "0.6485188", "0.64760214", "0.64340895", "0.64287096", "0.6383377", "0.63576704", "0.6311185", "0.6309588", "0.63059455", "0.62988013", "0.6285153", "0.6267263", "0.62659246", "0.62458557", "0.6236562", "0.62324536", "0.62196213", "0.620...
0.5939206
49
TODO: use getSessionStore or something like that...
function getMiddleware(sessionStore) { middleware.getMiddleware(options, function(err, _middleware, _restRouter) { if (err) fsm.fire("error", err); else { var mirror = null, deferCompletion = false, tlsOptions; //stash...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mySession(){\n var session_login = Session.get(\"mySession\");\n // var session_signup = Session.get('mySession_signup');\n return session_login;\n }", "function getSession( create ) {\n return thymol.objects.thHttpSessionObject;\n }", "async loadSession() {\n if (this.store) {\n await th...
[ "0.6470277", "0.6103705", "0.594887", "0.58961445", "0.58931047", "0.58674145", "0.5840454", "0.5738767", "0.5733041", "0.5727246", "0.5720452", "0.57064104", "0.5704931", "0.5679015", "0.5675578", "0.5674", "0.566869", "0.5655638", "0.5636275", "0.562035", "0.55997974", "0...
0.0
-1
RenderSelection creates a Select component given an array arr
function RenderSelection(props) { const dispArr = [<option >{""}</option>]; if (props.arr) { props.arr.forEach(element => { dispArr.push(<option >{element}</option>); }); } return ( dispArr ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSelectionOptionsHTML(iArray) {\n var iName = iArray.name;\n var iType = iArray.type;\n var aValues = iArray.value;\n var iOptions = '';\n for (j = 0; j < aValues.length; j++) {\n var iValue = aValues[j];\n var iId = iValue.replace(/\\s+/g, '-').toLowerCase();\n var selOptHTML = \"<div ...
[ "0.659263", "0.62627894", "0.60606015", "0.59335935", "0.5924121", "0.59004354", "0.5900317", "0.589553", "0.5889414", "0.5870788", "0.5870788", "0.5870788", "0.5870788", "0.5870788", "0.585881", "0.58531046", "0.5839282", "0.58385795", "0.58381045", "0.5809644", "0.580901", ...
0.8101828
0
DetailsPage is the page generated for each clothing item
function DetailsPage(props) { activeFilters.length = 0; let id = useParams().id.substring(1); let clothing = ClosetDB[id]; let navigate = useNavigate(); // deleteClothing removes clothing from ClosetDB function deleteClothing(clothing, ClosetDB) { let ind = ClosetDB.indexOf(clothing); ClosetDB....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detailPage(ind){\n displayDetails(formatDetails('detail', json.list[ind]));\n // console.log(json.list[ind]);\n document.getElementById(\"homepage\").style.display = \"none\";\n document.getElementById(\"detailpage\").style.display = \"block\";\n }", "handleViewDetailsClic...
[ "0.656899", "0.63847", "0.63666564", "0.62744665", "0.6134881", "0.613347", "0.61262035", "0.61240995", "0.60585266", "0.6035354", "0.59905654", "0.59826094", "0.594085", "0.59289724", "0.5923339", "0.5894293", "0.58759314", "0.58621573", "0.5855452", "0.58514845", "0.5817518...
0.0
-1
deleteClothing removes clothing from ClosetDB
function deleteClothing(clothing, ClosetDB) { let ind = ClosetDB.indexOf(clothing); ClosetDB.splice(ind, 1); localStorage["ClosetDB"] = JSON.stringify(ClosetDB); navigate(`/`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_boat(boat_id) {\r\n const b_key = datastore.key( ['BOAT', parseInt(boat_id, 10)] ); // Create key for ds entity deletion\r\n return datastore.delete(b_key); // Delete entity and return to calling function\r\n}", "deleteParkingLot() {\n defaultLot = new ParkingLot();\n this.db.deletePark...
[ "0.67016727", "0.6574279", "0.6337014", "0.6334918", "0.6304349", "0.6188155", "0.61814106", "0.615381", "0.60686404", "0.60654056", "0.6049928", "0.60272", "0.597376", "0.5956154", "0.59381294", "0.5932484", "0.59261155", "0.5917295", "0.59017223", "0.58892655", "0.58804387"...
0.8289048
0
displays description only if it exists
function Description(props) { if (clothing.desc) { return (<div> <SubHeading> <div> Description</div></SubHeading> <Desc> {clothing.desc} </Desc></div> ); } else { return (<div></div>); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function descriptionCheck() {\n\t\tlet desc;\n\t\tif (detail.description === null) {\n\t\t\treturn desc = \"No description given\"\n\t\t}\n\t\telse {\n\t\t\treturn desc = detail.description\n\t\t}\n\t}", "get htmlDescription(){\n var desc = \"\";\n if(Object.keys(this.inventory).length == 0){\n ...
[ "0.74242973", "0.7020388", "0.68571", "0.68403506", "0.6806286", "0.67357403", "0.6687903", "0.6650576", "0.6593087", "0.65739936", "0.6567982", "0.6550931", "0.6548413", "0.6540536", "0.6516731", "0.65066946", "0.6473206", "0.6453821", "0.6452282", "0.6440731", "0.6401727", ...
0.69429874
2
DisplaySeasons creates a text header with clothing's seasons
function DisplaySeasons(props) { let dispArr = []; clothing.season.forEach(element => { dispArr.push(<StyledP> {element} </StyledP>); }); return ( <SeasonsStyle>{dispArr}</SeasonsStyle> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeSeason() {\n var seasonAndEpisodePatterns = {\n '<b>Season $1</b> ': /s(\\d\\d)/gi,\n '<b>- Episode $1</b>': /e(\\d\\d)/gi\n };\n $.each(seasonAndEpisodePatterns, function(title, pattern) {\n $('.detLink').html(function () {\n return $(this).html().replace(pattern, tit...
[ "0.65058976", "0.639503", "0.63459", "0.60600764", "0.59568006", "0.5956248", "0.5945106", "0.58626944", "0.5842519", "0.58201265", "0.5816618", "0.5754641", "0.57181066", "0.5663577", "0.5640662", "0.56046265", "0.5558184", "0.55490917", "0.55246556", "0.5521943", "0.5517592...
0.78691864
0
DissplayTags displays the tags of the clothing
function DisplayTags(props) { let dispArr = []; clothing.tags.forEach(element => { dispArr.push(<div> - {element} </div>); }); return ( <div>{dispArr}</div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTags(){\n sendChatMessage(\"List of Monopoly tags:\")\n for (let i = 1; i <= tags.length; i++){\n sendChatMessage( i + \") \" + tags[i-1]);\n }\n sendChatMessage(\"Use '/Choosing a b ... c' to select 8 different tags by numbering with a space between each for the game\");\n sendC...
[ "0.6811759", "0.6173175", "0.6126559", "0.6047491", "0.59985465", "0.5988941", "0.5971849", "0.59337354", "0.5905808", "0.5840282", "0.5839712", "0.5765891", "0.5751437", "0.57374495", "0.57249826", "0.56922734", "0.5640375", "0.56150013", "0.5611888", "0.55318004", "0.552387...
0.6698717
1
Load Data after Rendering
async componentDidMount() { //this.getData(); //this.readTokenFile(); /*const fileTokenExists = await FileSystem.fileExists('tokenFile.txt'); const fileUsernameExists = await FileSystem.fileExists('usernameFile.txt'); // Check token if file exists if (fileTokenExists == true && fileUsernameExists == true)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadAndRenderItems() {\n pageData().then(render)\n }", "function loadData()\n\t{\n\t\tloadMaterials(false);\n\t\tloadLabors(false);\n\t}", "function pageOnLoad(){\n render(datasetInit);\n render(convertedDataSet1992);\n }", "loadingData() {}", "loadingData() {}", "loadData() {\n\n ...
[ "0.74283266", "0.7368466", "0.7259046", "0.7210738", "0.7210738", "0.70401883", "0.70042527", "0.6996597", "0.6911261", "0.6871026", "0.68636525", "0.6845565", "0.6738485", "0.6726093", "0.6726093", "0.67246616", "0.67246616", "0.66970146", "0.6650073", "0.66465193", "0.66219...
0.0
-1
Read Enter Key Username
handleKeyDownUsername(e) { if(e.nativeEvent.key == "Enter"){ this.searchAction(this.state.usernameValue); this.usernameTxt._root.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueofInput () {\n\tif (username) {\n\tconsole.log(username.value);\n\t}\n}", "function getUserInput(){\r\n return readlineSync.question(\"Enter a string: \");\r\n}", "function getUserInput(){\r\n return readlineSync.question(\"Enter a string: \");\r\n}", "onEnterUsername(event) {\n if(...
[ "0.65602446", "0.65282106", "0.65282106", "0.64790386", "0.63736254", "0.6351759", "0.6308939", "0.6287816", "0.6284378", "0.6277394", "0.6273681", "0.6250484", "0.62237597", "0.620929", "0.61972815", "0.617282", "0.61306405", "0.6126538", "0.6117789", "0.60772204", "0.605572...
0.6632783
0
Read Enter Key Password
handleKeyDownPassword(e) { if(e.nativeEvent.key == "Enter"){ this.searchAction(this.state.passwordValue); this.passwordTxt._root.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPassword() {\n \tvar stdin = process.openStdin(),\n \ttty = require('tty');\n\n process.stdout.write('Enter password for user ' + database.getUser() + ' on database ' + database.getName() +': ');\n\tprocess.stdin.resume();\n\tprocess.stdin.setEncoding('utf8');\n\tprocess.stdin.setRawMode(true);\n...
[ "0.73056316", "0.6844472", "0.67568403", "0.67139196", "0.6564776", "0.6212989", "0.6198199", "0.6186538", "0.6186538", "0.6180022", "0.61696315", "0.6155062", "0.61450195", "0.6119228", "0.6110306", "0.6079403", "0.6074256", "0.60456294", "0.6045219", "0.5978885", "0.5970216...
0.621309
5
Read Enter Key Email
handleKeyDownEmail(e) { if(e.nativeEvent.key == "Enter"){ this.searchAction(this.state.emailValue); this.emailTxt._root.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inputAndFormatEmail() {\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n return new Promise(resolve => rl.question('Enter Email ', result => {\n rl.close();\n if (i.test(String(result).toLowerCase()) !== true) {\n ...
[ "0.67172056", "0.6630009", "0.65018606", "0.6409968", "0.62416387", "0.6176467", "0.61661625", "0.61213547", "0.6090835", "0.6084272", "0.60608596", "0.6057965", "0.60089934", "0.59855336", "0.59855336", "0.59659547", "0.5962773", "0.5948721", "0.59259546", "0.59060663", "0.5...
0.6587599
2
Read Enter Key Name
handleKeyDownName(e) { if(e.nativeEvent.key == "Enter"){ this.searchAction(this.state.nameValue); this.nameTxt._root.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alphaValLeader(input){\r\n\tvar key;\r\n\tdocument.getElementById ? key = input.keyCode: key = input.which;\r\n\tif(event.keyCode == 13){\r\n\t\tgetNames();\r\n\t}\r\n\treturn ((key > 64 && key < 91) || (key > 96 && key < 123) || key == 8 || key == 39 || key == 16 || key == 13);\r\n}", "function keyEven...
[ "0.66981643", "0.6576925", "0.65707976", "0.6504789", "0.6497165", "0.635459", "0.6256701", "0.6179799", "0.6178177", "0.60860544", "0.606891", "0.60607797", "0.6019297", "0.6019297", "0.601188", "0.6008862", "0.60068524", "0.6004755", "0.59893584", "0.59797263", "0.59717095"...
0.6452183
5
setup is a custom p5 js function that runs once at the program's start and does not repeat Sets up the board of mines
function setup() { canvas = createCanvas((boardWidth > headerWidth) ? boardWidth : headerWidth, boardHeight + headerHeight); canvas.parent('game-canvas'); // createBoard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {\n createCanvas(w * 20 + 1, w * 20 + 1); // forms the width and height of the board\n // need to + 1 to draw the right and bottom borders\n\n // calculates number of rows and columns and then round down to nearest whole number\n cols = floor(width/w);\n rows = floor(height/w);\n g...
[ "0.7435956", "0.74009925", "0.7384601", "0.7364882", "0.73255813", "0.7303141", "0.72271854", "0.71498543", "0.7117607", "0.7085156", "0.70801204", "0.70575255", "0.70354056", "0.7021808", "0.7020382", "0.70192343", "0.69515944", "0.6942775", "0.69154537", "0.6915251", "0.691...
0.6907346
22
draw is a custom p5 js function that loops continually throughout the program's operation Loop through board and show each square
function draw() { background("#616363"); // Show each square on the board if (board.length > 0) { for (let i = 0; i < numSquaresY; i++) { for (let j = 0; j < numSquaresX; j++) { board[i][j].show(); } } } // Tell them if they are waiting for the game to be over if (!canPlay)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawBoard() {\n for (r = 0; r < ROW; r++) {\n for (c = 0; c < COL; c++) {\n drawSquare(c, r, board[r][c])\n }\n }\n}", "function draw() {\n draw_board(board_width,board_height,board_color)\n draw_snake();\n draw_fruit();\n // console.log(\"drawing\")\n}", "function draw() {\n ...
[ "0.7616947", "0.76169395", "0.7568221", "0.7537031", "0.7520177", "0.7515482", "0.74913687", "0.7448359", "0.74303985", "0.7426878", "0.7424094", "0.7420753", "0.74113995", "0.73947674", "0.73568946", "0.7325002", "0.73219836", "0.73172474", "0.7311586", "0.730818", "0.728885...
0.6905078
72
Custom p5 js event handler Activates whenever mouse is pressed
function mousePressed() { if (!playerAlive || !canPlay) return; // First, check if mouse is within bounds of board if (mouseX <= width && mouseY <= height && mouseY > headerHeight) { // Use x and y of mouse to determine which square the mouse is over const i = floor((mouseY - headerHeight) / yIncreme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mousePressed() {\n setup();\n}", "function mousePressed() {\n session.mousePressed();\n}", "mousePressed() {\n console.log(\"Mouse pressed\");\n }", "function mousePressed() {\n init();\n}", "function mousePressed(){\n microBitConnect();\n}", "mouseDown(pt) {}", "mouseDown(pt) {}",...
[ "0.77239054", "0.74989104", "0.7441446", "0.7326641", "0.723226", "0.7154282", "0.7154282", "0.71199894", "0.7108824", "0.7105023", "0.70724374", "0.7045109", "0.7045109", "0.7043787", "0.70354265", "0.7031752", "0.7031752", "0.7031752", "0.70146346", "0.6992251", "0.6985535"...
0.0
-1
Custom p5 js event handler that activates every key press
function keyPressed() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keyPressed() {\n if (handler.active === handler.nameplate) {\n doorbell.keyPressed();\n }\n}", "function keyPressed() {\r\n if (keyCode === LEFT_ARROW) {\r\n frequency--;\r\n } else if (keyCode === RIGHT_ARROW) {\r\n frequency++;\r\n }\r\n if (keyCode === UP_ARROW) {\r\n ...
[ "0.71484", "0.71059424", "0.6977575", "0.6976591", "0.6882622", "0.68797284", "0.6859301", "0.6834797", "0.68067217", "0.6782437", "0.6779487", "0.6727583", "0.6706894", "0.6697696", "0.66961855", "0.66839486", "0.66710466", "0.66608125", "0.6651052", "0.664674", "0.66404754"...
0.71925807
0
Checks if the player has won
function checkWin() { // Determines if the # of placed flags equals the # of mines const allFlags = numPlacedFlags == startingMines; // Checks if all flags are correctly placed const correctFlags = checkFlagPosition(); // Only returns true if both conditions are met return allFlags && correctFlags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "gameWon() {\n if (this._gameBoard[0] == this._currentPlayer && this._gameBoard[1] == this._currentPlayer && this._gameBoard[2] == this._currentPlayer ||\n this._gameBoard[3] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[5] == this._currentPlayer ||\n ...
[ "0.79777163", "0.7847542", "0.7788344", "0.77680796", "0.76788986", "0.7623595", "0.75950915", "0.7553094", "0.7510986", "0.74658155", "0.7443476", "0.7422849", "0.7420163", "0.74158764", "0.7373188", "0.73712415", "0.73648494", "0.73590755", "0.73555624", "0.73295516", "0.73...
0.0
-1
Checks if all the placed flags are in the correct position
function checkFlagPosition() { let allFlagsCorrect = true; for (let f of placedFlags) { if (!f.isMine) allFlagsCorrect = false; } return allFlagsCorrect; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkWin() {\n // Determines if the # of placed flags equals the # of mines\n const allFlags = numPlacedFlags == startingMines;\n \n // Checks if all flags are correctly placed\n const correctFlags = checkFlagPosition();\n \n // Only returns true if both conditions are met\n return allFlags && cor...
[ "0.67097384", "0.64419746", "0.6046095", "0.5998293", "0.5940007", "0.59223366", "0.5839868", "0.58076334", "0.57603747", "0.5708147", "0.56361777", "0.56070423", "0.5593708", "0.5577682", "0.55776316", "0.5562248", "0.5556368", "0.5554933", "0.5542699", "0.5527718", "0.54929...
0.8231262
0
Set the board full of empty squares, then fills it with mines and calculates number of adjacent mines for each square DEPRECATED: now runs on server side and is sent to clients
function createBoard() { for (let i = 0; i < numSquaresY; i++) { board[i] = []; for (let j = 0; j < numSquaresX; j++) { board[i][j] = new Square(i, j, j * xIncrement, i * yIncrement + headerHeight); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMinesNegsCount(board) {\r\n for (var i = 0; i < board.length; i++) {\r\n for (var j = 0; j < board.length; j++) {\r\n TypeCell(board, { i, j });\r\n }\r\n }\r\n}", "function setMinesNegsCount(board, size) {\r\n //Go through every cell in board\r\n for (var i = 0; i < ...
[ "0.7290767", "0.7002049", "0.6991127", "0.6898256", "0.68904793", "0.6834781", "0.6833484", "0.68145996", "0.66528267", "0.6645856", "0.6621724", "0.66188717", "0.661589", "0.65957445", "0.6501545", "0.64830965", "0.64797825", "0.6476917", "0.64655405", "0.64254886", "0.64216...
0.0
-1
Randomly places startingMines of mines throughout the board
function setMines(safeCol, safeRow) { let numMines = startingMines; while (numMines > 0) { const i = floor(random(0, numSquaresY)); const j = floor(random(0, numSquaresX)); if (!board[i][j].isMine && (Math.abs(i - safeRow) > 1 || Math.abs(j - safeCol) > 1)) { board[i][j].isMine = true; numM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMinesRandomly() {\n for (var i = 0; i < gLevel.MINES; i++) {\n var rowIdx = getRandomInt(0, gLevel.SIZE)\n var colIdx = getRandomInt(0, gLevel.SIZE)\n while (gBoard[rowIdx][colIdx].cellContent === gMINE) {\n rowIdx = getRandomInt(0, gLevel.SIZE)\n colIdx = ...
[ "0.7937025", "0.79208857", "0.77272934", "0.7640107", "0.7630548", "0.7573545", "0.75205743", "0.73481464", "0.73442847", "0.7281276", "0.72670513", "0.7196272", "0.7168084", "0.7057791", "0.69224465", "0.69030493", "0.68441194", "0.6565589", "0.65560067", "0.65527093", "0.64...
0.70519125
14
Increments through each square and calculates adjacent mines for that square
function findMines() { for (let i = 0; i < numSquaresY; i++) { for (let j = 0; j < numSquaresX; j++) { board[i][j].calculateAdjacentMines(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findMines(theBoard) {\n\n let temp = theBoard;\n let { rows, cols } = this.props;\n\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < cols; j++) {\n\n if (!(theBoard[i][j].mine)) {\n let numMines = 0;\n\n /* Get all surroun...
[ "0.6570356", "0.6545155", "0.6536113", "0.64364564", "0.6378975", "0.6352977", "0.6302723", "0.62325346", "0.6214023", "0.62066543", "0.61676764", "0.6109179", "0.6105069", "0.6098718", "0.6096255", "0.60902715", "0.6047183", "0.60423595", "0.601417", "0.5988298", "0.59772414...
0.8023538
0
Resets the board and starts a new game
function restart() { firstClick = true; playerAlive = true; placedFlags = []; numPlacedFlags = 0; time = 0; createBoard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "restart() {\n $('#player_turn').text('Red')\n const $board = $(this.selector)\n $board.empty()\n this.drop_btn()\n this.create_board()\n this.turn = 0\n this.game_over = false\n }", "resetBoard() {\n this._gameBoard = [\"\", \"\", \"\", \"\", \"\", \"\",...
[ "0.8116651", "0.8045361", "0.8020583", "0.7972164", "0.7943568", "0.7920208", "0.78832644", "0.7751233", "0.7748226", "0.7679367", "0.7649068", "0.7646948", "0.764611", "0.76359594", "0.76223063", "0.76167274", "0.7604488", "0.7601441", "0.75882137", "0.75737494", "0.75656426...
0.7347249
40
Adds a flag to the array of placed flags
function addToFlagArray(square) { placedFlags.push(square); numPlacedFlags++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addFlags(...flags) {\n this._flags += flags.join(\"\");\n return this;\n }", "function addToGameFlags() {\n for (var i in arguments) {\n gameFlags[arguments[i]] = 0;\n }\n}", "function addFlag(square) {\n\tif (isGameOver) return\n\tif (!square.classList.contains('checked') && (fla...
[ "0.65278375", "0.63456285", "0.63123393", "0.6307574", "0.6225049", "0.620358", "0.59234077", "0.58868843", "0.5716865", "0.56722814", "0.56292766", "0.56120086", "0.5523932", "0.5498425", "0.5488483", "0.548808", "0.54533195", "0.5405662", "0.53280616", "0.5312588", "0.53110...
0.78123444
0
Removes a flag from the array of placed flags
function removeFromFlagArray(square) { const index = placedFlags.indexOf(square); const temp = placedFlags[placedFlags.length - 1]; placedFlags[placedFlags.length - 1] = placedFlags[index]; placedFlags[index] = temp; placedFlags.pop(); numPlacedFlags--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_fa(array,element){\n\tif(in_array(array,element)){\n\t\tindex=array.indexOf(element);\n\t\tarray.splice(index,1);\n\t};\n}", "function removeAll(arr, item){\n\t var idx = indexOf(arr, item);\n\t while (idx !== -1) {\n\t arr.splice(idx, 1);\n\t idx = indexOf(arr...
[ "0.6227363", "0.62143165", "0.6148545", "0.6129008", "0.6041205", "0.6013068", "0.600987", "0.5993333", "0.5973438", "0.5959864", "0.59533346", "0.5914137", "0.5901114", "0.5891785", "0.58885777", "0.58862203", "0.58766466", "0.5857681", "0.5851878", "0.5849251", "0.5845769",...
0.79972786
0
Sets the number of squares on the board based on predetermined dimensions
function setNumSquaresFromDimensions() { while (numSquaresX * xIncrement + xIncrement < boardWidth) { numSquaresX++; } while (numSquaresY * yIncrement + yIncrement < boardHeight) { numSquaresY++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDimensionsFromNumSquares() {\n boardWidth = numSquaresX * xIncrement;\n headerWidth = boardWidth;\n boardHeight = numSquaresY * yIncrement;\n}", "setBoardSize() {\n let self = this;\n //self.board.style.height = (window.innerHeight / 3).toString() + 'px'; // make the board a t...
[ "0.82619894", "0.7056775", "0.68646586", "0.6774022", "0.6727721", "0.66786075", "0.6555077", "0.6543035", "0.6490164", "0.64472973", "0.6383913", "0.63693917", "0.6327771", "0.6298214", "0.62788504", "0.6257066", "0.62321454", "0.6228867", "0.6212523", "0.62029713", "0.61937...
0.837506
0
Sets the board's dimensions based on the number of squares
function setDimensionsFromNumSquares() { boardWidth = numSquaresX * xIncrement; headerWidth = boardWidth; boardHeight = numSquaresY * yIncrement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setNumSquaresFromDimensions() {\n while (numSquaresX * xIncrement + xIncrement < boardWidth) {\n numSquaresX++;\n }\n\n while (numSquaresY * yIncrement + yIncrement < boardHeight) {\n numSquaresY++;\n }\n}", "setBoardSize() {\n let self = this;\n //self.board.style.height ...
[ "0.8098505", "0.7319389", "0.713623", "0.7066674", "0.6605652", "0.6603924", "0.65408087", "0.6526596", "0.65141934", "0.648414", "0.6463833", "0.6463452", "0.6457743", "0.6455644", "0.64383805", "0.63941884", "0.63844496", "0.63823795", "0.6366949", "0.63591516", "0.6336055"...
0.83702224
0
Check if the item have COLLECTION as type, if yes then delete the related collection.
function checkIfCollectionType (currentUser, item, callback) { if (item.type === itemTypes.COLLECTION.id) { collectionController.deleteOne(currentUser, item._content, function (apiResponse) { callback(apiResponse.err) }) } else { callback(null) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteRelatedItem (currentUser, collection) {\n m.Item.findOne({type: itemTypes.COLLECTION.id, _content: collection._id}, function (err, item) {\n if (err) return logger.error(err)\n itemController.deleteOne(currentUser, item._id, function (apiResponse) {\n if (apiResponse.err) return logger.e...
[ "0.6374547", "0.592844", "0.58616513", "0.5835144", "0.56913376", "0.5626858", "0.5605843", "0.55807817", "0.55284876", "0.55245167", "0.55165416", "0.5490132", "0.54833084", "0.5472602", "0.5456929", "0.54117346", "0.5401252", "0.53950244", "0.5372424", "0.53453475", "0.5308...
0.7407335
0
Retrieve the customSort object related to collection that contain the item passed as parameter. Then remove the itemId from the list of ids.
function removeItemFromCustomSort (item, callback) { m.CustomSort.findOne({ _collection: item._collection._id, type: sortTypes.COLLECTION_ITEMS.id}, function (err, customSort) { if (err) { logger.error(err); return callback(new m.ApiResponse(err, 500)) } m.CustomSort.update({ _id: customSort._id}, { $pull: { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeCollectionFromCustomSort (collection, callback) {\n m.CustomSort.findOne({ _user: collection._author, type: sortTypes.MY_COLLECTIONS.id }, function (err, customSort) {\n if (err) { logger.error(err); return callback(err) }\n if (!customSort) { return callback('cannot find custom sort object')...
[ "0.6564934", "0.57416856", "0.5475968", "0.52999145", "0.52674973", "0.52338076", "0.52291197", "0.51804495", "0.5113155", "0.50587624", "0.50009894", "0.49809724", "0.49781585", "0.49508515", "0.48999837", "0.48943004", "0.4856813", "0.48471615", "0.4835957", "0.4807384", "0...
0.75573653
0
this is the fuction used takes table and an array of data to insert it to the table on first row
function addTR(table, arrayOfData){ //takes the first row of the table var row =table.tBodies[0].insertRow(0); //looping through the data and creating as many TD and give them the data for(var i=0;i<arrayOfData.length;i++){ row.insertCell(i).innerHTML=arrayOfData[i]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendTableData(id, data){\r\n\r\nlet newRow = id.insertRow();\r\n//Check column doesn't contain the data\r\nfor(let i=0; i<id.rows.item(0).cells.length; i++){\r\n let cell = newRow.insertCell();\r\n if(i < data.length){\r\n cell.innerHTML = data[i];\r\n }\r\n}\r\n\r\n}", "function insert_row(data...
[ "0.7304542", "0.71667063", "0.6845734", "0.6790393", "0.67376804", "0.642409", "0.6419678", "0.63993084", "0.63490736", "0.63490736", "0.6332599", "0.6322987", "0.63211286", "0.62730056", "0.62636775", "0.62299836", "0.6211849", "0.6207672", "0.6199761", "0.6188078", "0.61738...
0.748347
0
add fills table header with columns
function addTHead(table,arraOfTH){ var thead=table.tHead; var tr= (thead.rows[0]==null) ?thead:thead.rows[0]; for(var i=0;i<arraOfTH.length;i++){ var th=document.createElement('th'); th.innerHTML=arraOfTH[i]; tr.appendChild(th); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_thead() {\n var schema = _store.active_columns();\n var total = _store.active_rows()['total'];\n var html = [ '<tr>' ];\n\n // create header\n schema.forEach( function ( column ) {\n html.push( '<td class=\"', column['key'], ' ' );\n html.pus...
[ "0.80529493", "0.8039932", "0.7907033", "0.784353", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757275", "0.7757106", "0.77427566", "0.7712226", "0.7695105", ...
0.0
-1
check if local storage works. credit:
_storageAvailable(type) { try { var storage = window[type], x = "__storage_test__"; storage.setItem(x, x); storage.removeItem(x); return true; } catch (e) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_local_storage() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API\n try {\n var x = '__storage_test__';\n localStorage.setItem(x, x);\n localStorage.removeItem(x);\n return true;\n }\n catch(e) {\n return false;\n }\n}", "function...
[ "0.8279508", "0.8032114", "0.8019687", "0.79965174", "0.7953574", "0.79154116", "0.78474224", "0.7727356", "0.77119994", "0.7710773", "0.7695221", "0.76913124", "0.7684622", "0.76257455", "0.76067466", "0.7582542", "0.7577238", "0.7577238", "0.7577238", "0.7577238", "0.757723...
0.732457
45
save to local storage (c/o
_saveToLocalStorage(storage, propObj) { try { window.localStorage.setItem(storage, propObj); return true; } catch (e) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save() {\n storage.write(filename, data);\n }", "function save() {\n localStorage && localStorage.setItem(key, Y.JSON.stringify(data));\n }", "function save() {\n\tvar save = {\n\t\t// Player attributes\n\t\texp: exp,\n\t\tlevel: level,\n\t\tbaseDamage: baseDamage,\n\t\ttotalDama...
[ "0.79766726", "0.74885976", "0.73818505", "0.7330338", "0.7314046", "0.72483444", "0.72036916", "0.71722233", "0.71394837", "0.71346784", "0.7072415", "0.7064598", "0.7045574", "0.70189506", "0.70107234", "0.6984989", "0.6953859", "0.69454914", "0.6914145", "0.69053835", "0.6...
0.0
-1
When editing a recipe this function updates the state for that recipe
updateIngredient(oldIngredient, newIngredient, id) { const newState = { ...this.state }; // todo - some sort of check for same name ingredient newState.recipes.forEach(rcp => { if (rcp.id === id) { rcp.ingredients.forEach(ing => { if (ing.food == oldIngredient.food) { ing...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleEdit(recipe: string, props: State & WrappedActionProps) {\n props.setForm('Recipe', recipe)\n props.setForm('Ingredients', pack(props.recipes.get(recipe)))\n props.selectRecipe(recipe)\n props.setModal('Edit_Recipe_Modal')\n}", "function changeRecipeState(e) {\n currentRecipe = this.value\n...
[ "0.72105944", "0.7167812", "0.6996779", "0.69058675", "0.68800443", "0.677932", "0.67392164", "0.6737884", "0.64739877", "0.64136034", "0.64100045", "0.6341273", "0.6325174", "0.6280927", "0.6232152", "0.62188536", "0.62004733", "0.618711", "0.6168094", "0.61627597", "0.61399...
0.65337527
8
When deleting an ingredient from a recipe this function updates the state for that recipe
removeIngredient(oldIngredient, id) { const newState = { ...this.state }; newState.recipes.forEach(s => { if (s.id === id) { const newList = s.ingredients.filter(x => { return x.food != oldIngredient; }); s.ingredients = newList; } }); this.setState(newState...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteIngredient(){\n\n\t\t//Run provided deletion callback method\n\t\tthis.props.deleteCallback().then(res => {\n\n\t\t\t//Force React to update the DOM\n\t\t\tthis.forceUpdate();\n\n\t\t\t//Update self details and id\n\t\t\tthis.setState({id:undefined});\n\n\t\t\t//Tell parent to reset ingredient data member\n\...
[ "0.74878824", "0.7294148", "0.7183334", "0.6801565", "0.6775093", "0.6762271", "0.66746944", "0.66661406", "0.66495174", "0.6644643", "0.66256756", "0.66227263", "0.66163003", "0.6571866", "0.6525576", "0.65070397", "0.63767374", "0.63442284", "0.6283856", "0.6267545", "0.624...
0.75860596
0
Insert a statement after the last import statement in a file
function insertStatement(tree, path, statement) { const contents = tree.read(path).toString(); const sourceFile = typescript_1.createSourceFile(path, contents, typescript_1.ScriptTarget.ESNext); const importStatements = sourceFile.statements.filter(typescript_1.isImportDeclaration); const index = import...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "exitImport_stmt(ctx) {\n\t}", "ImportDeclaration(path) {\n if (path.node.source.value === \"hnt\") {\n path.remove();\n }\n }", "ImportDeclaration(path) {\n path.remove()\n }", "function replaceImportFile(func) {\n _importFile = func;\n }", "exit(path, state) {\n...
[ "0.57498085", "0.5445813", "0.5435876", "0.54107136", "0.5400193", "0.5396563", "0.5340112", "0.51629573", "0.5018603", "0.5016165", "0.5014406", "0.49837893", "0.49730054", "0.4968474", "0.48873466", "0.48494098", "0.482223", "0.48151866", "0.48032254", "0.4797368", "0.47915...
0.62878895
0
Underlying "class" for the sandblaster API.
function SandBlaster() { var sb = this; if (!(sb instanceof SandBlaster)) { return new SandBlaster(); } sb._initialState = sb.detect(); sb._unsandboxState = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Bart(apiKey){\n this.key = apiKey;\n }", "constructor(options) {\n let {\n url,\n username,\n password,\n request: reqOptions\n } = options;\n\n // Beginning of SNOW initiation.\n this.url = url;\n this.table = 'sc_req_it...
[ "0.59992474", "0.5974518", "0.58819854", "0.5867607", "0.5863035", "0.5855803", "0.58419496", "0.58418566", "0.58263224", "0.5799635", "0.5746047", "0.56776416", "0.56518674", "0.5606809", "0.5606809", "0.5606809", "0.5598412", "0.55068874", "0.5502866", "0.5496597", "0.54965...
0.5955401
2
Google Maps API Lazy Load SDStudio ;)
function google_maps_init() { 'use strict' var markerElement = document.getElementById('marker') var mapElement = document.getElementById('map') var addressName = mapElement.getAttribute('data-name') var roemerberg = {lat: + mapElement.getAttribute("data-lat"), lng: + mapElement.getAttribute("data-lng")} var ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function asyncGoogleMaps() { }", "function getGoogleMap() {\n $.ajax({\n url: scriptsUrls.google,\n dataType: \"script\",\n cache: true\n });\n }", "function loadGoogleMapsApi() {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.s...
[ "0.74558383", "0.7455039", "0.7436106", "0.73416924", "0.7244953", "0.7244953", "0.7243318", "0.72198075", "0.72171235", "0.72171235", "0.72171235", "0.72171235", "0.72171235", "0.72171235", "0.7062968", "0.70566386", "0.7046472", "0.69967514", "0.69550455", "0.6952001", "0.6...
0.0
-1
tag() returns a regular expression that matches opening and closing tags for a given element and captures the inner value
function tag(element) { return new RegExp('\<' + element + '\>(.*(?=\<))\<\/' + element + '\>') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTag(tag)\n{\n var group = tag.substring(1,5);\n var element = tag.substring(5,9);\n var tagIndex = (\"(\"+group+\",\"+element+\")\").toUpperCase();\n var attr = dict.TAG_DICT[tagIndex];\n return attr;\n}", "function getTag(text, tag){\n console.log(tmpString);\n var tmpString = t...
[ "0.6373034", "0.63209033", "0.627086", "0.627086", "0.627086", "0.627086", "0.6241184", "0.6169761", "0.61546564", "0.6081518", "0.6007218", "0.60038495", "0.5971917", "0.59563935", "0.59563935", "0.59563935", "0.59563935", "0.59505445", "0.5898067", "0.5866712", "0.58064014"...
0.74912524
0
The function which uses the library
function CreditCardTest() { return ( <div className="credit-card-test-page-main"> <CreditCard submitbuttontext="Submit card" onsubmitfunc={myHandlerFunction} expiryMinMonth="2021-10" /> </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "function FunctionUtils() {}", "function fnMyLibraryAFunction (){}", "function Utils() {}", "function Utils() {}", "function Library() {\n \n}", "function Utils(){}", "function miFuncion (){}", "function Kutility() {\n\n}", "function Kutility() {\n\n}", ...
[ "0.71731234", "0.6879161", "0.68015325", "0.66272897", "0.66272897", "0.6520636", "0.6345353", "0.62999266", "0.62967545", "0.62967545", "0.6289808", "0.6289808", "0.6289808", "0.619836", "0.611206", "0.61108273", "0.6093304", "0.60837555", "0.6073061", "0.6059931", "0.604513...
0.0
-1
From Jake Archibald's Promises and Back:
function getJSON(url) { // Return a new promise. return new Promise(function (resolve, reject) { // Do the usual XHR stuff var req = new XMLHttpRequest(); req.open('GET', url); req.onload = function () { // This is called even on 404 etc // so check the status if (req.sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tProm() {\n\n\tvar res = null;\n\tvar ref = null;\n\n\treturn new Promise(function(resolve, reject) {\n\t\tconsole.log('created promise');\n\n\t});\n/*\n\treturn {\n\t\tp: prom,\n\t\tres: \n\t\trej\n\t}\n*/\n}", "function Pt(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{c(i.next(e)...
[ "0.68691665", "0.6765235", "0.66159683", "0.6513045", "0.64969414", "0.648491", "0.64805967", "0.64021456", "0.63989365", "0.6339789", "0.6335627", "0.6307503", "0.62995535", "0.6269389", "0.6255654", "0.62244487", "0.621197", "0.6211211", "0.62008023", "0.61902857", "0.61879...
0.0
-1
Get Functions & Endpoints
function getAsset(namespace, type, id, bnc) { logger.debug('getAsset() called for ' + namespace + '.' + type + '#' + id); return new Promise((resolve, reject) => { return bnc.getAssetRegistry(namespace + '.' + type).then((reg) => { return reg.resolve(id).then((asset) => { res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getEndpoints(options) {\n\n let _this = this,\n allEndpoints = [],\n foundEndpoints = [];\n\n // Get all functions\n for (let i = 0; i < Object.keys(_this.project.components).length; i++) {\n let component = _this.project.components[Object.keys(_this.project.components)[i]];\n ...
[ "0.6553928", "0.6212035", "0.6201798", "0.6198967", "0.61803555", "0.61412215", "0.6096782", "0.6061468", "0.60095716", "0.5993346", "0.5959917", "0.5883957", "0.5870194", "0.58664745", "0.58593404", "0.5851849", "0.5761588", "0.5684973", "0.564662", "0.55888844", "0.5556586"...
0.0
-1
Get All Functions & Endpoints
function getAllAssets(namespace, type, bnc) { logger.debug('getAllAssets() called for ' + namespace + '.' + type); return new Promise((resolve, reject) => { return bnc.getAssetRegistry(namespace + '.' + type).then((reg) => { return reg.getAll().then((assets) => { resolve(asse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get endpoints() {\n return this.getListAttribute('endpoints');\n }", "debugEndpointProvider() {\n console.log(this.epProvider.getEndPointByName('allData'));\n console.log(this.epProvider.buildEndPointWithQueryStringFromObject({\n limit: 10,\n sort: 'title',\n page: 1,\n filter...
[ "0.6247843", "0.62157714", "0.620934", "0.62003523", "0.61965287", "0.61634547", "0.61581004", "0.61393577", "0.61212915", "0.6031217", "0.60293996", "0.6017612", "0.6009168", "0.5996992", "0.5972838", "0.59194744", "0.5888725", "0.5884453", "0.58590466", "0.584638", "0.58453...
0.0
-1
Transaction Functions & Endpoints
function invokeTransaction(namespace, type, attributes, bnc) { logger.debug('issueTransaction() called with ' + namespace + ' ' + type + ' ' + JSON.stringify(attributes)); return new Promise((resolve, reject) => { // Make the transaction let newTransaction; try { newTransact...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addTransaction (params){\r\n return Api().post('/savetransaction', params)\r\n }", "updateTransaction(params) {\r\n return Api().post('/updatetransactions', params)\r\n }", "async beginTransaction() {\n }", "async commitTransaction() {\n }", "transaction(fun, transaction) {\n const tx = { tran...
[ "0.75842655", "0.6957644", "0.692672", "0.68134457", "0.67845535", "0.67488223", "0.6694327", "0.6569967", "0.6535634", "0.6472047", "0.64671695", "0.63918954", "0.6371662", "0.63378984", "0.6264461", "0.62123245", "0.6194666", "0.6194666", "0.6189879", "0.6189155", "0.618732...
0.0
-1
Go through the identities on disk and create them
function createExistingIdentities() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createUsers() {\n const arr = []\n for (let index = 0; index < 1000; index++) {\n arr.push(createUser())\n\n }\n fs.writeFileSync('outfile.json', JSON.stringify(arr));\n}", "async function loadNamedIdentitiesLoop(network, mnemonic, index, identities) {\n // 65536 is a ridiculously huge number\...
[ "0.57908195", "0.53885585", "0.5196281", "0.51878726", "0.5183912", "0.51186883", "0.5116837", "0.50109106", "0.49492383", "0.49316004", "0.49165505", "0.49131098", "0.49110845", "0.49059105", "0.4875471", "0.48588488", "0.48509565", "0.48446295", "0.48162803", "0.48139626", ...
0.6769487
0
this method created to modify all the status for property exchange
function invokeStatusUpdateTransaction(namespace, type, attributes, bnc) { logger.debug('issueTransaction() called with ' + namespace + ' ' + type + ' ' + JSON.stringify(attributes)); return new Promise((resolve, reject) => { // Make the transaction let newTransaction; try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setAdjustmentSendingStatus(state, status) {\n state.adjustmentSendingStatus = status\n }", "static updatePropertystatus(req, res) {\n const foundWholeObject = propertyModal.find(p => p.id === parseInt(req.params.id));\n\n if (foundWholeObject.status === 'sold') {\n return res.status(400).json({ st...
[ "0.645068", "0.63247085", "0.6152161", "0.6142811", "0.61101353", "0.6056782", "0.60121006", "0.5980454", "0.5891916", "0.5844624", "0.58329356", "0.58304614", "0.5828732", "0.5807989", "0.5793348", "0.5719028", "0.5719028", "0.5719028", "0.5719028", "0.5719028", "0.5719028",...
0.0
-1
12/15/2017 Darkness Falls Short program to practice separation of javascript files for a bigger project. Working towards implementation of guidedTour. This contains the functions for creating the spotlight effect. Helper Functions for darkness falls function to convert number to pixel format Used by darkness falls for ...
function toPixels(number){ var pixels = number.toString() + "px"; return pixels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function darknessFalls(elem){\n\tvar boundingRect = elem.getBoundingClientRect();\n\tvar pageWidth = document.body.scrollWidth;\n\tvar pageHeight = document.body.scrollHeight;\n\t//create four quadrants to cover all of screen except spotlight\n//quadrant1: top strip\n\tconsole.log(\"made it to canvas creation\");\...
[ "0.7004481", "0.67819273", "0.6443416", "0.6321085", "0.62827474", "0.61705536", "0.6156187", "0.6067532", "0.6063697", "0.60627997", "0.60422397", "0.60148436", "0.60102344", "0.59887767", "0.59790695", "0.59719425", "0.5923671", "0.588864", "0.5861929", "0.5843033", "0.5831...
0.0
-1
function to add to pixel formatted number used by darkness falls in case of screenoffset
function addPixels(number,add){ number= number.slice(0,-2); number= Number(number) + add; number= number.toString(); number= number + "px"; return number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function px(n) { return n+'px' }", "function appendUnit(apples) {\n if(apples.toString().indexOf(\"px\") < -1 && apples.toString().indexOf(\"%\") < -1) {\n return apples += \"px\";\n }\n }", "function px(x) {return (x|0) + 'px';}", "function incdec(v, how){return parseInt(v) + how...
[ "0.64722687", "0.5857545", "0.5851679", "0.58470184", "0.577423", "0.5744548", "0.5579283", "0.5577664", "0.5575239", "0.55452794", "0.5531612", "0.5528015", "0.5501127", "0.55000985", "0.5487947", "0.545991", "0.545991", "0.5443519", "0.54329395", "0.5428263", "0.5425348", ...
0.6566971
1
function to get true screen size/multibrowser approach important for program portability
function getScreenSize(){ var body = document.body, html = document.documentElement; var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ); return height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getScreenSize() {\n var width = getScreenWidth();\n var height = getScreenHeight();\n\n //Check for Mobile\n if (width < 800) {\n return \"Mobile\";\n }\n //Check for Desktop Normal\n if (width > 799) {\n return \"Desktop\";\n }\n}", "function getMaxScreenSize() {\n...
[ "0.8087762", "0.7425163", "0.7416517", "0.73424226", "0.72929513", "0.72711504", "0.72708356", "0.7260872", "0.72569036", "0.72102934", "0.72102934", "0.7192307", "0.71286947", "0.7100182", "0.7098015", "0.7017668", "0.70071596", "0.69883543", "0.696531", "0.69609994", "0.695...
0.72079057
11
The Buffer constructor returns instances of `Uint8Array` that have their prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`, so the returned instances will have all the node `Buffer` methods and the `Uint8Array` methods. Square bracket notation works as expected it returns a si...
function Buffer (arg, encodingOrOffset, length) { if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { return new Buffer(arg, encodingOrOffset, length) } // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new Error( 'If encoding is ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "toB...
[ "0.7353416", "0.7353416", "0.7353416", "0.7353416", "0.6973993", "0.6893469", "0.6893469", "0.68475807", "0.68475807", "0.68475807", "0.68475807", "0.68475807", "0.68475807", "0.68475807", "0.6837346", "0.6837346", "0.6837346", "0.6837346", "0.6837346", "0.6837346", "0.683734...
0.0
-1
Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, OR the last index of `val` in `buffer` at offset <= `byteOffset`. Arguments: buffer a Buffer to search val a string, Buffer, or number byteOffset an index into `buffer`; will be clamped to an int32 encoding an optional encoding, relevant is va...
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1 // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset byteOffset = 0 } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffff...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){// Empty buffer means no match\n if(buffer.length===0)return -1;// Normalize byteOffset\n if(typeof byteOffset==='string'){encoding=byteOffset;byteOffset=0;}else if(byteOffset>0x7fffffff){byteOffset=0x7fffffff;}else if(byteOffset<-0x80000000){byte...
[ "0.82827944", "0.82551014", "0.82551014", "0.8253447", "0.8253447", "0.8253447", "0.8253447", "0.8253447", "0.8253447", "0.8253447", "0.8253447", "0.8248611", "0.82462674", "0.82445997", "0.82445997", "0.8228133", "0.8220099", "0.8218732", "0.8218732", "0.8218732", "0.8218732...
0.0
-1
Need to make sure that buffer isn't trying to write out of bounds.
function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeBuffer(buffer, pos, src) {\n src.copy(buffer, pos)\n return src.length\n}", "function writeBuffer(buffer, pos, src) {\n src.copy(buffer, pos)\n return src.length\n}", "ensure(n) {\n let minsize = this.pos + n;\n if (minsize > this.capacity) {\n let cap = this.capacity * 2;\n w...
[ "0.66712785", "0.66712785", "0.6632945", "0.65210676", "0.63827264", "0.62754023", "0.62562263", "0.62335545", "0.62335545", "0.61056054", "0.6035937", "0.6017502", "0.59810936", "0.5959609", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.5951102", "0.595...
0.0
-1
Removes all keyvalue entries from the hash.
function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", ...
[ "0.67331547", "0.66229314", "0.65130246", "0.6456053", "0.62131137", "0.6201214", "0.6139392", "0.61100906", "0.6029288", "0.5966744", "0.59360605", "0.59072584", "0.59072584", "0.59072584", "0.59040016", "0.5900616", "0.5900616", "0.5900616", "0.58648694", "0.58648694", "0.5...
0.0
-1
Removes all keyvalue entries from the list cache.
function listCacheClear() { this.__data__ = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}", "function listCacheClear() ...
[ "0.73586595", "0.73586595", "0.73586595", "0.73586595", "0.7318183", "0.7265705", "0.7265705", "0.72641057", "0.72572887", "0.72572887", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", ...
0.0
-1
Removes all keyvalue entries from the map.
function mapCacheClear() { this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function multiMapRemo...
[ "0.7589402", "0.70686156", "0.673569", "0.6651485", "0.6528891", "0.6266802", "0.6257602", "0.6257602", "0.6257602", "0.6170819", "0.6170819", "0.6170819", "0.616584", "0.6152476", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0...
0.0
-1
Removes all keyvalue entries from the stack.
function stackClear() { this.__data__ = new ListCache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear () {\n this._dict = {}\n this._stack = [this._dict]\n }", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear() {\n\t this.__...
[ "0.63577217", "0.63291264", "0.63291264", "0.63291264", "0.62734073", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006"...
0.0
-1
Removes all keyvalue entries from the hash.
function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", ...
[ "0.67331547", "0.66229314", "0.65130246", "0.6456053", "0.62131137", "0.6201214", "0.6139392", "0.61100906", "0.6029288", "0.5966744", "0.59360605", "0.59072584", "0.59072584", "0.59072584", "0.59040016", "0.5900616", "0.5900616", "0.5900616", "0.58648694", "0.58648694", "0.5...
0.0
-1
Removes all keyvalue entries from the list cache.
function listCacheClear() { this.__data__ = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}", "function listCacheClear() ...
[ "0.73586595", "0.73586595", "0.73586595", "0.73586595", "0.7318183", "0.7265705", "0.7265705", "0.72641057", "0.72572887", "0.72572887", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", "0.72368693", ...
0.0
-1
Removes all keyvalue entries from the map.
function mapCacheClear() { this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function multiMapRemo...
[ "0.7589402", "0.70686156", "0.673569", "0.6651485", "0.6528891", "0.6266802", "0.6257602", "0.6257602", "0.6257602", "0.6170819", "0.6170819", "0.6170819", "0.616584", "0.6152476", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0.6147431", "0...
0.0
-1
Removes all keyvalue entries from the stack.
function stackClear() { this.__data__ = new ListCache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear () {\n this._dict = {}\n this._stack = [this._dict]\n }", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear() {\n\t this.__...
[ "0.63577217", "0.63291264", "0.63291264", "0.63291264", "0.62734073", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006"...
0.0
-1