Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Function Challenge 7 5h 57 OBJECTS etc
function counter(value) { return { // function return objects with up and down functions up: function () { value += 1; return value; }, down: function () { value -= 1; return value; } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function o1084(o1)\n{\n try {\nfor (var o2 in o1)\n {\n try {\no3.o4(o2 + \" = \" + o1[o2]);\n}catch(e){}\n }\n}catch(e){}\n}", "function o1109()\n{\n var o1 = {};\n var o2 = \"aabccddeeffaaggaabbaabaabaab\".e(/((aa))/);\n try {\nfor(var o3 in e)\n { \n try {\nif(o4.o11([7,8,9,10], o...
[ "0.5979627", "0.5802954", "0.5772877", "0.57203126", "0.55847937", "0.556997", "0.55514085", "0.55504096", "0.5529085", "0.55180436", "0.55089873", "0.55019677", "0.54675925", "0.5453362", "0.5427097", "0.54165196", "0.53977245", "0.53892297", "0.5385741", "0.53803027", "0.53...
0.0
-1
Function Challenge 8 6h 05 OBJECTS etc
function m (value, source) { return { value: value, source: (typeof source === 'string') ? source : String(value) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function o1084(o1)\n{\n try {\nfor (var o2 in o1)\n {\n try {\no3.o4(o2 + \" = \" + o1[o2]);\n}catch(e){}\n }\n}catch(e){}\n}", "function o0(o1,o2,o3)\n{\n try {\no4.o5(o39 === true + \" index:\" + o2 + \" Object:\" + o3);\n}catch(e){}\n try {\nreturn true;\n}catch(e){}\n}", "function vol...
[ "0.5946667", "0.5818811", "0.57576793", "0.56631935", "0.5584039", "0.55565965", "0.55471426", "0.5545691", "0.5537352", "0.5511355", "0.5497963", "0.54852605", "0.5474527", "0.54659706", "0.54458517", "0.54331136", "0.5426144", "0.5408882", "0.5403797", "0.54000825", "0.5388...
0.0
-1
nested array expression modyfied exp
function exp(value) { return (Array.isArray(value)) ? value[0]( exp(value[1]), exp(value[2]) ) : value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ArrayExpression (elements, loc) {\n\t\tvar _elements = elements;\n\t\tvar _loc = loc;\n\n\t\tObject.defineProperty(this, 'elements', {\n\t\t\tget: function() {\n\t\t\t\treturn _elements;\n\t\t\t},\n\t\t\tenumerable: true\n\t\t});\n\n\t\tObject.defineProperty(this, 'loc', {\n\t\t\tget: function() {\n\t\t\t...
[ "0.6422016", "0.6413364", "0.6347548", "0.6347548", "0.6249428", "0.6249428", "0.6249428", "0.6249428", "0.6241882", "0.62152696", "0.62152696", "0.60814697", "0.59896535", "0.59896535", "0.59819067", "0.59726006", "0.59205717", "0.5838246", "0.5778397", "0.5738819", "0.57373...
0.59740484
15
Function Challenge 10 6h 18min ARRAY expresions etc.
function addg(first) { function more(next) { if (next === undefined) { return first; }; first += next; return more; }; if (first !== undefined) { return more; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _t(t){var N,L,A,S,e,c=Math.floor,_=new Array(64),F=new Array(64),P=new Array(64),k=new Array(64),y=new Array(65535),v=new Array(65535),Z=new Array(64),w=new Array(64),I=[],C=0,B=7,j=new Array(64),E=new Array(64),M=new Array(64),n=new Array(256),O=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42...
[ "0.6491887", "0.6491887", "0.6491887", "0.6491887", "0.63480806", "0.6278377", "0.6264565", "0.62406236", "0.6154438", "0.61542743", "0.60960835", "0.60559493", "0.603342", "0.6006813", "0.5958619", "0.59421134", "0.59023935", "0.5866134", "0.5838771", "0.5814173", "0.5811458...
0.0
-1
build an array from many invocations
function arrayg(first) { var array = []; function more(next) { if (next === undefined) { return array; }; array.push(next); return more; }; return more(first); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeArray() {\n this[0] = makeArray.arguments.length;\n for (i = 0; i<makeArray.arguments.length; i++)\n this[i+1] = makeArray.arguments[i];\n}", "function buildArray(count, value) {\n var array = [];\n for (var i = 0; i < count; i++) {\n array.push(value);\n }\n retur...
[ "0.6197948", "0.6049428", "0.60474217", "0.6031811", "0.60268384", "0.59821665", "0.5942743", "0.5911769", "0.5911769", "0.5911769", "0.5911769", "0.5911769", "0.5888937", "0.5883869", "0.5871816", "0.58428234", "0.5818124", "0.5806398", "0.580636", "0.57831305", "0.5774725",...
0.0
-1
Building a better constructor PATTERN <<<<<<<<
function constructor(init) { var that = other_constructor(init), member, method = function () { //init, member, method }; that.method = method; return that; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function tempCtor() {}", "function HelperConstructor() {}", "function construct() { }", "function _construct()\n\t\t{;\n\t\t}", "function TempCtor() {}", "function TempCtor() {}", "functio...
[ "0.74000484", "0.7116202", "0.7116202", "0.7116202", "0.6971965", "0.6946282", "0.6901332", "0.67842233", "0.67519814", "0.67519814", "0.67519814", "0.67519814", "0.67519814", "0.67519814", "0.6703149", "0.66993755", "0.6656381", "0.6575238", "0.6557958", "0.65030324", "0.643...
0.0
-1
Function Challenge 11 6h 18min array wrapper figure out how to get to hack the array (hacking)
function vector() { var array = []; return { get: function get(i) { return array[i]; }, store: function store(i, v) { array[i] = v; }, append: function append(v) { array.push(v); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function solution(arr){\n\n}", "function taintArray() {\n taintDataProperty(Array.prototype, \"0\");\n taintMethod(Array.prototype, \"indexOf\");\n taintMethod(Array.prototype, \"join\");\n taintMethod(Array.prototype, \"push\");\n taintMethod(Array.prototype, \"slice\");\n taintMethod(Array.prototype, \"s...
[ "0.62490785", "0.61132747", "0.6104416", "0.6104416", "0.6104416", "0.6104416", "0.6091112", "0.59272665", "0.5902641", "0.5879472", "0.58590645", "0.5764742", "0.57543296", "0.5744716", "0.57201415", "0.57176054", "0.5714861", "0.56983984", "0.5692297", "0.56920505", "0.5681...
0.0
-1
stash is array REPAIR
function vector() { var array = []; return { get: function get(i) { return array[+i]; // change i to integer }, store: function store(i, v) { array[+i] = v; // change i to integer }, append: function append(v) { array[array.length]= v;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mov(ori, des) { \n des.push(ori.pop()); \n}", "function reocurring(){\n\tarray.forEach(array)\n}", "function restoreEntries(\r\n storedEntries\r\n ) {\r\n // convert the stored entries\r\n // from a string back to an object\r\n // with the pokemonIds as keys and\r\n // the stringified ...
[ "0.5211258", "0.5182107", "0.51511014", "0.51010424", "0.50496566", "0.5041559", "0.49710995", "0.4940088", "0.49113122", "0.4873385", "0.48704055", "0.4858096", "0.4858096", "0.4858096", "0.48371214", "0.48371214", "0.48371214", "0.48371214", "0.4815387", "0.47917053", "0.47...
0.0
-1
Function Challenge 12 7h 10min
function pubsub() { var subscribers = []; return Object.freeze({ // freeze to repair subscribe: function (subscriber) { subscribers.push(subscriber); }, publish: function (publication) { // var i, length = subscribers.length; // for (i =0; i< length; i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function busTimer(time) {\n // variables for hour and minute\n let hour = parseInt(time.slice(0, 2));\n let minute = parseInt(time.slice(3));\n console.log(hour, minute);\n let extraMinutes = 0;\n // if the hour is less than 5, return the extra minutes\n if (hour < 5) {\n extraMinutes =...
[ "0.6294894", "0.62622136", "0.62296957", "0.62279207", "0.6221769", "0.6215283", "0.62081367", "0.61841834", "0.6177636", "0.61680776", "0.6158664", "0.61415696", "0.6124367", "0.6083935", "0.6054565", "0.6039255", "0.6028647", "0.6028647", "0.6028647", "0.6026504", "0.602557...
0.0
-1
Get add category form
function addCategoryButtonClicked() { let categoryButton = document.getElementById('add-category-button'); categoryButton.classList.add('hidden'); let addCategoryForm = document.getElementById('add-category-form-wrapper'); addCategoryForm.classList.remove('hidden'); addCategoryForm.classList.add('adding-categ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCategory() {\n ajaxCall('action=add-category&new_category=' + categoryName.value.trim(),\n function(response) {\n categoryCloseButton.click();\n console.log(response);\n var data = JSON.parse(response);\n console.log(data);\n...
[ "0.69933414", "0.6976077", "0.69390196", "0.68437016", "0.67690545", "0.66789186", "0.65809244", "0.65788096", "0.6533803", "0.6500369", "0.6479502", "0.6474479", "0.64515936", "0.6374497", "0.63430786", "0.6340324", "0.62938315", "0.6230956", "0.62002975", "0.61764175", "0.6...
0.62785053
17
Get template for adding new card
function getAddCategoryFormTemplate() { let categoryElement = document.createElement('div'); categoryElement.classList.add('category-element'); categoryElement.classList.add('hidden'); categoryElement.id = 'add-category-form-wrapper'; let categoryForm = document.createElement('form'); categoryForm.id = 'sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getTemplate() {\n const cardElement = document.querySelector(this._templateSelector)\n .content\n .querySelector('.element')\n .cloneNode(true);\n return cardElement;\n }", "function cardTemplate(cards){\r\n // RETURN TEMPLATE LITERAL\r\n return `\r\n <div class=\"card-base\" ...
[ "0.75393844", "0.71962357", "0.6704277", "0.64743596", "0.6469679", "0.64583576", "0.63438785", "0.62084866", "0.6192533", "0.61630136", "0.60794413", "0.6046767", "0.6010821", "0.59975433", "0.5951265", "0.59148604", "0.5905376", "0.58967716", "0.5891595", "0.5882351", "0.58...
0.5618483
45
Listener for saving category
function saveAddCategoryButtonClicked(formElement) { if (formElement) { formElement.addEventListener('submit', function(){ event.preventDefault(); event.stopPropagation(); let formData = $('#save-category-form') ? $('#save-category-form').serializeArray() : []; let formattedData = addNewCa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveCat(e) {\n var names = $.name.value;\n var colors = $.viewcat.backgroundColor;\n\n if (!names) {\n alerted.note(\"Name of the category is missing!\", 1);\n } else {\n if (args.length == 0) {\n database.database_call_algorithm(\n \"INSERT INTO category (title,color) VALUES (?,?)\"...
[ "0.7074611", "0.6711522", "0.6654469", "0.65011513", "0.6285892", "0.62552816", "0.6161619", "0.60220027", "0.6005989", "0.58986145", "0.58948565", "0.5836272", "0.5807929", "0.5791581", "0.5779113", "0.57663405", "0.57418025", "0.5624706", "0.5624409", "0.56195", "0.5600684"...
0.55587995
26
Listener for discarding new add of category
function discardAddCategoryButtonClicked(formElement) { let discardButton = formElement.getElementsByClassName('discard-category')[0]; if (discardButton) { discardButton.addEventListener( 'click', resetAddCategory ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "[consts.CATEGORY_REMOVING_INDICATOR](state, val) {\n state.categoryOneRemoving = val;\n }", "function onCategoryChosen(event) {\n let category = event.target.innerHTML;\n //Prevents choosing all faculties at once on moving a pressed mouse over list elements and chosing the same faculty again\n if (c...
[ "0.6364101", "0.63348144", "0.62151736", "0.60935307", "0.59870017", "0.59506404", "0.5925196", "0.58163506", "0.57494235", "0.57432306", "0.56525713", "0.5632072", "0.5589164", "0.5581302", "0.55513346", "0.5547762", "0.55454415", "0.5501156", "0.5487298", "0.5486653", "0.54...
0.63820577
0
Style could be built for each new word, but it is more practical to make it only once for the whole paragraph.
constructor (word, style) { if (!word) { throw new Error('Invalid word!'); } super(); this._isWord2D = true; this._originalWorldToPixels = windowUtils.worldToPixels; this._ht3d = { tag: 'word', class: '', id: '' }; var charArray = word.split(''); for (let...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function style_paragraph(lines, style_word) {\n var styled_text = \"\";\n\n for(i=0; i<lines.length; i++){\n var line = lines[i];\n for(j=0; j< line.length; j++){\n var word = line[j];\n styled_text += \" \" + style_word(word);\n } \n }\n \n styled_text = styled_text.substring(1, styled_tex...
[ "0.7596575", "0.65576786", "0.6365878", "0.62708795", "0.62325215", "0.6215396", "0.62122124", "0.6205587", "0.61689305", "0.6157803", "0.61451256", "0.6107593", "0.610501", "0.6009872", "0.594613", "0.5944279", "0.5897724", "0.58018345", "0.5795699", "0.5758574", "0.575536",...
0.53121275
85
when a components root VNode is also a component, we can run into issues this will recursively look for vNode.parentNode if the VNode is a component
function updateParentComponentVNodes(vNode, dom) { if (vNode.flags & 28 /* Component */) { var parentVNode = vNode.parentVNode; if (parentVNode) { parentVNode.dom = dom; updateParentComponentVNodes(parentVNode, dom); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateParentComponentVNodes(vNode, dom) {\n if (vNode.flags & 28 /* Component */) {\n var parentVNode = vNode.parentVNode;\n if (parentVNode) {\n parentVNode.dom = dom;\n updateParentComponentVNodes(parentVNode, dom);\n }\n }\n ...
[ "0.70018953", "0.68828917", "0.68828917", "0.65200776", "0.61326635", "0.60749024", "0.60749024", "0.6050738", "0.6050738", "0.6009211", "0.6009211", "0.6009211", "0.6009211", "0.6009211", "0.6009211", "0.6009211", "0.6009211", "0.6009211", "0.6009211", "0.6009211", "0.600921...
0.69508404
1
We are assuming here that we come from patchProp routine nextAttrValue cannot be null or undefined
function patchStyle(lastAttrValue, nextAttrValue, dom) { var domStyle = dom.style; var style; var value; if (isString(nextAttrValue)) { domStyle.cssText = nextAttrValue; return; } if (!isNullOrUndef(lastAttrValue) && !isString(lastAttrValue)) { for (style in next...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function patchProp(prop, lastValue, nextValue, dom) {\n\tif (isNullOrUndef(nextValue)) {\n\t\tdom.removeAttribute(prop);\n\t\treturn false;\n\t}\n\tif (prop === 'className') {\n\t\tdom.className = nextValue;\n\t\treturn false;\n\t} else if (prop === 'style') {\n\t\tpatchStyle(lastValue, nextValue, dom);\n\t} else ...
[ "0.7468216", "0.70656884", "0.592409", "0.592409", "0.5921927", "0.5845722", "0.5842936", "0.5838156", "0.5832205", "0.5832205", "0.5797685", "0.57912827", "0.56997836", "0.5695341", "0.5695341", "0.5695341", "0.5691314", "0.56830233", "0.56830233", "0.56647056", "0.5656025",...
0.5704284
12
=========================== interface with api resources ==============================
function indexAction() { // GET /data/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function API(){}", "function API(){}", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "function ApiClient() {\n\n}", "constructor(api) {\r\n this._api = api;\r\n }", "getList() { return this.api(); }", "function getA...
[ "0.74319446", "0.74319446", "0.7124197", "0.7124197", "0.7124197", "0.6681688", "0.66756725", "0.654752", "0.652808", "0.6497874", "0.6477941", "0.64704806", "0.6443885", "0.6416626", "0.6334665", "0.62636995", "0.6239596", "0.6239596", "0.6239437", "0.62282413", "0.6219767",...
0.0
-1
recordNumber used to be row but now it is the recordNumber tbl_cols and tbl_rows will be switched do everything in terms of cells switch from talking about cols and rows to talking about fields and records then just switch the bindings define iterators over records and fields independently of rows and columns
function createNextFieldsCell(dataGridRecordNumber) { var cell, table; if (dataGridRecordNumber === self.recordHeader || dataGridRecordNumber === self.recordSearchInsert) { table = self.headerElem; } else { table = self.tableElem; } var recordNumber = data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WNextRec()\n{\n this.WSetRow(this.currow + 1);\n}", "function IterableChangeRecord(){}", "function watchByTableRows(){\n scope.$watch(function () {\n return tableCtrl.items;\n }, function (newVal) {\n scope.firstShowingRecordNumber = ( (tableCtrl.currentPage - 1) * ta...
[ "0.5552245", "0.54088664", "0.5380069", "0.53307056", "0.53307056", "0.53289145", "0.5324059", "0.5308428", "0.5293792", "0.5292701", "0.5283129", "0.5271871", "0.5271871", "0.5271871", "0.5238665", "0.512473", "0.5114735", "0.51036686", "0.50718", "0.5062584", "0.5038008", ...
0.6234234
0
Formats |x| in decimal such that it occupies |count| characters.
function PadWithZero(x, count) { var s = "" + x; while (s.length < count) s = "0" + s; return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatnumber(x) {\n\t\treturn x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \".\");\n\t}", "function formatNumber(n, count, sign)\r\n{\r\n return n.toFixed(0).replace(/./g, function(c, i, a) {\r\n return i > 0 && c !== \".\" && (a.length - i) % count === 0 ? sign + c : c;\r\n });\r\n}", ...
[ "0.66515714", "0.638379", "0.632897", "0.6308696", "0.625215", "0.617532", "0.6107075", "0.6083171", "0.6077708", "0.6060778", "0.601822", "0.601822", "0.60133666", "0.5992409", "0.5952969", "0.59331036", "0.5892374", "0.58866316", "0.58497715", "0.58464617", "0.58358747", ...
0.62097746
5
Helper function to add required zero characters to a string.
function zeroPad(num, width) { num = num.toString(); while (num.length < width) { num = "0" + num; } return num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addLeadingZero(str) {\n return str.length < 2 ? `0${str}` : str\n}", "function addZero (str) {\n str = str.toString();\n return str.length < 6 ? addZero(\"0\" + str) : str;\n }", "function zfill(str, len) {\n while (str.length < len) {\n str = \"0\" + str\n }\n retu...
[ "0.8031456", "0.8018361", "0.79122233", "0.76757824", "0.7594899", "0.7528333", "0.7528265", "0.7456485", "0.74563736", "0.7447025", "0.7321071", "0.7232677", "0.72235036", "0.72160655", "0.72149795", "0.7208844", "0.7200495", "0.71742237", "0.71739393", "0.7145333", "0.71109...
0.0
-1
ReferPosition includes top, right, bottom, left, nwCorner, neCorner, seCorner, swCorner.
calcLinePosition (referPosition, referPercent) { let x, y let [innerLeft, innerTop, innerWidth, innerHeight, ellipseLeft, ellipseRight] = this.calcInnerShapeData() switch (referPosition) { case 'nwCorner': x = innerLeft y = innerTop break; case 'neCorner': x = inn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPosition(_ref) {\n var target = _ref.target,\n offset = _ref.offset,\n container = _ref.container,\n box = _ref.box\n var _getOffset = (0, _offset.default)(target),\n top = _getOffset.top,\n left = _getOffset.left,\n width = _getOffset.width,\n height = _getOffset.height\n var _...
[ "0.61604244", "0.58160996", "0.57409376", "0.56802857", "0.56062376", "0.55803657", "0.55466884", "0.54463017", "0.537429", "0.5348965", "0.53472286", "0.5323936", "0.5311771", "0.5264237", "0.5182094", "0.5162687", "0.515881", "0.51569253", "0.51484543", "0.51474476", "0.514...
0.6571405
0
Add a marker to the map and push to the array.
function addMarker(location) { if (marker == null) { marker = new google.maps.Marker({ position: location, map: map }); } marker.setPosition(location); //post send of position must go here document.getElementById('lat-s').value = location.lat().toFixed(5); document.getElementById('lon-s').valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMarker(location,array) {\n var marker = new google.maps.Marker({\n position: location,\n map: map\n });\n array.push(marker);\n }", "function addMarker(location) {\n var marker = new google.maps.Marker({\n position: location,\n map: map\n ...
[ "0.77157706", "0.75503474", "0.7507636", "0.75021887", "0.7350772", "0.7325604", "0.7244519", "0.71071553", "0.71029925", "0.70562315", "0.7036228", "0.7015914", "0.70131105", "0.70029217", "0.70022047", "0.6992825", "0.69863176", "0.6977092", "0.6954292", "0.6944243", "0.693...
0.0
-1
Sets the map on all markers in the array.
function setAllMap(map) { for (var i = 0; i < markers.length; i++) { markers[i].setMap(map); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMapOnAll(map) {\n for (var i = 0; i < markersArray.length; i++) {\n markersArray[i].setMap(map);\n }\n}", "function setMapOnAll(map) {\r\n for (var i = 0; i < markers.length; i++) {\r\n markers[i].setMap(map);\r\n }\r\n }", "function setMapOnAll(map){\n ...
[ "0.86419475", "0.8592096", "0.85918146", "0.8581791", "0.8581473", "0.85735416", "0.85723966", "0.857033", "0.857033", "0.85633993", "0.85626596", "0.8554875", "0.8554875", "0.8554875", "0.8554875", "0.85501784", "0.85501784", "0.8547008", "0.85301447", "0.8528565", "0.852266...
0.84861
38
Removes the markers from the map, but keeps them in the array.
function clearMarkers() { setAllMap(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearMarkers() {\n markers.forEach(function(marker) {\n marker.removeFrom(mymap);\n });\n markers = [];\n}", "function remMarkerSez(){\n for (var x in markerArray){\n\t\t\tmarkerArray[x].setMap(null);\n\t\t }\n}", "function removeMarkers() {\n for (i = 0; i < markers.length; i++) ...
[ "0.836155", "0.8336889", "0.8327865", "0.8327865", "0.830046", "0.8277553", "0.8270043", "0.824967", "0.82446665", "0.823589", "0.8225775", "0.8212477", "0.8188333", "0.8163021", "0.81607306", "0.8156697", "0.8156487", "0.81543255", "0.81423306", "0.81312937", "0.81164604", ...
0.0
-1
Shows any markers currently in the array.
function showMarkers() { setAllMap(map); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showMarkers() {\n for (var i=0; i < markers.length; i++) {\n markers[i].setVisible(true);\n }\n }", "function showMarkers() {\n displayAllMarkers(map);\n }", "function showMarkers() {\n\t setAllMap(map);\n\t}", "function showMarkers() {\n\t setAllMap(map);\n\t}", "function showMa...
[ "0.83660954", "0.8186145", "0.81549734", "0.81549734", "0.814078", "0.814078", "0.81302625", "0.81292725", "0.8116352", "0.81025255", "0.8095168", "0.8091384", "0.8081748", "0.8078595", "0.80732024", "0.8072171", "0.8071884", "0.8071884", "0.801003", "0.79556906", "0.7946402"...
0.78892815
25
Deletes all markers in the array by removing references to them.
function deleteMarkers() { clearMarkers(); markers = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteMarkers() {\n clearMarkers();\n markers = [];\n // remove bounds values from boundsArray\n boundsArray = [];\n}", "function deleteMarkers() {\n clearMarkers()\n markerArr = []\n}", "function deleteAllMarkers() {\r\n if (_markersArray) {\r\n for (i in _markersArray) {\r\n ...
[ "0.79807633", "0.79240143", "0.7880661", "0.77787656", "0.77312356", "0.7722471", "0.77152866", "0.76681226", "0.76642114", "0.76642114", "0.76642114", "0.766018", "0.7659618", "0.76480204", "0.7636397", "0.763061", "0.7626263", "0.7614999", "0.7611798", "0.7611798", "0.76117...
0.764948
32
finding array of quesion by selector
function datafunction(quesion) { let pricearray = document.querySelectorAll(quesion); let details = []; for (let i = 0; i < pricearray.length; i++) { let name = pricearray[i].textContent.trim() let url = "https://leetcode.com" + pricearray[i].getAttrib...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $qsa(q) {\n\treturn Array.from(document.querySelectorAll(q));\n}", "function Queens(){\n\t\tthis.setup();\n\t\tthis.startSearch();\n\t}", "selections() {\n let selections = this.actions().filter(a => !a.args || !a.args.length || this.choice(a).match(/^literal\\(/));\n if (this.state.action) {\n ...
[ "0.55909455", "0.5551711", "0.55094016", "0.54997605", "0.54820293", "0.54609776", "0.54075646", "0.54068685", "0.53894234", "0.5309172", "0.52701056", "0.52664995", "0.52531016", "0.52494603", "0.5246514", "0.5228182", "0.52239645", "0.521649", "0.5214516", "0.5204826", "0.5...
0.0
-1
quiz function round 1
function round1(){ timer(); console.log('round one, fight!') var heading = document.createElement('h4'); heading.setAttribute('id', 'quiz'); heading.textContent = "Question 1: When was the first computer virus created?" var answers = document.createElement('ul'); answers.setAttribute('id', 'answers'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startNextRound() {\r\n// log(\"snr:\"+currentRound);\r\n var remainingRounds = FIRST_ACTUAL_ROUND+numRounds-currentRound-1;\r\n// alert(remainingRounds);\r\n// if (currentRound < (FIRST_ACTUAL_ROUND+numRounds-1)) {\r\n if (remainingRounds > 0) {\r\n initializeRound(currentRound+1);\r\n } else {\r...
[ "0.68508375", "0.683575", "0.6733782", "0.6718068", "0.6610185", "0.660799", "0.6512765", "0.6492768", "0.64693755", "0.64689183", "0.64599943", "0.64588565", "0.6454221", "0.64441127", "0.64048725", "0.63854176", "0.6384718", "0.6378772", "0.6377042", "0.63752073", "0.636624...
0.0
-1
the main function of the code
function testfunction() { //Two google services are stored as a variable. var directionsDisplay = new google.maps.DirectionsRenderer; var directionsService = new google.maps.DirectionsService; //It stores two elements from the form as a variable. var origin_input = document.getElementById('start'); var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Main()\n {\n \n }", "function main(){\n\t\n}", "function main(){\n\n\n}", "function main(){\r\n}", "function main() {\n\n}", "function main() {\n}", "function main(){\n//CODE//\n}", "function main() {\n return _main.apply(this, arguments);\n}", "function Main() {\n cons...
[ "0.7691003", "0.75479305", "0.7538596", "0.73964655", "0.7160255", "0.7073685", "0.69796973", "0.69595397", "0.6777846", "0.67315865", "0.6710071", "0.669458", "0.663711", "0.66123253", "0.6563651", "0.65294117", "0.65193295", "0.6515137", "0.6466526", "0.64570653", "0.644829...
0.0
-1
This function is responsible for autofill the start element of the form with address where the device is located.
function posSuccess(pos) { var crd = pos.coords; var API_KEY = `AIzaSyAn__qjdqcfvl6zXthkIeltbb-8wmEPmgY`; var geo_url = `https://maps.googleapis.com/maps/api/geocode/json?latlng=${crd.latitude},${crd.longitude}&key=${API_KEY}`; console.log(geo_url); console.log(`Latitude : ${crd.latitude}`); consol...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setRegisterStart() {\n $('#kreator > div.kreator-section.rejestracja-container > div.buttonWrap > div.dalej.waves-effect.z-depth-2.rejestrujButton').fadeIn();\n registerGoStep(1);\n\n $('#register-form > div > section.step1 > input[name=\"lat\"]').val('');\n $('#register-form > div > section.s...
[ "0.60841584", "0.60769784", "0.5969679", "0.58739334", "0.58045435", "0.56896687", "0.55533206", "0.55315083", "0.5455503", "0.54489934", "0.5411793", "0.540736", "0.540287", "0.53961796", "0.5391804", "0.5390167", "0.53864086", "0.5380423", "0.53764606", "0.53756887", "0.536...
0.0
-1
Saves the current invitationCommunication.
function save() { // console.log('Saving the unsatisfied.'); var promise = CoursePlanService.update($scope.OmsCoursePlanVoForCreate); $scope.dataLoading = false; $scope.modal.hide(); promise.then(function (OmsCoursePlanVoForCreate) { }, function ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveEquipment() {\n MeasuringEquipmentServiceCalibrator.saveEquipment(\n $scope.equipmentFormData).then(\n function (data) {\n if (data == 201) {\n $scope.closeModal();\n $scop...
[ "0.52294344", "0.5008468", "0.49771887", "0.49548143", "0.49431923", "0.48925728", "0.48913157", "0.48764843", "0.484138", "0.4804305", "0.4778466", "0.47777146", "0.4744616", "0.47079498", "0.47026485", "0.46779352", "0.46393263", "0.46168834", "0.46155003", "0.46031824", "0...
0.4287905
64
Wait until syncing completes to scan/setup filters.
function syncWait() { self.augur.rpc.eth("syncing", {}, function (syncing) { if (syncing.error){ console.log("RPC error:", syncing.error); setTimeout(syncWait, 30000); return; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function syncWait() {\n try {\n var syncing = self.augur.rpc.eth(\"syncing\");\n var peers = parseInt(self.augur.rpc.net(\"peerCount\"));\n if (self.debug) console.log(\"syncWait:\", syncing, peers);\n if...
[ "0.60839444", "0.5761795", "0.56422704", "0.5552599", "0.55280334", "0.54770356", "0.53914297", "0.53588986", "0.53577685", "0.5331723", "0.52926064", "0.52840596", "0.5276856", "0.5260633", "0.51892275", "0.5179051", "0.5170697", "0.5164439", "0.5135232", "0.51342386", "0.51...
0.63229704
0
XXVI iter i charAt(i) num pre curr 0 0 'X' 10 1 1 'X' 20 10 10 2 2 'V' 25 10 5 3 3 'I' 26 5 1 XXIV iter i charAt(i) curr pre num 0 0 'X' 10 1 1 'X' 10 10 20 2 2 'I' 1 10 21 3 2 'V' 5 1 24 num = pre2 + curr = 21 2 + 5 = 24 IX iter i charAt(i) curr pre num 0 0 I 1 1 1 X 10 1 num = num pre2 + curr = 1 2 + 10 = 9 IV iter i...
function roman_to_Int(str1) { if(str1 == null) return -1; let num = char_to_int(str1.charAt(0)); let pre, curr; for(var i = 1; i < str1.length; i++){ curr = char_to_int(str1.charAt(i)); pre = char_to_int(str1.charAt(i-1)); if(curr <= pre){ num += curr; } els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IteratedChar() {\n\n this.charValue = 0; // 1-4 bytes from the raw input data\n this.index = 0;\n this.nextIndex = 0;\n this.error = false;\n this.done = false;\n\n this.reset = function() {\n this.charValue = 0;\n this.index = -1;\n this.nextIndex = 0;\n this.error ...
[ "0.578632", "0.578632", "0.54183763", "0.5348678", "0.5312666", "0.5312083", "0.5303245", "0.5303245", "0.5287917", "0.52757853", "0.5262951", "0.52570003", "0.5228924", "0.52233595", "0.5217335", "0.52100706", "0.51971686", "0.5180679", "0.5171867", "0.5164685", "0.5140482",...
0.0
-1
healthCheck with the indication to change ip or port, if this is the case.
async healthCheck() { let healthPage = `${this.baseUrl}:${this.port}/swagger-ui.html`; try { let httpResponse = await axios.get(healthPage, { header: { 'Content-type': 'application/json' } }); console.log('System is running in the following address: ' + `${this.baseUrl}:${this.port}`); process...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "configureHealthCheck(healthCheck) {\n this.healthCheck = healthCheck;\n }", "async handleHealthCheck({ req, res, onHealthCheck, }) {\n // Response follows\n // https://tools.ietf.org/html/draft-inadarei-api-health-check-01\n res.setHeader('Content-Type', 'application/health+json');...
[ "0.63381886", "0.60489005", "0.5551392", "0.541019", "0.54097277", "0.5399015", "0.5280838", "0.52366656", "0.52278715", "0.5208967", "0.5207179", "0.51289576", "0.5123349", "0.5075305", "0.5044975", "0.50153714", "0.49859425", "0.49352485", "0.4932261", "0.4895936", "0.48928...
0.56848776
2
Send email via emailJS
function SendEmail() { emailjs .send('gmailAdmin', 'template_3WsqlJYJ', { from_name: document.getElementById('name').value, message_html: document.getElementById('message').value, from_email: document.getElementById('email').value, }) .then( //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendEmail() {\n email([EMAIL], null, null, null, null);\n }", "sendTextEmail() {\n email([EMAIL], null, null, null, this.state.text);\n }", "function sendEmail(e) {\n e.preventDefault();\n emailjs.sendForm('gmail', 'template_pz4qfec', e.target, 'user_HYImqyNA2H0p8YsBrLgBT')\n .then((re...
[ "0.7814048", "0.7279878", "0.72665805", "0.7131374", "0.7130452", "0.7087009", "0.7049046", "0.7040379", "0.70261115", "0.7015927", "0.7014564", "0.70049596", "0.7002763", "0.6990015", "0.6979442", "0.69576615", "0.6946771", "0.6941271", "0.69310457", "0.6922024", "0.6920487"...
0.78274685
0
LitElement constructable styles enhancement
static get styles() { return [ css` :host { display: none; } `, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_css$3(){var style=element(\"style\");style.id=\"svelte-82cst2-style\";style.textContent=\"span.svelte-82cst2{font-size:inherit;font-family:inherit}\";append(document.head,style)}", "function add_css$4(){var style=element(\"style\");style.id=\"svelte-82cst2-style\";style.textContent=\"span.svelte-82c...
[ "0.6573412", "0.65300834", "0.6455701", "0.63587797", "0.63406795", "0.6317974", "0.6306583", "0.6300778", "0.6300778", "0.6300778", "0.6300778", "0.6282644", "0.62151957", "0.6180651", "0.6170211", "0.6153014", "0.6131147", "0.61238915", "0.6107228", "0.60806614", "0.6074760...
0.0
-1
LitElement ready life cycle
firstUpdated(changedProperties) { // fire an event that this is a core piece of the system this.dispatchEvent( new CustomEvent("hax-register-core-piece", { bubbles: true, cancelable: true, composed: true, detail: { piece: "haxAutoloader", object: this, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Initialize() \n {\n this.UpdateElementDeclaration();\n }", "ready() {\n super.ready();\n const that = this;\n\n that._createElement();\n }", "ready() {\n super.ready();\n this._createElement();\n }", "function init() {\n if (!ready) {\n ready = tr...
[ "0.6444396", "0.6413532", "0.6358788", "0.6276597", "0.6181319", "0.61443216", "0.61261594", "0.6042884", "0.5991337", "0.5972933", "0.5957326", "0.59196174", "0.58888984", "0.58884174", "0.5880586", "0.5869108", "0.58607703", "0.58556396", "0.58452356", "0.58373064", "0.5835...
0.0
-1
sets the format of returned value
function onDeviceReady() { //用户名密码初始 getValueUserNameForKey("userName") ; //照相 //pictureSource = navigator.camera.PictureSourceType;//拍照功能取消 //destinationType = navigator.camera.DestinationType;//拍照功能取消 /*if(device.platform.indexOf("An")){ }else{ $("#aboutId #codeImgId").attr("src","ios.png"); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get format() { return this._format; }", "function Format() {}", "function Format() {}", "get format () {\n\t\treturn this._format;\n\t}", "get format() {\n\t\treturn this.__format;\n\t}", "print_format(val) {\n this._print_format = val;\n return this;\n }", "get format() {\n\t\treturn this._form...
[ "0.71194005", "0.7060468", "0.7060468", "0.693482", "0.6915009", "0.6841965", "0.6827114", "0.6827114", "0.63612974", "0.6155041", "0.6131275", "0.6110376", "0.60748655", "0.5951651", "0.5940815", "0.5918157", "0.58463836", "0.5842216", "0.58238316", "0.5811948", "0.5802493",...
0.0
-1
Contravariant inputs, covariant outputs
function showUserDashboard(user: User): Admin { return new SuperAdmin('1', 'Jina', 'JustJina') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contramap(f, contravariant) {\n return Contravariant.methods.contramap (contravariant) (f);\n }", "function contramap(f, contravariant) {\n return Contravariant.methods.contramap(contravariant)(f);\n }", "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emi...
[ "0.5459916", "0.54175144", "0.5353932", "0.52990067", "0.5294769", "0.52571946", "0.51638824", "0.51638824", "0.51638824", "0.49360803", "0.49360803", "0.49360803", "0.4685184", "0.46092403", "0.4590513", "0.45431945", "0.45431945", "0.44482118", "0.4439929", "0.44379961", "0...
0.0
-1
appends div main to DOM and creates el variable to point to where we want, then calls to create other elements for carousel
function createCarousel(array){ $("#lecture").append("<div class='main'></div>"); var $el = $("#lecture").children().last(); createNavButtons(peopleArray, $el); //createIndexPoints(array, $el); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupCarouselElements() {\n // element that will contain the slider and buttons\n viewportElement = document.createElement('div');\n viewportElement.className = 'carousel-viewport';\n\n // element that will contain the slides\n sliderElement = document.createElement('div');\n sliderEleme...
[ "0.68920493", "0.67719895", "0.6740908", "0.6666155", "0.657879", "0.64682645", "0.6459916", "0.6429743", "0.6309914", "0.6295929", "0.6260492", "0.62172216", "0.6164963", "0.6159939", "0.6137241", "0.61115557", "0.6053703", "0.6017524", "0.60102695", "0.598446", "0.58863753"...
0.69373304
0
go to the next slide by incrementing the tracker and then updating
function nextSlide(){ indexTracker++; if(indexTracker >= peopleArray.length){ indexTracker = 0; } updateIndexPoints(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function next()\n{\t\n\tnewSlide = sliderint+1;\n\tshowSlide(newSlide);\n}", "function nextSlide()\n{\n if(index == slider.length-1)\n {\n // If index is greater than the no. of slides\n index = 0;\n }\n else\n {\n // Forward the slides\n index++;\n }\n changeSlid...
[ "0.794481", "0.7815485", "0.78019744", "0.7706727", "0.76561224", "0.7600507", "0.75709885", "0.7567773", "0.7567529", "0.7560482", "0.7550187", "0.75452083", "0.7532581", "0.7525971", "0.7504896", "0.7493964", "0.74706686", "0.7455399", "0.7450632", "0.7443531", "0.74002695"...
0.7990472
0
go to the previous slide by decrementing tracker and then updating
function prevSlide(){ indexTracker--; if(indexTracker < 0){ indexTracker = peopleArray.length - 1; } //$('.index-point-active'). updateIndexPoints(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "prevStep() {\n\n if (this.currStep > -1) {\n\n this.goTo(this.currSlide, this.currStep - 1);\n\n }\n\n }", "prevSlide() {\n\n if (this.currSlide > 0) {\n\n this.goTo(this.currSlide - 1, -1);\n\n } else {\n\n this.goToLastSlide();\n\n }\n\n ...
[ "0.79582447", "0.7875235", "0.7830222", "0.7778327", "0.7624452", "0.75984323", "0.7562842", "0.75509775", "0.75419736", "0.7533437", "0.7504241", "0.74744177", "0.7459433", "0.74206036", "0.7391134", "0.73649293", "0.7358868", "0.734859", "0.7337667", "0.73161834", "0.729357...
0.7779197
3
only used to create the previous and next text
function createNavButtons(array,$el){ $el.append("<div id='prev' class='nav-button'>Prev</div>"); for(var i = 0; i < array.length; i++) { //we need i, 1 for each element $el.append("<div class='index-point' id='index" + i + "'></div>") } $el.append("<div id='next' class='nav-button'>Next...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get txt() {\n return [['← Back', `To Q. ${this.page - 1} of 3`], [`On Q. ${this.page} of 3`, 'Next →']]; }", "function nextText() {\n document.getElementById(currOrder).remove();\n currOrder++;\n putText(curr.text, currOrder);\n cur...
[ "0.7189898", "0.6501135", "0.64211655", "0.64211655", "0.62821007", "0.6275136", "0.6264297", "0.6231145", "0.61757815", "0.611467", "0.60894775", "0.6067025", "0.6030027", "0.5964026", "0.59632605", "0.59440315", "0.59339243", "0.5924938", "0.59186345", "0.59169734", "0.5905...
0.0
-1
Validates shape relation object
function validateRelation(rel) { var keys = ['type', 'id', 'role', 'sequence']; var types = ['Node', 'Way', 'Shape']; var roles = ['outer', 'inner', 'point', 'center', 'line']; rel = _.pick(rel, keys); if (!_.isString(rel.id) && !_.isNumber(rel.id)) rel.invalid = true; if (_.isString(rel.type...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateRelation({ relation, relationCollection }) {\n let errors = []\n\n // TODO - inflate these relations first\n // relationCollection.forEach((rel) => {\n // if (\n // rel.schema_id === relation.schema_id &&\n // (\n // (rel.as === rela...
[ "0.692861", "0.6179808", "0.6118485", "0.60736156", "0.5766761", "0.57567984", "0.5655209", "0.5637987", "0.56252766", "0.55335265", "0.54445803", "0.5442518", "0.5428313", "0.54218274", "0.540433", "0.5401506", "0.5399218", "0.5384573", "0.53782386", "0.5359176", "0.53499824...
0.7143884
0
register the currently running reaction to be queued again on obj.key mutations
function registerRunningReactionForOperation(operation) { // get the current reaction from the top of the stack var runningReaction = reactionStack[reactionStack.length - 1]; if (runningReaction) { debugOperation(runningReaction, operation); registerReactionForOperation(runningReaction, operation); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tellImReadyForTheAttack(){\n this._eventEmmiter.emit(SQUAD_RECHARGED, {rechargedSquad: this});\n }", "queue(action){\n Mediator.queue.push(action);\n }", "actionqueue_init() {\n if (!this.actionqueue_has_subscribers) {\n if (this.actionqueue_unsubscribe)\n thi...
[ "0.5496076", "0.5258363", "0.5202066", "0.50863576", "0.50302666", "0.49495313", "0.49168953", "0.4870724", "0.48608124", "0.48537984", "0.48504093", "0.4843057", "0.48122153", "0.48066518", "0.47900283", "0.47685084", "0.47631484", "0.4755784", "0.47419062", "0.47416103", "0...
0.48932135
7
intercept get operations on observables to know which reaction uses their properties
function get(target, key, receiver) { var result = Reflect.get(target, key, receiver); // do not register (observable.prop -> reaction) pairs for well known symbols // these symbols are frequently retrieved in low level JavaScript under the hood if (typeof key === 'symbol' && wellKnownSymbols.has(key)) { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get(target, key, receiver) {\n const result = Reflect.get(target, key, receiver);\n // do not register (observable.prop -> reaction) pairs for well known symbols\n // these symbols are frequently retrieved in low level JavaScript under the hood\n if (typeof key === 'symbol' && wellKnownSymbols.has(key...
[ "0.6345919", "0.62352836", "0.56582385", "0.55990005", "0.5545645", "0.5545606", "0.5483457", "0.54741985", "0.54221857", "0.54193276", "0.5405822", "0.5359312", "0.53020895", "0.5292051", "0.5272369", "0.5184778", "0.5184778", "0.5179534", "0.51754063", "0.51357335", "0.5135...
0.6397757
0
intercept set operations on observables to know when to trigger reactions
function set(target, key, value, receiver) { // make sure to do not pollute the raw object with observables if (typeof value === 'object' && value !== null) { value = proxyToRaw.get(value) || value; } // save if the object had a descriptor for this key var hadKey = hasOwnProperty$1.call(target, key); //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "notifyObservers(){}", "notifyObservers(){}", "notifyObservers(){}", "someBusinessLogic() {\n console.log('\\nSubject1: doing some business logic.');\n this.state = Math.floor(Math.random() * (10 + 1));\n\n console.log(`Subject1: state changed to: ${this.state}`);\n this.notify();\n }", "enable...
[ "0.5535683", "0.5535683", "0.5535683", "0.54783255", "0.54585093", "0.54212296", "0.54212296", "0.54212296", "0.54212296", "0.5410309", "0.53966093", "0.53966093", "0.5390138", "0.53769636", "0.53765565", "0.5368727", "0.53681827", "0.5280907", "0.52779126", "0.52734613", "0....
0.51792896
33
var host = Object.keys(config.hosts)[0]; var token = config.hosts[host].token; var phabricator = new Phabricator(host, token);
function Sparc(hosts) { if (!hosts) hosts = []; if (hosts.length === 0) { throw "No hosts passed into SPARC constructor"; } // hosts is a list of Phabricator instances which // we will query this.hosts = []; // iterate over each host given and create a Phabricator instance that we // can use to q...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function HostService() {\n this.host = \"https://sleepy-oasis-96155.herokuapp.com/\";\n }", "constructor(\n user = config.user,\n password = config.password,\n host = config.host\n ) {\n this.user = user;\n this.password = password;\n this.host = host;\n }", "constructor(uri, doAu...
[ "0.5536877", "0.54666966", "0.5262338", "0.51523834", "0.51397026", "0.5050704", "0.501573", "0.5007376", "0.49878877", "0.49853963", "0.49835002", "0.4961172", "0.4959418", "0.49562484", "0.48848897", "0.4876896", "0.48710337", "0.4861492", "0.48432383", "0.48312086", "0.481...
0.0
-1
TODO: Add some reconnect mechanism that buffers messages while trying to reconnect
function getConnection(connectionUrl) { let node = this; if(!connectionPromise) { connectionPromise = amqp.connect(connectionUrl, { clientProperties: { applicationName: GlobalConfig.APP_ID } }) .then(function(conn) { connection = conn; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_reconnect () {\n if (this._reconnecting === true) return\n this._reconnecting = true\n\n log('Trying to reconnect to remote endpoint')\n this._checkInternet((online) => {\n if (!online && !cst.PM2_DEBUG) {\n log('Internet down, retry in 2 seconds ..')\n this._reconnecting = false\n ...
[ "0.6976662", "0.6935419", "0.68696487", "0.68222463", "0.6818226", "0.6763867", "0.6743806", "0.6714159", "0.6683888", "0.6661969", "0.665485", "0.6650543", "0.66336274", "0.65918255", "0.6580592", "0.65365666", "0.6532867", "0.6532867", "0.64368695", "0.6424363", "0.6415017"...
0.0
-1
Compare whether a value has changed, accounting for NaN.
function hasChanged(value, oldValue) { // eslint-disable-next-line no-self-compare return value !== oldValue && (value === value || oldValue === oldValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valuesChanged(oldValue, newValue) {\n return !deepEqual(oldValue, newValue);\n}", "function valuesChanged(oldValue, newValue) {\n return !(0, _deepEqual2.default)(oldValue, newValue);\n}", "function valuesChanged(oldValue, newValue) {\n\treturn !(0, _deepEqual2.default)(oldValue, newValue);\n}", "...
[ "0.69309455", "0.6865783", "0.67901784", "0.6515343", "0.65043193", "0.6481577", "0.6433785", "0.643202", "0.63392794", "0.63145864", "0.6303519", "0.6297189", "0.628858", "0.628858", "0.628858", "0.624304", "0.62210464", "0.6179215", "0.61114216", "0.60467905", "0.6026068", ...
0.6774939
3
CHECK IF THERE IS A LOCALSTORAGE
function checkIfSquare() { let squares; if (localStorage.getItem("squares") === null) { squares = []; } else { squares = JSON.parse(localStorage.getItem("squares")); //converts the string from the web to object } return squares; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForStorage() {\n return typeof(Storage) !== \"undefined\"\n}", "function check_local_storage() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API\n try {\n var x = '__storage_test__';\n localStorage.setItem(x, x);\n localStorage.removeItem(x...
[ "0.71097064", "0.7082271", "0.7012839", "0.6942041", "0.6847427", "0.684633", "0.68298453", "0.68298453", "0.68298453", "0.68298453", "0.68298453", "0.68298453", "0.68298453", "0.6765304", "0.67601687", "0.67556643", "0.67450154", "0.6745002", "0.6722641", "0.6604691", "0.656...
0.0
-1
PUSH THE SQUARE INDEX INTO THE local storage
function saveSquare(square) { let squares = checkIfSquare(); squares.push(square); localStorage.setItem("squares", JSON.stringify(squares)); //converts the object to a stringb in order to storage it in web }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function increaseMatrix() {\r\n storeMatrix();\r\n var matrix = getMatrix().map(row => {\r\n row.push('1');\r\n return row;\r\n });\r\n matrix.push(new Array(matrix.length + 1).fill('1'));\r\n localStorage.setItem('matrix', JSON.stringify(matrix));\r\n createTable();\r\n}", "addSquare() {\n le...
[ "0.620271", "0.6086766", "0.60372037", "0.5886328", "0.5801693", "0.5791922", "0.5781745", "0.5733114", "0.56791687", "0.5672339", "0.5661178", "0.5652962", "0.56486845", "0.56337726", "0.56106913", "0.55900705", "0.55665", "0.55585146", "0.5550537", "0.55430055", "0.55387026...
0.5931258
3
SECOND CLICK REMOVES SQUARE FROM LS
function removeSquare(square) { let squares = checkIfSquare(); squares.splice(squares.indexOf(square), 1); //deleting 1 element in the place i mentioned localStorage.setItem("squares", JSON.stringify(squares)); //localStorage.setItem(<itemName>,<itemValue>), }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function undraw() {\n current.forEach((index) => {\n squares[currentPosition + index].classList.remove(\"tetromino\");\n });\n }", "function refr() {\n $.each(box, function() {\n $(this).html('');\n });\n selectionMade = false;\n o.removeClass('red');\n x.removeClass('red');\n ...
[ "0.6402779", "0.62341976", "0.623025", "0.6104939", "0.6071496", "0.60598963", "0.6055103", "0.60174525", "0.60148054", "0.59851414", "0.59795785", "0.59733915", "0.5966158", "0.59569234", "0.59569234", "0.5937478", "0.59350127", "0.5930251", "0.5921357", "0.59111744", "0.590...
0.0
-1
Write password to the password input
function writePassword() { var password = generatePassword(); var passwordText = document.querySelector("#password"); passwordText.value = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writePassword() {}", "function writePassword() {\n var password = getPasswordOptions();\n var passwordText = document.querySelector('#password');\n \n passwordText.value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.qu...
[ "0.88605946", "0.85434437", "0.8511256", "0.8500835", "0.84896296", "0.84846", "0.84719414", "0.84686357", "0.8454292", "0.8443738", "0.8431387", "0.8419759", "0.8418786", "0.8406216", "0.8403772", "0.8400314", "0.8392802", "0.83758265", "0.8370068", "0.83642554", "0.836013",...
0.0
-1
Constructs a new SamplerImpl instance.
constructor() { /** Indicates if the clock is endend. */ this.endedLocal = false; /** The duration between start and end of the clock. */ this.diff = null; this.startTimeLocal = new Date(); this.hrtimeLocal = process.hrtime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSampler (type, samplerType) {\n\tsampler.type = type;\n\tfunction sampler () {\n\t\tvar name = arguments[0];\n\t\treturn Descriptor(null, {\n\t\t\ttype: samplerType,\n\t\t\tinclude: 'texture2D',\n\t\t\tcomplexity: 999\n\t\t});\n\t}\n\treturn sampler;\n}", "createSampler(gltfSampler) {\n return ...
[ "0.64974403", "0.64374065", "0.59663486", "0.5879643", "0.5792143", "0.5766477", "0.56855154", "0.56297666", "0.5526631", "0.55033594", "0.5415553", "0.52305543", "0.5157365", "0.50788563", "0.5073668", "0.50183094", "0.50072736", "0.49925265", "0.4981481", "0.4977953", "0.49...
0.0
-1
Gets the duration of the clock.
get duration() { if (!this.endedLocal) { return null; } const ns = this.diff[0] * 1e9 + this.diff[1]; return ns / 1e6; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "duration() {\n if (this.end) return this.end.getTime() - this.start.getTime();\n else return new Date().getTime() - this.start.getTime();\n }", "duration() {\n let now = (this.end!==null)\n ? this.end\n : new Date().valueOf();\n return (this.since!==null)\n ...
[ "0.7243119", "0.71724534", "0.701742", "0.701742", "0.701742", "0.69783473", "0.6945563", "0.6815169", "0.67359084", "0.67175806", "0.6622292", "0.66203576", "0.65800667", "0.6577599", "0.6577599", "0.6576251", "0.65345734", "0.65262717", "0.648711", "0.6431537", "0.64301944"...
0.70529103
2
Gets the time so far.
get endTime() { let result = null; if (this.ended) { result = new Date(this.startTime.getTime() + this.duration); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get time() {}", "get time() {\n return (process.hrtime()[0] * 1e9 + process.hrtime()[1]) / 1e6;\n }", "get time () {\n\t\treturn this._time;\n\t}", "function get_time() {\n return Date.now();\n}", "getTime(){\n this.time = millis();\n this.timeFromLast = this.time - this.timeUntilLast;\n ...
[ "0.78824437", "0.7574045", "0.75357836", "0.742306", "0.7351838", "0.731986", "0.7284964", "0.72654974", "0.7230014", "0.7230014", "0.72041357", "0.7165435", "0.71434236", "0.7100897", "0.7099452", "0.70809317", "0.7049697", "0.7025162", "0.69593585", "0.6938949", "0.6876421"...
0.0
-1
Indicates if the clock was ended.
get ended() { return this.endedLocal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasEnded () {\r\n return this._getTime() > this._totalRunningTime\r\n }", "isEnd() {\n return this.data.rounds.end(); \n }", "get ended() {\n return this._hasEnded\n }", "function checkEndGame() {\r\n if (cardMatches == 8) {\r\n console.log(\"gameEnd\");\r\n // stop...
[ "0.75669014", "0.68507165", "0.68372554", "0.6665197", "0.66183454", "0.65931433", "0.64612937", "0.6288175", "0.62641495", "0.6255333", "0.6203494", "0.62029666", "0.6078601", "0.6060579", "0.6055125", "0.6006588", "0.5970086", "0.5935115", "0.5926382", "0.5902756", "0.59027...
0.56622756
39
This sample demonstrates how to Gets the list of Batch supported Virtual Machine VM sizes available at the given location.
async function locationListVirtualMachineSkus() { const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid"; const locationName = "japaneast"; const credential = new DefaultAzureCredential(); const client = new BatchManagementClient(credential, subscriptionId); const resArray = new Array(); for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshVmSizesList(computeClient, location){\n console.log('\\n\\tUpdating List of VM Sizes for '+ location +' for you!');\n computeClient.virtualMachineSizes.list(location, function (err, result, request, response) {\n if (err) {\n return console.error('\\n Error while Updating List...
[ "0.6717594", "0.6693136", "0.6002237", "0.5788165", "0.57004905", "0.5680194", "0.567834", "0.567834", "0.5588478", "0.5578753", "0.5570381", "0.55140054", "0.541874", "0.53902125", "0.5359319", "0.5314841", "0.5306547", "0.5267398", "0.5247739", "0.52460873", "0.5221341", ...
0.6285644
2
this data should have everything about this user
function inArray(value, array){ for(var i=0;i<array.length;i++){ if(array[i]==value) {return false;} } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUserFullData() {\n let user = this.getUser()\n return {\n id: user.id,\n name: user.name,\n followers: this.getFollowers(),\n following: this.getFollowing(),\n feed: this.createUserFeed()\n }\n }", "users(parent, args, ctx, info) {\n return USERS_DATA;\n }"...
[ "0.7126316", "0.6804755", "0.6744385", "0.66188544", "0.6549392", "0.6423112", "0.6414666", "0.6408525", "0.6402683", "0.6394252", "0.6379458", "0.6370219", "0.634284", "0.6306685", "0.62966835", "0.6288174", "0.62742", "0.6268439", "0.62357646", "0.6209165", "0.62078255", ...
0.0
-1
Muestra mensaje de permiso
function askCameraPermissionUI() { document.querySelector(".create-gifos__wrapper-title").innerHTML = `¿Nos das acceso<span class="line-break"></span>a tu cámara?`; document.querySelector(".create-gifos__wrapper-info").innerHTML = `El acceso a tu camara será válido sólo<span class="line-break"></span>por el tie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handlePerm(perms) {\n Alert.alert('Permissions', JSON.stringify(perms));\n }", "function noPerms(message, perm) {\n let embed = new Discord.RichEmbed()\n .setAuthor(message.author.username)\n .setTitle(\"FARA PERMISIUNI\")\n .setColor(config.red)\n .addField(\"N-AI SUFICIENTI P...
[ "0.73174554", "0.6298662", "0.6264214", "0.61146843", "0.6069009", "0.6059483", "0.60457146", "0.6029013", "0.59585273", "0.5842317", "0.5824374", "0.58123404", "0.5784995", "0.5771745", "0.56981903", "0.56789243", "0.56642294", "0.56298995", "0.5599231", "0.55543756", "0.551...
0.0
-1
Incluye info del grabador al formulario
function prepareGifInfo(recorder) { const form = new FormData(); form.append('file', recorder.getBlob(), 'myGif.gif'); console.log(form.get('file')); gifoData = form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_inpt_formulario_cargar_recorrido() {\n // Inputs del formulario para inicializar\n}", "function cargar_reg_emergente(){\n\tparametros\t\t\t\t\t\t\t= cargar_reg_emergente.arguments;\n\tf\t\t\t\t\t\t\t\t\t= document.form1;\t\t\t\t//alias del formulario\t\n\tcombo_codigo_emergente.value\t\t= parame...
[ "0.62910134", "0.6083362", "0.60728616", "0.6041766", "0.590213", "0.5891005", "0.5860177", "0.58224314", "0.58013225", "0.5795661", "0.5788782", "0.5772516", "0.57489115", "0.5716463", "0.5693795", "0.56767184", "0.56753695", "0.566692", "0.5648364", "0.56076694", "0.5597148...
0.0
-1
Request para subir gif
function uploadGifo() { showUploadingUI() document.querySelector(".create-gifos__wrapper-title").innerHTML = ""; const uploadGifoData = uploadGifosRequest(uploadGifoURL, gifoData); uploadGifoData .then((response) => { const gifoInfo = response.data; const gifoID = gifoIn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subir_GIF_function() {\r\n let form = new FormData();\r\n form.append('file', GIF_video, 'myGif.gif');\r\n let GIF_preview = URL.createObjectURL(GIF_video);\r\n summary_panel_function(GIF_preview);\r\n POST_GIF_function(form);\r\n }", "functi...
[ "0.7501299", "0.6985574", "0.6946705", "0.693652", "0.68838775", "0.678801", "0.67740625", "0.67348915", "0.6713243", "0.6692429", "0.6692429", "0.66644037", "0.6594394", "0.6589667", "0.65890044", "0.6588756", "0.6578446", "0.6574233", "0.65662926", "0.65662825", "0.6550388"...
0.0
-1
Copiar URL del gif
function copyURL(gifoURL) { const aux = document.createElement("input"); aux.setAttribute("value", gifoURL); document.body.appendChild(aux); aux.select(); document.execCommand("copy"); document.body.removeChild(aux); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyLink(){\n const el = document.createElement('textarea');\n el.value = myGifURL;\n el.setAttribute('readonly', '');\n el.style.position = 'absolute';\n el.style.left = '-9999px';\n document.body.appendChild(el);\n el.select();\n document.execCommand('copy');\n document.body.r...
[ "0.7585488", "0.7022005", "0.6869472", "0.64056915", "0.634435", "0.634435", "0.62541324", "0.62300146", "0.62248933", "0.61520135", "0.6093441", "0.59149504", "0.58666587", "0.58591586", "0.58494014", "0.581692", "0.5800041", "0.5789575", "0.5783984", "0.5779879", "0.5758644...
0.6727023
3
TODO: optionally verify the deps install
async function fixIndividualRequirementsTxt(workspace, dir, entryFileName, fileName, remediation, parsedRequirements, options, directUpgradesOnly) { const entryFilePath = pathLib.normalize(pathLib.join(dir, entryFileName)); const fullFilePath = pathLib.normalize(pathLib.join(dir, fileName)); const { updated...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install() {}", "function install() {}", "function install() {}", "function install() {}", "install() {\n this.installDependencies();\n }", "install() {\n\n }", "function main () {\n if (process.platform === 'win32') {\n console.error('Sorry, check-deps only works on Mac and Linux')\n ...
[ "0.67442554", "0.67442554", "0.67442554", "0.67442554", "0.66297", "0.6523316", "0.6480313", "0.6374141", "0.6311522", "0.630471", "0.6293727", "0.6238613", "0.6178608", "0.61746943", "0.6171837", "0.61405325", "0.6121988", "0.61097646", "0.60833895", "0.6029535", "0.5987244"...
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function makeEmptyFunction(arg) { return function () { return arg; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.58231497", "0.5635069", "0.55553025", "0.54889935", "0.5398619", "0.5385384", "0.536367", "0.53274816", "0.53211474", "0.53150505", "0.53150505", "0.52930033", "0.5266658", "0.52168185", "0.5198329", "0.5192131", "0.5191426", "0.5155422", "0.5141882", "0.5130252", "0.51256...
0.0
-1
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n ...
[ "0.527866", "0.52612406", "0.51951283", "0.518796", "0.51302594", "0.5044646", "0.48934332", "0.4857401", "0.484017", "0.48302925", "0.482028", "0.4812441", "0.4808473", "0.47852293", "0.47828078", "0.47574478", "0.47493434", "0.4739314", "0.47239366", "0.4703992", "0.4703992...
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function makeEmptyFunction(arg) { return function () { return arg; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.5822285", "0.5634995", "0.5554211", "0.5488144", "0.53981984", "0.53835696", "0.53624743", "0.5326257", "0.5321075", "0.53149205", "0.53149205", "0.52923155", "0.5265581", "0.52166533", "0.5197848", "0.51920915", "0.5191381", "0.5154422", "0.5140002", "0.51310736", "0.5125...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own /eslintdisable noselfcompare
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject$1(obj) {\n ...
[ "0.67302245", "0.66326123", "0.6608616", "0.6598653", "0.65985197", "0.65631413", "0.6505178", "0.64672697", "0.6461792", "0.64105475", "0.6369575", "0.63644415", "0.63644415", "0.63644415", "0.63644415", "0.63560927", "0.6326123", "0.63212097", "0.63208926", "0.6295097", "0....
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'functio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\...
[ "0.6908362", "0.6774889", "0.6606997", "0.65384954", "0.64926404", "0.6489072", "0.6489072", "0.6449892", "0.6449892", "0.6428727", "0.64280385", "0.6402795", "0.6402795", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.639...
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for type...
[ "0.68783313", "0.6854933", "0.6854933", "0.6854933", "0.6854933", "0.6853718", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", "0.6848216", ...
0.0
-1
Returns a string that is postfixed to a warning about an invalid type. For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; def...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case \"array\":\n case \"object\":\n return \"an \" + type;\n case \"boolean\":\n ...
[ "0.6600106", "0.6565784", "0.6560073", "0.6560073", "0.6560073", "0.6560073", "0.65228695", "0.65221345", "0.65066546", "0.65066546", "0.65066546", "0.65066546", "0.65066546", "0.6501843", "0.6478328", "0.6478328", "0.6478328", "0.6478328", "0.6478328", "0.6478328", "0.647832...
0.64902776
14
Returns class name of the object, if any.
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(obj) {\n var funcNameRegex = /function\\s+(.+?)\\s*\\(/;\n var results = funcNameRegex.exec(obj['constructor'].toString());\n return (results && results.length > 1) ? results[1] : '';\n }", "getClassName() {\n return this.constructor\n .className;\n...
[ "0.77293825", "0.74671346", "0.74671346", "0.7423857", "0.7165478", "0.7143079", "0.70839536", "0.7080388", "0.699565", "0.6969293", "0.6898184", "0.6879559", "0.67127705", "0.66558695", "0.66352963", "0.66087157", "0.66087157", "0.66087157", "0.66087157", "0.65980244", "0.65...
0.0
-1
Base class helpers for the updating state of a component.
function ReactComponent(props, context, updater) { this.props = props; this.context = context; this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n BaseState.update.call(this);\n }", "_update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate = this.needsUpdate();\n // End lifecycle method\n debug(TRACE_UPDATE, this, stateNeedsUpdate);\n\n if (stateNeedsUpdate) {\n this._updateState();\n }\n }", "func...
[ "0.7217204", "0.67610246", "0.66769236", "0.66106635", "0.6540022", "0.65259355", "0.6489663", "0.64705694", "0.645821", "0.63847154", "0.6354757", "0.63347685", "0.63053316", "0.6304944", "0.62717897", "0.6266675", "0.621649", "0.6214279", "0.6194085", "0.6189877", "0.615812...
0.0
-1
Base class helpers for the updating state of a component.
function ReactPureComponent(props, context, updater) { // Duplicated from ReactComponent. this.props = props; this.context = context; this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n BaseState.update.call(this);\n }", "_update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate = this.needsUpdate();\n // End lifecycle method\n debug(TRACE_UPDATE, this, stateNeedsUpdate);\n\n if (stateNeedsUpdate) {\n this._updateState();\n }\n }", "func...
[ "0.7217204", "0.67610246", "0.66769236", "0.66106635", "0.6540022", "0.65259355", "0.6489663", "0.64705694", "0.645821", "0.63847154", "0.6354757", "0.63347685", "0.63053316", "0.6304944", "0.62717897", "0.6266675", "0.621649", "0.6214279", "0.6194085", "0.6189877", "0.615812...
0.0
-1
WARNING: DO NOT manually require this module. This is a replacement for `invariant(...)` used by the error code system and will _only_ be required by the corresponding babel pass. It always throws.
function reactProdInvariant(code) { var argCount = arguments.length - 1; var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; for (var argIdx = 0; argIdx < argCount; argIdx++) { message += '&args[]=' + encodeURIComponen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function invariant(condition,format,a,b,c,d,e,f){if(process.env.NODE_ENV!=='production'){if(format===undefined){throw new Error('invariant requires an error message argument');}}if(!condition){var error;if(format===undefined){error=new Error('Minified exception occurred; use the non-minified dev environment '+'for...
[ "0.7493267", "0.7493267", "0.7265097", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.7220996", "0.72176296", "0.714445", "0.714445", "0.714445", "0.714445", "0.7...
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function makeEmptyFunction(arg) { return function () { return arg; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.5822034", "0.56360537", "0.5553897", "0.54877555", "0.53990006", "0.5384031", "0.53643835", "0.5326518", "0.53214234", "0.5315397", "0.5315397", "0.52921", "0.52652663", "0.52165633", "0.51990235", "0.51921695", "0.5191763", "0.5154459", "0.5141133", "0.5131102", "0.512619...
0.0
-1
Flatten a children object (typically specified as `props.children`) and return an array with appropriately rekeyed children. See
function toArray(children) { var result = []; mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toArrayChildren(children) {\n var ret = [];\n React__default.Children.forEach(children, function (child) {\n ret.push(child);\n });\n return ret;\n }", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,function(child){return child;}...
[ "0.775594", "0.7520282", "0.74348474", "0.7408082", "0.7408082", "0.7408082", "0.7408082", "0.7408082", "0.7408082", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own /eslintdisable noselfcompare
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject$1(obj) {\n ...
[ "0.6731362", "0.6633782", "0.6609513", "0.6599949", "0.6599775", "0.6565226", "0.6506394", "0.64681304", "0.6463561", "0.641157", "0.6370518", "0.63660806", "0.63660806", "0.63660806", "0.63660806", "0.6357975", "0.6327474", "0.6323051", "0.63226765", "0.6296809", "0.6296809"...
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\...
[ "0.6908362", "0.6774889", "0.6606997", "0.65384954", "0.64926404", "0.6489072", "0.6489072", "0.6449892", "0.6449892", "0.6428727", "0.64280385", "0.6402795", "0.6402795", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.63939744", "0.639...
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for type...
[ "0.6876233", "0.6852812", "0.6852812", "0.6852812", "0.6852812", "0.6851453", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0.68460804", "0...
0.0
-1
Returns a string that is postfixed to a warning about an invalid type. For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case \"array\":\n case \"object\":\n return \"an \" + type;\n case \"boolean\":\n ...
[ "0.65988296", "0.6565237", "0.6559532", "0.6559532", "0.6559532", "0.6559532", "0.6522337", "0.65215486", "0.65060395", "0.65060395", "0.65060395", "0.65060395", "0.65060395", "0.65013695", "0.6489755", "0.6453345", "0.6453345", "0.6453345", "0.6453345", "0.6453345", "0.64533...
0.6477735
51
Returns class name of the object, if any.
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(obj) {\n var funcNameRegex = /function\\s+(.+?)\\s*\\(/;\n var results = funcNameRegex.exec(obj['constructor'].toString());\n return (results && results.length > 1) ? results[1] : '';\n }", "getClassName() {\n return this.constructor\n .className;\n...
[ "0.7730571", "0.74697196", "0.74697196", "0.74258965", "0.7164231", "0.71448183", "0.7083163", "0.7080694", "0.6995368", "0.6971116", "0.6901662", "0.6883398", "0.67147285", "0.66557264", "0.6639163", "0.6611592", "0.6611592", "0.6611592", "0.6611592", "0.6600893", "0.6599787...
0.0
-1
Helper function to allow the creation of anonymous functions which do not have .name set to the name of the variable being assigned to.
function identity(fn) { return fn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function funcName(func) {\n return func.name || \"{anonymous}\"\n }", "function creaClosure(name) {\n return function () {\n console.log(name);\n }\n}", "function nom(fun) {\n var src = fun.toString();\n src = src.substr('function '.length);\n var n = src.substr(0, src.indexOf('...
[ "0.62308073", "0.61240923", "0.6085263", "0.6070107", "0.5988301", "0.58374244", "0.57285535", "0.570585", "0.5691739", "0.5691739", "0.5691739", "0.5691739", "0.5691739", "0.5691739", "0.56854874", "0.56675273", "0.56586903", "0.56509346", "0.5611548", "0.55932945", "0.55871...
0.0
-1
Mixin helper which handles policy validation and reserved specification keys when building React classes.
function mixSpecIntoComponent(Constructor, spec) { if (!spec) { if (false) { var typeofSpec = typeof spec; var isMixinValid = typeofSpec === 'object' && spec !== null; if (process.env.NODE_ENV !== 'production') { warning( isMixinValid, "%s: Yo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_validate() {\n throw new Error('_validate not implemented in child class');\n }", "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}", "function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props...
[ "0.53252375", "0.5078387", "0.5078387", "0.5058763", "0.5030095", "0.5030095", "0.50016403", "0.50016403", "0.50016403", "0.50016403", "0.50016403", "0.50016403", "0.50016403", "0.50016403", "0.50016403", "0.50016403", "0.50016403", "0.49984896", "0.49584594", "0.49584594", "...
0.0
-1
Subclass the `QueueRunner` and override the `clearStack` method.
function alwaysClearStack(fn) { _global[SET_TIMEOUT](fn, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n if (this.currentRun) {\n throw new Error(\"Can't reset if a test run is already in progress!\");\n }\n this.resetRunResults();\n this.testRunCancelled = false;\n this.testQueueStack = [];\n for (const type of QueueStackTypes) {\n this.queu...
[ "0.71621287", "0.6890467", "0.68585825", "0.68585825", "0.6853782", "0.68400186", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678", "0.6837678",...
0.0
-1
Function to calculate the result
function calculate(operation) { let result; try { result = eval(operation); } catch (error) {} if ( result === 0 || isFinite(result) && Boolean(result) ) { document.getElementById('display').value = result; } else { document.getElementById('display').value = 'Invalid operation'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculate(){}", "getResult() {\n var nominator = 0;\n var denominator = 0;\n\n const criteriaList = [\n this.criteriaCloud,\n this.criteriaWind,\n this.criteriaHumidity,\n this.criteriaVisibility\n ]\n\n criteriaList.forEach((criteria) => {\n nominator += criteria...
[ "0.75682783", "0.70880693", "0.69667846", "0.68858075", "0.6875431", "0.6870657", "0.68455607", "0.6706247", "0.67027676", "0.6669172", "0.6668916", "0.66140926", "0.6609723", "0.65946215", "0.65803987", "0.6575721", "0.6568346", "0.65628546", "0.6548188", "0.6541238", "0.653...
0.0
-1
need math floor to choose a word
function promptUser() { return inquirer.prompt([ { type: "input", name: "letter", message: "Enter your letter" } ]) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wording(value, words) {\n if (value == 0) {\n return words[0];\n }\n else if (value === 1 || (value % 100 !== 11 && value % 10 === 1)) {\n return `${value} ${words[1]}`;\n }\n else if ((function() {\n const remMain = value % 100;\n const remSub = remMain % 10;\n return remSub > 1 && re...
[ "0.634331", "0.6258757", "0.6144619", "0.61404777", "0.6127872", "0.6112767", "0.6061261", "0.5957174", "0.5938487", "0.59039617", "0.5894831", "0.5894182", "0.58533925", "0.5845077", "0.58393294", "0.5826281", "0.58101493", "0.58083755", "0.5793094", "0.5784718", "0.5784659"...
0.0
-1
menangani perubahan nilai input form
function handleChange(e) { var key = e.target.name; var value = e.target.value; setValues(function (values) { return _objectSpread(_objectSpread({}, values), {}, _defineProperty({}, key, value)); }); } //menangani submit form
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function angkaValid2(input,info,poin){\n\t\tvar n = $('#'+input).val();\n\n\t\tif($('#'+input).val()!=$('#'+input).val().replace(/[^0-9.]/g,'')){\n\t\t\t$('#'+input).val($('#'+input).val().replace(/[^0-9.]/g,''));\n\n\t\t\t$('#'+info).html('<span class=\"label label-important\"> hanya angka</span>').fadeIn();\n\t\...
[ "0.672875", "0.6710726", "0.6681885", "0.6681636", "0.6668338", "0.6631896", "0.6605768", "0.65656817", "0.64798117", "0.6457424", "0.6442639", "0.6408851", "0.63405246", "0.6283514", "0.6272261", "0.6258091", "0.6234745", "0.62178296", "0.62178296", "0.6178413", "0.6160771",...
0.0
-1
The function returns the recall value for a given curve
function getRecall(offset, strength, day) { let recall = Math.exp(-(day - offset)/strength); //recall = Math.round(recall*100); recall = recall*100; return recall > 100 ? NaN : recall; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get animationCurveValue() {}", "function curve(grade) {\n return grade + 5;\n}", "get curve_cnt(){ return this._curve_cnt; }", "function curve(grade){\n\treturn grade += 5;\n}", "rate(T){\n return -Math.log(this.df(T))/T;\n }", "function sampleCurveX(t) {return ((ax*t+bx)*t+cx)*t;}", "function s...
[ "0.59741193", "0.5847115", "0.57988274", "0.5701864", "0.56620604", "0.5449672", "0.5449672", "0.5393254", "0.53896284", "0.53631747", "0.53449833", "0.53326404", "0.5332623", "0.52323216", "0.51966184", "0.5188521", "0.5178353", "0.5162964", "0.5158653", "0.5155981", "0.5146...
0.5712665
3
'31', '32', '33', '34', '35'];
function getRecallData(offset, strength, total_days){ let rData = []; for(let i = 0; i < total_days; i++){ rData.push(getRecall(offset,strength,i)); } return rData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function digits(e){return Array.from(e.toString&&e.toString())}", "function digitize(val) {\n return Array.from('' + val, Number);\n}", "_getValidRedoublesValues() {\n let values = [\"unlimited\", \"none\"];\n for (let i = 1; i < 100; i++) { values.push(i.toString()); }\n return values;\n }", "fun...
[ "0.6268634", "0.6256652", "0.60906047", "0.5957915", "0.59497315", "0.589104", "0.58023274", "0.57942176", "0.5717114", "0.5620332", "0.5602161", "0.56000906", "0.55773014", "0.55412793", "0.55333436", "0.5522158", "0.5517028", "0.5508768", "0.55039036", "0.5482381", "0.54735...
0.0
-1
tamanhos randomicos para a mosca
function tamanhoAleatorio() { var tamanho = Math.floor(Math.random() * 3) switch (tamanho) { case 0: return 'mosca1' case 1: return 'mosca2' case 2: return 'mosca3' } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "popuniIzvjestaj() {\n this.donja = Util.getRandomIntIn(50, 100);\n this.gornja = Util.getRandomIntIn(70, 140);\n this.puls = Util.getRandomIntIn(50, 160);\n }", "generarSecuencia(){\n this.secuencia = new Array(10).fill(0).map(m => Math.floor(Math.random() * 4))\n }", "generaSecuenc...
[ "0.73459023", "0.71316314", "0.7013278", "0.6959277", "0.6938373", "0.6836925", "0.6813821", "0.67965", "0.677662", "0.6753187", "0.672196", "0.6688596", "0.66839266", "0.6669664", "0.6661971", "0.6659166", "0.6640277", "0.6625574", "0.6621274", "0.6605048", "0.658389", "0....
0.6746484
10
By scott faris && Jordan Dominguez November 30, 2017 Car Object Challenge Story 1 Creating car Object
function createCar(newCarMake, newCarYear, newCarColor) { return { make: newCarMake, year: newCarYear, color: newCarColor, carInfo : function () { return this.color+" "+this.year+" "+this.make } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MakeCarObjects(brand, model, year) {\n this.brand = brand;\n this.model = model;\n this.year = year;\n this.move = 0;\n\n this.moveCar = function () {\n this.move += 10;\n };\n}", "function Car(obj){\n this.model = obj.model;\n this.year = obj.year;\n}", "function Car(make,year,model) {...
[ "0.76391447", "0.7634383", "0.75005156", "0.74811554", "0.7411349", "0.7407077", "0.74002546", "0.73846513", "0.73737204", "0.7364677", "0.73582995", "0.73582995", "0.73582995", "0.7311916", "0.728743", "0.7279753", "0.72354305", "0.7233953", "0.72298956", "0.72216666", "0.71...
0.70342565
37
Story 2 adding speed and accelerate/deccelerate functionality
function createCar(newCarMake, newCarYear, newCarColor) { let speed = 0; return { // car looks make: newCarMake, year: newCarYear, color: newCarColor, carInfo: function () { return this.color+" "+this.year+" "+this.make }, // driving & stuff getSpeed: function () { return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "accelerate(){\n this.speed += 10;\n }", "function accelerate(){this.velInfluence = accelerator;}", "get speed() {\n return this.getFeature('speed');\n }", "accelerate(amount) {\n // It's virtually impossible for this data to be\n // accidentally accessed.\n this.#speed += a...
[ "0.71523046", "0.70429516", "0.67960936", "0.67164356", "0.67025983", "0.66100985", "0.66100985", "0.65877783", "0.64676225", "0.642535", "0.64034206", "0.6344566", "0.63411385", "0.62964743", "0.62880546", "0.62796116", "0.6251256", "0.6241573", "0.62335294", "0.6232144", "0...
0.0
-1
Story 3 w/ While Loops
function createCar(newCarMake, newCarYear, newCarColor) { let speed = 0; return { // car looks make: newCarMake, year: newCarYear, color: newCarColor, carInfo: function () {return this.color+" "+this.year+" "+this.make}, // driving functionality getSpeed: function () {return speed}, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function whileDemo([n]) {\r\n let health = 100;\r\n while (health > 0) { // its not depend on counter\r\n \r\n // walk\r\n // take damage\r\n // headshot\r\n }\r\n}", "function _exec_while_stmt(ast, context) {\n if (ast.type == \"WHILE_STMT\" && ast.sons.length == 2...
[ "0.62830293", "0.6090815", "0.59971315", "0.5952725", "0.59206176", "0.5898431", "0.58646894", "0.58516854", "0.5831932", "0.5818743", "0.58038545", "0.5762867", "0.5755563", "0.5748012", "0.57449234", "0.57412386", "0.57123834", "0.5674757", "0.5660827", "0.5630702", "0.5628...
0.0
-1
loops to speed up and slow down car to limits (speed limit and 0)
function speedUp(object) { while (object.getSpeed() < 100) { object.accelerate(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSpeed(speed){\r\n if(speed==0&&control==1)\r\n {\r\n clear();\r\n Interval(10);\r\n }\r\n if(speed==1&&control==1)\r\n {\r\n clear();\r\n Interval(5);\r\n }\r\n if(speed==2&&control==1)\r\n {\r\n clear();\r\n Interval(1);\r\n }\r\n}", "function speedBoostTime(){\r\n if(s...
[ "0.6686819", "0.66680396", "0.6438547", "0.64004785", "0.6368292", "0.6312384", "0.6267305", "0.6221035", "0.619694", "0.61900645", "0.6186409", "0.61765975", "0.6144531", "0.61434704", "0.6133898", "0.6132353", "0.6060256", "0.6051092", "0.60400784", "0.6025271", "0.60188377...
0.65637165
2
Only change code below this line delete myDog.tails; 88 Using Objects for Lookups Setup
function phoneticLookup(val) { var result = ""; // Only change code below this line var lookup = { "alpha":"Adams", "bravo": "Boston", "charlie":"Chicago", "delta": "Denver", "echo":"Easy", "foxtrot":"Frank" } result = lookup[val]; // Only change code above this line return r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findDog() {\n\tfor (i = 0; i < animals.length; i++){\n\t\tif (animals[i].species == \"cat\"){\n\t\t\tcats.push(animals[i])\n\t\t}\n\t}\n}", "function Dog () {\n this.legs = 4;\n this.bark = function() {\n return 'arf arf;;\n }\n }", "function Dog ...
[ "0.58489144", "0.5702984", "0.5652825", "0.5585457", "0.5525068", "0.5456387", "0.5456387", "0.5454927", "0.5420739", "0.53829926", "0.53822863", "0.5375473", "0.53418684", "0.53399044", "0.53334105", "0.53274155", "0.5322333", "0.53177613", "0.5315475", "0.5301233", "0.52655...
0.0
-1
89 Testing Objects for Properties
function checkObj(obj, checkProp) { // Only change code below this line if(obj.hasOwnProperty(checkProp)) { return obj[checkProp]; } else { return "Not Found"; } // Only change code above this line }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PropertyDetection() {}", "function createMultiplePropertyTest(testFunc) {\r\n return function(o, props) {\r\n var i = props.length;\r\n while (i--) {\r\n if (!testFunc(o, props[i])) {\r\n return false;\r\n }\r\n }\r...
[ "0.7274153", "0.64014745", "0.64014745", "0.6389857", "0.637829", "0.6347525", "0.6336841", "0.631911", "0.631911", "0.631911", "0.631911", "0.631911", "0.631911", "0.631911", "0.631911", "0.631911", "0.631911", "0.6302063", "0.6188996", "0.618841", "0.617338", "0.6077823",...
0.0
-1
TODO Create methods for constructor, and rendering the quote to the page (be sure to review the HTML as an element already was put there for you)
function _draw() { let quote = store.State.quote document.getElementById("quote-text").innerText = quote.quote document.getElementById("quote-author").innerText = quote.author document.getElementById("quote-link").href = quote.url }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderQuote() {\r\n quoteContainer.innerHTML = quote.quote;\r\n }", "function renderQuote(quote){\n return `<li class='quote-card'>\n <blockquote class=\"blockquote\">\n <p class=\"mb-0\">${quote.quote}</p>\n <footer class=\"blockquote-footer\">${quote.a...
[ "0.8062015", "0.7587749", "0.7525533", "0.7481232", "0.74568576", "0.74437684", "0.7441821", "0.7440734", "0.74105984", "0.7388238", "0.7372597", "0.73716795", "0.73708177", "0.73579174", "0.7352523", "0.7347678", "0.7341695", "0.7335805", "0.7315152", "0.73138785", "0.731339...
0.71552247
40
Macro class Macro .ctor
function Macro(name, value) { this.name = name; this.value = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _ctor() {\n\t}", "constructur() {}", "function Ctor() {}", "function macro(x) {\n x.isMacro = true;\n return x;\n}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function createInstance (args)\r\n{\r\n\t__init (args); // init package identifier\r\...
[ "0.665072", "0.657184", "0.6368934", "0.62765735", "0.62733", "0.62733", "0.62733", "0.61983335", "0.61379063", "0.61318636", "0.6087769", "0.6077016", "0.5972979", "0.58644295", "0.58644295", "0.58644295", "0.5846687", "0.5846687", "0.5846687", "0.5846687", "0.5846687", "0...
0.68683326
0