query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Generate Random Fractions with JavaScript Random numbers are useful for creating random behavior. JavaScript has a Math.random() function that generates a random decimal number between 0 (inclusive) and not quite up to 1 (exclusive). Thus Math.random() can return a 0 but never quite return a 1 Note Like Storing Values ...
function randomFraction() { // Only change code below this line. var result = 0; // Math.random() can generate 0. We don't want to return a 0, // so keep generating random numbers until we get one that isn't 0 while (result === 0) { result = Math.random(); } return result; // Only change co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomFraction() {\n\n return Math.random();\n}", "function randomFraction() {\n var random = Math.random();\n return random;\n}", "function randomFraction() {\n\n // Only change code below this line\n // Math.random() returns decimal x where: 0 <= x < 1\n // Math.random can never return 1...
[ "0.90718466", "0.9042516", "0.8937583", "0.87177986", "0.86076075", "0.6969647", "0.6694422", "0.66428185", "0.65557605", "0.64738125", "0.6457785", "0.6442733", "0.64146906", "0.63689566", "0.6324166", "0.63234216", "0.6298639", "0.6281306", "0.6276429", "0.62503904", "0.624...
0.9044956
1
BY DEFAULT STEPS //////////////////// / INIT each of the filter groups
function setFiltersDic() { $('.button-group').each(function() { initGroupFromFilters( $(this) ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initGroupFromFilters(group) {\n var data = group.attr('data-filter-group');\n filters[data] = {\n \"star\" : undefined,\n \"list\" : []\n };\n\n var star = group.find('.filter-button[data-filter=\"*\"]');\n if (star.length != 0) filters[data][\"star\"] = star.eq(0);\n}", "_a...
[ "0.7550599", "0.73761016", "0.6936579", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", "0.6874211", ...
0.737917
1
CHECK first star input of each filter group
function checksFirstStar() { $('.button-group').each(function() { checkOnlyStar($(this)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkOnlyStar(group) {\n var found = false;\n group.find('.filter-button').each(function() {\n var ths = $(this);\n if (ths.attr('data-filter') == \"*\" && !found) {\n check(ths.find('input').eq(0));\n found = true;\n }\n else\n uncheck(th...
[ "0.66314816", "0.5750802", "0.57481366", "0.57457227", "0.57457227", "0.57457227", "0.5495966", "0.5495966", "0.5477075", "0.5315055", "0.5288327", "0.52882266", "0.5275695", "0.5263317", "0.5237829", "0.5234111", "0.52334696", "0.52334696", "0.52334696", "0.5229427", "0.5207...
0.6296859
1
MANIPS OF var filters & filtersList //////////////////// / INITIATE the filters[group] attached to $group : > finds the star in the group > initiates filters list at empty list
function initGroupFromFilters(group) { var data = group.attr('data-filter-group'); filters[data] = { "star" : undefined, "list" : [] }; var star = group.find('.filter-button[data-filter="*"]'); if (star.length != 0) filters[data]["star"] = star.eq(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilterToGroupListFromFilters(group, list) {\n filters[group.attr('data-filter-group')][\"list\"] = list;\n}", "function addFilterToGroupListFromFilters(group, filter) {\n filters[group.attr('data-filter-group')][\"list\"].push(filter);\n}", "function changeToFiltersList() {\n for (var grou...
[ "0.7053058", "0.6983789", "0.6917838", "0.6913691", "0.6881111", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "0.66642714", "...
0.8263515
0
EMPTIES the filtersList of $group
function cleanGroupListFromFilters(group) { filters[group.attr('data-filter-group')]["list"] = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilterToGroupListFromFilters(group, list) {\n filters[group.attr('data-filter-group')][\"list\"] = list;\n}", "function changeToFiltersList() {\n for (var group in filters) filtersList[group] = filters[group][\"list\"];\n}", "function addFilterToGroupListFromFilters(group, filter) {\n filt...
[ "0.7653638", "0.7531466", "0.7343447", "0.6988518", "0.68731457", "0.68127567", "0.66017437", "0.6564515", "0.6533432", "0.64445233", "0.63811076", "0.6345633", "0.62477016", "0.62188226", "0.62043625", "0.6201514", "0.6160897", "0.6134437", "0.6134437", "0.6134437", "0.61344...
0.75806475
1
ADDS a filter to list of GroupName
function addFilterToGroupListFromFilters(group, filter) { filters[group.attr('data-filter-group')]["list"].push(filter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilterToGroupListFromFilters(group, list) {\n filters[group.attr('data-filter-group')][\"list\"] = list;\n}", "function changeToFiltersList() {\n for (var group in filters) filtersList[group] = filters[group][\"list\"];\n}", "_addFilters() {\n this._createGroupOfFavorites();\n ...
[ "0.72408783", "0.6876865", "0.67230964", "0.6692338", "0.65448034", "0.6518239", "0.64423555", "0.6414141", "0.64063483", "0.63237643", "0.6247312", "0.6217915", "0.616868", "0.6158597", "0.6129966", "0.609798", "0.60842335", "0.60535514", "0.60535514", "0.60535514", "0.60535...
0.78611493
0
SETS a filter to list of GroupName
function setFilterToGroupListFromFilters(group, list) { filters[group.attr('data-filter-group')]["list"] = list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addFilterToGroupListFromFilters(group, filter) {\n filters[group.attr('data-filter-group')][\"list\"].push(filter);\n}", "function changeToFiltersList() {\n for (var group in filters) filtersList[group] = filters[group][\"list\"];\n}", "function cleanGroupListFromFilters(group) {\n filters[gr...
[ "0.74446535", "0.7408221", "0.72624326", "0.6860333", "0.66561234", "0.66406405", "0.64347255", "0.6373577", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998", "0.6355998"...
0.792969
0
CHANGES filtersList with filters groups lists
function changeToFiltersList() { for (var group in filters) filtersList[group] = filters[group]["list"]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilterToGroupListFromFilters(group, list) {\n filters[group.attr('data-filter-group')][\"list\"] = list;\n}", "function cleanGroupListFromFilters(group) {\n filters[group.attr('data-filter-group')][\"list\"] = [];\n}", "function onFiltersChanged(filters){\n\n }", "function addFilterToGroup...
[ "0.7018232", "0.695218", "0.6841912", "0.67625195", "0.6600659", "0.6494353", "0.63811046", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", "0.6357158", ...
0.7825064
0
MANIPS OF INPUT FILTERS //////////////////// /checks only the first star filter of each group
function checkOnlyStar(group) { var found = false; group.find('.filter-button').each(function() { var ths = $(this); if (ths.attr('data-filter') == "*" && !found) { check(ths.find('input').eq(0)); found = true; } else uncheck(ths.find('input')....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyAdditionalFilter(nextFilter, previousFilterNodeArray) {\n const nextFilterArray = filterAppNodes(nextFilter);\n const andFilterArray = previousFilterNodeArray.filter(node => nextFilterArray.includes(node));\n if (andFilterArray.length === 0) {\n alert(\"There is are no nodes with this...
[ "0.57190746", "0.56842226", "0.5683471", "0.5675525", "0.56712306", "0.56712306", "0.56712306", "0.5640271", "0.55402535", "0.55402535", "0.55402535", "0.5511919", "0.5504232", "0.5496051", "0.5495891", "0.54847914", "0.54847914", "0.54693425", "0.54406434", "0.54378074", "0....
0.68163097
0
returns whether none of the filters in the group is checked (true) or else
function noneChecked(group) { var inputs = group.find('.filter-button input'); for (var inp of inputs) if (isChecked($(inp))) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterListIsChecked() {\n for (var i = 0; i < filters.length; i++) {\n if (filters[i].checked) {\n return true;\n break;\n }\n }\n return false;\n}", "get allCompUnChecked() {\n return this.options.length == 0 || this.options.findIndex(val => val.metaName == this.currentView &&...
[ "0.7122769", "0.68261564", "0.66735315", "0.6628086", "0.64955676", "0.64140236", "0.6275497", "0.62745345", "0.6252181", "0.62327653", "0.6206342", "0.61806947", "0.6113579", "0.60739934", "0.60675997", "0.60675997", "0.60675997", "0.6045091", "0.6045091", "0.6045091", "0.60...
0.74844414
0
input is the list to be incremented maxs is the respective max of each el of input THAT CAN BE REACHED ex if you count in binary and input.length == 4 then maxs = [2,2,2,2] returns the input incremented by 1 if possible or else false (if input already at max) other example : maxs = [5, 2, 0, 2] input = [4, 2, 0, 1] inc...
function increment(input, maxs) { if (input.length != maxs.length) return false; for (var i = 0; i < input.length; i++) if (input[i]>maxs[i]) return false; for (var i = input.length - 1; i >= 0; i--) { if (input[i] != (maxs[i])) { input[i] ++; return input; } else {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function increaseArray(array, max) {\n\tfor (let index = array.length -1; index >= 0; index--) {\n\t\tif (array[index] < max) {\n\t\t\tarray[index] += 1\n\t\t\treturn array\n\t\t} else {\n\t\t\tarray[index] = 0\n\t\t}\n\t}\n\treturn false\n}", "function finfMaxIncreasingSequence(inputSequence){\n var i, len,\...
[ "0.65253323", "0.61611164", "0.61578614", "0.6137971", "0.61082053", "0.59275776", "0.57979566", "0.56756866", "0.56682646", "0.55832976", "0.55743945", "0.55649877", "0.55626553", "0.5558419", "0.55410445", "0.5526154", "0.5511558", "0.5505601", "0.5484613", "0.54683626", "0...
0.8349443
0
This function creates a webGL color buffer.
static initColorBuffer(colorData) { ColorShader.colorBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, ColorShader.colorBuffer); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(colorData), gl.STATIC_DRAW); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setColors(gl) {\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Uint8Array([\n // left column front\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n 200, 70, 120,\n\n // top rung front\n...
[ "0.7003918", "0.67180693", "0.6705676", "0.6686928", "0.66660154", "0.6524053", "0.650628", "0.6499444", "0.64868474", "0.6463222", "0.64246523", "0.63701886", "0.6367185", "0.6332039", "0.63310075", "0.6312008", "0.6302683", "0.6288411", "0.6247982", "0.62274224", "0.6217544...
0.7130498
0
start hitung total semua barang sesuai qty
function hitung_total() { var total_harga = 0; $('.baris-barang').each(function () { var i = $('.properti-barang', this); var harga = $(i).data('harga'); var qty = $(i).val(); total_harga = total_harga + (harga * qty); }); return total_harga; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quantidadeMudou() {\n\twriteTotal(calculateTotalProducts()); // altera o valor do total\n}", "function total_barang()\r\n{\r\n var total = 0;\r\n var data = data_keranjang();\r\n\r\n $.each(data.isi_keranjang, function (index, value) { \r\n total = total + (value.qty*value.harga_brg);\...
[ "0.705017", "0.66737884", "0.6614941", "0.6553443", "0.6495824", "0.6491591", "0.64734006", "0.6463946", "0.64611924", "0.64177865", "0.636961", "0.63658744", "0.63523716", "0.6350135", "0.63481367", "0.63460845", "0.63350326", "0.63350326", "0.63201225", "0.63193417", "0.630...
0.67733026
1
wrapper function to wave right arm
function waveRightArm() { misty.MoveArmDegrees( "right", // right arm -80, // raise 80 degrees, 30); // 30% speed misty.Pause(3000); misty.MoveArmDegrees("both", 80, 30); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wave() {\n //console.log('todo'); //todo\n}", "function wave(tone) {\r\n var _shape = Synth[shape()];\r\n var _amShape = Synth[amShape()];\r\n var _amFreq = tone / 20;\r\n\r\n return function (t) {\r\n return _shape(\r\n tone...
[ "0.6587686", "0.6217339", "0.6144137", "0.5967882", "0.5964644", "0.59292483", "0.5917544", "0.58783716", "0.5867788", "0.58080107", "0.57646435", "0.5689936", "0.5680603", "0.5673398", "0.5613678", "0.56133854", "0.5600276", "0.5597473", "0.55864024", "0.5576624", "0.5554881...
0.76279324
0
callback function for FaceRec events
function _FaceRec(data) { // store value of detected face var faceDetected = data.PropertyTestResults[0].PropertyParent.Label; // log detected face misty.Debug("misty sees " + faceDetected); // wave if person is recognized, act confused if not var faceID = "vivi"; if (faceDetected == faceID) { misty....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _registerFaceRec() {\n // cancel any running face recognition\n misty.StopFaceRecognition();\n // start face recognition\n misty.StartFaceRecognition();\n // add a property test to limit when the callback function should be invoked\n // if the test was not there, all FaceRecognition events would inv...
[ "0.7218142", "0.6290078", "0.6153147", "0.6153147", "0.61068517", "0.60646445", "0.5998006", "0.5952181", "0.5869682", "0.5832388", "0.5762624", "0.57412493", "0.56998086", "0.56969637", "0.56930435", "0.5689086", "0.56599194", "0.5656464", "0.563962", "0.5590966", "0.5576899...
0.68727195
1
Render scoreboard data template in HTML block's body.
render() { if (!this._data) { return; } this._el.innerHTML = scoreboardTableTemplate(); this._scoreboardTableBodyRoot = this._el.querySelector('.js-scoreboard-tbody'); this.renderData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderData() {\n if (!this._scoreboardTableBodyRoot) {\n return;\n }\n const data = {'data' : this._data};\n this._scoreboardTableBodyRoot.innerHTML = scoreboardTbodyTemplate(data);\n }", "function genHTML(data) {\n\tconst gameDiv = document.querySelector('#game');\n\tconst cols = 6;\n\tconst q...
[ "0.74949676", "0.63831764", "0.63824135", "0.62031233", "0.61851776", "0.6157201", "0.61238295", "0.58802617", "0.5795335", "0.5793427", "0.5789923", "0.5772481", "0.57710737", "0.57565755", "0.5747181", "0.5746475", "0.57396764", "0.5738557", "0.5719492", "0.570832", "0.5701...
0.74952155
0
Render scoreboard data template in scoreboard table body.
renderData() { if (!this._scoreboardTableBodyRoot) { return; } const data = {'data' : this._data}; this._scoreboardTableBodyRoot.innerHTML = scoreboardTbodyTemplate(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n if (!this._data) {\n return;\n }\n this._el.innerHTML = scoreboardTableTemplate();\n this._scoreboardTableBodyRoot = this._el.querySelector('.js-scoreboard-tbody');\n this.renderData();\n }", "function buildResultTable(data) {\n var table = '<table class=\"scoreboard\">';\n ...
[ "0.83747536", "0.6513808", "0.6470752", "0.63732153", "0.63462687", "0.6277676", "0.6267081", "0.618867", "0.6186238", "0.61799765", "0.6128483", "0.61271745", "0.609308", "0.6088695", "0.60880727", "0.6027491", "0.60224247", "0.60100174", "0.6008153", "0.5993606", "0.5978969...
0.8313164
1
Register validator in registry only if acton is used
function register() { const foundationRegistry = $(window).adaptTo("foundation-registry"); // Make target 'validatable' foundationRegistry.register("foundation.validation.selector", { submittable: TARGET_SEL, candidate: TARGET_SEL + ':not([disabled])', exclusi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "registerValidator(validators) {\n for (const [k, v] of Object.entries(validators)) {\n if (k in this.validators) {\n throw `model '${k}' already registered`;\n }\n\n this.validators[k] = v;\n }\n }", "registerMoreValidate() {}", "checkValidator (...
[ "0.6391479", "0.63814026", "0.6348379", "0.6108596", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", "0.61025006", ...
0.68662775
0
Check that values are in list.
function valueInList(alist:array, values:string, descr:string) { // Verify that value is in alist. if (values === "" ) return; var vlist=values.split(','); for (var vind in vlist) { var vval=vlist[vind]; if (alist.indexOf(vval)<0) throw "Invalid "+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contains(list, value) {\n\t// check every item in the list until we find the item\n\tvar valueExists = false;\n\tvar counter = 0;\n\twhile (!valueExists && counter < list.length) {\n\t\tif (value == list[counter]) {\n\t\t\tvalueExists = true;\n\t\t}\n\t\tcounter = counter + 1;\n\t}\n\treturn valueExists;\...
[ "0.72458863", "0.7044404", "0.70303714", "0.7027722", "0.70107496", "0.6922262", "0.68920505", "0.68529606", "0.6775183", "0.6753499", "0.6732073", "0.66113144", "0.66110885", "0.6584947", "0.6513966", "0.65058315", "0.6466046", "0.64628136", "0.6431889", "0.6409318", "0.6395...
0.72155255
1
Normal DataTable. Enable By TableID
function EnableDataTableByTableID_CustomDataTableDataJS(TableID) { $("#" + TableID).dataTable({ "bDestroy": true, "bAutoWidth": true, "iDisplayLength": 10, "sPaginationType": "full_numbers", "iDisplayLength": 10, "aLengthMenu": [[10, 20, 30, 50, 100, 150, 200, 500, 10...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnableDataTableByTableIDWithFirstColumnSortableDisabled_CustomDataTableDataJS(TableID) {\n $(\"#\" + TableID).dataTable({\n \"bDestroy\": true,\n \"bAutoWidth\": true,\n \"iDisplayLength\": 10,\n \"sPaginationType\": \"full_numbers\",\n \"iDisplayLength\": 10,\n ...
[ "0.67693466", "0.67693466", "0.6411504", "0.6240502", "0.6207627", "0.6177273", "0.6082119", "0.5967414", "0.5939857", "0.59288305", "0.59228075", "0.58999956", "0.58868617", "0.57860285", "0.5777602", "0.5761228", "0.57183504", "0.5712974", "0.569928", "0.568905", "0.5685020...
0.72229844
0
DataTable With Last Column Sortable Disable. Enable By TableIDe
function EnableDataTableByTableIDWithLastColumnSortableDisabled_CustomDataTableDataJS(TableID) { $("#" + TableID).dataTable({ "bDestroy": true, "bAutoWidth": true, "iDisplayLength": 10, "sPaginationType": "full_numbers", "iDisplayLength": 10, "aLengthMenu": [[10, 20, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnableDataTableByTableIDWithFirstColumnSortableDisabled_CustomDataTableDataJS(TableID) {\n $(\"#\" + TableID).dataTable({\n \"bDestroy\": true,\n \"bAutoWidth\": true,\n \"iDisplayLength\": 10,\n \"sPaginationType\": \"full_numbers\",\n \"iDisplayLength\": 10,\n ...
[ "0.7124238", "0.7124238", "0.71181494", "0.677553", "0.66660404", "0.64978045", "0.64028245", "0.631848", "0.62649995", "0.618579", "0.6106598", "0.60866654", "0.6077657", "0.60754824", "0.60645854", "0.6038253", "0.6036273", "0.6032168", "0.59683615", "0.5935656", "0.5933530...
0.7677612
0
DataTable With First Column Sortable Disable. Enable By ClassName
function EnableDataTableByClassNameWithFirstColumnSortableDisabled_CustomDataTableDataJS(ClassName) { $("." + ClassName).dataTable({ "bDestroy": true, "bAutoWidth": true, "iDisplayLength": 10, "sPaginationType": "full_numbers", "iDisplayLength": 10, "aLengthMenu": [[1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnableDataTableByTableIDWithFirstColumnSortableDisabled_CustomDataTableDataJS(TableID) {\n $(\"#\" + TableID).dataTable({\n \"bDestroy\": true,\n \"bAutoWidth\": true,\n \"iDisplayLength\": 10,\n \"sPaginationType\": \"full_numbers\",\n \"iDisplayLength\": 10,\n ...
[ "0.73207396", "0.73207396", "0.68268824", "0.64149004", "0.62903106", "0.624679", "0.6213047", "0.6210889", "0.62033975", "0.61653143", "0.61649936", "0.61213094", "0.60831064", "0.60691416", "0.60343236", "0.59736615", "0.5894867", "0.5879638", "0.5850675", "0.5836443", "0.5...
0.8205001
0
DataTable With First Column Sortable Disable. Enable By TableID
function EnableDataTableByTableIDWithFirstColumnSortableDisabled_CustomDataTableDataJS(TableID) { $("#" + TableID).dataTable({ "bDestroy": true, "bAutoWidth": true, "iDisplayLength": 10, "sPaginationType": "full_numbers", "iDisplayLength": 10, "aLengthMenu": [[10, 20,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnableDataTableByTableIDWithLastColumnSortableDisabled_CustomDataTableDataJS(TableID) {\n $(\"#\" + TableID).dataTable({\n \"bDestroy\": true,\n \"bAutoWidth\": true,\n \"iDisplayLength\": 10,\n \"sPaginationType\": \"full_numbers\",\n \"iDisplayLength\": 10,\n ...
[ "0.76643205", "0.72036546", "0.6523595", "0.6467958", "0.6450372", "0.642141", "0.6374327", "0.63547504", "0.63365483", "0.6310596", "0.63001037", "0.6289319", "0.62127304", "0.62080973", "0.61788195", "0.6176186", "0.61653334", "0.6140582", "0.6116988", "0.6106827", "0.61013...
0.8170335
1
DataTable With Display Length 5. Enable By Class Name
function EnableDataTableByClassName_CustomDataTableDataJS(ClassName) { $('.' + ClassName).dataTable({ "bDestroy": true, "iDisplayLength": 5, "sPaginationType": "full_numbers", "aLengthMenu": [[5, 10, 20, 30, 50, 100, 150, 200, 500, 1000], [5, 10, 20, 30, 50, 100, 150, 200, 500, 1000]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnableDataTableByTableIDWithDisplayLength_5_CustomDataTableDataJS(TableID) {\n $('#' + TableID).dataTable({\n \"bDestroy\": true,\n \"iDisplayLength\": 5,\n \"sPaginationType\": \"full_numbers\",\n \"aLengthMenu\": [[5, 10, 20, 30, 50, 100, 150, 200, 500, 1000], [5, 10, 20, ...
[ "0.67266357", "0.6195048", "0.6130446", "0.57643926", "0.57643926", "0.57643926", "0.57643926", "0.57643926", "0.57643926", "0.57643926", "0.57643926", "0.57382464", "0.5732528", "0.5634854", "0.56282705", "0.55476147", "0.5545887", "0.55262357", "0.551059", "0.5450175", "0.5...
0.62853634
1
DataTable With Display Length 5. Enable By TableID
function EnableDataTableByTableIDWithDisplayLength_5_CustomDataTableDataJS(TableID) { $('#' + TableID).dataTable({ "bDestroy": true, "iDisplayLength": 5, "sPaginationType": "full_numbers", "aLengthMenu": [[5, 10, 20, 30, 50, 100, 150, 200, 500, 1000], [5, 10, 20, 30, 50, 100, 150, 20...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnableDataTableByTableID_CustomDataTableDataJS(TableID) {\n $(\"#\" + TableID).dataTable({\n \"bDestroy\": true,\n \"bAutoWidth\": true,\n \"iDisplayLength\": 10,\n \"sPaginationType\": \"full_numbers\",\n \"iDisplayLength\": 10,\n \"aLengthMenu\": [[10, 20, 30...
[ "0.62291235", "0.6157319", "0.6123226", "0.6023044", "0.6006004", "0.59889245", "0.59887207", "0.59761494", "0.59714204", "0.5929006", "0.5929006", "0.5929006", "0.5929006", "0.5929006", "0.5929006", "0.5929006", "0.5929006", "0.59284663", "0.59268075", "0.5916812", "0.590870...
0.77331114
0
DataTable With Copy/XSL/PDF and Last Column Sortable Disable. Enable By TableID
function EnableDataTableWithCopyXSLPDFAndLCSortableDisable_CustomDataTableDataJS(TableID) { $("#" + TableID).dataTable({ "bDestroy": true, "bAutoWidth": true, "iDisplayLength": 10, "sPaginationType": "full_numbers", "iDisplayLength": 10, "aLengthMenu": [[10, 20, 30, 5...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnableDataTableByTableIDWithFirstColumnSortableDisabled_CustomDataTableDataJS(TableID) {\n $(\"#\" + TableID).dataTable({\n \"bDestroy\": true,\n \"bAutoWidth\": true,\n \"iDisplayLength\": 10,\n \"sPaginationType\": \"full_numbers\",\n \"iDisplayLength\": 10,\n ...
[ "0.7043968", "0.7043968", "0.70227253", "0.6899803", "0.6777143", "0.6743724", "0.65240276", "0.6353803", "0.62655175", "0.62645173", "0.6238704", "0.62320065", "0.6225965", "0.62208384", "0.61709785", "0.6168034", "0.6157828", "0.61372924", "0.6122934", "0.6122194", "0.61206...
0.7332247
0
DataTable With First Column Sortable Disable. Enable By TableIDe
function EnableDataTableByTableIDWithFirstColumnSortableDisabled_CustomDataTableDataJS(TableID) { $("#" + TableID).dataTable({ "bDestroy": true, "bAutoWidth": true, "iDisplayLength": 10, "sPaginationType": "full_numbers", "iDisplayLength": 10, "aLengthMenu": [[10, 20,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EnableDataTableByClassNameWithFirstColumnSortableDisabled_CustomDataTableDataJS(ClassName) {\n $(\".\" + ClassName).dataTable({\n \"bDestroy\": true,\n \"bAutoWidth\": true,\n \"iDisplayLength\": 10,\n \"sPaginationType\": \"full_numbers\",\n \"iDisplayLength\": 10,\n...
[ "0.7425184", "0.73192537", "0.6802367", "0.66828585", "0.65805566", "0.6580542", "0.6506458", "0.6505323", "0.6457052", "0.64073867", "0.6342854", "0.632125", "0.62601405", "0.61892563", "0.6162248", "0.6162081", "0.61602664", "0.61358", "0.6077639", "0.60511553", "0.603799",...
0.7905128
0
iboxTools with full screen Directive for iBox tools elements in right corner of ibox with full screen option
function iboxToolsFullScreen($timeout) { return { restrict: 'A', scope: true, templateUrl: 'views/common/ibox_tools_full_screen.html', controller: function($scope, $element) { // Function for collapse ibox $scope.showhide = function() { var ibo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iboxToolsFullScreen($timeout) {\n return {\n restrict: 'A',\n scope: true,\n templateUrl: 'views/common/ibox_tools_full_screen.html',\n controller: function ($scope, $element) {\n // Function for collapse ibox\n $scope.showhi...
[ "0.7069388", "0.6970803", "0.60718906", "0.5907172", "0.58832437", "0.58634436", "0.58159256", "0.56455904", "0.5607371", "0.55754423", "0.5544224", "0.5543762", "0.5531563", "0.55166894", "0.547238", "0.54543185", "0.54513097", "0.5450116", "0.544351", "0.54232407", "0.54093...
0.6971958
1
minimalizaSidebar Directive for minimalize sidebar
function minimalizaSidebar($timeout) { return { restrict: 'A', template: '<a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="" ng-click="minimalize()"><i class="fa fa-bars"></i></a>', controller: function($scope, $element) { $scope.minimalize = function() { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minimalizaSidebar($timeout) {\n return {\n restrict: 'A',\n template: '<a class=\"navbar-minimalize minimalize-styl-2 btn btn-primary\" href=\"\" ng-click=\"minimalize()\"><i class=\"fa fa-bars\"></i></a>',\n controller: function ($scope, $element) {\n $scope.minimalize ...
[ "0.7368236", "0.73283225", "0.7326588", "0.72591186", "0.7206685", "0.69225955", "0.6871329", "0.6822739", "0.6710057", "0.6665748", "0.6616883", "0.65979195", "0.6588709", "0.65536195", "0.6551802", "0.65333796", "0.6477472", "0.64394575", "0.64020133", "0.63766634", "0.6373...
0.73673654
1
Transform results returned from back office about stats by category into readable data
function transformStatsByCategory(results) { const response = {}; const resultFiltered = results.filter(function(currentElement) { if (currentElement._id != 'Revenu' && currentElement._id != null) { return true; } }); response.labels = resultFilt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transform_data()\n\t\t\t\t{\n\n\t\t\t\tscope.values = [scope.data['label']];\n\t\t\t\tscope.categories = [];\n\t\t\t\tscope.categories_cache = []; //for caching categories, when small screen filter them (to show only small numbers of them)\n\t\t\t\tfor (var each in scope.data['data'])\n\t\t\t\t\t{\n\t\t\t...
[ "0.6252971", "0.5903662", "0.5852251", "0.58120334", "0.57754177", "0.57397765", "0.5695491", "0.56409526", "0.5617525", "0.55699396", "0.55645263", "0.5522775", "0.54736966", "0.5447936", "0.54375875", "0.54335797", "0.5428877", "0.54139894", "0.5391676", "0.53891426", "0.53...
0.77808064
0
stops game with alert when a winner is called;
function stopGame(gameWinner) { alert(gameWinner + "has won the match."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function end_turn() {\n swap_player();\n var winner = check_for_win(); \n if (winner != null) {\n declare_winner(winner);\n }\n draw_board();\n }", "function loseGame(){\n stopGame();\n alert(\"Game Over. You lost.\");\n}", "function loseGame(){\n stopGame();\n alert(\"Game Over. You l...
[ "0.786123", "0.76073325", "0.76073325", "0.7584471", "0.7566667", "0.7563401", "0.7510984", "0.74847883", "0.74632776", "0.7393773", "0.7377725", "0.7371967", "0.7355067", "0.7315384", "0.73035204", "0.7298627", "0.7282919", "0.72792715", "0.7272777", "0.7252178", "0.72249734...
0.77158135
1
function to check if all cells filled.. if allcellsfilled && nowinnercalled then game is a draw
function checkAllCells(){ if((filledCells.length = 9) && (gameWinner = undefined)){ gameIsDraw = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawCheck () {\n const fullSlot = []\n for (let i = 0; i < tableCell.length; i++) {\n // If the background color of the cell isn´t white push it to the array\n if (tableCell[i].style.backgroundColor !== 'white') {\n fullSlot.push(tableCell[i])\n }\n }\n // If the fullslot...
[ "0.7370779", "0.7368899", "0.7317507", "0.7255995", "0.7136419", "0.71288365", "0.7115043", "0.70574963", "0.7019861", "0.7012367", "0.69578856", "0.6906439", "0.6904258", "0.68501306", "0.679144", "0.67809296", "0.67770505", "0.6772932", "0.67591697", "0.675386", "0.6739525"...
0.8259583
0
Initailizes all loggers with the configuration saved in `/config/logConfig.json`
function initLoggers(config, $) { var log4js = require('log4js'); //logDir var logDir; if (config.logDir) { logDir = path.resolve(config.logDir); } else { logDir = path.join(__dirname, '../logs'); } try { if (!fs.statSync(logDir).isDirectory()) { fs.mkdi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n logger.config();\n}", "setDefault() {\n this.loggers = [];\n const defaultLogger = new Logger();\n this.add(defaultLogger);\n }", "function init() {\n\n var handlers = ['log.critical'];\n var level = config.logging.level;\n\n if (level === 'error') {\n ...
[ "0.7294654", "0.67577845", "0.65603465", "0.6266896", "0.6206226", "0.6178263", "0.6164076", "0.6047973", "0.6047973", "0.5994541", "0.5986423", "0.5973629", "0.59518003", "0.58057237", "0.57802504", "0.5776006", "0.574592", "0.5736186", "0.5729834", "0.5657821", "0.56244636"...
0.75073415
0
reurn qibla direction for a given location
direction(location) { var qiblaDir = this.getDirection(location, kaba); if (qiblaDir < 0) qiblaDir += 360; return qiblaDir; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set Directional(value) {}", "set Directional(value) {}", "function move(){\n switch (direction) {\n case 0:\n North();\n break;\n case 1:\n East();\n break;\n case 2:\n South();\n break;\n case 3:\n We...
[ "0.62325656", "0.62325656", "0.6169757", "0.6106012", "0.60741496", "0.60084236", "0.5988694", "0.59316164", "0.5913772", "0.59090775", "0.58605164", "0.5859941", "0.581781", "0.581781", "0.57507527", "0.5703183", "0.569528", "0.56864566", "0.56840163", "0.56389236", "0.56355...
0.6889446
0
embeds the Quantcast delivery tag (html head) if quantcast is enabled.
function embedQuantCastDeliveryTag() { if (!settings.quantcast.enabled) return; document.write('<scr' + 'ipt src="http://pixel.quantserve.com/seg/' + settings.quantcast.qacct + '.js" type="text/javascript"></scr' + 'ipt>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function embedQuantCastMeasurementTag() {\n if (!settings.quantcast.enabled) return;\n\n var elem = document.createElement('script');\n elem.src = (document.location.protocol == \"https:\" ? \"https://secure\" : \"http://edge\") + \".quantserve.com/quant.js\";\n elem.async = true;\n ...
[ "0.69488055", "0.53648925", "0.5244921", "0.5177358", "0.51415586", "0.49927026", "0.4979819", "0.4871505", "0.4824789", "0.4779146", "0.47687668", "0.475399", "0.471684", "0.46444786", "0.4641589", "0.45859218", "0.4560084", "0.4548467", "0.4544945", "0.4505997", "0.4496909"...
0.8017499
0
embeds the Quantcast measurement tag (footer) if quantcast is enabled.
function embedQuantCastMeasurementTag() { if (!settings.quantcast.enabled) return; var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function embedQuantCastDeliveryTag() {\n if (!settings.quantcast.enabled) return;\n document.write('<scr' + 'ipt src=\"http://pixel.quantserve.com/seg/' + settings.quantcast.qacct + '.js\" type=\"text/javascript\"></scr' + 'ipt>');\n }", "function wcmSurveyPlaceInFooter() {\n if (wcmSurve...
[ "0.70826656", "0.52411795", "0.5184446", "0.5134811", "0.51270074", "0.49756497", "0.49748278", "0.49308792", "0.49159652", "0.49148798", "0.49120754", "0.49040788", "0.48903143", "0.48862934", "0.4848315", "0.48221081", "0.4810635", "0.4803266", "0.47578415", "0.47331417", "...
0.7104191
0
gets the hashtags (currently passed as "tag" for AdOps)
function getHashtags() { var hashtags = []; /** todo: get hashtags automagically? or just allow via setGlobalTargeting/init dfp_settings */ if( dfp_settings.global_targeting["tag"] != "" ) { hashtags = dfp_settings.global_targeting["tag"].split(","); var tagString = ""; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hashTags() {\n var t$$1 = tags.hashtags || '';\n return t$$1\n .split(/[,;\\s]+/)\n .map(function (s) {\n if (s[0] !== '#') { s = '#' + s; } // prepend '#'\n var matched = s.match(hashtagRegex);\n ...
[ "0.7765078", "0.7566712", "0.7296291", "0.7247183", "0.7225153", "0.7225153", "0.7149225", "0.7124834", "0.7037533", "0.6956962", "0.6852196", "0.68504655", "0.6791031", "0.6749931", "0.6637988", "0.65612054", "0.6527206", "0.64763397", "0.63679457", "0.62392384", "0.61363894...
0.7809732
0
Flushes all cmd functions to googletag.cmd.push();
function flushCmd() { var cmds = cmd.slice(0); cmd = []; for (var i=0; i<cmds.length; i++) { googletag.cmd.push(cmds[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function clearAllCmds(data) {\r\n\tawait chrome.storage.local.set({\"cmds_list\": []});\r\n}", "RemoveAllCommandBuffers() {}", "function push() { DEX(); DEX(); }", "RemoveCommandBuffers() {}", "static clearCommands() {\n for (const label in registeredCommands) {\n const command = registeredCo...
[ "0.6019282", "0.5629073", "0.55589736", "0.55486757", "0.5521348", "0.5476574", "0.5448868", "0.5435871", "0.5375117", "0.5371707", "0.53446096", "0.52881056", "0.52867866", "0.52346635", "0.52096665", "0.5202896", "0.51662374", "0.51289004", "0.50856835", "0.5052674", "0.505...
0.82504326
0
Convert svg dataurl to canvas element
async svg2canvas(svgDataURL, width, height) { const svgImage = await new Promise((resolve) => { var svgImage = new Image(); svgImage.onload = function() { resolve(svgImage); } svgImage.src = svgDataURL; }) var canvas = document.crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImgData(chartContainer) {\n var chartArea = chartContainer.getElementsByTagName('svg')[0].parentNode;\n var svg = chartArea.innerHTML;\n var doc = chartContainer.ownerDocument;\n var canvas = doc.createElement('canvas');\n canvas.setAttribute('width', chartArea.offsetWidth);\n canvas....
[ "0.6415968", "0.63816655", "0.6368016", "0.6155735", "0.61515003", "0.6064711", "0.59538865", "0.5952086", "0.58456457", "0.58354753", "0.58273745", "0.57994026", "0.5767793", "0.5737766", "0.5737109", "0.56967854", "0.5687681", "0.56798035", "0.56520796", "0.5647834", "0.560...
0.7372269
0
Get the status and if is 'Analyzed', reload the page otherwise update the status
function getStatus(url, interval, target) { $('html, body').animate({ scrollTop: ($('section#analyze-section').offset().top) }, 1250, 'easeInOutExpo'); $.ajax({ method: 'GET', url: '/status/', data: {url: url}, timeout: 2000 }) .done(function (data) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStatus () {\n $.get('status.cgi',\n function (data) {\n $('div#status').html(data);\n });\n}", "function updateTrackStatus() {\n \n var trackStatus = \"incomplete\";\n var obj = true;\n for (var j = 0; j < pages.length; j++) {\n ...
[ "0.6630727", "0.6349358", "0.61968935", "0.60785085", "0.60334605", "0.6008634", "0.59862906", "0.598049", "0.59680015", "0.59606636", "0.59525406", "0.5947389", "0.59463036", "0.59351104", "0.5921503", "0.5877594", "0.5874871", "0.57951933", "0.5778478", "0.57777345", "0.574...
0.63690954
1
Is called when the button analyze is pressed POST /analyzerepo/ to analyze the repository. On success, reload the web
function analyzeRepository(url, target) { //TODO: Onlymodified $.ajax({ method: 'POST', url: '/analyze-repo/', data: {url: url, onlymodified:0} }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }) .always(function() { $(target).c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function triggerAnalysis() {\n if (analysisRunning) return;\n\n analysisRunning = true;\n\n chrome.tabs.query({active: true, currentWindow: true}, tabs => {\n toggleStatusBlinking();\n \n if (tabs[0].url.startsWith(\"chrome://\")) {\n analysisFail(\"Legal Buddy cannot run o...
[ "0.5888989", "0.5676114", "0.56338364", "0.5351805", "0.5351664", "0.5336595", "0.5316317", "0.5290025", "0.5278832", "0.52528644", "0.5188451", "0.51867", "0.51857954", "0.5116008", "0.5096027", "0.50858456", "0.50719637", "0.5041691", "0.5024722", "0.49997324", "0.4976551",...
0.58546317
1
Creates an instance of `FieldBuilder`.
function FieldBuilder(fieldOf) { this.fieldOf = fieldOf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createField (name) {\n return new Field(this, name);\n }", "function Field() {\n\tvar self = this;\n\tvar args = Array.prototype.slice.call(arguments);\n\tif(!(self instanceof Field)) {\n\t\treturn Field.create.apply(Field, args);\n\t} else {\n\t\tWidget.call(self);\n\t}\n}", "function FieldBuilder() {\n ...
[ "0.6295685", "0.6208896", "0.6161135", "0.56122756", "0.5600489", "0.5600489", "0.5600489", "0.5556982", "0.5542587", "0.5420594", "0.51862335", "0.51748914", "0.5124613", "0.5052801", "0.50487703", "0.50442773", "0.5033634", "0.50223684", "0.50223684", "0.49662086", "0.49638...
0.66365725
0
Handle the format parameter for fetch urls
function patchFetchFormat() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; if (options.type === "fetch") { if (options.fetch_format == null) { options.fetch_format = consumeOption(options, "format"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatURL (type, value, callback) {\n var url = 'https://api-v2.themuse.com/jobs?page=1&api_key=' + process.env.API_KEY\n if (type === 'location') {\n formatLocation(url, value, function (url) {\n callback(null, url)\n return\n })\n } else if (type === 'level') {\n formatLevel(url, v...
[ "0.64331645", "0.63607633", "0.6248496", "0.6232853", "0.61872005", "0.61553055", "0.61553055", "0.6099363", "0.6099363", "0.60908437", "0.608668", "0.60716575", "0.60633165", "0.60633165", "0.60633165", "0.60633165", "0.60633165", "0.60633165", "0.60633165", "0.60633165", "0...
0.6567419
0
cdn_subdomain and secure_cdn_subdomain 1) Customers in shared distribution (e.g. res.cloudinary.com) if cdn_domain is true uses res[15].cloudinary.com for both http and https. Setting secure_cdn_subdomain to false disables this for https. 2) Customers with private cdn if cdn_domain is true uses cloudnameres[15].cloudin...
function unsigned_url_prefix(source, cloud_name, private_cdn, cdn_subdomain, secure_cdn_subdomain, cname, secure, secure_distribution) { var prefix = void 0; if (cloud_name.indexOf("/") === 0) { return '/res' + cloud_name; } var shared_domain = !private_cdn; if (secure) { if (secure_distribution == nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function domained(host) {\n if (GLOBAL.CONFIG.subdomain && host && host.indexOf('.') < 0) {\n host = host + '.' + GLOBAL.CONFIG.subdomain;\n }\n return host;\n}", "makeCdnUrl(url, mods){\n const prefixPos = url.search('://')\n if (prefixPos !== -1) url = url.substr(prefixPos+3)\n\n let modStr = ''...
[ "0.5500248", "0.5474914", "0.5414798", "0.533102", "0.5295383", "0.52102673", "0.5181073", "0.5178607", "0.51672053", "0.5117358", "0.50850546", "0.50642043", "0.5049339", "0.5026972", "0.50246257", "0.5011189", "0.50065005", "0.49994358", "0.4955746", "0.4955746", "0.4955746...
0.6960212
0
Returns a URL that when invokes creates an zip archive and returns it.
function download_zip_url() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return exports.download_archive_url(merge(options, { target_format: "zip" })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createZip(filepaths, callback) {\n let callbackCalled = false;\n // There have been very occasional crashes in production due to the callback\n // function here being called multiple times.\n // I can't see why this might happen, so this function is a temporary way of\n // 1) preventing f...
[ "0.6192539", "0.6100931", "0.5803434", "0.56323093", "0.56271154", "0.5586308", "0.5546866", "0.5535096", "0.55093235", "0.5503502", "0.54963696", "0.5485155", "0.5464766", "0.545716", "0.54520255", "0.5404747", "0.53831106", "0.5362942", "0.52610844", "0.5222294", "0.5206582...
0.79363406
0
Split a range into the start and end values
function split_range(range) { // :nodoc: switch (range.constructor) { case String: if (!OFFSET_ANY_PATTERN_RE.test(range)) { return range; } return range.split(".."); case Array: return [first(range), last(range)]; default: return [null, null]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function range() {\r\n var arr = [];\r\n for (let i = 0; i < Math.floor((end - start) / step) + 1; i++) {\r\n arr.push(start + step * i);\r\n }\r\n return arr;\r\n }", "function splitRange(range, headerLen, dataLen) {\n return [\n ...
[ "0.72238195", "0.705614", "0.6950827", "0.69252306", "0.6876894", "0.6851639", "0.68225783", "0.68218666", "0.6782069", "0.6753834", "0.6747932", "0.6747646", "0.6741321", "0.67280734", "0.6725889", "0.6725889", "0.6723347", "0.67180556", "0.6714994", "0.6711945", "0.67026037...
0.7735856
0
END GameLetter BEGIN GameWord
function GameWord(word) { this.letters = this.makeLetters(word); this.isSolved = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newGame(){\n\tword = hangman.endGame();\n \tnumLetter = word.length;\n \thangman.endofGame = false;\n\timage.style.display = 'none';\n\tworldimg.style.display = \"block\";\n}", "function startGame(){\n\tvar word = hangman.getWord();\n\tword.display();\n\tgetUserGuess(word);\n}", "function displayWor...
[ "0.66539294", "0.66321653", "0.6506668", "0.6496285", "0.64498615", "0.6449751", "0.64489293", "0.642532", "0.6422232", "0.6367436", "0.6341119", "0.6329976", "0.62852865", "0.6279282", "0.6256658", "0.6250402", "0.62446505", "0.6240242", "0.62303287", "0.62225807", "0.620794...
0.67570627
0
Twostep argument splitting function that first splits arguments in quotes, and then splits up the remaining arguments if they are not part of a quote.
function splitArgsFromString(argsString) { let result = []; const quoteSeparatedArgs = argsString.split(/(\x22[^\x22]*\x22)/).filter(x => x); quoteSeparatedArgs.forEach(arg => { if (arg.match('\x22')) { result.push(arg.replace(/\x22/g, '')); } else { result = result.concat(arg.trim().split(' '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitargs(cmdline) {\n\tvar args1 = cmdline.trim().split(/\\\"/);\n\tvar result = [];\n\tfor (var i = 0; i < args1.length; i++) {\n\t\tif (i % 2) {\n\t\t\tif (args1[i - 1].charAt(args1[i - 1].length - 1) === ' ') result.push(args1[i]);\n\t\t\telse result[result.length - 1] += '\"' + args1[i] + '\"';\n\t\t...
[ "0.66718197", "0.6356916", "0.62354434", "0.6094557", "0.6055946", "0.6024746", "0.59503496", "0.5904168", "0.58212787", "0.5783395", "0.5783395", "0.5783395", "0.5783395", "0.5765775", "0.5765775", "0.5765775", "0.5765775", "0.5765775", "0.5765775", "0.5765775", "0.5765775",...
0.6368939
1
Constructs a new EKSTargetDetails. EKSTargetDetails defines details related to connecting to a EKS (Elastic Container Service) target
constructor() { EKSTargetDetails.initialize(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(options, additionalOptions) {\n var _a;\n super(options, additionalOptions);\n this.environmentId = options.credential_source.environment_id;\n // This is only required if the AWS region is not available in the\n // AWS_REGION or AWS_DEFAULT_REGION environment variabl...
[ "0.49150252", "0.479128", "0.47542796", "0.45102078", "0.44703832", "0.4427809", "0.44032493", "0.43638822", "0.42942643", "0.42925826", "0.42666757", "0.41271728", "0.41147223", "0.41143918", "0.41134134", "0.41098303", "0.41088635", "0.40962812", "0.40943342", "0.4081607", ...
0.7061023
0
initializing web3 providers and getting addresses 0x741f40106a56bCe6Cc6CE87C6fC52B5883fD72ae is the address of the deployed contract
async function initETH(){ const injectedProvider = window.ethereum; const addresses = await injectedProvider.enable(); const iWeb3 = new Web3(injectedProvider); address = addresses[0]; iUbi = new iWeb3.eth.Contract( abi, '0x6cE00BDf756f3a8afD0BDFBFC49dad28C171D482', {from: address} )...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async init() {\n if (!this.provider) {\n this.cb.call(this, \"error\", \"No Ethereum provider given.\");\n return;\n }\n if (!this.registryContract) {\n this.cb.call(this, \"error\", \"No registry contract found.\");\n return;\n }\n try...
[ "0.7100266", "0.6676664", "0.6662696", "0.6613269", "0.6561016", "0.6482469", "0.64772004", "0.64207333", "0.6398823", "0.6397134", "0.63748306", "0.6353327", "0.6238045", "0.62262094", "0.6159017", "0.6097618", "0.6076798", "0.60649467", "0.6008316", "0.59830785", "0.5965956...
0.7083415
1
Renicia las manos y las cartas jugadas de los jugadores
reiniciarManoMesa() { for(let jugador in this.jugadores) { this.jugadores[jugador].mano = []; this.jugadores[jugador].cartasJugadas = []; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Joc() {\r\n // Es demana el nombre de jugadors i es guarda en una variable.\r\n var nombreJugadors = parseInt(prompt(\"Introdueix el nombre de jugadors:\"));\r\n\t\r\n // Es creen els jugadors i es guarden en una llista.\r\n var jugadors = [];\r\n for (var i = 0; i < nombreJugadors; i++) {\...
[ "0.720913", "0.6724455", "0.6705569", "0.6371504", "0.62730074", "0.6101252", "0.6094998", "0.6076177", "0.6057383", "0.5962442", "0.59299034", "0.58512074", "0.5839949", "0.58348274", "0.577896", "0.57447594", "0.56801414", "0.5667995", "0.5667145", "0.56365454", "0.5631321"...
0.7111063
1
Actualiza los puntos del jugador
actualizarPuntosJugador(nombre, puntos) { this.tabla.jugadores.forEach(jugador => { if(jugador.nombre == nombre) { jugador.puntos = puntos; }; }); return this.tabla.actualizarPuntos(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function actualizar_datos_transferencia_puertos(nombre_puerto){\n d3.select(\"#puertos_cant_servicios\").text(relacion_puerto_servicio[nombre_puerto].servicios.length);\n loadDataToneladasExportacion_puerto(nombre_puerto,\"Exportación\");\n loadDataToneladasExportacion_puerto(nombre_puerto,\"Importación\"...
[ "0.60987675", "0.60870034", "0.59037787", "0.5887221", "0.57138056", "0.57010394", "0.5659489", "0.5643325", "0.5626759", "0.5586862", "0.55176187", "0.55057496", "0.5495831", "0.5399348", "0.53918475", "0.53892535", "0.53665024", "0.5345146", "0.53249764", "0.5318666", "0.52...
0.7099542
0
Muestra los jugadores en la tabla
agregarJugadoresTabla() { const { jugador, cpu } = this.jugadores; this.tabla.jugadores.push({ nombre: jugador.nombre, puntos: jugador.puntos }); this.tabla.jugadores.push({ nombre: cpu.nombre, puntos: cpu.puntos }); return this.tabla.dibujarJugadoresEnLaTabla(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostrarTableroJuego() {\n let tablero = \" \";\n for (let i = 0; i < campoMinas.length; i++) {\n if (i === 0) {\n for (let j = 0; j < campoMinas[i].length; j++) {\n if (j < 10) {\n tablero += \" \";\n }\n...
[ "0.73036754", "0.69215894", "0.67299455", "0.67114484", "0.6356482", "0.6351173", "0.62772644", "0.6271426", "0.62527615", "0.6210215", "0.6202283", "0.6176627", "0.61735034", "0.61665565", "0.6160692", "0.6146149", "0.6145901", "0.61443347", "0.6133604", "0.61297446", "0.611...
0.7320599
0
API call for 10 recent opponent games
function getOppData(match,client,done,userNewLastGameId,userOldGameReached,userGamesPlayed){ var match = match; var path = 'https://na.api.pvp.net/api/lol/na/v1.3/game/by-summoner/' + match.opponent_summoner_id + '/recent?api_key=' + API_KEY; request.get(path, function(err, response) { if (!err) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGameTop100(){\n $.ajax({\n type: 'GET',\n url: 'https://api.twitch.tv/helix/games/top?first=100', // we fetch the current top 100 game list \n dataType: 'json',\n timeout: 30000,\n headers: {\n '...
[ "0.708927", "0.6817117", "0.68046427", "0.6780386", "0.6734124", "0.6614055", "0.65569174", "0.6545745", "0.6543895", "0.65279144", "0.6482886", "0.6469332", "0.6464699", "0.6405711", "0.63531154", "0.63182354", "0.6297185", "0.62856686", "0.6239187", "0.6237672", "0.6204471"...
0.6934867
1
Get Opponent Mastery Data
function getOppChampMastery(match,client,done,userJson){ var match = match; var path = 'https://na.api.pvp.net/championmastery/location/NA1/player/' + match.opponent_summoner_id + '/champion/' + match.champion_id + '?api_key=' + API_KEY; request.get(path, function(err, response) { done(); if (!err) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAPOD() {\n Util.getJSON(APODAPIKEY, data => {\n let picData = {\n alt: data.explanation,\n src: data.url,\n title: data.title,\n href: data.url\n };\n putPicInCard(picData);\n });\n}", "championMastery (platformId, playerId) {\n const championMastery = RiotApi.get('h...
[ "0.5938948", "0.57776177", "0.5765978", "0.56706834", "0.5662747", "0.5599254", "0.55861413", "0.55798876", "0.55328506", "0.54906374", "0.54779035", "0.54772234", "0.54535437", "0.540631", "0.53913265", "0.5387871", "0.5387013", "0.5383295", "0.5375625", "0.53172934", "0.531...
0.5836242
1
Crea y prepara los sonidos.
function crearSonidos(){ console.log("Crea sonido"); sonidoMusica = game.add.audio('sonidoMusica'); sonidoMusica.play('',0,1,true); sonidoDisparo = game.add.audio('sonidoDisparo'); sonidoExplosion = game.add.audio('sonidoExplosion'); sonidoItem = game.add.audio('sonidoItem'); sonidoHerido = game.add.audio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function datosPreCargados() {\n //Cargo 2 docentes:\n crearUsuario(\"doc1\", \"Docente 1\", \"1234aB\", \"D\", \"\", \"\");\n crearUsuario(\"doc2\", \"Docente 2\", \"1234aB\", \"D\", \"\", \"\");\n crearUsuario(\"doc3\", \"Docente 3\", \"1234aB\", \"D\", \"\", \"\");\n //Cargo 2 alumnos:\n crearUsuario(\"alu...
[ "0.6057355", "0.5794099", "0.5601625", "0.5594787", "0.5545366", "0.55322564", "0.5515312", "0.55052495", "0.5461709", "0.54445124", "0.5407908", "0.5372831", "0.53620434", "0.53579915", "0.5337869", "0.5318174", "0.53167665", "0.5315271", "0.53049314", "0.5294558", "0.529330...
0.58396953
1
use XHR to load an audio track, and decodeAudioData to decode it and stick it in a buffer. Then we put the buffer into the source
function getData(url) { source = audioCtx.createBufferSource(); request = new XMLHttpRequest(); request.open('GET', url, true); request.responseType = 'arraybuffer'; request.onload = function() { var audioData = request.response; audioCtx.decodeAudioData(audioData, function(buffer) { sour...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getData(track) {\n var request = new XMLHttpRequest();\n request.open('GET', track + '.ogg', true);\n request.responseType = 'arraybuffer';\n\n\n request.onload = function() {\n audioCtx.decodeAudioData(request.response, function(buffer) {\n myBuffer = buffer;\n buffers.push(myBuffer)...
[ "0.78198063", "0.7494837", "0.7462935", "0.7326088", "0.72690886", "0.72312415", "0.72312415", "0.7196902", "0.7170068", "0.71088874", "0.7097438", "0.70579267", "0.7034424", "0.70199454", "0.70041835", "0.69823146", "0.69614637", "0.69514847", "0.69460696", "0.6882763", "0.6...
0.749716
1
A generic function used to send HTTP requests to the API. The "method" is the HTTP method, the "path" is the request path, and the "data" is the optional request payload.
function api(method, path, data) { // Returns a promise to the called, resolved with // the API response, or failure. return new Promise((resolve, reject) => { var request = new XMLHttpRequest(); // Resolves the promise using the parsed JSON // object - usually a chat. request.addEventListener('load', (e) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async request(method: string, path: string, data: string, opts: object = {}) {\n let response, logger = Logger.create(\"request\")\n logger.info(\"enter\", {method, path, data, opts})\n\n let url = `${this._baseUrl}/${path}`\n\n try {\n response = await this._http.request(met...
[ "0.71049947", "0.6544723", "0.6407153", "0.6370827", "0.6243181", "0.6235411", "0.6202005", "0.61872756", "0.6144056", "0.61431307", "0.61410767", "0.61047405", "0.6081617", "0.60374135", "0.60374135", "0.6033871", "0.5998682", "0.5980913", "0.5969259", "0.5919941", "0.590889...
0.66166884
1
Filters the "chat" object to include only new users and new messages. That is, data with a newer "timestamp" than when we last checked.
function filterChat(chat) { Object.assign(chat, { // Assigns the filtered arrays to the // corresponding "chat" properties. users: chat.users.filter( user => user.timestamp > timestamp ), messages: chat.messages.filter( message => message.timestamp > timestamp ) }); // Reset the "timestamp" so we...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateRecentChats(chat, index){\n if(document.getElementById(chat.id) !=null){\n setToMostRecent(chat.id, chat.message, chat.time);\n }\n else{\n appendRecentChat(chat, index);\n }\n}", "function chatHistory(chat) {\n for(var j=chat.length-1; j>=0; j--){\n var msg = c...
[ "0.59127146", "0.5896441", "0.5781493", "0.577853", "0.5726317", "0.57034284", "0.56936115", "0.56916237", "0.5655467", "0.5601169", "0.55975074", "0.55681634", "0.55616415", "0.55432516", "0.54942304", "0.54934216", "0.549278", "0.5485312", "0.54817474", "0.5454256", "0.5446...
0.78771883
0
Creates a chat using the given "topic" and "user". The returned promise is resolved with the created chat data.
function createChat(topic, user) { return api('post', 'api/chat', { topic: topic, user: user }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createChat() {\n\t\tswitcher(\n\t\t\t'users',\n\t\t\tnumOfChats,\n\t\t\t'Выберете пользователя для создания диалога',\n\t\t\tnull,\n\t\t\tfalse,\n\t\t);\n\t\tconst newTopic = prompt('Введите название нового чата', 'новый чат');\n\t\tif (newTopic !== null) {\n\t\t\tif (newTopic.trim().length === 0) {\n\t\t...
[ "0.6758781", "0.65039605", "0.6402227", "0.6225927", "0.60176396", "0.59707344", "0.59355676", "0.58200735", "0.57796776", "0.56602466", "0.5543889", "0.5538699", "0.5513909", "0.54838943", "0.5475389", "0.54426324", "0.5401299", "0.5401175", "0.5390352", "0.5334241", "0.5329...
0.82547355
0
Joins the given "user" to the given chat "id". The returned promise is resolved with the joined chat data.
function joinChat(id, user) { return api('post', `api/chat/${id}/join`, { user: user }).then(filterChat); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function userJoin(id, username, room) {\n return new Promise((resolve, reject) => {\n users.findOne({username}, {s_id:id})\n .then(user => {\n // check if use already exists\n if(user){\n // no need to create new user\n users.findOneAndUpdate({username}, {s_id:id})\n ...
[ "0.6369479", "0.62904197", "0.621613", "0.6214019", "0.6202468", "0.61462647", "0.6131363", "0.60436344", "0.604114", "0.6023779", "0.601412", "0.60114497", "0.6010827", "0.59171593", "0.5902543", "0.58880377", "0.5866387", "0.5760406", "0.57375365", "0.5729857", "0.5709922",...
0.7721807
0
Loads the given chat "id". The returned promise is resolved with filtered chat data.
function loadChat(id) { return api('get', `api/chat/${id}`) .then(filterChat); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getChat(\n chat_id\n ) {\n return this.request('getChat', this.buildQuery({\n 'chat_id': chat_id\n }));\n }", "function getchat(idchat){\r\n\t\t return listchat.find(function(chat){\r\n\t\t\t\t\t\treturn chat.idchat==idchat;\r\n\t\t\t\t\t\t});\r\n}", "findChatForId(chatId) {\n return this...
[ "0.71977496", "0.6831675", "0.6760118", "0.6713181", "0.66493106", "0.65743107", "0.651728", "0.6447462", "0.6402978", "0.62291586", "0.6222597", "0.6147972", "0.61348605", "0.6080217", "0.60788584", "0.6075909", "0.6008512", "0.59679353", "0.5884583", "0.5871926", "0.5833919...
0.85481673
0
Posts a "message" from the given "user" to the given chat "id". The returned promise is resolved with filtered chat data.
function sendMessage(id, user, message) { return api('post', `api/chat/${id}/message`, { user: user, message: message }).then(filterChat); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postMessage(message) {\n\n var defer = $q.defer();\n\n var info = 'sender=' + message.sender + '&message=' + message.message + '&created=' + message.created + '&chatid=' + message.chatid;\n\n $http({\n method: 'POST',\n url: originLoungeExpres...
[ "0.62051654", "0.6204562", "0.5886576", "0.5875", "0.5872923", "0.57451123", "0.5592462", "0.54889333", "0.54816765", "0.5479755", "0.5476041", "0.5474838", "0.5472322", "0.5472322", "0.5472322", "0.5441267", "0.5438197", "0.53861487", "0.53861487", "0.5377446", "0.5371793", ...
0.7352123
0
The generic promise resolver function. It's job is to post data back to the main thread using "postMessage()". It also returns the data so that it may be used further down in the promise resolution chain.
function resolve(data) { postMessage(Object.assign({ msgId: e.data.msgId }, data)); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_resolve(resolver, ...args) {\n const resolution = resolver(...args);\n if (resolution instanceof FancyPromise) {\n /**\n * \"Connect\" the callback/error handler from the promise we initially returned to set up the chain,\n * to this, the promise that is being returned by eventual asynchron...
[ "0.5981983", "0.5846612", "0.57493913", "0.5694649", "0.5694649", "0.5694649", "0.5694649", "0.5671996", "0.56608814", "0.5638344", "0.5582526", "0.5498728", "0.5488638", "0.5488638", "0.5472374", "0.54650426", "0.5449284", "0.5442063", "0.5439451", "0.543702", "0.54347414", ...
0.6972662
0
Edit transaction Makes use of the Add Income Modal
function addEditTransactionHandlerIncome() { let editBtns = [...document.querySelectorAll('.edit-income-icon')]; editBtns.forEach(function(item, index) { item.addEventListener('click', function() { let selectedIncome = currentUser.incomeItems[index]; modalIncome.classList.remove(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editTransaction (transID) {\r\n\t// Do nothing if the user is editing the transaction\r\n\tif (editing) {return;}\r\n\t\r\n\t//Change the Amount Field to a text box\r\n\tvar elAmount = $('#amount' + transID);\t\r\n\tvar amount = parseFloat(elAmount.html().replace(\"$\",\"\").replace(\",\",\"\"));\t\r\n\tv...
[ "0.63542193", "0.6339913", "0.6297016", "0.6290735", "0.62854415", "0.62044495", "0.6152307", "0.6105213", "0.6062639", "0.60602593", "0.60074335", "0.59912825", "0.5956605", "0.5951903", "0.5934721", "0.5930683", "0.59271145", "0.58999723", "0.5899514", "0.5848188", "0.58453...
0.6667871
0
Edit transaction Makes use of the Add Expense Modal
function addEditTransactionHandler() { let editBtns = [...document.querySelectorAll('.edit-expense-icon')]; editBtns.forEach(function(item, index) { item.addEventListener('click', function() { let selectedExpense = currentUser.expenseItems[index]; modalExpense.classList.remove('h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editExpense() {\n\n\t\n\t\t// grab the data from this specific expense from Local Storage\n\t\tvar value = localStorage.getItem(this.key);\n\t\tvar expenseObj = JSON.parse(value);\n\t\t\n\t\t// bring back the form to the display\n\t\ttoggleDisplay();\n\t\n\t\t// fill in the form with this specific expense...
[ "0.6691433", "0.6624388", "0.6469861", "0.64276016", "0.63135135", "0.62622005", "0.6255006", "0.624911", "0.624911", "0.624911", "0.624911", "0.624911", "0.624911", "0.62423176", "0.62365854", "0.6229052", "0.61882997", "0.6174554", "0.6171213", "0.6171213", "0.6133684", "...
0.66994977
0
on scroll highlight navigation bar
function navBarHighlight () { var windowScrollPositionTop = $(window).scrollTop(), navbar = $('#navbar'); if(windowScrollPositionTop > 0 ){ navbar.addClass('navbar-black'); } else { navbar.removeClass('navbar-black'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function navHighlight() {\n let currentPosition = window.scrollY + 80;\n removeBackground();\n if (currentPosition >= functions.offsetTop && currentPosition < premier.offsetTop) {\n link1.classList.add(\"hightlight\");\n }\n else if (currentPosition >= premier.offsetTop && currentPosition < about.offsetT...
[ "0.75508904", "0.7165648", "0.6989669", "0.6926708", "0.6907154", "0.6872816", "0.68443227", "0.6786252", "0.6785396", "0.6756011", "0.6750621", "0.67486745", "0.67239296", "0.6709486", "0.6704033", "0.66914517", "0.66858894", "0.6678358", "0.6676125", "0.66584575", "0.662559...
0.7761122
0
add remove css active class from navigation menu items
function navBarMenuItemSelection() { $(this).parents('ul').find('a').removeClass('active'); $(this).addClass('active'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeActiveClass(){\n\t\t$mainNav.removeClass('main-active');\n\t}", "function navActive() {\n $('.nav-item,nav,.menu-button').removeClass('active');\n var navItem = '.nav-item' + navCount;\n $(navItem).addClass('active');\n }", "function removeIsActiveFromMenu(){\n\t\t\tmenuI...
[ "0.76093316", "0.76022106", "0.7580108", "0.75185156", "0.7442564", "0.7412029", "0.7225976", "0.71701413", "0.7162083", "0.71180665", "0.7109597", "0.6998022", "0.6967055", "0.69351697", "0.69332486", "0.6924589", "0.69211924", "0.6900074", "0.68978214", "0.6877914", "0.6859...
0.7789357
0
update selected menu item on scroll and resize window
function navBarMenuItemSelectionOnScrollResize() { var sectionHomeTop = $('#section-home').position().top, sectionStrengthTop = $('#section-strength').position().top, sectionClientTop = $('#section-client').position().top, sectionContactTop = $('#section-contact').position()....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_menu(elem) {\n\t index = $(el).index( elem );\n\t $(apply_autoscroll_options.menu_selector).find(\"li\").removeClass(\"active\");\n\t $(apply_autoscroll_options.menu_selector).find(\"li:eq(\" + index + \")\").addClass(\"active\"); \n\t }", "function menu_up...
[ "0.6601478", "0.65240556", "0.6368882", "0.62376684", "0.62376684", "0.62376684", "0.62376684", "0.62376684", "0.6192596", "0.6187482", "0.6183657", "0.6166906", "0.6121435", "0.5984278", "0.5945055", "0.59134364", "0.5903469", "0.5895406", "0.5887643", "0.58747286", "0.58599...
0.70185024
0
handles reset button click event
function handleResetButtonEvent() { setTextFieldValue(""); handleTextFieldEvent(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onReset() {\n}", "handleReset(event) {\n this.selected = {};\n this.correctAnswers = 0;\n this.showMessage = false;\n }", "function reset(){}", "_reset() {\n this._emit({\n type: 'reset',\n parent: this\n });\n }", "function cb_resetState(){\n species = \"none\";\...
[ "0.76543164", "0.7652472", "0.7584946", "0.752487", "0.747673", "0.7456056", "0.741361", "0.7371682", "0.7357474", "0.7320754", "0.7308708", "0.730302", "0.72812325", "0.72812325", "0.72812325", "0.7277177", "0.7251574", "0.7205985", "0.7202604", "0.7200959", "0.7194159", "...
0.77534825
0
Displays a song's information
function displaySongInfo(song) { console.log("Artist: " + song.artists[0].name); console.log("Song: " + song.name); console.log("Preview: " + song.album.external_urls.spotify); console.log("Album name: " + song.album.name); console.log("------------"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function songDisplay() //display function\n\n {\n \n if(songIndex)\n {\n console.log(\"Song Id:\"+songDatabase[songIndex].songId+\"\\n\"+ \"Song title:\"+songDatabase[songIndex].title +\"\\n \"+\"Song artist\"+songDatabase[songIndex].artist);\n }\n else{\n\n console.log(\"Sorry!this ...
[ "0.7666749", "0.76666313", "0.71954066", "0.71705276", "0.71517783", "0.70762897", "0.70751774", "0.7040168", "0.7003466", "0.69904476", "0.69473636", "0.68710345", "0.68670094", "0.68592715", "0.6858115", "0.68469816", "0.68453074", "0.6798646", "0.6787067", "0.6782502", "0....
0.80833
0
/ Check if the user specified command line arguments. If so, check how we should start. You can schedule a manual recording from the command line doing something like: $ node sunriseController.js schedulerecordinginsec 5 recordingcameraip 192.168.1.51 recordforseconds 60
function scheduleRecordingUsingCommandLineArguments(opts) { if (false == validateCommandLineOptionsForManualRecording(opts)) { return false } var startRecordDate = new Date() startRecordDate.setSeconds(startRecordDate.getSeconds() + parseInt(opts['schedule-recording-in-sec'])) console.log(`Scheduling recording...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateCommandLineOptionsForManualRecording(opts) {\n\n if (undefined == opts['recording-camera-ip']) {\n\tconsole.log(opts);\n console.error(\"No --recording-camera-ip given, cannot schedule a recording.\");\n return false;\n }\n\n if (undefined == opts['record-for-seconds']) {\n console.err...
[ "0.6611667", "0.56000954", "0.55955774", "0.55653477", "0.5541767", "0.5486201", "0.5472526", "0.5435489", "0.54350775", "0.54161143", "0.54027385", "0.5395732", "0.5345771", "0.5225399", "0.520958", "0.5137028", "0.51352614", "0.5084938", "0.50700974", "0.5058628", "0.504383...
0.6475223
1
Using the sunrise table files to schedule a new recording.
function scheduleRecordingUsingSunriseTables() { parseDateFile("data/sunriseTables/2019.txt", function(data) { var today = new Date() prepNextSunrise(today, data) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scheduleRecording(date, dataPath, cameraIP, duration) {\n\tvar startRecorderJob = schedule.scheduleJob(date, function() {\n\t\tstartRecorder(dataPath, cameraIP, duration, function() {\n\t\t\tconsole.log(\"Scheduled new recording from camera: \" + cameraIP + \" at: \" + date + \" for duration: \" + duratio...
[ "0.6001845", "0.55360854", "0.5453144", "0.5425798", "0.53704864", "0.5288116", "0.5284829", "0.52440894", "0.5195904", "0.51891226", "0.51760983", "0.5166297", "0.5152935", "0.51378715", "0.51375437", "0.5104016", "0.50789016", "0.50575465", "0.503819", "0.502307", "0.501688...
0.83679783
0
Schedule a recording to happen at an individual date. date: When we should start the recording dataPath: Where to store the recordings cameraIP: The Camera IP address we pass to the parser.exe file. duration: Duration of the recording in seconds.
function scheduleRecording(date, dataPath, cameraIP, duration) { var startRecorderJob = schedule.scheduleJob(date, function() { startRecorder(dataPath, cameraIP, duration, function() { console.log("Scheduled new recording from camera: " + cameraIP + " at: " + date + " for duration: " + duration) }) }) return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startRecorder(dataPath, cameraIP, recordDuration, callback) {\n\tconsole.log(\"Start Recorder With Data Path: \" + dataPath)\n\tvar label = getFolderLabelFromDate(new Date())\n\n\tmkdirp(dataPath + \"/\" + label, function(err) {\n\t\tif(err) {\n\t\t\tthrow err\n\t\t}\n\t\tconsole.log(\"Starting Recorder\"...
[ "0.6524781", "0.633803", "0.5977104", "0.58040106", "0.56915754", "0.56304026", "0.5463677", "0.5460608", "0.5446596", "0.5436986", "0.53189534", "0.5283266", "0.52355427", "0.5224897", "0.51953536", "0.5191782", "0.51814675", "0.51511633", "0.513035", "0.5115884", "0.5113694...
0.8390024
0
Valdate if all the required command line arguments were given for a manual scheduled (via command line) recording.
function validateCommandLineOptionsForManualRecording(opts) { if (undefined == opts['recording-camera-ip']) { console.log(opts); console.error("No --recording-camera-ip given, cannot schedule a recording."); return false; } if (undefined == opts['record-for-seconds']) { console.error("No --record-f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scheduleRecordingUsingCommandLineArguments(opts) {\n\n\tif (false == validateCommandLineOptionsForManualRecording(opts)) {\n\t\treturn false\n\t}\n\n\tvar startRecordDate = new Date()\n\tstartRecordDate.setSeconds(startRecordDate.getSeconds() + parseInt(opts['schedule-recording-in-sec']))\n\tconsole.log(`...
[ "0.60602605", "0.54353833", "0.53716946", "0.5096408", "0.50794786", "0.50570244", "0.5028516", "0.49423143", "0.48428723", "0.4837859", "0.48366824", "0.4828163", "0.47619015", "0.47358704", "0.47093377", "0.4666535", "0.46609", "0.46519592", "0.4629231", "0.46231207", "0.46...
0.6822665
0
Parse the date file and save it as a variable.
function parseDateFile(file, callback) { fs.readFile(file, 'utf8', function(err, data) { if(err) { throw err } callback(data) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "postParse(filename){\n let info = {};\n\n info.year = filename.substring(0,4);\n info.month = filename.substring(5,7);\n info.day = filename.substring(8,10);\n info.ext = filename.split('.')[1];\n info.title = filename.substring(11).split('.')[0];\n\n return info;\n }", "async function extr...
[ "0.61611474", "0.55306834", "0.5349761", "0.5349761", "0.5349761", "0.5349761", "0.5349761", "0.5349761", "0.5349761", "0.5349761", "0.53228265", "0.5235084", "0.52249527", "0.51890475", "0.5153945", "0.51274294", "0.5108514", "0.50693744", "0.5065591", "0.50626165", "0.50542...
0.6422677
0
Given a particular moment, gets the time and date of the next sunrise as a Date object.
function prepNextSunrise(date, data) { var startingPoint = 1224 var numCharactersPerRow = 136 var startRowOffset = 4 var sunriseOffset = 11 var day = date.getDate() var month = date.getMonth() var datePoint = startingPoint + startRowOffset + numCharactersPerRow*(day-1) + sunriseOffset*(month) var sunriseHou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStartOfNextWindow() {\n return moment\n .tz('America/Los_Angeles')\n .endOf('day')\n .add('1', 'minute')\n .valueOf();\n // return moment.utc().startOf('day').add(1, 'day').add(8, 'hours').valueOf();\n }", "getDateFromTime(time, isSunrise) ...
[ "0.5553613", "0.55526114", "0.5455062", "0.54482764", "0.5386256", "0.53797585", "0.53041136", "0.52445614", "0.5195782", "0.5100486", "0.50949603", "0.5063329", "0.5051095", "0.5044842", "0.5019326", "0.5001814", "0.4966445", "0.48862514", "0.48599982", "0.4853618", "0.48388...
0.55561966
0
This function takes a value and converts it to a string then adds 0s at the front until it reaches the specified length. Useful for dates. If the value is longer than the target length the input is left unchanged. Usage: val value to add leading zeros to. targetLength integer length of the output string. Example: input...
function PadValueWithLeadingZeros(val, targetLength) { var v = val.toString() for(var i = 0; i < targetLength; i++) { if(v.length < targetLength) { v = "0" + v } } return v }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leftZeroFill(number, targetLength) {\n var output = number + '';\n while (output.length < targetLength) {\n output = '0' + output;\n }\n return output;\n}", "function leftZeroFill(number, targetLength) {\n var output = number + '';\n while (output.length < targetLength) ...
[ "0.8172717", "0.81267565", "0.81267565", "0.81267565", "0.81267565", "0.81267565", "0.81267565", "0.81267565", "0.81267565", "0.81267565", "0.81267565", "0.7862575", "0.77531147", "0.77355814", "0.767923", "0.7655276", "0.765242", "0.7583651", "0.7549921", "0.74869937", "0.74...
0.85855603
0
Given a Date object, returns a folder label
function getFolderLabelFromDate(date) { var day = PadValueWithLeadingZeros(date.getDate(), 2) var month = PadValueWithLeadingZeros(date.getMonth()+1, 2) var year = PadValueWithLeadingZeros(date.getFullYear(), 2) var hour = PadValueWithLeadingZeros(date.getUTCHours() + timezoneOffset, 2) var minute = PadValueW...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDateFromFolderLabel(label) {\n\t// console.log(\"Folder Label Before: \"+ label);\n\tvar l \t\t= label.split(\"-\")\n\tvar year \t= l[0]\n\tvar month \t= l[1]\n\tvar day \t= l[2]\n\tvar hour \t= l[3]\n\tvar minute \t= l[4]\n\tvar second \t= l[5]\n\n\tvar date = new Date(year+\"-\"+month+\"-\"+day+\"T\"...
[ "0.7366805", "0.6639837", "0.60591245", "0.584832", "0.5519029", "0.5488119", "0.54240197", "0.5332164", "0.53229606", "0.5308886", "0.5281211", "0.5274088", "0.52503467", "0.52474713", "0.5234648", "0.5230262", "0.5216899", "0.51893616", "0.51441365", "0.5142972", "0.5142682...
0.86508656
0
Given a folder label string return the date. Folder labels are in the format: YYYYMMDDHHmmss
function getDateFromFolderLabel(label) { // console.log("Folder Label Before: "+ label); var l = label.split("-") var year = l[0] var month = l[1] var day = l[2] var hour = l[3] var minute = l[4] var second = l[5] var date = new Date(year+"-"+month+"-"+day+"T"+hour+":"+minute+":"+second) return date ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFolderLabelFromDate(date) {\n\tvar day \t= PadValueWithLeadingZeros(date.getDate(), 2)\n\tvar month \t= PadValueWithLeadingZeros(date.getMonth()+1, 2)\n\tvar year \t= PadValueWithLeadingZeros(date.getFullYear(), 2)\n\tvar hour \t= PadValueWithLeadingZeros(date.getUTCHours() + timezoneOffset, 2)\n\tvar ...
[ "0.7485621", "0.58419925", "0.57976454", "0.5795279", "0.5772143", "0.5772143", "0.56989425", "0.5282364", "0.5257522", "0.52411133", "0.5229473", "0.52286315", "0.52085483", "0.52025324", "0.5181057", "0.51758313", "0.5164746", "0.5155713", "0.5153462", "0.5148483", "0.51394...
0.8664773
0
Starts the recorder and monitors it with pm2
function startRecorder(dataPath, cameraIP, recordDuration, callback) { console.log("Start Recorder With Data Path: " + dataPath) var label = getFolderLabelFromDate(new Date()) mkdirp(dataPath + "/" + label, function(err) { if(err) { throw err } console.log("Starting Recorder") console.log(" data-path:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onRecording() {\n recorder.start();\n }", "function startRecording() {\n console.log('Inside startRecording');\n try{\n recorder = new Recorder(mediaStreamSource, { numChannels: 1 })\n recorder.record()\n } catch ( e){\n console.log('error while recording', e);\n };\n}", "startRecordin...
[ "0.652431", "0.6483746", "0.6400775", "0.62298673", "0.6093298", "0.60884553", "0.60099494", "0.5995762", "0.5934799", "0.59330326", "0.58304375", "0.58024275", "0.5787249", "0.5777491", "0.57511055", "0.5710432", "0.5655029", "0.5610127", "0.5586123", "0.5537236", "0.5533988...
0.6691353
0
Starts the player and monitors it with pm2
function startPlayer(dataPath, windowWidth, windowHeight, windowX, windowY, videoWidth, videoHeight, videoX, videoY) { console.log("Starting Player") console.log(` data-path: ${dataPath}`) console.log(` window-width: ${windowWidth}`) console.log(` window-height: ${windowHeight}`) console.log(` window-x: ${win...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OnServerInitialized () : void {\n SpawnLocalPlayer(); \n }", "start() {\n // new instances of player\n this.playerOne = new Player(\"Player 1\");\n this.playerTwo = new Player(\"Player 2\");\n console.log(this.playerOne, \" playerOne\");\n console.log(this.p...
[ "0.6368628", "0.63391715", "0.62311447", "0.62114173", "0.61798376", "0.6154866", "0.61491734", "0.6106829", "0.61033326", "0.6055093", "0.6009022", "0.60079855", "0.600718", "0.59785604", "0.59625393", "0.59573215", "0.5946131", "0.59410965", "0.59344786", "0.58893216", "0.5...
0.64856297
0
This is a function for taking a screenshot using chuntaro's screenshot script The script can be found here Usage: x left coordinate of screenshot y top coordinate of screenshot r right coordinate of screenshot b bottom coordinate of screenshot fileName name of file to save to
function takeScreenshot(x, y, r, b, fileName, callback) { pm2.start({ name: "screenshot", script: "lib/screenshot-cmd/screenshot.exe", args: ["-rc", x, y, r, b, "-o", fileName], exec_mode: "fork", instanced: "1", interpreter: "none", autorestart: false }, function(err, proc) { if(err) throw err p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ScreenShot(){\n//statement\nconsole.log(\"Taking a ScreenShot! 3 2 1\");\ndriver.takeScreenshot().then(\n function(image,err){\n fs.writeFile('./Images/JazebCoupon.png',image,'base64',function(err){\n console.log(err);\n if(err == null){\n console.log('ScreenShot has been captured and...
[ "0.7590426", "0.68441164", "0.67532855", "0.6663991", "0.66141355", "0.65990853", "0.65507174", "0.64965963", "0.64869106", "0.64786273", "0.6351735", "0.6348122", "0.6342665", "0.6244583", "0.6219206", "0.61931264", "0.61719006", "0.61595505", "0.6128128", "0.6127872", "0.61...
0.70905995
1
This function schedules a screenshot at a particular date Usage: same as takeScreenshot with the addition(s) of... date The date at which to take the screenshot (javascript date object).
function scheduleScreenshot(date, x, y, r, b, fileName, callback) { var screenshotJob = schedule.scheduleJob(date, function() { takeScreenshot(x, y, r, b, fileName, callback) // console.log("Took Screenshot: " + fileName); }); return screenshotJob }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scheduleScreenshots(dateStart, dateEnd, interval, x, y, r, b, fileName) {\n\tvar now = new Date()\n\tif(dateStart < now)\n\t\tconsole.log(\"Warning! The start date is in the past and this function will not run!\")\n\tvar screenshotJob = scheduleScreenshot(dateStart, x, y, r, b, fileName, function() {\n\t\...
[ "0.67856", "0.5873658", "0.5831356", "0.56726384", "0.5549158", "0.5528773", "0.5469801", "0.54616094", "0.5412723", "0.5389944", "0.5376306", "0.5282765", "0.52628267", "0.5232305", "0.52239823", "0.5220297", "0.5205021", "0.5157044", "0.5103336", "0.5068621", "0.5060918", ...
0.7702625
0
This function schedules a set of screenshots starting at a particular date (which must be in the future!) until a particular end date. Usage: Same as scheduleScreenshot with the additions of... dateStart The date to take the first screenshot. dateEnd The date to take the final screenshot. interval time between screensh...
function scheduleScreenshots(dateStart, dateEnd, interval, x, y, r, b, fileName) { var now = new Date() if(dateStart < now) console.log("Warning! The start date is in the past and this function will not run!") var screenshotJob = scheduleScreenshot(dateStart, x, y, r, b, fileName, function() { var now = new Date...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scheduleScreenshot(date, x, y, r, b, fileName, callback) {\n\tvar screenshotJob = schedule.scheduleJob(date, function() {\n\t\ttakeScreenshot(x, y, r, b, fileName, callback)\n\t\t// console.log(\"Took Screenshot: \" + fileName);\n\t});\n\treturn screenshotJob\n}", "function takeShotInRange(start, end, i...
[ "0.616418", "0.5562219", "0.49394152", "0.4924845", "0.48654142", "0.476948", "0.47547677", "0.46860287", "0.46728423", "0.45749667", "0.44680616", "0.44632107", "0.4444638", "0.44406304", "0.43903968", "0.43857738", "0.4374009", "0.43731046", "0.43715534", "0.43252206", "0.4...
0.78270966
0
This function takes a directory path and converts all the images inside from pngs to jpgs. Does not work recursively, ignores all other files. Usage: filename path to file to be converted
function convertAllFilesToJpg(filePath) { fs.readdir(filePath, function(err, files) { if(err) throw err var pngs = [] files.forEach(function(fileName) { var extension = fileName.split(".") var fileTitle = extension[0] extension = extension[extension.length - 1] if(extension == "png") { sharp(s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function images() {\n\n // TODO: leverage kraken.io API to optimize image assets for production\n // -- https://www.npmjs.com/package/kraken\n\n let images = fs.expand({ filter: 'isFile' }, [\n path.join(IMG_SRC, '**/*')\n ]);\n\n _.each(images, function(filepath) {\n // cons...
[ "0.5768359", "0.554742", "0.5512198", "0.55008346", "0.5400515", "0.53320336", "0.53069305", "0.52394295", "0.5185247", "0.5161154", "0.515913", "0.5155206", "0.5067541", "0.50107133", "0.50073665", "0.49681476", "0.49629968", "0.4961997", "0.49260488", "0.49086088", "0.48825...
0.7459208
0
This function schedules a "convert all files to jpg" call at a date in the future. Usage: date javascript date object to schedule conversion of all png files to jpg filename path to file to be converted
function scheduleConvertAllFilesToJpg(date, filePath) { var convertJob = schedule.scheduleJob(date, function() { convertAllFilesToJpg(filePath) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scheduleScreenshots(dateStart, dateEnd, interval, x, y, r, b, fileName) {\n\tvar now = new Date()\n\tif(dateStart < now)\n\t\tconsole.log(\"Warning! The start date is in the past and this function will not run!\")\n\tvar screenshotJob = scheduleScreenshot(dateStart, x, y, r, b, fileName, function() {\n\t\...
[ "0.62261707", "0.53869814", "0.52496445", "0.5207323", "0.5147061", "0.5123113", "0.49685687", "0.4958262", "0.48414725", "0.48295882", "0.48242563", "0.47974616", "0.4794902", "0.47870982", "0.47631356", "0.47371882", "0.47192025", "0.47081664", "0.46865666", "0.46601593", "...
0.8358411
0
Method, that inits Models Objects.
initModels() { this.models = this.generateModels(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n // Run `.associate` if it exists,\n // ie create relationships in the ORM\n Object.values(this._models)\n .filter(model => typeof model.associate === `function`)\n .forEach(model => model.associate(this._models));\n\n this.DB = {\n ...this._mo...
[ "0.7236253", "0.7181029", "0.6926658", "0.69003457", "0.68270737", "0.677679", "0.6679707", "0.662468", "0.66168743", "0.6571697", "0.64883906", "0.64867455", "0.6303067", "0.6303067", "0.6290082", "0.6260674", "0.6208945", "0.612995", "0.61131036", "0.6102891", "0.61027974",...
0.8058279
0
Method, that generates Models Objects, based on openapi_schema.
generateModels() { let models_constructor = new ModelConstructor(openapi_dictionary, guiModels); return models_constructor.generateModels(this.api.openapi); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getAPISchema() {\n var args = Array.prototype.slice.call(arguments);\n \n // Make the request [function was called with no parameters]\n if(typeof(args[0]) == \"undefined\") {\n _xhrRequest(\"?format=json\", _getAPISchema);\n } else {\n // Proccess the request data [function was ...
[ "0.6417473", "0.5953795", "0.592129", "0.5912874", "0.5823576", "0.57714194", "0.57628745", "0.57038736", "0.56968534", "0.56839377", "0.5662827", "0.56052184", "0.5569907", "0.5534362", "0.5508437", "0.54991746", "0.549833", "0.5463906", "0.54615057", "0.54546165", "0.544121...
0.7287978
0
Method, that inits Views Objects.
initViews() { this.views = this.generateViews(); this.prepareViewsModelsFields(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_views () {\n // Attaching known Models\n var my_map_shader = MapShader();\n mantis.register_new_view(my_map_shader);\n var my_hm = HorizontalMenu();\n mantis.register_new_view(my_hm);\n var my_vm = VerticalMenu();\n mantis.register_new_view(my_vm);\n var my_basic_treemap = Bas...
[ "0.7498285", "0.7352606", "0.7299048", "0.7272145", "0.7156867", "0.7140063", "0.6983727", "0.6925119", "0.6916506", "0.68385667", "0.68124795", "0.67514765", "0.67119676", "0.67003465", "0.66629314", "0.6655387", "0.6655387", "0.66523707", "0.66343313", "0.6634289", "0.65893...
0.8332566
0
Method, that generates Views Objects, based on openapi_schema.
generateViews() { let views_constructor = new ViewConstructor(openapi_dictionary, this.models); return views_constructor.generateViews(View, this.api.openapi); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "NuxeoDSL(ctx) {\n let ast = super.NuxeoDSL(ctx)\n let result = new Map()\n\n\n if (ast.schemas && ast.schemas.length > 0) {\n var schemas = new ArrayList();\n result.put(\"schemas\", schemas)\n\n ast.schemas.map((schema)=> {\n\n var item = { fiel...
[ "0.59360594", "0.57642776", "0.5579148", "0.54529554", "0.5384891", "0.5342019", "0.5320105", "0.53192496", "0.5315451", "0.5279713", "0.52251977", "0.522089", "0.522089", "0.5212392", "0.51925665", "0.51657486", "0.5157121", "0.5096436", "0.5091956", "0.50728077", "0.5046724...
0.7915855
0
Method, that runs through all views and handles all fields with additionalProperties.
prepareViewsModelsFields() { for (let path in this.views) { if (Object.prototype.hasOwnProperty.call(this.views, path)) { let view = this.views[path]; for (let key in view.objects.model.fields) { if (Object.prototype.hasOwnProperty.call(view.objec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applyViewProperties(view) {\n if (view instanceof View) {\n this.styles = Object.assign(this.styles, typeof view.styles === \"object\" ? view.styles : {})\n this.attributes = Object.assign(this.styles, typeof view.styles === \"object\" ? view.attributes : {})\n\n for (let i ...
[ "0.6183895", "0.614667", "0.55362576", "0.53747404", "0.5217383", "0.52167284", "0.51865417", "0.5177387", "0.5150842", "0.51409394", "0.5136599", "0.5099719", "0.5072179", "0.49959007", "0.49899438", "0.4977546", "0.49711135", "0.49711135", "0.4949343", "0.49299714", "0.4921...
0.65841615
0
Method, that creates store and router for an application and mounts it to DOM.
mountApplication() { window.spa.signals.emit('app.beforeInit', { app: this }); let storeConstructor = new StoreConstructor(this.views); window.spa.signals.emit('app.beforeInitStore', { storeConstructor }); let routerConstructor = new RouterConstructor( this.views, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createApp() {\n // create store and router instances\n const store = createStore();\n const router = Object(src_router[\"createRouter\"])();\n\n // sync the router with the vuex store.\n // this registers `store.state.route`\n Object(vuex_router_sync[\"sync\"])(store, router);\n\n // create the app...
[ "0.64804125", "0.6257884", "0.6249748", "0.61810607", "0.61560696", "0.61071056", "0.60722613", "0.59878373", "0.58549684", "0.5842977", "0.5785763", "0.57780355", "0.5762757", "0.573824", "0.57316554", "0.571112", "0.5699966", "0.5694215", "0.56926286", "0.5672224", "0.56486...
0.6805676
0
write a function that take a string define a variable that take the value with small letters and splitted from the orginal text if condition : if the deviding of the length of the text by 2 = 0 it willkeep the proces run for loop that start from 0 til the half of the text's length if condition : if each element has the...
function PalindromeChecker(text){ var t = text.toLowerCase().split(" ").join("").toLowerCase(); for (let i = 0 ; i < t.length/2 ; i++) { if (t[i] !== t[t.length-i-1]) { return false } } return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function palindrome1(str) {\n strArr = str.split('')\n\n for (let i = 0; i < strArr.length/2; i++) {\n if (strArr[i] !== strArr[strArr.length - 1 - i]) return false\n }\n return true;\n}", "function palindrome2(str) {\n return str.split('').every((char,i)=>{\n // first element is compared to las...
[ "0.7809496", "0.77010167", "0.7681986", "0.76654434", "0.76417625", "0.7580194", "0.75668526", "0.74976486", "0.7487543", "0.74693245", "0.74554724", "0.7428926", "0.74276507", "0.7418307", "0.7413784", "0.74071693", "0.74004334", "0.73931456", "0.73911494", "0.738107", "0.73...
0.7818543
0
Register for Network Status Change notifications, and display new Internet Connection Profile information on network status change
function registerForNetworkStatusChangeNotif() { try { // register for network status change notifications if (!registeredNetworkStatusNotif) { networkInfo.addEventListener("networkstatuschanged", onNetworkStatusChange); registeredNetworkStatusNotif = tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onNetworkStatusChange(sender) {\n try {\n //network status changed\n internetProfileInfo = \"Network Status Changed: \\n\\r\";\n\n // get the ConnectionProfile that is currently used to connect to the Internet\n var internetProfile = networkInfo.getIntern...
[ "0.7684182", "0.68782336", "0.6712311", "0.6311983", "0.6286014", "0.6235261", "0.62348133", "0.6024866", "0.59895635", "0.5804691", "0.57869005", "0.5786506", "0.5729722", "0.5698148", "0.56929696", "0.56048864", "0.56014806", "0.55925274", "0.55663353", "0.556509", "0.55383...
0.7860832
0
Event handler for Network Status Change event
function onNetworkStatusChange(sender) { try { //network status changed internetProfileInfo = "Network Status Changed: \n\r"; // get the ConnectionProfile that is currently used to connect to the Internet var internetProfile = networkInfo.getInternetConnectionPro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "status(event) {\n\t\tlet online = navigator.onLine;\n\t\tthis.online = online;\n\t\tif (online) {\n\t\t\tthis.emit(\"online\", this);\n\t\t} else {\n\t\t\tthis.emit(\"offline\", this);\n\t\t}\n\t}", "function setNetworkValueChangeListener() {\n try {\n systeminfo.addPropertyValueChangeListener(...
[ "0.6931698", "0.6917515", "0.65177566", "0.6466259", "0.6215545", "0.61613166", "0.60540605", "0.60282856", "0.59817076", "0.59546524", "0.58812916", "0.58407825", "0.5838289", "0.5821939", "0.5808408", "0.5806244", "0.5792382", "0.5781855", "0.5750619", "0.57052284", "0.5698...
0.79713154
0
Unregister Network Status Change notifications
function unRegisterForNetworkStatusChangeNotif() { try { networkInfo.removeEventListener("networkstatuschanged", onNetworkStatusChange); internetProfileInfo = ""; } catch (e) { WinJS.log && WinJS.log("An unexpected exception occured: " + e.name + ": " + e.mess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {\n\t\twindow.removeEventListener('online', this._status);\n\t window.removeEventListener('offline', this._status);\n\t\tthis._status = undefined;\n\t}", "removeListener({cmd,data,from,fromResource,owner,resource}) { this.$publish('removeListener', {cmd,data,from,fromResource,owner,resource})...
[ "0.6884879", "0.6296595", "0.6245236", "0.6146777", "0.5999056", "0.5979011", "0.5959332", "0.5959332", "0.59318984", "0.59272295", "0.58698726", "0.584142", "0.5841043", "0.5825533", "0.57980305", "0.5770963", "0.5769626", "0.5713849", "0.5708816", "0.5688937", "0.56884706",...
0.80174196
0
Suggested behaviors based on Profile cost Implementation of simple behavior cost awareness Application implements three behavioral models: High Cost network behavior: this handles an exceptional case where the network access cost is higher than the plan normal cost This behavioral model could include: prompt the user f...
function costBasedSuggestions(connectionCost) { var returnString = ""; // Check cost flags to see if connection status is outside the MNO's network if (connectionCost.roaming) { //ImplementHighCostBehavior returnString = "Connection is roaming outside of MNO's network, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUseCost() {\r\n\t\treturn 0;\r\n\t}", "function calculateHintCost (challenge, hintOption) {\n var costMultiplier = 0\n if (hintOption === options.paidTextHints) {\n costMultiplier = 0.1\n } else if (hintOption === options.paidHintUrls) {\n costMultiplier = 0.2\n }\n return costMultiplier * calculat...
[ "0.5460856", "0.5414896", "0.53227943", "0.5279027", "0.51828015", "0.5144965", "0.51245147", "0.50842756", "0.5079498", "0.5069777", "0.50195235", "0.50067705", "0.5004695", "0.500085", "0.49979034", "0.4994627", "0.49608603", "0.4959688", "0.49557298", "0.49499917", "0.4945...
0.5891102
0
Get Connection Profile Information
function getConnectionProfileInfo(connectionProfile) { try { if (connectionProfile === null) { return "Profile not found\n\r"; } var returnString = "ProfileName: " + connectionProfile.profileName + "\n\r"; switch (connectionProfile.getNetworkCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProfile() {\n\treturn profile;\n}", "get profile () {\n\t\treturn this._profile;\n\t}", "function getProfileData() {\n IN.API.Raw(\"/people/~\").result(onSuccess).error(onError);\n IN.API.Raw('people/~:(id,num-connections,picture-url)').result(image).error(onError);\n}", "function getProfileDat...
[ "0.6808148", "0.6396565", "0.6322329", "0.6315096", "0.6291433", "0.626803", "0.6226603", "0.6219265", "0.6148052", "0.5936746", "0.58866733", "0.5870909", "0.58240277", "0.5814947", "0.5807754", "0.57879317", "0.57787305", "0.57424116", "0.5731167", "0.5731167", "0.5731167",...
0.76077616
0
Method to split ID token.
function parseIdToken(idToken) { if (!idToken) { return; } if (typeof idToken !== "string") { idToken = JSON.stringify(idToken); } const idTokenSplit = idToken.split("."); let idTokenObject = { "encoded": [], "decoded": [] }; idTokenSplit.forEach(functi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "splitID (id) { \n\t\t\tlet splittedID = id.split('-');\n\t\t\treturn [parseInt(splittedID[1]), splittedID[0]];\n }", "function parseID(num) {\r\n\treturn [num[0],num[1]];\r\n}", "extractPart (id) {\n return id.split('-').pop()\n }", "function parseId (p) {\n if (p != null) {\n var token, m ...
[ "0.7058492", "0.60602015", "0.58845466", "0.58323884", "0.5653838", "0.5612126", "0.55784965", "0.55778277", "0.55715483", "0.5534271", "0.52942115", "0.5292395", "0.52659345", "0.5262704", "0.52151674", "0.52048904", "0.5194717", "0.51941717", "0.5192542", "0.5182754", "0.51...
0.61278635
1