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
Run when the Mass Edit button is selected.
function massEdit() { var button = $(this), type = button.attr('data-type'), id = button.attr('data-id'), name = button.attr('data-name'), table = $('#searchResults'), checkboxes = table.find($('.selection')), cnt = 0; // Check if there are selections. checkboxes.each(function () { var checkbox = $(this), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editClicked() {\n edit = true;\n}", "edit() {\n this._enterEditMode();\n }", "onClickEditMode() {\n\t\teventEmitter.emit(EVENTS.ToggleEditMode, this.Controls.EDIT_MODE);\n\t}", "onEditPressed(asset) {\n this.showUpdateAsset(asset);\n }", "function onEdit() {\n transition(EDIT);\n...
[ "0.69458014", "0.6897563", "0.68103695", "0.6763437", "0.66547674", "0.6584299", "0.65762764", "0.65084946", "0.6507648", "0.64936686", "0.64393073", "0.6401809", "0.63579595", "0.63481987", "0.6317533", "0.6315544", "0.6298785", "0.6260574", "0.62234557", "0.6202278", "0.620...
0.70707613
0
Open mass edit site dialog.
function openMassEditSiteDialog(id, name) { $('#dialog').dialog({ width: '30%', modal: true, show: 'fade', hide: 'fade', resizable: false, position: { my: "center", at: "top", of: $('body') }, open: function () { var dialog = $(this), accessOptions = buildAccessOptions(), html = ''; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function massEdit() {\n\tvar button = $(this),\n\ttype = button.attr('data-type'),\n\tid = button.attr('data-id'),\n\tname = button.attr('data-name'),\n\ttable = $('#searchResults'),\n\tcheckboxes = table.find($('.selection')),\n\tcnt = 0;\n\t// Check if there are selections.\n\tcheckboxes.each(function () {\n\t\t...
[ "0.6585125", "0.6456563", "0.6386045", "0.63229483", "0.63100255", "0.62704384", "0.6182798", "0.6171299", "0.6125609", "0.60553515", "0.60390323", "0.6035709", "0.6011421", "0.5980065", "0.5972777", "0.59535754", "0.5939061", "0.59015626", "0.59015626", "0.58940107", "0.5876...
0.7092958
0
Run when editing users for site is finished.
function usersEditedForSite(info,siteID,siteName,iteration,totalIterations,totalUsers,group) { var message = $('#dialogMessage'); if (info["status"].indexOf('ERROR') >= 0) { message.html('<p>There was an issue editing users.<br />Please try again.</p>'); $('#dialogButtons').show(); } else { var id = siteID, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sitesEditedForUser(info,userOID,userName,iteration,totalIterations,totalSites,group) {\n\tvar message = $('#dialogMessage');\n\tif (info[\"status\"].indexOf('ERROR') >= 0) {\n\t\tmessage.html('<p>There was an issue editing sites.<br />Please try again.</p>');\n\t\t$('#dialogButtons').show();\n\t} else {\n...
[ "0.6528005", "0.6375323", "0.6292145", "0.6273854", "0.6265189", "0.6135885", "0.6123557", "0.60873187", "0.6069854", "0.60676056", "0.6061761", "0.6058019", "0.60355294", "0.60071117", "0.60071117", "0.5994825", "0.5973262", "0.5904013", "0.58794683", "0.5871293", "0.5857648...
0.6420299
1
Open mass edit user dialog.
function openMassEditUserDialog(id, name) { $('#dialog').dialog({ width: '30%', modal: true, show: 'fade', hide: 'fade', resizable: false, position: { my: "center", at: "top", of: $('body') }, open: function () { var dialog = $(this), accessOptions = buildAccessOptions(), html = ''; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function massEdit() {\n\tvar button = $(this),\n\ttype = button.attr('data-type'),\n\tid = button.attr('data-id'),\n\tname = button.attr('data-name'),\n\ttable = $('#searchResults'),\n\tcheckboxes = table.find($('.selection')),\n\tcnt = 0;\n\t// Check if there are selections.\n\tcheckboxes.each(function () {\n\t\t...
[ "0.70249975", "0.6999005", "0.68549126", "0.680167", "0.6746949", "0.67310566", "0.6446123", "0.6389858", "0.6377663", "0.6353417", "0.63105524", "0.6206616", "0.6193025", "0.6176563", "0.609792", "0.6045256", "0.59967977", "0.59929836", "0.5981148", "0.5973413", "0.59617406"...
0.74932426
0
Run when editing sites for user is finished.
function sitesEditedForUser(info,userOID,userName,iteration,totalIterations,totalSites,group) { var message = $('#dialogMessage'); if (info["status"].indexOf('ERROR') >= 0) { message.html('<p>There was an issue editing sites.<br />Please try again.</p>'); $('#dialogButtons').show(); } else { var id = userOID, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleEditSite() {\n\n\t\t//log that we were called\n\t\tosFtpCommon.consoleDebug('handleEditSite()');\n\n\t\t//radio button site name\n\t\tvar RADIO_SITE_NAME = 'site';\n\n\t\t//show dialog\n\t\tvar selectDialog = osFtpDialog.showSiteSelectDialog(osFtpSitesManager.getSitesArray(), RADIO_SITE_NAME);\n\n\t...
[ "0.66828454", "0.61853826", "0.6175541", "0.60403115", "0.59419996", "0.5936743", "0.57488924", "0.5746628", "0.57354534", "0.57206225", "0.5714632", "0.5688958", "0.56883544", "0.56883544", "0.56546867", "0.56424946", "0.56209594", "0.56209594", "0.56180066", "0.5586344", "0...
0.6296644
1
Run when the Mass Add button is selected.
function massAdd() { var button = $(this), type = button.attr('data-type'), id = button.attr('data-id'), name = button.attr('data-name'); if (type == 'site') { openMassAddSiteDialog(id, name); } else { openMassAddUserDialog(id, name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onAddClicked() {\n console.log('clicked');\n }", "function onClickAdd() {\n console.log(\"add clicked\");\n const elementType = $(\"#add-select\").val();\n console.log(\"submited a new element of type\", elementType);\n if (elementType === \"element\") {\n setError(\"select an element\");\n } else {\...
[ "0.65496075", "0.64658076", "0.6241474", "0.62136126", "0.61976975", "0.6195384", "0.6123435", "0.6123319", "0.610047", "0.60997444", "0.60519356", "0.6043542", "0.6021999", "0.60175943", "0.59982353", "0.5942245", "0.5926652", "0.58680934", "0.58581316", "0.58214706", "0.581...
0.74695504
0
Open mass add site dialog.
function openMassAddSiteDialog(id, name) { $('#dialog').dialog({ width: '50%', modal: true, show: 'fade', hide: 'fade', resizable: false, position: { my: "center", at: "top", of: $('body') }, open: function () { var dialog = $(this), accessOptions = buildAccessOptions(), html = ''; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function massAdd() {\n\tvar button = $(this),\n\ttype = button.attr('data-type'),\n\tid = button.attr('data-id'),\n\tname = button.attr('data-name');\n\tif (type == 'site') {\n\t\topenMassAddSiteDialog(id, name);\n\t} else {\n\t\topenMassAddUserDialog(id, name);\n\t}\n}", "function openMassAddUserDialog(id, name...
[ "0.6886745", "0.65929586", "0.65387076", "0.6246821", "0.6222201", "0.6196465", "0.61718583", "0.61169356", "0.6050208", "0.60350275", "0.60106105", "0.59414804", "0.5912309", "0.58674777", "0.5842865", "0.58241403", "0.58127004", "0.5811828", "0.58026516", "0.57945323", "0.5...
0.6779181
1
Run when adding users for site is finished.
function usersAddedForSite(info,siteID,siteName) { if (info["status"].indexOf('ERROR') >= 0) { $('#dialogMessage').html('<p>There was an issue adding users.<br />Please try again.</p>'); $('#dialogButtons').show(); } else { cancelDialog(); var id = siteID, name = siteName; // Reload search results to visu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addUsersForSite() {\n\tvar button = $(this),\n\tsiteID = button.attr('data-id'),\n\tsiteName = button.attr('data-name'),\n\taccessCheckboxes = $('#dialog').find($('.accessSelection')),\n\tuserAccess = {},\n\tusersToBeAdded = $('#dialog #userList .user'),\n\tusers = [];\n\t// Loop through access checkboxes...
[ "0.6622621", "0.6530464", "0.6477977", "0.6456725", "0.63580304", "0.633266", "0.6328957", "0.63235056", "0.62533265", "0.6238485", "0.62298393", "0.6209656", "0.6133121", "0.6133003", "0.6128021", "0.6126822", "0.61208725", "0.6091723", "0.6039065", "0.6030381", "0.60286325"...
0.6741925
0
Clean up staff oid.
function cleanOID(oid) { return oid.replace(/[\\.,-\/#!$%\^&\*;:{}=\-_`~()' ]/g, ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "if (!userData.id) {\n delete userData.id;\n }", "function clear_mobileno() {\r\n \tself.user.mobileno = '';\r\n }", "function clearIdentity(sfuForm, sfuEmail) {\n//\tvar remove_sp_identity = $.removeCookie('SP_IDENTITY');\t\t\t\t\t// clear the cookie\n\tvar remove_sp_identity = ...
[ "0.5533764", "0.549847", "0.54933834", "0.54761624", "0.54733", "0.54003865", "0.532129", "0.5307962", "0.52114564", "0.52102274", "0.5164559", "0.5159221", "0.5147076", "0.5132394", "0.51159036", "0.5104571", "0.5071045", "0.5069807", "0.5064463", "0.5023946", "0.50204736", ...
0.60777336
0
Takes string of confirmed characters and randomizes them
function generatePassword() { var randomString = ""; for (var i = 0; i < chosenPasswordLength; i++) { randomString += charConfirm.charAt(Math.floor(Math.random() * charConfirm.length)); } return randomString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomSpecialCharacters(){\n var specialCharacter = \"!#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\";\n return specialCharacter[Math.floor(Math.random()*specialCharacter.length)];\n }", "function randomPass() {\n for (var i = 0, n = charset.length; i < length; ++i) {\n\t\tpassword += charset.charAt(Math.flo...
[ "0.7135738", "0.71233827", "0.71115726", "0.70997995", "0.70740724", "0.70655704", "0.7057601", "0.70560324", "0.7003715", "0.6966673", "0.6942943", "0.6941291", "0.69370997", "0.6935901", "0.6916782", "0.6904519", "0.6902789", "0.69020253", "0.6885162", "0.6884744", "0.68660...
0.7135738
1
Attr `name=language` is changed to `name=account[language]` if using fast creation; let jquery find either. When setting 's `value`, if it's not support by one of the elements, then the `value` would be null. Then, the value would be defaulted to US English by Classic. To avoid this defaulting, set iff there is a match...
function encodeLanguage() { var select = findInputElm('language').add(findInputElm('account[language]')); var options = select.children('option'); var code = chatAccount.language.replace(/_/, '-').toLowerCase(); var isCodeValid = hasOption(code); function hasOption(val) { return options.filt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUserLanguage(value){\n __params['ul'] = value;\n}", "function selectLocallyStoredLanguage(langCode){\n document.getElementById('languages').value = langCode;\n }", "function setLanguage(lang) {\n var inner = \"data-\" + lang;\n var title = \"data-\" + (lang == \"jp\" ? \"en\" : \...
[ "0.6536678", "0.6204957", "0.61711735", "0.60579145", "0.6048796", "0.6039489", "0.60006726", "0.5891349", "0.5891116", "0.58890235", "0.5815796", "0.57835734", "0.5726963", "0.57255584", "0.571587", "0.5691798", "0.5653382", "0.56405914", "0.5635003", "0.56278235", "0.560436...
0.6626948
0
Remove all rendered cluster
function removeCluster(map) { var overlayPane = d3.select(map.getPanes().overlayPane); overlayPane.selectAll('.cluster').remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearClusterers() {\n\t\tclusters.moto.clearMarkers();\n\t\tclusters.auto.clearMarkers();\n\t\tclusters.collection.clearMarkers();\n\t}", "_onZoomStart() {\n this._clusters.clearLayers()\n }", "function clearAllLayers() {\n map.eachLayer(function(layer) {\n if (layer instanceof L.Mar...
[ "0.7529505", "0.6861444", "0.6776532", "0.67463744", "0.6720525", "0.6720525", "0.6592318", "0.65822965", "0.6537983", "0.6529468", "0.64584935", "0.6430852", "0.6403692", "0.63760406", "0.6366854", "0.63580513", "0.63524085", "0.6351391", "0.6334796", "0.6325412", "0.6318322...
0.7192443
1
Get the min and max bounds of all features
function getBounds(features) { var bounds = { min: [999, 999], max: [-999, -999] }; _.each(features, function(element) { var point = map.latLngToLayerPoint(element.LatLng); bounds.min[0] = Math.min(bounds.min[0], point.x); bounds.min[1] = Math.min(boun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBounds(feature) {\n var bounds = { min: [999, 999], max: [-999, -999] };\n\n _.each(feature, function(path) {\n _.each(path, function(point) {\n point = map.latLngToLayerPoint(new L.LatLng(point.x, point.y));\n\n bounds.min[0] = Math.min(...
[ "0.73592067", "0.71995026", "0.7011342", "0.6918168", "0.6815655", "0.6815655", "0.6815655", "0.6612628", "0.65932935", "0.6557213", "0.65160394", "0.6438965", "0.64053494", "0.6393565", "0.62576413", "0.6225795", "0.6192629", "0.61865705", "0.6180209", "0.615363", "0.615363"...
0.8016625
0
Automatically submit dropdown forms when an item is selected. This function is called like so:
function submitDropdown(formElement) { formElement.form.submit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function choiceCollection() {\n $(\"#collectionDropdown\").submit();\n}", "function activateSubmittedByDropdown()\n{\n\t// get the member id from the member name field\n\tvar memberId = document.getElementById(\"member_name\").value;\n\t// send member id as get request to list_admin function in LettersControl...
[ "0.7253929", "0.6849489", "0.64944357", "0.645609", "0.645609", "0.6331201", "0.62640536", "0.6250148", "0.6216349", "0.6205645", "0.61883837", "0.61491996", "0.61491996", "0.6115752", "0.6100007", "0.60808456", "0.60753506", "0.60536546", "0.60359913", "0.6023088", "0.599512...
0.6906765
1
create a new potion effect of the given type with duration "dur" (seconds) and strength "str" (effect level)
function newPotionEffect(type, dur, str) { var effectType; switch (type.toUpperCase()) { case "ABSORPTION": effectType = bkPotionEffectType.ABSORPTION; break; case "BLINDNESS": effectType = bkPotionEffectType.BLINDNESS; break; case "CONFUSION": effectType = bkPotionEffectType.CONFUSION; break;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function HurtEffect(duration)\n {\n /*\n * Initialion - all variable/funciton must have \"this.\" before\n * Use \"var\" to change the variable/funciton become private\n * \"x || 0\" just means \"if there is a value for x, use that. Otherwise use 0.\"\n */\n Effect....
[ "0.5721903", "0.5532556", "0.54325783", "0.54129356", "0.5388105", "0.5325623", "0.53249204", "0.53092486", "0.5292145", "0.52887416", "0.52676284", "0.5262979", "0.52365243", "0.5234231", "0.52066004", "0.5193699", "0.5184804", "0.5132594", "0.5128808", "0.5114563", "0.51122...
0.83958334
0
animate the sticky box if the screen size is larger then 767 px and not IE 8
function setSticky(){ if(width > 767){ if(jQuery.support.leadingWhitespace == false){ }else { var top = $('.sticky-scroll-box').offset().top; var stickyHeight = $('.sticky-scroll-box').height(); var boxHeight = $('#content').height(); var stickyHeight; var bottom = $('.end-st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sticky(){\n if($( window ).width() >= 992){\n //$(\"#full_width div:first-child\").removeClass(\"container\");\n $(\"#sticker\").sticky({\n topSpacing:0,\n zIndex: 1,\n getWidthFrom: '#full_width',\n responsiveWidth: false\n });\n ...
[ "0.7291997", "0.6749189", "0.6727267", "0.6703672", "0.664591", "0.66426694", "0.6540372", "0.6476634", "0.632041", "0.632041", "0.6270992", "0.6270357", "0.62583274", "0.6256562", "0.62349796", "0.6179622", "0.61645645", "0.61593276", "0.61368746", "0.61192274", "0.6113229",...
0.68943655
1
Find the term by its key, then perform the given operation. This is a result of storing terms in an array. Consider switching to an object as we'll save ourselves from iterating the entire list on most operations.
function operate(key, operation) { if (key == null || key.length === 0) { throw 'Error: invalid key supplied'; } var i = terms.length; while(i--) { if (terms[i].key === key) { operation(i, terms[i], key); return true; } } return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findReducingTerm(selected_op, iObj, iObj_ops, targetSide){\n\t\n\tvar indexStr = '_'; \n\tvar opsStr = '';\n\tfor (var n in iObj_ops){\n\t\tindexStr += iObj_ops[n].index + '_';\n\t\topsStr += iObj_ops[n].val;\n\t}\n\tconsole.log('findReducingTerm - indexStr: ' + indexStr);\n\n\t\n\tvar fStr = '';\n\tfor (...
[ "0.5403928", "0.5282009", "0.50662833", "0.49068958", "0.4893838", "0.48072016", "0.47934026", "0.47296834", "0.4663469", "0.4660813", "0.4660813", "0.4660813", "0.4660813", "0.4660813", "0.4660813", "0.4660813", "0.4660813", "0.4660813", "0.4643052", "0.46198472", "0.4618372...
0.62241125
0
Removes a basket by using the BasketService remove method
function performRemove() { BasketService.remove(vm.basket) .then(deleteBasketSuccess) .catch(deleteBasketCatch); function deleteBasketSuccess() { Toast.show({type: 'success', text: 'Basket ' + vm.displayName + ' deleted'}); vm.showList(); } function deleteBasketCatch(err) { To...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeProductFromBasket(state, data){ \r\n\t\t\tvar i = data.i\r\n state.basket.splice(i, 1)\r\n\t\t\tthis.dispatch(\"basket/saveBasket\")\r\n\t\t}", "removeBasket(state, index){ \r\n\t\t\tstate.basket = []\t\t\t\t\t\r\n\t\t\tthis.dispatch(\"basket/saveBasket\")\r\n\t\t}", "function RemoveItem(item)...
[ "0.7283377", "0.7059206", "0.6867501", "0.6822488", "0.6633715", "0.6522961", "0.64041233", "0.6396971", "0.63642794", "0.63148034", "0.6272749", "0.6242456", "0.6221809", "0.62190557", "0.6181376", "0.6177183", "0.6174179", "0.6165742", "0.6127523", "0.6119304", "0.61166096"...
0.7183891
1
Update state for filter "pickedFaction"
setFaction(event) { this.setState({pickedFaction: event.target.value}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async _applyFactionFilter(faction) {\n if (!this._callsDone.faction.find(e => e === faction) && !this._filtersObject.firstFilter) {\n const cardsByFaction = await requestCardsByFaction(faction);\n\n if (cardsByFaction) {\n cardsByFaction.forEach(e => {\n ...
[ "0.6524549", "0.58657104", "0.56046396", "0.5576442", "0.5569988", "0.5483805", "0.5467723", "0.53920764", "0.5350089", "0.53451043", "0.5342522", "0.5328245", "0.5305774", "0.52619433", "0.52524596", "0.5218228", "0.52129817", "0.5200619", "0.51756173", "0.5169859", "0.51684...
0.70962065
0
returns the amount of the specific card that is currently in the deck
cardCount(card) { return this.state.currentDeck.reduce((n, val) => {return n + (val === card);}, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "numCardsRemaining() {\n return this.deck.numCardsRemaining();\n }", "function getCardNumericValue(card) {\n switch(card.value) {\n case 'Ace':\n return 1;\n case '2':\n return 2;\n case '3':\n return 3;\n case '4':\n return 4;\n...
[ "0.69882774", "0.6819076", "0.6801534", "0.67954236", "0.67895573", "0.67046815", "0.66825956", "0.6666318", "0.66363674", "0.662902", "0.6628758", "0.6625383", "0.66081274", "0.66028035", "0.65905774", "0.6530935", "0.65228814", "0.64645225", "0.6463717", "0.64611423", "0.64...
0.7380655
0
(Throughout the algorithm, memoize any dependencies (or lack of dependency) you discover. INPUT: a list of continuous effects applicable in this layer in timestamp order OUTPUT: the effect to apply, or null if the effects list is empty 1. Perform a depthfirst search on the first effect. If there is no dependency, then ...
static determineEffectToApply(effects, stateCheck, layer) { if (effects.length == 0) { return null; } if (effects.length == 1) { return effects[0]; } // Calculate dependency graph for (let main of effects) { main.dependsOn = []; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function re_dependency(re){var i,l,r\n switch(re[0]){\n case 0:\n case 1:\n case 8:\n return\n case 2:\n case 3:\n for(i=0,l=re[1].length;i<l;i++)\n if(r=re_dependency(re[1][i]))return r\n return\n case 4:\n return re_dependency(re[3])\n case 5:\n return re[1]\n case 6:\n case 7:\n return re_dependency(re[...
[ "0.55484", "0.51621866", "0.51182276", "0.48507574", "0.4723589", "0.4711771", "0.46669254", "0.4642578", "0.46300566", "0.46270916", "0.46148983", "0.45922643", "0.45449048", "0.45146647", "0.45076394", "0.44879806", "0.44334424", "0.43324247", "0.43295375", "0.43295375", "0...
0.78364563
0
APPEND GUESS FUNCTION // this function appends a new with the value of the last userGuess
function appendGuess(userGuess) { $('ul#guessList').append('<li>' + userGuess + '</li>'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendGuess(guess) {\n\t\tguesses.push(guess);\n\t\t$('#guessList').append('<li>' + guess + '</li>');\n\t}", "function saveGuessHistory(guess) {\r\n guesses.push(guess);\r\n}", "function wrongGuess(){\n guesses--;\n document.querySelector(\"#userChoice\").insertAdjacentHTML(\"beforeend\...
[ "0.7425412", "0.70269996", "0.7024684", "0.6990044", "0.696201", "0.69448906", "0.690213", "0.68470156", "0.6799837", "0.67960006", "0.6777684", "0.6732332", "0.67031753", "0.6655984", "0.66435343", "0.66401154", "0.6619211", "0.65864366", "0.6534967", "0.6523732", "0.651244"...
0.7369808
1
THIS IS THE CHECKDIFFERENCE FUNCTION // this function first checks to see if userGuess == secretNumber because this is the easiest case, if not, the code keeps running
function checkDifference (userGuess) { if (userGuess == secretNumber) { //here we give feedback that they won and tell //them to click new game $("#feedback").html("You Won! Click New Game!"); //here changing gameOver to true stops user from being //able to enter more guesses because the game is over!...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGuess() {\n\tguess = parseInt(document.getElementById( 'number-input' ).value);\n\n\tif ( guessesRemaining > 0 ) {\n\t\tif ( ! ( isNaN( guess ) ) && guess !== '' ) {\n\t\t\talreadyUsed = numbersGuessed.includes( guess );\n\t\t\tif ( ! alreadyUsed ) {\n\n\t\t\t\tguessesRemaining--;\n\t\t\t\tdocument.g...
[ "0.7350781", "0.7243452", "0.7192612", "0.70929056", "0.70793605", "0.6919051", "0.6914395", "0.6888603", "0.683476", "0.6828559", "0.6824382", "0.6819961", "0.6795291", "0.675357", "0.6748332", "0.67356694", "0.6715394", "0.6709046", "0.6706089", "0.669644", "0.6693281", "...
0.7706919
0
THIS IS THE DISPLAYFEEDBACK FUNCTION // this function takes the result of the (Math.abs...) calculation above and passes it through as the variable "difference" and this function displayFeedback compares difference to all the if, else if, else statements
function displayFeedback(difference) { //here we are using one more function called feedback(x) //so that we don't have to write $("#feedback").html() //over and over again to select the #feedback section //of the form where we want to display the feedback message if (difference >= 50) { feedback("Ice Ic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkDifference (userGuess) {\n\t\tif (userGuess == secretNumber) {\n\t\t\t//here we give feedback that they won and tell\n\t\t\t//them to click new game\n\t\t\t$(\"#feedback\").html(\"You Won! Click New Game!\"); \n\t\t\t//here changing gameOver to true stops user from being\n\t\t\t//able to enter more g...
[ "0.7261676", "0.72339845", "0.6727857", "0.6670179", "0.6655377", "0.6626366", "0.6525857", "0.64391464", "0.64263284", "0.64137256", "0.64088935", "0.637947", "0.6372706", "0.63103443", "0.630776", "0.6264952", "0.62313086", "0.6207568", "0.6163446", "0.61179227", "0.6077919...
0.7896222
0
The signed comment gets two extra headers at the top: Signature: \n PublicKey: \n ... The signature signs everything below the Signature header.
async function signComment(comment) { let supercop = await getSupercop(); let keys = await getUserKeys(); comment = PUBKEY_HEADER + ': ' + hashutil_1.a2hs(keys.publicKey) + '\n' + comment; let buffer = getTextBytes(comment); let signature = supercop.sign(buffer, keys.publicKey, k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signTheFile() {\n var plaintext = document.querySelector('.output').value\n // initialize\n var sig = new KJUR.crypto.Signature({\"alg\": \"SHA1withRSA\"});\n // initialize for signature generation\n sig.init(object_2.private_key); // rsaPrivateKey of RSAKey object\n ...
[ "0.6166056", "0.61320984", "0.59306234", "0.57828456", "0.5778052", "0.564667", "0.56048673", "0.55888367", "0.55320275", "0.5461535", "0.5434808", "0.5434808", "0.54342043", "0.5420632", "0.54156774", "0.54133904", "0.5402235", "0.5395755", "0.5393612", "0.5380095", "0.53568...
0.7233661
0
Based on the route arguments, determine whether we have a valid user route.
isValidUserRoute(guid, state, ...deepRouteParts) { if (!guid || this.userStates.indexOf(state) === -1) { return false; } if (state === 'store') { // so far store is the only state that could have // route parts beyond the state, e.g @themes/store/<slug> if (deepRouteParts.length > 1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isRoutingValid(from, to, player) {\r\n var isValid = false\r\n var roll = this.addLastRoll()\r\n var route = (player === this.PlayerEnum.player1) ? this.Player1Route : this.Player2Route;\r\n if(route.indexOf(to) - route.indexOf(from) === roll) {\r\n isValid = true;\r\n ...
[ "0.65082395", "0.64186794", "0.63141996", "0.62715375", "0.61028343", "0.6071619", "0.60688514", "0.6012893", "0.59925514", "0.59925514", "0.59585434", "0.5843808", "0.58352566", "0.58352566", "0.58352566", "0.58352566", "0.58352566", "0.58352566", "0.58352566", "0.58352566", ...
0.7067271
0
Hides result same with the selected currency
function hideDublicate() { $('.hide').removeClass('hide'); active = $('.currencies .active').attr('class').replace(/ active/, ''); $('.results .' + active).addClass('hide'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subtotalContainerCurrency (currency_code) {\n\t\t\t$('.moneda, .precio').hide();\n\t\t\t$('.'+currency_code).show();\n\t\t}", "function currency_conveter_close()\n{\t\n\tdocument.getElementById(\"currency_id\").style.display=\"none\";\t\n}", "function showMeTheMoney() {\n const x = document.getElem...
[ "0.6854338", "0.65767586", "0.6535914", "0.6363109", "0.6241286", "0.6128853", "0.6075926", "0.60296077", "0.5973681", "0.59569293", "0.59397036", "0.59387773", "0.589233", "0.5871772", "0.58072", "0.5802853", "0.57849723", "0.57700396", "0.5768782", "0.5763725", "0.5756543",...
0.6593368
1
By default, all elements that are shorter than the recommended height are expanded uniformly, not considering any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and reduces the available height.
function distributeHeight(els, availableHeight, shouldRedistribute) { // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions, // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars. var minOffset1 = Math.floor(availabl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function distributeHeight(els, availableHeight, shouldRedistribute) {\n // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,\n // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.\n var minOffset1 = Math....
[ "0.7512673", "0.7438064", "0.7415191", "0.7411168", "0.7411121", "0.7407324", "0.7407324", "0.7407324", "0.7407324", "0.7404371", "0.74020743", "0.7371521", "0.7368006", "0.7368006", "0.7368006", "0.7368006", "0.7368006", "0.7368006", "0.7368006", "0.7368006", "0.5739975", ...
0.744916
1
cells to be that width. PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline
function matchCellWidths(els) { var maxInnerWidth = 0; els.forEach(function (el) { var innerEl = el.firstChild; // hopefully an element if (innerEl instanceof HTMLElement) { var innerWidth_1 = innerEl.getBoundingClientRect().width; if (innerWidth_1 > maxInnerWidth) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchCellWidths(els){var maxInnerWidth=0;els.find('> *').each(function(i,innerEl){var innerWidth=$(innerEl).outerWidth();if(innerWidth>maxInnerWidth){maxInnerWidth=innerWidth;}});maxInnerWidth++;// sometimes not accurate of width the text needs to stay on one line. insurance\nels.width(maxInnerWidth);retu...
[ "0.70497334", "0.6667279", "0.66234493", "0.66234493", "0.66234493", "0.66234493", "0.66234493", "0.66234493", "0.65965426", "0.6593734", "0.6593079", "0.6593079", "0.6593079", "0.6593079", "0.65798247", "0.65798247", "0.6567137", "0.6551386", "0.6551386", "0.65425336", "0.63...
0.6678387
1
Date stuff that doesn't belong in datelib core given a timed range, computes an allday range that has the same exact duration, but whose start time is aligned with the start of the day.
function computeAlignedDayRange(timedRange) { var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1; var start = startOfDay(timedRange.start); var end = addDays(start, dayCnt); return { start: start, end: end }; } // given a timed range, computes an a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeAlignedDayRange$1(timedRange) {\n var dayCnt = Math.floor(diffDays$1(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay$1(timedRange.start);\n var end = addDays$1(start, dayCnt);\n return { start: start, end: end };\n }", "function computeAlignedDayRa...
[ "0.7304423", "0.722295", "0.7154397", "0.7154397", "0.7154397", "0.7154397", "0.6930892", "0.6145394", "0.61383194", "0.6116686", "0.6116686", "0.6116686", "0.6116686", "0.6039628", "0.6025339", "0.6014083", "0.5997815", "0.5834493", "0.5834493", "0.582292", "0.5768429", "0...
0.78589034
0
always executes the workerFunc, but if the result is equal to the previous result, return the previous result instead.
function memoizeOutput(workerFunc, equalityFunc) { var cachedRes = null; return function () { var newRes = workerFunc.apply(this, arguments); if (cachedRes === null || !(cachedRes === newRes || equalityFunc(cachedRes, newRes))) { cachedRes = newRes; } return cache...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoizeOutput(workerFunc, equalityFunc) {\n var cachedRes = null;\n return function () {\n var newRes = workerFunc.apply(this, arguments);\n\n if (cachedRes === null || !(cachedRes === newRes || equalityFunc(cachedRes, newRes))) {\n cachedRes = newRes;\n ...
[ "0.67940664", "0.6742785", "0.6742785", "0.6742785", "0.6693245", "0.6508765", "0.6012485", "0.53963876", "0.536228", "0.53092426", "0.52782077", "0.5172226", "0.5133392", "0.50990874", "0.5080058", "0.50645953", "0.5060959", "0.50179565", "0.5009813", "0.50028396", "0.497610...
0.6798861
0
Reuses old values when equal. If anything is unequal, returns newProps asis. Great for PureComponent, but won't be feasible with React, so just eliminate and use React's DOM diffing.
function recycleProps(oldProps, newProps, equalityFuncs) { var comboProps = {}; // some old, some new var anyChanges = false; for (var key in newProps) { if (key in oldProps && (oldProps[key] === newProps[key] || equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key]))) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n\n var anyChanges = false;\n\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] || equalityFuncs[key] && equalityFuncs[key](oldProps[key], newP...
[ "0.7131838", "0.71228373", "0.71228373", "0.71228373", "0.7101739", "0.7023524", "0.649072", "0.6271153", "0.62107885", "0.61844766", "0.61383915", "0.6066818", "0.60410994", "0.60330707", "0.5948182", "0.59422773", "0.59422773", "0.58844805", "0.5864793", "0.5820127", "0.581...
0.7149765
0
TODO: find a way to avoid comparing DateProfiles. it's tedious
function isDateProfilesEqual(p0, p1) { return rangesEqual(p0.validRange, p1.validRange) && rangesEqual(p0.activeRange, p1.activeRange) && rangesEqual(p0.renderRange, p1.renderRange) && durationsEqual(p0.minTime, p1.minTime) && durationsEqual(p0.maxTime, p1.maxTime); /* TODO: compare more? curr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDateProfilesEqual(p0, p1) {\n return rangesEqual(p0.activeRange, p1.activeRange) &&\n rangesEqual(p0.validRange, p1.validRange) &&\n durationsEqual(p0.minTime, p1.minTime) &&\n durationsEqual(p0.maxTime, p1.maxTime);\n }", "function isDateProfilesEqual(p0, p1...
[ "0.70069826", "0.6989276", "0.6989276", "0.68671584", "0.65773696", "0.57456386", "0.5635219", "0.5573025", "0.55383563", "0.55383563", "0.55370533", "0.550376", "0.54983395", "0.5423133", "0.5423133", "0.5367248", "0.5354451", "0.5335503", "0.5323803", "0.5323346", "0.531388...
0.69912595
1
Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.
function computeTitleFormat(dateProfile) { var currentRangeUnit = dateProfile.currentRangeUnit; if (currentRangeUnit === 'year') { return { year: 'numeric' }; } else if (currentRangeUnit === 'month') { return { year: 'numeric', month: 'long' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n\n if (currentRangeUnit === 'year') {\n return {\n year: 'numeric'\n };\n } else if (currentRangeUnit === 'month') {\n return {\n year: 'numeric',...
[ "0.63324076", "0.6297603", "0.6297603", "0.6297603", "0.6194456", "0.6141514", "0.59930736", "0.58826584", "0.5842213", "0.5793832", "0.5457624", "0.5387548", "0.5291831", "0.52914876", "0.52627593", "0.52439994", "0.5240169", "0.5210504", "0.5210504", "0.5196107", "0.5191251...
0.63608164
0
validates reset password request email
validateRequestResetPasswordEmail(request, response) { request .checkBody("email", "Please enter a valid email.") .isEmail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_email() {\n if (!valid_email(vm.email_address)) {\n vm.error_message = 'Please enter a valid email address';\n return;\n }\n reset_password();\n }", "function validateEmailReset() {\n if (checkIfEmpty(email)) return;\n ...
[ "0.7690095", "0.7437819", "0.7031319", "0.68164676", "0.6810596", "0.68033946", "0.68030816", "0.6542822", "0.64572674", "0.6450064", "0.64060956", "0.63424385", "0.63377506", "0.6332511", "0.6326632", "0.62750316", "0.6248615", "0.6245973", "0.6243801", "0.62325084", "0.6221...
0.7987868
0
Setting up the structure for each job posting
function createJobs(_data) { //Checking for potential Lever source or origin parameters let pageUrl = window.location.href; let leverParameter = ''; let trackingPrefix = '?lever-'; if (pageUrl.indexOf(trackingPrefix) >= 0) { // Found Lever parameter let ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async create(feed) {\n feed.options = {\n title: 'Mastering Backend Development',\n link: 'https://masteringbackend.com/jobs.xml',\n description: 'This is Mastering Backend Development Job feeds!',\n }\n\n const jobs = await Utils.getJobs()\n jobs.forEach((job...
[ "0.6153944", "0.5947446", "0.58433473", "0.5759095", "0.574909", "0.5729391", "0.5676086", "0.5651651", "0.56346154", "0.5596035", "0.5560284", "0.552517", "0.5499328", "0.5484165", "0.54511726", "0.5410401", "0.54072237", "0.529986", "0.5252398", "0.5244045", "0.5228222", ...
0.65906507
0
Determine if we are validating the root source object.
function isRoot() { return this.source === this.value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validates() {\n if(this.isRoot()) {\n return true; \n }else if(this.value === undefined && !this.rule.required) {\n return false;\n }\n return this.rule.required\n || (!this.rule.required && this.source.hasOwnProperty(this.field));\n}", "isRootFound() {\n return Boolean(this.config.r...
[ "0.6815824", "0.6012659", "0.5887436", "0.58868724", "0.58643454", "0.583623", "0.58301073", "0.5778789", "0.57430834", "0.5637383", "0.5626546", "0.5626546", "0.5626546", "0.56194234", "0.56174666", "0.55694324", "0.5561056", "0.55270207", "0.5514687", "0.5469932", "0.542538...
0.69113475
0
Main BootWeb servers object, may emit events
function servers (bootweb) { this.bootweb = bootweb; EventEmitter.call ( this ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bootstrap() {\n //Apply front http listener\n const appFront = express();\n appFront.use(bodyParser.json());\n bodyParser.text();\n appFront.listen(process.env.HTTP_FRONT_PORT, function(){\n console.log('HTTP Front listener running on', process.env.HTTP_FRONT_PORT);\n });\n new...
[ "0.67614734", "0.65214163", "0.63896996", "0.63259906", "0.6293171", "0.62898546", "0.6280776", "0.62777597", "0.6277546", "0.62628615", "0.62619793", "0.62480164", "0.62405807", "0.6223916", "0.6220832", "0.6215417", "0.61808926", "0.6137782", "0.6118071", "0.61085004", "0.6...
0.75152606
0
Rerturns total endpoint length
@computed get totalEndpoints() { return this.endpoints.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "length() {\n let length = this.end - this.begin;\n if (length < 0) {\n length = this.doubledCapacity + length;\n }\n return length;\n }", "function maxTripLength() {\n var profile = session.plan().routes();\n return profile[profile.length - 1].stats.avg;\n}", "totalL...
[ "0.6828969", "0.66701806", "0.6632358", "0.657506", "0.657506", "0.65201646", "0.6494508", "0.6494508", "0.6494508", "0.6494508", "0.64676845", "0.64503616", "0.6432535", "0.6396636", "0.6386825", "0.63782614", "0.6348986", "0.6306177", "0.6305782", "0.6305782", "0.62649024",...
0.6879421
0
Sets the cursor to end
function setCursorToEnd(input){ input.selectionStart = input.selectionEnd = 10000; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "navigateLineEnd() {\n this.selection.moveCursorLineEnd();\n this.clearSelection();\n }", "function setCursorToEnd() {\n let p = document.getElementById(\"content\");\n let s = window.getSelection();\n let r = document.createRange();\n r.setStart(p.lastChild, 1);\n r.setEnd(p.lastChild, 1);\...
[ "0.74844176", "0.7249282", "0.71906126", "0.71140915", "0.70548964", "0.7024489", "0.6947848", "0.6935972", "0.69339114", "0.68216324", "0.67572916", "0.6736376", "0.6696001", "0.66754526", "0.66410947", "0.66410947", "0.6634197", "0.6556871", "0.6507465", "0.649867", "0.6420...
0.7299752
1
if dons = [14, 30, 5, 7, 9, 11, 15] then new_avg(dons, 30) > 149 The function new_avg(arr, navg) should return the expected donation (rounded up to the next integer) that will permit to reach the average navg. Should the last donation be a non positive number (<= 0) John wants us to throw an error (return Nothing in Ha...
function newAvg(arr, newavg) { if(!arr.length){return newavg}; if(newavg * (arr.length + 1) - arr.reduce((prev, curr) => prev + curr) < 0){throw Error();} return Math.ceil(newavg * (arr.length + 1) - arr.reduce((prev, curr) => prev + curr)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find_avg(arr) {\n\t\tvar sum = 0, avg;\n\t\tfor (var i = 0; i < arr.length; i++) {\n\t\t\tsum += arr[i];\n\t\t}\n\t\tavg = sum / arr.length;\n\t\treturn avg;\n\t}", "function Average(arr) {\n let sum = 0;\n for (let i = 0; i < arr.length; i++) {\n if (isNaN(arr[i])) {\n return 'Array contains ...
[ "0.59453064", "0.5903694", "0.58757615", "0.5832567", "0.5812005", "0.576877", "0.57643396", "0.5743246", "0.57188326", "0.56753576", "0.5663021", "0.56593835", "0.56364244", "0.56356996", "0.56328195", "0.5621218", "0.5616628", "0.5614444", "0.56079227", "0.5603593", "0.5602...
0.59532046
0
component that renders when the match entered is invalid this is not actually another page
function InvalidMatchIdPage() { return <h1>404 - Match Id Not Found</h1> }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NoMatch(){\n return(\n <div>\n No Match Found\n </div>\n )\n}", "renderFormError(inputName) {\n\n if (inputName == 'lastname') {\n if (this.state.lastnameError !='') {\n return (<RkText rkType='danger'> {this.state.lastnameError} </RkText>);\n }\n }\n }", "function...
[ "0.62154937", "0.60441965", "0.6032922", "0.5936112", "0.5875843", "0.5764671", "0.5720418", "0.5678171", "0.5656736", "0.56434566", "0.5626248", "0.55917", "0.55866396", "0.5564408", "0.55548716", "0.55545753", "0.55522007", "0.5538025", "0.55075914", "0.5490486", "0.5482144...
0.66967237
0
process nutrients for display
function prepareNutrientsView(nutrientsInfo) { Utils.smartLog(["preparing nutrients info for rendering"]); var collectedNutrients = {}; var collectedNutrientsSize; // var total_daily = nutrientsInfo.totalDaily; // var total_quantity = nutrientsInfo.totalNutrients; var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayNutrientResults (responseJson) {\n console.log(responseJson);\n // if there are previous results, remove them\n $('#results-list').empty();\n // iterate through the foods array\n for (let i = 0; i < responseJson.foods.length; i++){\n $('#results-list').append(\n //full na...
[ "0.5242351", "0.5206729", "0.5129763", "0.51179165", "0.5043242", "0.50146633", "0.49858004", "0.4912856", "0.49051166", "0.49050543", "0.4903748", "0.48746616", "0.48662576", "0.48415774", "0.4839507", "0.48253915", "0.48248634", "0.482121", "0.481426", "0.48101503", "0.4783...
0.6115116
0
Returns humanreadable strings of red's and blu's play time at the instant this function is called.
function times(moveStart, redTime, bluTime) { var currentTime = new Date().getTime(); var redString, bluString; // The current move is red. if (stats.future[0] == "r") { redString = convert(redTime - currentTime + moveStart); bluString = convert(bluTime); } // The current move is bl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getTimerClockFaceText() {\n if (!this.timerState.started) {\n return \"\";\n }\n\n // Calculate current unix ts with server offset correction\n let nowUnix = Date.now() / 1000;\n nowUnix += this.timeOffset;\n\n // Calculate diff (total run time)\n ...
[ "0.6296524", "0.6267395", "0.6074857", "0.607083", "0.59466213", "0.5946168", "0.5918353", "0.58924925", "0.5840559", "0.58306444", "0.5794326", "0.5768211", "0.5738857", "0.5728142", "0.56788594", "0.5658831", "0.5633358", "0.56214356", "0.5600819", "0.55768394", "0.5575378"...
0.6373196
0
this filteres the unique names and populates the dropdown
function populateNames(data){ var result = _.uniq(data); for (var x = 0; x < result.length; x++){ var $opt = $('<option>'); $opt.text(result[x]); $('#names').append($opt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterDropdown (list) {\n return _.filter(list, function(mug_) {\n return (mug.ufid !== mug_.id) &&\n (mug_.name && !_.isUndefined(mug_.displayLabel));\n });\n }", "function init(){...
[ "0.6670389", "0.63788086", "0.6363138", "0.6331009", "0.6316063", "0.6311373", "0.63069344", "0.6287578", "0.6271794", "0.62389606", "0.6188832", "0.61669314", "0.6131019", "0.61227435", "0.6063563", "0.6057256", "0.605643", "0.6048922", "0.60480225", "0.60252666", "0.6020363...
0.77502024
0
confirmation of choice deletion
function confirmDeleteDecision( projectID, DecisionID, button ){ //window.alert("PID: " + projectID +", " + "DID: " + DecisionID ); if( !$('#dialog').length ){ $('body').append('<div id="dialog" title="Confirm Deletion of Choice"></div>'); } var html = ""; html+= "<h2>Are you sure you want to delete this Choice?...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function confirm(e) {\n deleteQuestion(deleteId); //sending question id\n message.success(\"Deleted Successfully\");\n }", "function confirmDeletion(){\n vex.dialog.open({\n message: \"Comment Has Been Deleted\",\n buttons:[\n $.extend({},vex.dialog.buttons.Yes,...
[ "0.7290716", "0.7117276", "0.7077907", "0.70388037", "0.7006606", "0.7002816", "0.68586826", "0.68586826", "0.68406725", "0.68216765", "0.6820766", "0.68115", "0.68098795", "0.6807238", "0.67695516", "0.67552453", "0.6754987", "0.6741894", "0.67399836", "0.6723309", "0.672086...
0.7221655
1
Confirmation of Delete Segment
function confirmDeleteSegment( projectID, segmentID, button ){ if( !$('#dialog').length ){ $('body').append('<div id="dialog" title="Confirm Deletion of Segment"></div>'); } //ok I'm cheating here technically I should use my get method... but then I'd have to add some extra params var use = updateItem("segment", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function confirmDeletion(){\n vex.dialog.open({\n message: \"Comment Has Been Deleted\",\n buttons:[\n $.extend({},vex.dialog.buttons.Yes,{text: \"OK\"})\n ],\n callback: function (data) {\n $(location).attr(\"href\", \"/\"); \n ...
[ "0.7284709", "0.6931065", "0.6823032", "0.680005", "0.67671627", "0.67671627", "0.675341", "0.67174166", "0.67169094", "0.67057335", "0.67056775", "0.6705228", "0.6700757", "0.6690084", "0.6676347", "0.66753185", "0.66753185", "0.6635302", "0.660826", "0.6579117", "0.65768296...
0.77495813
0
Segments/ Update Starting Segment
function setStartSegment( projectID, segmentID ){ //close dialog box closeDialog(); //set the project Starting Clip - have to see if it exists or not first var resp = updateItem( "project", projectID, "startingSegment", segmentID ); console.log( resp ); if( resp != null ){ var d = resp.data; if( d.lengt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Segment(seg, desired)\n{\n\tthis.name = seg;\n\tthis.desired = desired;\n this.digit_pos = 0;\n \n this.setDigitPos = function(digit_pos)\n {\n this.digit_pos = digit_pos;\n }\n}", "function repaintSegments() {\n\t\tupdateDescriptions();\n\t\tfor (var i = 0; i < segments.length; i+...
[ "0.5977328", "0.5922154", "0.5913089", "0.5913021", "0.58863866", "0.58859205", "0.5881022", "0.587697", "0.581097", "0.57776946", "0.5753953", "0.5700368", "0.56925786", "0.5676837", "0.5672844", "0.56505203", "0.564991", "0.5638598", "0.56219584", "0.55728245", "0.5535115",...
0.66473806
0
Update Project Starting Segment
function updateStartingSegment(projectID){ if( !$('#dialog').length ){ $('body').append('<div id="dialog" title="Set Starting Segment"></div>'); } var data = getAjaxHandlerResponse(projectID, "segment", "list"); var html = ""; var items = data.items; html += "<p>Items: " + items + "</p>"; html+= '<tabl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setStartSegment( projectID, segmentID ){\n\t//close dialog box\n\tcloseDialog();\n\t//set the project Starting Clip - have to see if it exists or not first\n\t\n\tvar resp = updateItem( \"project\", projectID, \"startingSegment\", segmentID );\n\t\n\tconsole.log( resp );\n\t\n\tif( resp != null ){\n\t\tva...
[ "0.7462874", "0.54685843", "0.5433637", "0.52354723", "0.52132523", "0.51958907", "0.5160709", "0.5125494", "0.5065728", "0.50549954", "0.50035924", "0.50021875", "0.49844703", "0.4968277", "0.4965797", "0.4933045", "0.4907199", "0.49006644", "0.48993662", "0.48961347", "0.48...
0.6058257
1
Links / Delete /Edit Project Functions /Segments
function addSegment(projectID){ window.location = serverHost + "/administration/segments/add?projectID=" + projectID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewsEvents()\n { $('#tree .b-delete-view').attr('title', T('DELETE_VIEW'));\n }", "function insertEditTaskDeleteLink(divId)\n{\n if (prefs.getPref(\"SHOW_EDIT_DELETE_TASKS_LINK\"))\n addLinkToDiv(divId, deleteSelectedTasks, \"Delete tasks\", \"Delete Tasks\");\n}", "function DELET...
[ "0.5411483", "0.523675", "0.5194796", "0.5177057", "0.51572657", "0.5143676", "0.5123719", "0.51067054", "0.5101231", "0.5077486", "0.50445694", "0.50306624", "0.5026545", "0.50171304", "0.5004321", "0.49695265", "0.4961045", "0.4944612", "0.49417534", "0.49406084", "0.493643...
0.594392
0
Get the current style of a feature and returns an array.
static getStyleAsArray(feature) { const styles = feature.getStyleFunction()(); return Array.isArray(styles) ? styles : [styles]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStyle(feature) {\n return {\n fillColor: getColor(feature.properties.LIENSAVG),\n weight: 2,\n opacity: 1,\n color: 'white',\n dashArray: '3',\n fillOpacity: 0.7\n };\n}", "function getStyle(feature) {\r\n return {\r\n radius: '2.5',\r\n fillColor: g...
[ "0.71697706", "0.70931226", "0.6708484", "0.67072034", "0.66772866", "0.66393507", "0.6578685", "0.65733963", "0.656191", "0.655808", "0.65456116", "0.65237117", "0.65164846", "0.6512569", "0.65043414", "0.6463679", "0.64299357", "0.6405518", "0.6401102", "0.6382974", "0.6377...
0.80753934
0
Search for the current icon in a category's icons list.
static findIcon(olIcon, category) { const src = olIcon.getSrc(); return category.icons.find(icon => { const regex = category.type === 'img' ? new RegExp(`${category.id}-${icon.id}.png`) : category.regex(icon.id); return regex.test(src) || (category.type === 'img' && icon....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCategoryIconClass(category) {\n // Call getCategory() to return the icon class string\n return getCategory(category.toLowerCase()).category_icon;\n}", "function pickIcon(category) {\n switch (category) {\n case \"fruit\":\n return \"<img src='img/fruit.svg' alt='Fruit Category Icon' cl...
[ "0.62048256", "0.60857517", "0.5938231", "0.588796", "0.5858513", "0.5637834", "0.5636686", "0.5623987", "0.56193805", "0.5612407", "0.5490203", "0.54030967", "0.53896827", "0.53896827", "0.5338677", "0.53384733", "0.5321634", "0.52768", "0.5261222", "0.5249237", "0.5245172",...
0.7340793
0
Search for the current size in a sizes list.
static findSize(olStyle, sizes, dflt) { const scale = olStyle.getScale(); return sizes.find(size => scale === size.scale) || dflt || sizes[2]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function size(found) {\n return sizes[found] || 1;\n }", "getSize(name) {\n let size = this._data.sizes.find(s => s.name === name);\n return size;\n // for (let i = 0; i < this._data.sizes.length; i++) {\n // if (this._data.sizes[i].name === name) {\n // return this._data.s...
[ "0.6579017", "0.6054431", "0.5888866", "0.56836087", "0.56374556", "0.5575877", "0.55578554", "0.54946506", "0.53570515", "0.5339202", "0.52910423", "0.52689487", "0.52166915", "0.52125174", "0.51880467", "0.5186507", "0.514965", "0.510612", "0.5079071", "0.50378716", "0.5001...
0.6416853
1
Search for the current color in a color list.
static findColor(olColor, colors) { const rgb = asString( typeof olColor === 'string' ? olColor : olColor.slice(0, 3), ); return colors.find(c => rgb === asString(c.fill)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_findColor() {\n let color = null;\n do {\n // generate colors, till we found a unique one\n color = randomColor().hexString();\n } while (this.takenColors.has(color));\n this.takenColors.add(color);\n return color;\n }", "function searchColors(r, g, b) {\n var nearestColor = -1;\n ...
[ "0.6520476", "0.623328", "0.6208499", "0.6208499", "0.615107", "0.60543615", "0.598487", "0.598487", "0.59659404", "0.5965757", "0.59346926", "0.5912292", "0.5912029", "0.59016466", "0.58784133", "0.5858213", "0.5818066", "0.5765948", "0.5757839", "0.57484543", "0.5744373", ...
0.69532925
0
function return false if dateStart greater endDate
function checkDateIsAfterDate(startDateIn, endDateIn){ if($.trim(startDateIn) == "" || $.trim(endDateIn) == ""){ return true; } var dateStart = moment(startDateIn, "DD/MM/YYYY"); var dateEnd = moment(endDateIn, "DD/MM/YYYY"); if(dateStart > dateEnd){ return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateTwoDates(startDate, endDate){\n if( startDate < endDate) {\n return true;\n } else {\n return false\n }\n }", "function inRange(start, end, date) {\n if (start && date.isBefore(start)) {\n return false\n }\n if (end && date.isAfter(end)) {\n return f...
[ "0.797585", "0.7465308", "0.74155676", "0.7381943", "0.73454547", "0.7303541", "0.72778225", "0.7230367", "0.71339744", "0.7131801", "0.7129072", "0.7089432", "0.7079537", "0.70351374", "0.7029409", "0.7010708", "0.7010708", "0.6971167", "0.6918468", "0.6855825", "0.6855825",...
0.7551589
1
return true if string length < lengthInput
function checkLengthStringInput(strInput, lengthIn){ var strLetter = StringUtilNVL(strInput); if(strLetter.length > lengthIn){ return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "verifyLength(value, length) {\n if (value.length >= length) {\n return true;\n }\n return false;\n }", "verifyLength(value, length) {\n if (value.length >= length) {\n return true;\n }\n return false;\n }", "verifyLength(value, length) {\n if (value.length >= length) {\n r...
[ "0.7553069", "0.7553069", "0.7553069", "0.7553069", "0.7553069", "0.7553069", "0.7553069", "0.7553069", "0.7535337", "0.74762726", "0.7408163", "0.73259044", "0.7315855", "0.73081523", "0.7299853", "0.72925496", "0.7291623", "0.7265829", "0.72651434", "0.7245946", "0.722944",...
0.81776494
0
validate msisdn return true if validate OK.
function validateMSISDN(msisdnInput){ var resultValidateMSISDN = true; var msisdn = StringUtilNVL(msisdnInput); var msisdnLength = msisdn.length; if(msisdnLength > MAX_LENGTH_SUBSCRIBER_NUMBER || msisdnLength < MIN_LENGTH_SUBSCRIBER_NUMBER){ resultValidateMSISDN = false; } if(!isNumbericInteger(msisdn)){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateSSN(ssn) {\n if (!this.isNumeric(ssn) || ssn.toString().length !== 10) {\n return { numeric: false, error: \"SSN can only be a 10 digit number\" };\n } else {\n return { numeric: true, error: null };\n }\n }", "function isValidSSN(str)\r\n{\t\r\n\tvar newvalue = \"\";\r\n\t\r\n\tvar o...
[ "0.6282825", "0.61160165", "0.6115331", "0.597948", "0.59650373", "0.5896994", "0.5888681", "0.5873993", "0.57752705", "0.57721657", "0.5738731", "0.57306415", "0.57123864", "0.56898206", "0.5653629", "0.56416464", "0.5639922", "0.56398803", "0.5619735", "0.560984", "0.560810...
0.7189507
0
formate msisdn with 0 and +84
function formatMsisdnWithoutZero(msisdn) { var msisdnValue = null; if (msisdn == null || $.trim(msisdn) == "") { return msisdnValue; } msisdn = $.trim(msisdn) if (msisdn.startsWith("0")) { msisdnValue = msisdn.substring(1); } else if (msisdn.startsWith("84")) { msisdnValue = msisdn.substring(2); } else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getInternational() {\r\n return this.phoneNumber.replace(/^(0)(\\d{8,9})$/, '972$2');\r\n }", "function replaceCCN(num){\n str = num.toString();\n let regex = /\\d/g;\n str1 = str.slice(0, 12).replaceAll(regex, '*');\n str2 = str.slice(12, 16)\n return str1 + str2;\n}", "function mask(value) {\n...
[ "0.57980025", "0.5682809", "0.5678548", "0.566402", "0.55967504", "0.559298", "0.55826235", "0.5576177", "0.54895085", "0.5478023", "0.5469013", "0.5439256", "0.5436138", "0.5408838", "0.5408838", "0.5408838", "0.53732324", "0.5361982", "0.53555894", "0.5346665", "0.5335485",...
0.7149416
0
Check for PBJS loaded and add listeners to various events when ready
function checkForPBJS(domFoundTime) { if (window.pbjs && window.pbjs.libLoaded && do_once_pbjs == 1) { window.pbjs.onEvent('auctionEnd', function(data) { console.log('PREBID_TOOLS: auctionEnd ' + convertTimestamp(Date.now())); // TODO hmmm 'data' seems to contain all (and more) data that I use from // the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_FBPReady() {\n super._FBPReady();\n // this._FBPTraceWires();\n // check initial overrides\n this._registerListeners();\n }", "onReady() {}", "function addReadyListener()\n {\n var _timer;\n\n if (SnowPlow.documentAlias.addEventListener)\n {\n SnowPlow.addEventL...
[ "0.675755", "0.6519246", "0.6375729", "0.6342578", "0.63389814", "0.632905", "0.6311896", "0.6269646", "0.62531745", "0.62309885", "0.6201813", "0.6201493", "0.61983526", "0.61852896", "0.6180598", "0.6176265", "0.6165831", "0.60951054", "0.60951054", "0.6069313", "0.6054175"...
0.6777435
0
function that accepts json data and parses it's tasks to add data in todo list
function addData(json) { var tasks = json.tasks; for(var i=0;i<tasks.length;i++) { // adding tasks document.getElementById('taskname').value = tasks[i]; CreateListItem() } // clearing text field document.getElementById('taskname').value = ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_response(data,status){\n\n\tvar tasks = JSON.parse(data);\n\tfor(var i = 0;i<tasks.length;i++){\n\t\tif(tasks[i]!= undefined){\t\t\n\t\t\n\n\t\tvar taskName = tasks[i].todo;\n\n\t\t//add to the todo-list\n\t\tif(tasks[i].state ==\"current\"){\n\t\t\tvar taskHTML = '<li><span class=\"done\">%</span...
[ "0.680246", "0.63709", "0.63578004", "0.63504714", "0.63354385", "0.6298268", "0.61992234", "0.61984587", "0.6193453", "0.61375105", "0.6103791", "0.61030364", "0.61023545", "0.60971695", "0.60793775", "0.60724217", "0.6062265", "0.6058256", "0.60384536", "0.6025542", "0.6025...
0.6826557
0
Air Speed Set air speed
function _setAirSpeed(speed){ var deg = 0; if (speed >= 0 && speed < 40) deg = speed * 0.9; if (speed >= 40 && speed <= 160) deg = speed * 1.8 - 36; if (speed > 70 && speed <= 160) deg = speed * 2 - 50; if (speed > 160) deg = speed + 110; if (spe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _setTrueAirSpeed(speed){\n // Make me work!\n }", "function setSpeed(speed_data){\r\n\tif(speed_data == 0)\r\n\t\tset_speed = 40;\r\n\telse if(speed_data == 1)\r\n\t\tset_speed = 25;\r\n\telse\r\n\t\tset_speed = 15;\r\n}", "function setSpeed(speed){\n for (m in motors){\n ms....
[ "0.8128995", "0.6948298", "0.68077976", "0.67661554", "0.6680548", "0.6639177", "0.6613277", "0.65754604", "0.6491467", "0.64524764", "0.64319223", "0.63918144", "0.63531333", "0.6347749", "0.63219655", "0.62756354", "0.62281775", "0.62050265", "0.61756325", "0.61753345", "0....
0.7929398
1
Air Speed Set true air speed
function _setTrueAirSpeed(speed){ // Make me work! }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _setAirSpeed(speed){\n\n var deg = 0;\n\n if (speed >= 0 && speed < 40) deg = speed * 0.9;\n if (speed >= 40 && speed <= 160) deg = speed * 1.8 - 36;\n if (speed > 70 && speed <= 160) deg = speed * 2 - 50;\n if (speed > 160) deg = speed + 110;\n ...
[ "0.7736948", "0.70660037", "0.69693494", "0.67954636", "0.6771205", "0.6754061", "0.6728712", "0.668404", "0.66579056", "0.66387856", "0.6635418", "0.6630588", "0.6517591", "0.64908457", "0.6466655", "0.64406765", "0.6401583", "0.6395206", "0.63643867", "0.6352358", "0.630621...
0.87181795
0
Attitude Set visibility of the off flag
function _setOffFlag(visible){ placeholder.each(function(){ $(this).find('div.instrument.attitude div.attitude_off_flag').toggle(visible); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set visible(value) {\n this._planeHelper.visible = value;\n }", "markOff(){\n this.room.unmarkPosition(this.positionX, this.positionY);\n }", "function setScanVisibility(name, value) {\n var currentCAD = getCad();\n if (!currentCAD) {\n return;\n }\n c...
[ "0.6072876", "0.5970901", "0.5915104", "0.5908954", "0.5908954", "0.5908954", "0.5908954", "0.5908954", "0.5908954", "0.58572245", "0.5809276", "0.58089685", "0.5798834", "0.5784384", "0.57606894", "0.57546896", "0.57432204", "0.5740114", "0.5740114", "0.5703763", "0.56465006...
0.7968243
0
Altimeter Set pressure (by default inHg; set milibar to true if you wish to use mbar)
function _setPressure(pressure, milibar){ var pressure1 = 0, pressure2 = 0; // pressure1: 5 units = 9 degrees // pressure2: 0.1 units = 6 degrees if (milibar !== true) { if (pressure >= 27.1 && pressure <= 33) { pressure1 = (925 - 33....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get pressure() {\n return this.getSetting('pressureEnabled') ? this.paper.view.pressure : 1;\n }", "function transformFromHpaToMmHg() {\r\n return (weatherData.main.pressure * 0.75).toFixed(); \r\n}", "set_level() {\n this.height = (this.totalVolume + this.minVolume) * this.maxHeight / this.maxVolu...
[ "0.6357495", "0.60555166", "0.5609736", "0.56084156", "0.55834687", "0.5555747", "0.542742", "0.53922796", "0.53854656", "0.5350066", "0.5311486", "0.52939606", "0.52807367", "0.5267222", "0.52589625", "0.5245947", "0.52417815", "0.5215932", "0.52015555", "0.51920927", "0.517...
0.7320369
0
Turn Coordinator Load SVG path along which the slip/skid ball moves
function _loadBallPath() { if (typeof(d3) != 'undefined') { // If running directly from the file, this will fail in Chrome due to security reasons try { placeholder.each(function(){ var i = this; d3.xml(set...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n var path =\n 'M1 1C1 1 62.1562 56.1927 101.659 72.1468C141.162 88.1009 207 95 207 95'; // an SVG path\n\n\n // path.setAttribute('transform', 'translate(50,50)');\n var pathAnimator;\n var startFromPercent = 0; // start from 10% of the path\n var stopAtPercent = 90; // stop at 9 0% ...
[ "0.6355612", "0.62586653", "0.6136757", "0.60259295", "0.5908393", "0.5848757", "0.58159673", "0.5807985", "0.5786521", "0.57676214", "0.57012343", "0.56893885", "0.5674937", "0.5674041", "0.5667897", "0.5644787", "0.56340665", "0.56179273", "0.5613684", "0.5604815", "0.5597"...
0.736388
0
Heading Set beacon one direction
function _setBeaconOne(heading, visible){ if (visible) placeholder.each(function(){ $(this).find('div.instrument.heading div.heading_beacon_1').show().css('transform', 'rotate(' + heading + 'deg)'); }); else placeholder.each(function(){ $(this).fin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setHeading(heading) {\n this.direction = toInt(heading) % 360;\n }", "set Directionality(value) {}", "function userHeadingUpdate(){\n // rotating marker\n mapUpdates.marker.icon.rotation = currentLocation.heading;\n \n //displaying user's next action based on waypoint heading and user's current...
[ "0.71276414", "0.5642705", "0.5573477", "0.5541632", "0.55349076", "0.54651326", "0.5462513", "0.54277116", "0.54160684", "0.5380993", "0.5374316", "0.5369007", "0.535549", "0.5282682", "0.5270279", "0.5221362", "0.5206899", "0.5191312", "0.51654565", "0.51595616", "0.5151903...
0.5928541
1
Heading Set beacon two direction
function _setBeaconTwo(heading, visible){ if (visible) placeholder.each(function(){ $(this).find('div.instrument.heading div.heading_beacon_2').show().css('transform', 'rotate(' + heading + 'deg)'); }); else placeholder.each(function(){ $(this).fin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setHeading(heading) {\n this.direction = toInt(heading) % 360;\n }", "function _setBeaconOne(heading, visible){\n if (visible) placeholder.each(function(){\n $(this).find('div.instrument.heading div.heading_beacon_1').show().css('transform', 'rotate(' + heading + 'deg)');\n ...
[ "0.6797122", "0.5798207", "0.5797614", "0.56077987", "0.5564693", "0.5443713", "0.5440822", "0.5354446", "0.52885586", "0.5277541", "0.5235664", "0.52331686", "0.5226931", "0.5218726", "0.5209983", "0.51746225", "0.51615614", "0.515576", "0.51467663", "0.514306", "0.5099598",...
0.6184669
1
Toggle background box for instrument
function _toggleBox(toggle){ placeholder.each(function(){ $(this).find('.indicator_background').toggle(toggle); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleBackgroundSelect() {\n if (graphicsMode == '4') {\n document.getElementById('background-select-container').style.display = 'block';\n } else {\n document.getElementById('background-select-container').style.display = 'none';\n ...
[ "0.69339114", "0.6875474", "0.65297717", "0.6447865", "0.64400434", "0.642726", "0.64030385", "0.63261825", "0.62926865", "0.62845623", "0.6280589", "0.62313265", "0.62027365", "0.61523193", "0.6126999", "0.61086214", "0.60494614", "0.6036144", "0.59880227", "0.59880227", "0....
0.6996421
0
Toggle dashboard screws for instrument
function _toggleScrews(toggle){ placeholder.each(function(){ $(this).find('.indicator_background').toggle(toggle); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "switchCaseloadTrend() {\n // console.log(\"222\");\n this.isShowCaseStatus = false;\n if (this.isShowCaseloadTrend == false) {\n this.isShowCaseloadTrend = true;\n } else {\n this.isShowCaseloadTrend = false;\n }\n }", "function toggle_scrobble() {\n SETTINGS.scrobble =...
[ "0.5970225", "0.5906134", "0.58876747", "0.5823478", "0.5760053", "0.57542425", "0.5726239", "0.5715415", "0.5699171", "0.56902575", "0.5676188", "0.567352", "0.5668869", "0.5660233", "0.5658029", "0.56331956", "0.5603159", "0.5578332", "0.555731", "0.55506366", "0.553954", ...
0.60328996
0
Toggle inner indicator elements
function _toggleIndicatorInner(toggle){ placeholder.each(function(){ $(this).find('.indicator_inner').toggle(toggle); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleOn() {\n if(toggle==0)\n {\n toggle=1;\n $(\".content\").css(\"display\",\"none\");\n $(\".containeffect\").css(\"display\",\"inline-block\");\n if(equal==1)\n {\n $(\".contain\").css(\"display\",\"none\");\n $(\".fa-bar-chart\").toggleClass('bar-icon')\n $(\"svg\").c...
[ "0.6604487", "0.6330168", "0.6277514", "0.62764776", "0.61805224", "0.61499715", "0.6147323", "0.6122997", "0.60293317", "0.6009007", "0.6009007", "0.6000078", "0.59984845", "0.5990927", "0.59879804", "0.5983991", "0.59734213", "0.59734213", "0.59693575", "0.5967602", "0.5965...
0.80685925
0
Takes two arguments a function to be invoked later on if username is not undefined. After ensuring username is given, invoke processRequest()
function handleRequest(requestFn, username){ if(!username) { throw new Error("username is undefined"); } return this.processRequest(requestFn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleUserRequest(userName, chaincodeID, fcn, args) {\n // Register and enroll this user.\n // If this user has already been registered and/or enrolled, this will\n // still succeed because the state is kept in the KeyValStore\n // (i.e. in '/tmp/keyValStore' in this sample).\n var registrationR...
[ "0.6122817", "0.6106682", "0.6090638", "0.5761249", "0.5754355", "0.56979656", "0.56899524", "0.5686698", "0.5422482", "0.5396372", "0.53824395", "0.53792334", "0.53464836", "0.5334164", "0.5317849", "0.53092206", "0.52933174", "0.525501", "0.5245697", "0.52207696", "0.520199...
0.7992288
0
return if time since last donation was more than an hour
didDonateWithinLastHour(){ //return true is yes else false let persistedDonation = this.get(); if(persistedDonation){ let currTime = Date.now(); console.log("currTime" , currTime, typeof(currTime), "persistedDonation[when]", persistedDonation["when"], typeof(persistedDonation["when"])); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkQuestionExpiration(date) {\n const numberOfHours = 20;\n console.log(\n \"current time minus time when question was answered\",\n new Date().getTime() - date\n );\n console.log(\"other number\", numberOfHours * 60 * 60 * 1000);\n return new Date().getTime() - date > numberOfHours * 60 * 60...
[ "0.67077845", "0.6324127", "0.62525135", "0.6093477", "0.6003893", "0.59761614", "0.5928381", "0.59020126", "0.58487207", "0.5834792", "0.5802404", "0.57907116", "0.57623994", "0.57493246", "0.57305163", "0.5658983", "0.56272525", "0.5594692", "0.55901736", "0.55881727", "0.5...
0.7328308
0
Creates a new, active Channel from `options.source` to `options.target`.
function Channel(options) { if (!(this instanceof Channel)) { return new Channel(options) } options = options || {} this.source = options.source || null this.target = options.target || null this.heartbeat = options.heartbeat * 1000 || 30000 this.timeout = options.timeout * 1000 || 60000 this._sou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeChannel(channel, options = {}) {\n this.unsubscribe();\n this.initialize(channel, Object.assign(this.options, options));\n }", "create() {\n const source = internal(this).source;\n const target = internal(this).target;\n // Make sure source and target both exist.\n source...
[ "0.58023316", "0.556722", "0.55617434", "0.5477955", "0.5253103", "0.5161332", "0.5136075", "0.5088414", "0.50809634", "0.50411737", "0.5035367", "0.49848843", "0.49493235", "0.49323225", "0.48916146", "0.4884764", "0.4851364", "0.48395148", "0.4832429", "0.48300156", "0.4817...
0.70145917
0
check if a function exists
function function_exists(function_name) { if (typeof function_name == 'string') return (typeof window[function_name] == 'function'); return (function_name instanceof Function); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function function_exists(function_name)\n{\n if (typeof function_name == 'string')\n return (typeof window[function_name] == 'function');\n return (function_name instanceof Function);\n}", "function existFunction(strNameFunction)\n{\n return (!empty(window[strNameFunction])) ? isFunction(window[s...
[ "0.82761", "0.8115277", "0.80704427", "0.7920262", "0.76122284", "0.75433725", "0.73023456", "0.72193325", "0.7013975", "0.7012263", "0.6854636", "0.68449163", "0.6816809", "0.6816809", "0.6782556", "0.67772406", "0.67570376", "0.6746328", "0.6742004", "0.66848975", "0.663998...
0.8222967
1
execute oosHook js code
function oosHookJsCode() { for (var i = 0; i < oosHookJsCodeFunctions.length; i++) { if (function_exists(oosHookJsCodeFunctions[i])) setTimeout(oosHookJsCodeFunctions[i]+'()', 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "execute(code){\n }", "function alter() { //call the python script, then change the callback to post\r\n console.log(\"altering right now\");\r\n var cmd = \"python script.py\";\r\n exec(cmd, post);\r\n }", "function ScriptCreatedHook(script) {}", "hook1() {}", "functi...
[ "0.5995698", "0.5811336", "0.57890475", "0.5676539", "0.5593002", "0.55811715", "0.5556643", "0.5553353", "0.55378723", "0.5527333", "0.54963475", "0.5451372", "0.54469043", "0.53611726", "0.5288143", "0.5287606", "0.5287606", "0.52837235", "0.5226148", "0.52254516", "0.52070...
0.6774525
0
sets the date object with current month, day, and year
function initializeCurrentDate(){ currentYear=d.getFullYear(); currentMonth=d.getMonth(); todaysYear=d.getFullYear(); todaysMonth=d.getMonth(); todaysDate=d.getDate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ds_setToToday() {\r\r\n\tthis.setDateParts( this.year, this.month, this.date );\r\r\n}", "function setDateToToday()\n {\n var today = new Date();\n\n /* The following idiocy is due to bizarre incompatibilities\n\t in the behaviour of getYear() between Netscrape and\n\t Exploder. The ideal...
[ "0.7467854", "0.7207999", "0.71647877", "0.71049744", "0.70012283", "0.6918076", "0.6810112", "0.67942667", "0.6641604", "0.6604693", "0.65162444", "0.65017796", "0.64811414", "0.6459571", "0.64428717", "0.6438319", "0.64114594", "0.63954675", "0.63450503", "0.633926", "0.632...
0.73624796
1
returns a string representing the current month's name
function getMonthName(){ return months[getMonth()]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getMonthName () {\n var months = [\n 'Январь', 'Февраль', 'Март',\n 'Апрель', 'Май', 'Июнь',\n 'Июль', 'Август', 'Сентябрь',\n 'Октябрь', 'Ноябрь', 'Декабрь'];\n return months[new Date(this.state.currentDate).getMonth()];\n }", "function getMonthName(m) {\n\t\tif (m == 1)\n\t\t\tr...
[ "0.7959379", "0.7784031", "0.77508205", "0.76703537", "0.7643947", "0.7561576", "0.7526541", "0.75205195", "0.7502718", "0.74673796", "0.7467018", "0.7455797", "0.7375244", "0.7363261", "0.73150766", "0.72262216", "0.71682745", "0.7166569", "0.70352066", "0.70059115", "0.7000...
0.82752556
0
set firstWeekFlag as needed
function setFirstWeekFlag(tOrF){ if(tOrF==true) firstWeekFlag=true; else firstWeekFlag=false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "back_one_week() {\n this.start_date = this.start_date.next_day(-7);\n return this.update_data();\n }", "function firstWeek() {\n\tvar week = calendarTable.insertRow(0);\n\tvar monthName = '';\n\tdo\n\t{\n\t\tfirstMonthDay.setDate(firstMonthDay.getDate() - 1);\n\t\tif(firstMonthDay.getDate() == 1...
[ "0.68894774", "0.68363065", "0.6813072", "0.6734049", "0.6706771", "0.66256315", "0.65391743", "0.6533959", "0.65076506", "0.64409083", "0.64265835", "0.6418332", "0.641335", "0.6377906", "0.6374667", "0.63716316", "0.6365694", "0.6365694", "0.6365694", "0.6365694", "0.636569...
0.82318395
0
Find Quiz by tag
static async findByTag(id) { try { const query = `SELECT * FROM "quiz" WHERE tag_id=$1`; const values = [id]; const result = await db.query(query,values); if(result.rowCount == 0) { return {"message": "Pas de résultats"}; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchTag(tag) {\n const sql = `SELECT * FROM post WHERE tags LIKE '${tag}' ORDER BY timeposted DESC;`;\n return db.execute(sql);\n}", "find(database, quary) {\n return database\n .find((elementSearched) => elementSearched.name == quary);\n }", "findAnswer(page, question) {\r\n ...
[ "0.6069048", "0.55430853", "0.5491041", "0.54434264", "0.538497", "0.53273106", "0.52814376", "0.51797134", "0.5077467", "0.5071926", "0.5058732", "0.50494134", "0.5038105", "0.50309193", "0.503034", "0.502195", "0.5015545", "0.5014999", "0.5011242", "0.5006519", "0.49977818"...
0.5897005
1
Join subcategory to quiz table
static async findSubcategory(id) { try { const query ='SELECT * FROM "quiz" INNER JOIN "quiz_has_subcategory" ON quiz.id=quiz_has_subcategory.quizzes_id WHERE subcategory_id=$1'; const values = [id]; const result = await db.query(query, values); for(let i = 0; i ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSelectedCategory(questions, categoryId) {\n let stringbuilderQuestions = '<h4>Spørsmål</h4><ul class=\"list-group\">';\n for (let q of questions) {\n if (q.category.id === categoryId) {\n stringbuilderQuestions += '<li class=\"list-group-item\" onclick=\"getSelectedQuestion('\n ...
[ "0.53034294", "0.5202377", "0.51851314", "0.5174506", "0.5143994", "0.50927985", "0.49846834", "0.49841595", "0.49564457", "0.49334177", "0.4916225", "0.4904994", "0.48713112", "0.48621684", "0.48532364", "0.48377344", "0.4829653", "0.48186308", "0.48159343", "0.4808659", "0....
0.64251274
0
returns a guess that is half way between the min and max range
function makeSmartGuess(min, max) { return min + Math.floor((max - min) / 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomInt(min, userMax) {\n let range = userMax - min + 1;\n return min + Math.floor(range / 2); // returns a number halfway between the guess and the minimum or maximum, based on the guess\n }", "function random(min,max) {\n\tif (min < max && min > Number.NEGATIVE_INFINITY) {\n\t\tvar randomMax ...
[ "0.68330824", "0.67564255", "0.6624758", "0.6346062", "0.6315868", "0.63057196", "0.6303738", "0.62594366", "0.62579715", "0.6230211", "0.62260836", "0.61921716", "0.617944", "0.6127478", "0.61044496", "0.60933816", "0.6076866", "0.6068888", "0.6067251", "0.6051159", "0.60265...
0.7882631
0
Need to set state from props with initial is_done value onClick send POST request to server changing value redo "checked" toggle to to_do.is_done value
handleClick(ev) { this.setState({ checked: !this.state.checked // change this.props.to_do.is_done to true }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick() {\n this.setState({\n isForcedDone: true\n });\n }", "handleCheckDone(index){\n // console.log('you checked/unchecked done', index);\n\n let allTodos = this.state.todos;\n\n if(allTodos[index].done === true){\n allTodos[index].done = false;\n a...
[ "0.69304466", "0.6726165", "0.65853053", "0.6561369", "0.644761", "0.64165676", "0.63837594", "0.63779604", "0.6355253", "0.63396007", "0.62795776", "0.6268624", "0.6248825", "0.6238715", "0.621169", "0.61800206", "0.61759186", "0.61670244", "0.6126809", "0.6126263", "0.61077...
0.80043507
0
Ensure that the MEMBER has expected DAI balance before topup
async function ensureDAIBalance(cdp, neededRadBal, _from) { try { if (neededRadBal.eq(new BN(0))) return; // Add 1 DAI to avoid rounding errors neededRadBal = neededRadBal.add(RAD); const radInVat = await vat.dai(_from); const radInPool = await pool.rad(_from); const radMemberHave = radInPool...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkBalance() {\n return this.balance >= 1;\n }", "async callAndUpdatePlayerBalance() {\n let collectionPath = \"room/\" + this.props.room.id + \"/members\";\n let newBalance = this.props.members.balance - this.props.room.currentBettingAmount;\n if (newBalance <= 0) {\n ...
[ "0.63982356", "0.61625594", "0.6136465", "0.61188036", "0.60446817", "0.599154", "0.5977199", "0.5976802", "0.5897367", "0.58799905", "0.5875693", "0.5829007", "0.5820488", "0.57716167", "0.56822896", "0.5679704", "0.5618513", "0.55967355", "0.5560318", "0.55181175", "0.54943...
0.63908076
1
Rewrite ROM with new palette
function replace_color() { const new_body = parseInt(nes_vals[0], 16) const new_feet = parseInt(nes_vals[1], 16) const new_border = parseInt(nes_vals[2], 16) for (var i = 0; i < color_locations.length; i++) { var colorAddress = color_locations[i] // Palette data is encoded as Body-Feet-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadRomPal() {\n\tvar bf = new bytebuffer(romFrameData);\n\tvar bf2 = new bytebuffer(romFrameData);\n\t\n\t\n\tvar paletteIndex = bf.getInt(paletteAddressIndex1 + palset * 4);\t// palset = level\n\tvar paletteIndex2 = bf.getInt(paletteAddressIndex2 + palset * 4);\n\tvar paletteIndex3 = bf.getInt(paletteAd...
[ "0.6333331", "0.6294772", "0.61098737", "0.6054942", "0.59819937", "0.5915458", "0.5831531", "0.58147585", "0.578082", "0.5780139", "0.5772343", "0.576244", "0.56239307", "0.5578888", "0.55616665", "0.5552268", "0.5545237", "0.55264497", "0.54347813", "0.54062545", "0.5365631...
0.66923267
0
Recolor parent buttons if palette preset is chosen
function set_preset() { var preset_idx = Number(document.getElementById("presets").value) var nodes = document.getElementById("palette").getElementsByTagName("button") for (var i = 0; i < nodes.length; i++) { nes_vals[i] = preset_palettes[preset_idx][i] nodes[i].style.backgroundColor = "#" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateButtonColors(button, parent) {\n parent.selectAll(\"rect\")\n .attr(\"fill\",defaultColor)\n\n button.select(\"rect\")\n .attr(\"fill\",pressedColor)\n}", "function coloredButtons() {\r\n\r\n\t\t\t\t$('.nectar-button.see-through[data-color-override], .nectar-button.see-through-2[data-color...
[ "0.73957324", "0.6547662", "0.64420986", "0.6417774", "0.63058585", "0.6251486", "0.61259085", "0.6104269", "0.60888255", "0.60272634", "0.6009219", "0.6003478", "0.59540826", "0.5952865", "0.5930361", "0.59268725", "0.592208", "0.591063", "0.58687323", "0.5848666", "0.582425...
0.6638674
1
We know the content of the evaporator (content in ml), the percentage of foam or gas lost every day (evap_per_day) and the threshold (threshold) in percentage beyond which the evaporator is no longer useful. All numbers are strictly positive. The program reports the nth day (as an integer) on which the evaporator will ...
function evaporator(evap_per_day, threshold){ var day = 0; var effectiveDeodrantLeft = 100; evap_per_day /= 100; while(effectiveDeodrantLeft > threshold){ day ++; effectiveDeodrantLeft *= (1- evap_per_day); } return day; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function evaporator(evap_per_day, threshold){ \n threshold = threshold / 100\n evap_per_day = evap_per_day / 100\n return Math.ceil(Math.log(threshold) / Math.log(1-evap_per_day))\n}", "function evaporator(content, evap_per_day, threshold) {\n let remaining = 100;\n let days = 0;\n while (remaining > thre...
[ "0.7570572", "0.70903677", "0.56315196", "0.55558246", "0.55081743", "0.5438396", "0.53971547", "0.538113", "0.53679913", "0.5362846", "0.52870727", "0.5266675", "0.52531445", "0.52531445", "0.52531445", "0.52528626", "0.5242673", "0.52283865", "0.5215289", "0.5192306", "0.51...
0.7509539
1
Wires a child spec with this context as its parent
function wireChild(spec, options) { return createContext(spec, scopeParent, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wireChild(spec) {\n\t\t\treturn wireContext(spec, scopeParent);\n\t\t}", "function child(spec) {\n var that = base(spec); // Create the object through the \"base\" constructor\n that.sayHello = function() { // Augment that object\n return 'Hello, I\\'m ' + that.name;...
[ "0.7492382", "0.5967916", "0.53596365", "0.52519184", "0.5201473", "0.5125531", "0.5125531", "0.5125531", "0.5125531", "0.5125531", "0.5123934", "0.51033294", "0.50886905", "0.5081412", "0.5035738", "0.49601313", "0.49601313", "0.49541208", "0.49496847", "0.49382037", "0.4936...
0.72470856
1
Returns column name that contains the unit for the measure
function getUnitColumn (measure, oEntityType) { var properties = oEntityType.property; for (var i = 0, len = properties.length; i < len; i++) { if (properties[i].name == measure) { if (properties[i].hasOwnProperty("sap:unit")) { return properties[i]["sap:u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get unitFormatted() {\r\n\t\treturn this.count > 1 ? this.unit + 's' : this.unit;\r\n\t}", "function units(num) {\n\treturn num*CELL_SIZE + UNIT_NAME;\n}", "function getMeasureUnit(type) {\n switch (type) {\n case 2: // Temperature\n return '°C';\n case 1: // Intensity\n case 4: // Cur...
[ "0.68998796", "0.6555173", "0.64961207", "0.62262285", "0.5949238", "0.5938692", "0.5908377", "0.5889829", "0.5853887", "0.5853887", "0.5853887", "0.5853887", "0.5853887", "0.5853887", "0.5853887", "0.5853887", "0.5853887", "0.5853887", "0.58396053", "0.58333313", "0.58172446...
0.73167974
0
Indicates how much pixels of draggable element are overflowing in a vertical axis. When deltaY is negative content should be scrolled down, when deltaY is positive content should be scrolled up, when deltaY is zero content should not be scrolled
function getDeltaY() { var wrapperRect = that.wrapper.getBoundingClientRect(); //Up var topDiff = that.moveY - wrapperRect.top - that.scrollEdge; if (topDiff < 0) { return Math.abs(topDiff); } //Down ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_verticalScrollbarHandler() {\n const scrollViewer = this,\n verticalScrollBar = scrollViewer.$.verticalScrollBar,\n value = verticalScrollBar.value;\n\n if (scrollViewer.disabled) {\n return;\n }\n\n if (verticalScrollBar.max === value) {\n i...
[ "0.67384034", "0.6422068", "0.6283804", "0.6243201", "0.6219238", "0.6135122", "0.60927844", "0.60481024", "0.60365105", "0.6026588", "0.59673744", "0.58674127", "0.5847268", "0.58449197", "0.5829504", "0.5819463", "0.57676166", "0.57666135", "0.57576114", "0.57039803", "0.57...
0.68365103
0
util to turn a flags object into an array of flag strings and possible values
function flagify(flags, prefix = '', args = []) { return Object.entries(flags).reduce((args, [key, val]) => { let push = (f, ...v) => args.includes(f) ? args : args.push(f, ...v); key = key.replace(/([a-z])([A-Z])/g, (_, l, u) => `${l}-${u.toLowerCase()}`); for (let v of [].concat(val)) { if (typeo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFlagsForDisplay(flags) {\n return flags.map(({ name, type, alias, description }) => {\n /**\n * Display name is the way we want to display a single flag in the\n * list of flags\n */\n const displayName = alias ? `-${alias}, --${name}` : `--${name}`;\n /*...
[ "0.66537714", "0.6437117", "0.6405481", "0.63548076", "0.6300989", "0.62908834", "0.62908834", "0.62908834", "0.62908834", "0.62908834", "0.62908834", "0.62908834", "0.6290643", "0.6290643", "0.6290643", "0.6290643", "0.6290643", "0.62720126", "0.61821496", "0.61453944", "0.6...
0.6779256
0
this method is called when the Device is deleted
onDeleted() { // this.log('device deleted'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onDeleted () {\n this.log('device deleted');\n }", "onDeleted() {\n\t\t// stop polling\n\t\tclearInterval(this.intervalIdDevicePoll);\n\t\tthis.log('device deleted');\n\t}", "async onDeleted() {\n this.log('device deleted', this.getName(), this.settings.serialNumber);\n this.client ...
[ "0.8639863", "0.83942384", "0.81456345", "0.72176486", "0.7171303", "0.70922637", "0.7047036", "0.68812346", "0.68262136", "0.6692474", "0.6666642", "0.65402895", "0.6404346", "0.6386012", "0.63851815", "0.6332021", "0.6321823", "0.6317853", "0.6317853", "0.6309285", "0.62715...
0.8538467
1
Element Processing / Element processing consists of three parts data processing that cannot go stale and data processing that can go stale (i.e. thirdparty style modifications): 1) PreQueueing: Elementwide variables, including the element's data storage, are instantiated. Call options are prepared. If triggered, the St...
function processElement(element, elementArrayIndex) { /************************* Part I: Pre-Queueing *************************/ /*************************** Element-Wide Variables ***************************/ var /* The runtime opts object is the extension of the current ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processElement(element, elementArrayIndex) {\n\t\n\t\t\t\t\t/*************************\n\t\t\t\t\t Part I: Pre-Queueing\n\t\t\t\t\t *************************/\n\t\n\t\t\t\t\t/***************************\n\t\t\t\t\t Element-Wide Variables\n\t\t\t\t\t ***************************/\n\t\n\t\t\t\t\tvar /* The r...
[ "0.83732975", "0.83601516", "0.83601516", "0.83601516", "0.83601516", "0.83601516", "0.8358424", "0.77195483", "0.75881666", "0.75691617", "0.75583243", "0.75583243", "0.7530175", "0.7530175", "0.7530175", "0.7530175", "0.7530175", "0.75103414", "0.6314214", "0.6314214", "0.6...
0.8378271
1
if cat match object already has a matchTitle, renders it, otherwise renders a form for capturing a matchTitle from the user
function createFormOrTitle(catMatch, parentEl) { if (!catMatch.matchTitle || catMatch.matchTitle === '') { var formEl = document.createElement('form'); formEl.setAttribute('class', 'match-title-input'); var formLabelEl = document.createElement('label'); formLabelEl.innerText = 'Please name your cat ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function titleCatchMatch(event) {\n var catMatchSectionForm = event.target;\n //match event.target, which is a form, to the appropriate cat from its parent node\n var catMatchSection = catMatchSectionForm.parentNode;\n var catMatchPair = catMatchSection.classList[1];\n var matchTitle = event.target[0].value;\...
[ "0.73487514", "0.60240126", "0.59604657", "0.5952716", "0.5784191", "0.5778203", "0.57776475", "0.57273984", "0.5636776", "0.56161475", "0.5608583", "0.5558086", "0.5453322", "0.5429175", "0.5417343", "0.5346601", "0.52709013", "0.52365166", "0.5227094", "0.5225268", "0.52120...
0.67376065
1
function triggered when Submit button is hit on the cat match title form
function titleCatchMatch(event) { var catMatchSectionForm = event.target; //match event.target, which is a form, to the appropriate cat from its parent node var catMatchSection = catMatchSectionForm.parentNode; var catMatchPair = catMatchSection.classList[1]; var matchTitle = event.target[0].value; //build ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submit() {\n var url = urlstartcat + document.getElementById(\"text\").value + urlfinishcat;\n check(url);\n}", "function handleSubmitForm(e) {\n e.preventDefault();\n let title = $('#title').val()\n let rating = $('#rating').val()\n if (title !== '') {\n addMovi...
[ "0.64656544", "0.62838393", "0.62696373", "0.61813647", "0.61542374", "0.6136404", "0.61311805", "0.61250556", "0.61115575", "0.61113006", "0.61063594", "0.6101878", "0.61004", "0.607653", "0.60753167", "0.6052106", "0.6024933", "0.602202", "0.5998312", "0.5982023", "0.597693...
0.68552214
0
updates allMatchedCats with new matchTitle, then writes it to localStorage
function updateMatchInStorageWithTitle(catMatchPair, matchTitle) { var titledCatOne = catMatchPair.split('-')[0]; var titledCatTwo = catMatchPair.split('-')[1]; for (var i = 0; i < allMatchedCats.length; i++) { var oneMatchedCat = allMatchedCats[i]; if (oneMatchedCat.matchedCatOne.title === titledCatOne &...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "writeMatches(pageClock) {\n var dict = {};\n dict[this.matchName] = pageClock.matches;\n chrome.storage.local.set(dict, () => {\n pageClock.debug.debug('Writing matches to storage...');\n if (typeof chrome.runtime.lastError !== 'undefined') {\n console.erro...
[ "0.5644012", "0.5428037", "0.5357756", "0.5339462", "0.5307513", "0.53046906", "0.52736014", "0.526436", "0.5245406", "0.5244896", "0.522072", "0.5194846", "0.5155193", "0.51043284", "0.5086825", "0.5083952", "0.50453776", "0.5034764", "0.5033344", "0.5030006", "0.50092673", ...
0.79261035
0
Programming Quiz: Musical Groups (33) change the value of `musicians` to test your conditional statements your code goes here
function IsMusician(musicians) { if (isNaN(musicians)) { return; } else if (musicians < 0) { return; } else { var logMusicians = ""; switch (musicians) { case 4: logMusicians = "quartet"; break; case 3: logMusicians = "trio"; break; case 2: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function question7() {\n var questionCount = 6;\n var musicArray = ['Zac Brown Band', 'Blake Shelton', 'Keith Urban', 'Carrie Underwood'];\n while (questionCount > 0) {\n var countryGuess = prompt('Which country artists do I like?');\n\n for (var i = 0; i < musicArray.length; i++) {\n if ...
[ "0.59636956", "0.57892156", "0.5694566", "0.56903535", "0.5495325", "0.54798895", "0.5465509", "0.545288", "0.5435282", "0.5434379", "0.54080766", "0.5369826", "0.53629416", "0.53599864", "0.5317772", "0.53062165", "0.5293216", "0.5279986", "0.52797616", "0.52632403", "0.5261...
0.73350716
0
Programming Quiz: What do I Wear? (37) Using if/else statements, create a series of logical expressions that logs the size of a tshirt based on the measurements of: shirtWidth shirtLength shirtSleeve Use the chart above to print out one of the following correct values: S, M, L, XL, 2XL, or 3XL Size Width Length Sleeve ...
function SizeOfShirt(shirtWidth, shirtLength, shirtSleeve) { if (shirtWidth >= 28 && shirtLength >= 34 && shirtSleeve >= 10.13) { console.log("3XL"); } else if ( shirtWidth >= 26 && shirtLength >= 33 && (shirtSleeve >= 9.63 && shirtSleeve < 10.13) ) { console.log("2XL"); } else if ( shir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function totalSelse(shirt, pant, shoes) {\n if (shirt < 0 || pant < 0 || shoes < 0) {\n return \"negetive valu cnat'n accept\";\n }\n const shirtPrice = 100;\n const pantPrice = 200;\n const shoesPrice = 500;\n\n const total = shirt * shirtPrice + pant * pantPrice + shoes * shoesPrice;\n ...
[ "0.61922765", "0.61621994", "0.61026", "0.594363", "0.5874653", "0.58489645", "0.58448744", "0.5752626", "0.57514864", "0.5737756", "0.57187456", "0.57154274", "0.56927925", "0.5665666", "0.56504494", "0.5645404", "0.56394434", "0.56258094", "0.5600574", "0.5591762", "0.55882...
0.85136026
0
creates an animal trading card
function createAnimalTradingCardHTML(animal) { const cardHTML = `<div class="card"> <h3 class="name"> ${animal.name} </h3> <img src="${animal.name}.jpg" alt="${animal.name}" class="picture"> <div class="description"> <p class="fact"> ${animal.fact} </p> <ul class="details"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAnimalTradingCardHTML(animal) {\n const cardHTML = `<div class=\"card\"> \n <h3 class=\"name\"> ${animal.name} </h3> \n <img src=\"${animal.name}.jpg\" alt=\"${animal.name}\" class=\"picture\">\n <div class=\"description\">\n <p class=\"fact\"> ${animal.fact} </...
[ "0.6765301", "0.6686109", "0.6605393", "0.6494256", "0.64620227", "0.64414716", "0.64329976", "0.64067215", "0.6404036", "0.63778156", "0.6355349", "0.6325581", "0.6320762", "0.6319006", "0.63059026", "0.62785727", "0.6276702", "0.6268873", "0.62593037", "0.6258419", "0.62386...
0.6831485
0
Upgrade the dice pool's difficulty, converting any remaining difficulty dice into challenge dice or adding an difficulty die if none remain.
upgradeDifficulty(times) { if (times === undefined) { times = 1; } for (let i = 0; i < times; i++) { if (this.difficulty > 0) { this.difficulty--; this.challenge++; } else { this.difficulty++; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "upgradeDifficulty(times) {\n if (times === undefined) {\n times = 1;\n }\n let downgrade = false;\n if (times < 0) {\n downgrade = true;\n times = Math.abs(times);\n }\n\n for (let i = 0; i < times; i++) {\n if (downgrade) {\n if (this.challenge > 0) {\n this.c...
[ "0.66382563", "0.5838927", "0.5762304", "0.5523042", "0.53970706", "0.5369221", "0.5362768", "0.5351747", "0.5338914", "0.53113914", "0.53067917", "0.53034234", "0.52952445", "0.52710927", "0.5263677", "0.52618265", "0.5253031", "0.5209459", "0.5179556", "0.51724684", "0.5166...
0.6738994
0
Start electron process and inspect port 5858 with 9222 as debug port.
function startElectron() { /** @type {any} */ const electronPath = electron const spawnProcess = spawn( electronPath, ['--inspect=5858', '--remote-debugging-port=9222', join(__dirname, '../dist/index.js')] ) /** * @param {string | Buffer} data */ function electronLog(data) { const coloriz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async launch(params){\n\t\ttry{\n\t\t\t/*\n\t\t\t\tLancement de canary\n\t\t\t*/\n let isAlreadyRunning\n this.logDev('New attempt to launch Chrome')\n let portAvailable\n console.log(\"chromePort\",this.chromePort)\n if(!this.chromePort)\n portAvailable = await this.getAvailablePor...
[ "0.6284439", "0.5935094", "0.5788203", "0.5745343", "0.5742661", "0.57207775", "0.57124984", "0.5705064", "0.56525636", "0.56264096", "0.5613487", "0.5610768", "0.5600863", "0.55993986", "0.5586374", "0.5584758", "0.5576146", "0.5570251", "0.55618477", "0.5548519", "0.5534276...
0.77202946
0