query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
f4d58c2bd19c3cef41cf68cebb0694e3
when the loading is complete, this function will be called
[ { "docid": "ea96423068231ff11a5813a840e279ed", "score": "0.0", "text": "function complete(){\n\t\t\t\n\t\t\t// set up event handlers\n\t\t\twindow.onblur = function(){\n\t\t\t\tapp.paused = true;\n\t\t\t\tcancelAnimationFrame(app.animationID);\n\t\t\t\tapp.keydown = []; // clear key daemon\n\t\t\t\t// c...
[ { "docid": "23b6e3bddc0ee59e3b967851fd977db5", "score": "0.8123926", "text": "function finishedLoad() {\n console.log('finishedLoad()');\n if (externalIsLoaded()) {\n init();\n }\n }", "title": "" }, { "docid": "7889973fb99c4ec2f30ca81c2fc7e989", "score": "0.78656983", ...
f093ea84a1d0d4d098d7708d837a711f
Quick object check this is primarily used to tell Objects from primitive values when we know the value is a JSONcompliant type.
[ { "docid": "1bdd74e0a3c4358617464fac9f9dacc0", "score": "0.0", "text": "function isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}", "title": "" } ]
[ { "docid": "9d2ae619048b48b8f15900d1dda7b114", "score": "0.7022066", "text": "type(value) {\n if (typeof(value) == 'object') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "70b256160ff016f449f8c83792f7a830", "score": "0.6974483", ...
5e62ca075e48882d8917d710b47db237
preload() Load our two images into their variables for later
[ { "docid": "ae0f0fd44e85424f6a4d7c168ed30a5d", "score": "0.7521753", "text": "function preload() {\n userImage = loadImage(`assets/images/user.png`);\n evilTwinImage = loadImage(`assets/images/evil-twin.png`);\n}", "title": "" } ]
[ { "docid": "ab32c7f28deb9f8e2dc7284ea07902e1", "score": "0.83288765", "text": "function preload(){\n\n dogimg1 = loadImage(\"images/dogImg.png\");\n dogimg2 = loadImage(\"images/dogImg1.png\");\n\n}", "title": "" }, { "docid": "497c540a7771a990878320ffaf2fe392", "score": "0.8001546", ...
5ba0241372260708c666297f96f7007b
Calculates the focal length from the current .fov and .filmGauge.
[ { "docid": "83bc4b0457794d794013df2e0efa005b", "score": "0.8157715", "text": "getFocalLength() {\n\n\t\tconst vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov );\n\n\t\treturn 0.5 * this.getFilmHeight() / vExtentSlope;\n\n\t}", "title": "" } ]
[ { "docid": "09d93c2bf4b06bd0b5e42da8e0798788", "score": "0.71487635", "text": "setFocalLength( focalLength ) {\n\n\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\tconst vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\n\t\tthis.fov = RAD2DEG * 2 * M...
8aadbd4f8e80142bb163b121a84047b8
Looks for data input by user in tables and outputs data to result screen
[ { "docid": "710805214cfdf87b1ea615d9fc2311e5", "score": "0.0", "text": "function extract() {\nvar resultarray = Array();\nvar cellarray = new Array();\nvar founditems = '';\nvar found = 0;\nvar weblink = '';\nvar webbase = '';\n\nswitch (search) {\n\tcase \"snomed\":\n\t\tfounditems = searchMarkedUpCod...
[ { "docid": "6430763b1f2a32a038063c65834d055d", "score": "0.6687048", "text": "function viewData() {\n // Ask which table the user wants to see\n inquirer.prompt({\n name: \"table\",\n type: \"list\",\n message: \"Which data would you like to see?\",\n choices: [\"Depart...
e90ebea714755ab2189127e25f1064c3
validates all fields under the NFPA, HMIS, pH, Physical State, Density, Flashpoint, Boiling Point, Solids, Specific Gravity, Vapor Pressure, VOC, and VOC Less Water and Exempt sections
[ { "docid": "65afa248c2cdff3fcffb9675a116b1ff", "score": "0.6102341", "text": "function validateSections(msdsNotRequired, idOnly, requireFields, isCo) {\n\t\tvar message = \"\";\n\n\t\t// Validate Material Description\n\t\tif ( ! isCo) {\n\t\t\tmessage = validateMaterialDesc(message, requireFields);\n\t\...
[ { "docid": "f2c2d55757fe5541e94ada92209392ab", "score": "0.6889119", "text": "function validateFields() {\n const requiredFields = ['passenger_name', 'pnr_number', 'flight_info', 'logo_image_url', 'above_bar_code_image_url'];\n requiredFields.forEach(field => {\n if(!this.details[field]) throw new ...
35134fec9c9b09ec6c138f22cc250955
Applies a document modification to the document tree and the document map. Returns the DocumentChange event for successful modifications.
[ { "docid": "8e6afb872f85ce85ce9a42a8c296c7da", "score": "0.6392937", "text": "modifyDoc(newDocument) {\n const name = newDocument.ref.path;\n assert(this.docMap.has(name), 'Document to modify does not exist');\n const oldDocument = this.docMap.get(name);\n if (!oldDocument.up...
[ { "docid": "d2f111282cd04f501e707ca0e1672238", "score": "0.5830285", "text": "apply(doc) {\n if (this.length != doc.length)\n throw new RangeError(\"Applying change set to a document with the wrong length\");\n iterChanges(this, (fromA, toA, fromB, _toB, text) => doc...
398e3d2573a9b2c5d822d49339763cd7
Crea una card per i film / serie tv
[ { "docid": "b8aad86df5446ef979c8ae695e11a567", "score": "0.6148617", "text": "function getMovieCard(imgURL, title) {\n const cardWrap = document.createElement(\"div\");\n const coverImg = document.createElement(\"img\");\n\n const textWrap = document.createElement(\"div\");\n const text = document.c...
[ { "docid": "deef7149adeb9ed908b4c0717583b3bd", "score": "0.7281212", "text": "function createMovieDisplayCard(result) {\n let card = document.createElement(\"div\");\n card.setAttribute(\"class\", \"card\");\n card.setAttribute(\"style\", \"width:18rem\");\n\n let img = document.createElement(\"img\...
a7c64d18c6c6a694729ce9f299a2895e
GET request that takes in a username and a category to sort by and returns all appplications by the given user sorted by the given sort
[ { "docid": "f209e43a101cf7d9da509cbe1ff218a6", "score": "0.6226998", "text": "function getApplicationData(_username, _sort) {\n $('.application-error').text('');\n $('.event-error').text('');\n const params = {\n method: 'GET',\n url: `${applicationsUrl}/${_username}/${_sort}`,\n ...
[ { "docid": "bbcbe8440a1eb286340a79e5ddc5744c", "score": "0.61071885", "text": "async function getapi(url, searchText) {\r\n \r\n // Storing response\r\n const response = await fetch(url);\r\n \r\n // Storing users data in form of JSON\r\n let users = await response.json();\r\n if (response) {\r...
7c2dc90e04e628ddc0728c7618aaa5f2
Return a moment from input, that is local/utc/zone equivalent to model.
[ { "docid": "fee20e251083bbf8958a86a719542de3", "score": "0.0", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();...
[ { "docid": "0a15e8039907ad7ad4fa2d3991ea1a96", "score": "0.8500792", "text": "function makeAs(input, model) {\n\t return model._isUTC ? moment(input).zone(model._offset || 0) :\n\t moment(input).local();\n\t }", "title": "" }, { "docid": "0a15e8039907ad7ad4fa2d3991ea1a96...
4e509e5fdb7a34ee242654eb34b354c8
get description for school from text table
[ { "docid": "1378d12734450cca694ed09bf2579e19", "score": "0.0", "text": "getSchoolDesc({}, lang) {\n if (lang === undefined) {\n lang = \"PL\"\n }\n return axios({\n method: 'GET',\n url: `SchoolDesc?$filter=Language eq '${lang}'`,\n headers: {\n \"Content-type\": \"ap...
[ { "docid": "46b6a186f901be1a2d9d4964a32737a5", "score": "0.57870185", "text": "getDescriptionFromPage(page) {\r\n\t\tlet descriptionLabelIndex = page.indexOf(\"<td class=\\\"vndesc\\\"\");\r\n\t\tif(descriptionLabelIndex > -1) {\r\n\t\t\tlet elementWithDesc = page.substring(descriptionLabelIndex, page.l...
364a00209e35f7c547cf0817cdfe2d63
Set the default headers and user properties.
[ { "docid": "21b23e602727831f0045a8a12a98472b", "score": "0.0", "text": "function processAuth() {\n\n // let the authProvider access the access token\n authToken = localStorage.token;\n\n if (localStorage.getItem('user') === null) {\n\n // Get the profile of the current user...
[ { "docid": "75cd064b13c3f2c0ebb144fb1bd535a1", "score": "0.710441", "text": "setHeaders() { }", "title": "" }, { "docid": "374977aa9ec617b0f75904fe47a5ef9c", "score": "0.6937154", "text": "setupHeaders() {\n //This here sets the Authorization: Bearer header and other constant head...
b37b6523d7b5e8d294aae00aa4a147c2
Will trigger the submit button. Line 41: will create an object containing the values that will be used on the fetch. Line 47: Will create options that goes along with the fetch function line 55: Will post everything to the API, adding whatever we wrote on the form to be sent to the API, along to adding to the List alre...
[ { "docid": "194f17d87dcb717f86e7006189a70093", "score": "0.0", "text": "function renderPosts() {\n let html = '';\n for (let posts of postsArrays) {\n html += `<h3>${posts.title} </h3> \n <p>${posts.body}</p>\n <hr />`\n }\n div.innerHTML = html;\n}", ...
[ { "docid": "67f362125686d943eca2509cc51da127", "score": "0.6914547", "text": "function submitNewList() {\n //Grabbing the values entered into the form and setting them to the listData const\n const listData = {\n title: $(\"#listName\").val(),\n cardColor: $(\".colorSquare.selected\").css('backg...
61a9039007c15944adf134be6f1092a3
in Webpack 2, require.ensure now also returns a Promise so the resolve/reject functions may get called an extra time if the user uses an arrow function shorthand that happens to return that Promise.
[ { "docid": "114e0b229586cf0cba301f44502c0abb", "score": "0.0", "text": "function once (fn) {\n var called = false;\n return function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (called) { return }\n called = true;\n return fn.ap...
[ { "docid": "a022f55d40359a2c579b0d8f916c2b12", "score": "0.6026434", "text": "function lazyRequire(path) {\n let tmp = null;\n return ()=> {\n if (!tmp) tmp = require(path);\n return tmp;\n }\n}", "title": "" }, { "docid": "9fb2071e4b3f0691e1d906ee26478b02", "score...
5868170224290226c06131bed1e6aae3
Could use `inherits` module, but don't want to move from single file architecture yet.
[ { "docid": "51efbceff58743480cfab8501e4088c9", "score": "0.0", "text": "function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n ...
[ { "docid": "cf62f45df6557a48b5658524bd55a60f", "score": "0.73977566", "text": "function inherit(){}", "title": "" }, { "docid": "7819f50830d8d479119065334d775c1f", "score": "0.7323217", "text": "function inherit() {}", "title": "" }, { "docid": "2f83124dd1e6ffd476e099b77d...
ff5d00f9e13f21298c63b0ed3295c22c
show order details when 'Dettagli' is clicked
[ { "docid": "86d4c8e7f28a2cdc918eaa42e0e74b77", "score": "0.0", "text": "function showDettagli(id_comanda) {\r\n\r\n // read one record based on given ID\r\n $.getJSON(\"http://localhost/projects/programmazione_web/api/comanda/read_dettagli.php?id_comanda=\" + id_comanda, function (data) {\r\n\r\n ...
[ { "docid": "a15ff861396bef015f8b9f64689252eb", "score": "0.78346694", "text": "function showDetails(e) {\n var singleOrderInfo = e.currentTarget,\n singleId = singleOrderInfo.getAttribute(\"data-id\"),\n orderInfo = orderUtils.getItem(singleId, \"\"),\n orderHolde...
c4151d9497c421d96aa87eaf68a6aedd
Private functions. Execute named callbacks defined in the global (window) scope.
[ { "docid": "59a0e753b2d6c21f5012d76e9178762f", "score": "0.6058824", "text": "function execCallback(callbackName, arg) {\n // Callback functions are defined in the global scope. Check for\n // the existence of the named callback function on the window object.\n if (!callbackName in ...
[ { "docid": "35ed951e384356f4bd3f0bf4d6af4fcf", "score": "0.6584059", "text": "setupCallbacks() {\n var key, fn;\n var callbacks = {\n 'initialize': 'onInitialize',\n 'change': 'onChange',\n 'item_add': 'onItemAdd',\n 'item_remove': 'onItemRemove',\n 'clear': 'onClear',\n ...
edbe2f547cae3bfc1a25539ff85f7125
clears the title screen and allows gameplay to start
[ { "docid": "8dbdc1637599c2a3c37249d5287b4a2e", "score": "0.622221", "text": "function clearTitle(){\n\t\t$(\"#messages\").empty();\n\t\t$(\"#messages\").unbind(\"click\");\n\t}", "title": "" } ]
[ { "docid": "68588273b405014fa143aca1a4b8d19c", "score": "0.77751213", "text": "function reset(){\n\tchangeView(title_screen);\n\tload_game();\n}", "title": "" }, { "docid": "d56ae0f71321267e8063dd0c7c6bd4c2", "score": "0.76651216", "text": "function destroyTitleScreen() {\n titleS...
aa19bd054fe7eb9ca57aca2de4c83649
Used to grok the `now` parameter to createClock.
[ { "docid": "58bbf2140c074cdd19e8830f07cf9478", "score": "0.0", "text": "function getEpoch(epoch) {\n if (!epoch) { return 0; }\n if (typeof epoch.getTime === \"function\") { return epoch.getTime(); }\n if (typeof epoch === \"number\") { return epoch; }\n throw new TypeError(\...
[ { "docid": "15988e3aa7b211915826dfe9fadb396d", "score": "0.67242754", "text": "function calGetClockTime(now)\r\n{\r\n var hour = now.getHours();\r\n var minute = now.getMinutes();\r\n var second = now.getSeconds();\r\n var ap = \"AM\";\r\n if (hour > 11) { ap = \"PM\"; }\r\n ...
a4e71aca9b9f922e237c201fe96f2b96
Function for loading the tweets from the database
[ { "docid": "4e7d45086676fccb1ba6a97a453875f1", "score": "0.7385869", "text": "function loadTweets() {\n $.ajax({\n url: '/tweets',\n method: 'GET',\n dataType: 'json'\n })\n .then(function(data){\n renderTweets(data);\n });\n }", "title": "" } ]
[ { "docid": "a5989bcdd00034011c5a99283b95d54b", "score": "0.7729922", "text": "function loadTweets() {\n $.get('/tweets', data => {\n const newData = data.filter(tweet => tweet.created_at > lastFetched);\n lastFetched = Date.now();\n renderTweets(newData);\n });\n }", "title": "...
5c204863cfa76ebcbbb91c3e508adf43
Challenge: "Check for Palindromes" Return true if the given string is a palindrome. Otherwise, return false. palindrome("eye") should return a boolean. palindrome("eye") should return true. palindrome("not a palindrome") should return false.
[ { "docid": "a7e9f8215990e1ffe9dae972538515eb", "score": "0.0", "text": "function prepare(str) {\n\n\treturn str.replace(/[:|(|)|_| |,|.|\\/|\\\\|-]/g , \"\")\n\t\t\t .toLowerCase();\n}", "title": "" } ]
[ { "docid": "03668399daf94565715e7552768cc2c6", "score": "0.8470516", "text": "function palindrome(str) {\n return true;\n}", "title": "" }, { "docid": "eed59f71d04fcca65809a0b5d0ecf2f9", "score": "0.8434018", "text": "function palindrome(str) {\n // Good luck!\n return true;\n}", ...
69c5125725e8526df4b1848055c0ddbb
add event listener to open and close menu, load menu items
[ { "docid": "fefe314597167828e6d7ff265ad4ca0e", "score": "0.64168257", "text": "function openCloseMenu() {\n try {\n var menuButtons = document.getElementsByClassName('menu-buttons')[0].children;\n for (var i = 0; i < menuButtons.length; i++) {\n menuButtons[i]...
[ { "docid": "2bbf03fa379fec14ed99b0337b380d43", "score": "0.7524571", "text": "function onOpen() {\n createMenu()\n}", "title": "" }, { "docid": "7ceb936f198dd2eaff58b834b186f1a4", "score": "0.7498548", "text": "function onOpen() {\n createMenu();\n}", "title": "" }, { "...
4c80fa234f27797c5e5a609e4080336b
Encodes given object into urlfriendly format
[ { "docid": "96107068b3b117dc487fbe24914e388f", "score": "0.7066093", "text": "function urlEncode(object) {\n\t return Object.keys(object)\n\t .map(\n\t // tslint:disable-next-line:no-unsafe-any\n\t function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]);...
[ { "docid": "ff00a1618606650ee2564255a045735c", "score": "0.7079577", "text": "urlEscapeObject(object) {\n object = object || {};\n\n //Get our objects keys\n let keys = Object.keys(object);\n\n //Create an array containing a list of encoded strings\n let bufferArray = [];\n\n keys.forE...
01369b377edb45f919a13a49315d2ed0
PROBLEM 44 ////// / Convert input N to binary
[ { "docid": "a8ce50a650fcba93b59fa5873ffacf40", "score": "0.680214", "text": "function toBin(num){\n if(num < 1){\n return \"not valid\";\n }\n let binNum = [];\n let div = num;\n while(div >= 1){\n binNum.unshift(div%2);\n div = Math.floor(div/2);\n }\n return binNum;\n}", "tit...
[ { "docid": "e31d040b88e003274565e09873a9b249", "score": "0.7950438", "text": "function toBinary(n){\n return +n.toString(2);\n}", "title": "" }, { "docid": "f18e3e51b9e883b28bb121d16544146d", "score": "0.79210794", "text": "function toBinary(number){\n \n\n}", "title": "" ...
783fd5752dd2d8b7a46d0603d140cc64
when verb is "send", arg is a value when verb is "throw", arg is an exception
[ { "docid": "d426818005a702afd800a6b649b14b01", "score": "0.0", "text": "function continuer(verb, arg) {\n var result;\n\n // Until V8 3.19 / Chromium 29 is released, SpiderMonkey is the only\n // engine that has a deployed base of browsers that support generators.\n ...
[ { "docid": "ebd804bc38a56405c6f541712089865a", "score": "0.6089511", "text": "function e(t,n,r){try{return{type:\"normal\",arg:t.call(n,r)}}catch(t){return{type:\"throw\",arg:t}}}", "title": "" }, { "docid": "52b3644d3c925e5fa4a31c1b0f35370c", "score": "0.58336383", "text": "function...
2a8d30714067ffc559d6463487a55d4a
Get back the cart header //
[ { "docid": "bdbde6a5b95b7002750507671c0c18e9", "score": "0.5431202", "text": "function cartHeader(callback) {\n jQuery.ajax({\n type: \"GET\",\n url: \"https://netlink.laurajanelle.com:444/nlhtml/custom/netlink.php?\",\n data: {\n request_id: \"APICARTH\",\n session_no: session_no\n ...
[ { "docid": "2dd3945c8618fab9dd96263a5eaa42f6", "score": "0.79553986", "text": "get cartHeader() { return $('#contents_wrapper > div.subheader');}", "title": "" }, { "docid": "20d447d921d6a29dcd93ce315576d9b9", "score": "0.73699707", "text": "getEmptyCartHeader() {\n this.cartL...
416b1f16338afd0ff06f427f2f5c7b2f
Copyright (c) 2018 mol contributors, licensed under MIT, See LICENSE file for more info.
[ { "docid": "682edaaa5c96088114346f770c1c5195", "score": "0.0", "text": "function normalize(value, min, max) {\n return (value - min) / (max - min);\n}", "title": "" } ]
[ { "docid": "e3e2bb4d0241a12cbb016aa67b1e7dca", "score": "0.5354008", "text": "function Composition() {}", "title": "" }, { "docid": "688a1c1cd5957ae81a03e76a3e4e53da", "score": "0.52335167", "text": "static extraProps() {}", "title": "" }, { "docid": "ad91cf774842c7f01d01...
6af6d220383a33c955b3f903dfebde6e
=========================================================================== For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. (It will be regenerated if this run of deflate switches away from Huffman.)
[ { "docid": "a08189fb75fc5f8926b970c0a2ffb73c", "score": "0.0", "text": "function deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n ...
[ { "docid": "f104070965e8adc0fb83ca6b1a32878b", "score": "0.6870208", "text": "function deflate_fast(flush) {\n// short hash_head = 0; // head of the hash chain\nvar hash_head = 0; // head of the hash chain\nvar bflush; // set if current block must be flushed\nwhile (true) {\n// Make sure that we always ...
d7a7b4056936bb21a8a97ae07c264dbf
Used for un/redoing changes from the history. Combines the result of computing the existing spans with the set of spans that existed in the history (so that deleting around a span and then undoing brings back the span).
[ { "docid": "f9282045dd16fca6a611ea8a41eb3489", "score": "0.0", "text": "function mergeOldSpans(doc, change) {\n\t\t\t\tvar old = getOldSpans(doc, change);\n\t\t\t\tvar stretched = stretchSpansOverChange(doc, change);\n\t\t\t\tif (!old) { return stretched }\n\t\t\t\tif (!stretched) { return old }\n\n\t\t...
[ { "docid": "b5e849ef626c332ed85f2568bc3d5cf7", "score": "0.62928325", "text": "function removeClearedSpans(spans){if(!spans){return null;}var out;for(var i=0;i<spans.length;++i){if(spans[i].marker.explicitlyCleared){if(!out){out=spans.slice(0,i);}}else if(out){out.push(spans[i]);}}return!out?spans:out.l...
93f758f36b3792800b2edf0ff136dadb
Defines variables and functions within solr scope
[ { "docid": "3d474cc16b9cc5340f995eac9c9adaa7", "score": "0.0", "text": "function link(scope) {\n scope.$on('updatedMySubsetArray', function (event, args) {\n scope.mySubsetIDs = args;\n getSubsetArray();\n });\n\n /**\n * @private\n * @description Retrieves My Su...
[ { "docid": "6027eda1da7d386d51ae64d5055a2b65", "score": "0.61778736", "text": "function init() {\r\n searchResto();\r\n}", "title": "" }, { "docid": "23f582a03ef962429476fa70956e28d6", "score": "0.6046589", "text": "function init() {\n\t\t\tresetData();\n\t\t\trefreshTotalCount();...
ca59a5afbab473c68750beecfaad2fc3
Function to make sure rounding does not crash with toFixed(). Will only apply toFixed when possible else will return entry raw.
[ { "docid": "b30eb831d3d1d31cb67adf49c4034e5d", "score": "0.55960166", "text": "function myToFixed_(number, decimal) {\n \n if (validateN_(number)) return Number(number).toFixed(decimal);\n else return number;\n}", "title": "" } ]
[ { "docid": "58ebbec8c4aabd3af5a635894e77819d", "score": "0.6724276", "text": "handleRounding(value, precision) {\n return parseFloat(Math.round(value * 100) / 100).toFixed(precision)\n }", "title": "" }, { "docid": "6509601c1479229ee5d8216e801321e0", "score": "0.661487", "t...
6434fa4c126b12ae98f806b7410a7831
Called to restore the state of the backend when the frontend connects to it (make sure the backend driver matches the frontend instrument)
[ { "docid": "b18f045aed7a0b4b0c5c726aa05eaed0", "score": "0.57542694", "text": "function initConnection() {\n if (typeof (this.driver) != undefined) {\n this.driver.setBackendDriver();\n }\n }", "title": "" } ]
[ { "docid": "fd5fed5f4a7885b7e6ae4bc3341e8260", "score": "0.61454105", "text": "reset() {\n // Make any pending promise obsolete.\n this.pendingBackendInitId++;\n this.state.dispose();\n this.ENV.reset();\n this.state = new EngineState();\n for (const backendName...
67c190f176830b5f8cdee57469856fdf
These days Opera's core is based on Chromium so we shouldn't distinguish between them too much
[ { "docid": "3eed09bfd117bb9fdf0d91dac656875d", "score": "0.0", "text": "function isOpera() {\n return hasNavigator() && /Opera|OPR/i.test(navigator.userAgent);\n }", "title": "" } ]
[ { "docid": "cb7fba06d4140865b3d936cdf4449e70", "score": "0.65579504", "text": "function _isOpera(){}", "title": "" }, { "docid": "890631856bbe2d3a9fb42144a64038eb", "score": "0.6530454", "text": "function browserspecifics() {\n\n //http://stackoverflow.com/questions/2400935/browser-...
4ee5408c15085fba8aab1391128a4f3c
Get grid columns based on current column visibility settings:
[ { "docid": "e80bb17f4b8a5d99aa23ac407590cc7b", "score": "0.71260405", "text": "getGridCols (dataView: ?Object = null) {\n const viewParams = this.props.viewState.viewParams\n const showHiddenCols = viewParams.showHiddenCols\n const displayCols = viewParams.displayColumns\n\n let gridCols = d...
[ { "docid": "2e0c7e1dbc5655cd768633e1bc6d5e0b", "score": "0.71197414", "text": "get visibleColumns() {\n return this._visibleColumns;\n }", "title": "" }, { "docid": "c065dc639fd91742eb8b47deb8a4c91f", "score": "0.7009673", "text": "getVisibleTableColumns(visibleColumns) {\n...
efe6a2efcd319c62c261a89744618ee4
global $ /global Autodesk
[ { "docid": "eea4e530619b900ffd730c433a36043f", "score": "0.0", "text": "constructor(viewer, options) {\n super(viewer, options);\n this.viewer = viewer;\n\n console.log(MyViewerExtention.ExtensionId + ' Constructor');\n }", "title": "" } ]
[ { "docid": "2ac82eecab7045d9d68115dfc6203bab", "score": "0.5927019", "text": "function NintendoDS() {\n\n}", "title": "" }, { "docid": "a5ff142b506e188b07031ef28b080ce1", "score": "0.58714813", "text": "function dhm_KES(thisObj) \r { \r \r// var af_settings = {\r// ...
d874cebc30a36f6c306bd99086bd19e3
bug in JS, probably $(this).attr('id')
[ { "docid": "9857cda4eff363c8a315e9e9f3de7972", "score": "0.0", "text": "function buttonSelector(param)\n{\n //var button = $(this).attr('id');\n var button = param.id;\n //test\n //alert(button);\n $.post(send_url, {params: button , access_token: accessToken });\n //window.alert(button...
[ { "docid": "518c022a561ff719962c2095fb586cdf", "score": "0.6688731", "text": "url(){return\"url(#\"+this.id()+\")\"}", "title": "" }, { "docid": "518c022a561ff719962c2095fb586cdf", "score": "0.6688731", "text": "url(){return\"url(#\"+this.id()+\")\"}", "title": "" }, { "d...
9de85ee9b6b3e4e4d152814fd5d4daf9
Parse an inline template binding. ie `">`
[ { "docid": "17c420d6ec0d2759984a0be63f7f3afb", "score": "0.57734215", "text": "parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, targetMatchableAttrs, targetProps, targetVars) {\n const bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan);\n for (let i = 0; i < bindi...
[ { "docid": "5e11134b4f187b4eb595a5306d1959a6", "score": "0.591993", "text": "function parse (template, options) {}", "title": "" }, { "docid": "8e7816c9d1a9dba1e55e479aabbcd38d", "score": "0.5862552", "text": "parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, absoluteOffset, t...
1cf23b909e37487e8a6f63a6f57c7e62
4) PALINDROME Given a string, return true if the string is a palindrome or false if it is not. Palindromes are strings that form the same word if it is reversed. Do include spaces and punctuation in determining if the string is a palindrome. Examples: palindrome("abba") === true palindrome("abcdefg") === false
[ { "docid": "16715c870a31855f9acba214c78ea96f", "score": "0.0", "text": "function palindrome(str1) {\n let rev = str1.split(\"\").reverse().join(\"\");\n if (rev === str1) console.log(\"palindrome\");\n else console.log(\"Not a Palindrome\");\n}", "title": "" } ]
[ { "docid": "e88c8026cff7110802d86aa36c907970", "score": "0.8386804", "text": "function isPalindrome(str) {\n\n}", "title": "" }, { "docid": "ccdf7bf4d95ad62d000fca2003935daf", "score": "0.8331323", "text": "function palindromeCheck(string) {\n // const re = /[^A-Za-z0-9]/g;\n // st...
90a846128f4d71183f177120ea208205
Item is the active pane item, a TextEditor Instance
[ { "docid": "00241f593f0c5112fe72709a3e1b6f08", "score": "0.0", "text": "deactivate(){\n this.panel.destroy();\n this.subscriptions.dispose();\n return this.hnreaderView.destroy();\n }", "title": "" } ]
[ { "docid": "9a8bbe6fae72240d18b0d88dafc485e7", "score": "0.6723824", "text": "function isValidTextEditor(item) {\n return item instanceof _atom.TextEditor;\n}", "title": "" }, { "docid": "e900b773598219f42980abdca70ed434", "score": "0.63990504", "text": "function editItem() {\n\n ...
cf082e89bafd2e1547f2048421915e88
Simplified test for values allowed as the first character in plain style.
[ { "docid": "ed069f04baba4f1baf814150d736a7ef", "score": "0.68719757", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n ...
[ { "docid": "aa47cc17b462b33825cf530eacbd9d18", "score": "0.713633", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !...
381fae0ea79ed51dcc8893f2130e199d
Generate random Id for short_url
[ { "docid": "ccc39ef1d2ef3bf224d63b0a0640e8ae", "score": "0.0", "text": "function generateId() {\n var randomId = \"\";\n var chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (let i = 0; i < 5; i++){\n randomId += chars.charAt(Math.floor(Math.random() * chars.length...
[ { "docid": "2bb4c4a6a37d163cda07a41a3de1e79a", "score": "0.80742073", "text": "function shortId() {\n\treturn crypto\n\t\t.randomBytes(5)\n\t\t.toString(\"base64\")\n\t\t.replace(/\\//g, \"_\")\n\t\t.replace(/\\+/g, \"-\")\n\t\t.replace(/=+$/, \"\");\n}", "title": "" }, { "docid": "41cf2720b...
968a1b4904d90859193e0f250499cf9d
makes "value" a date picker for daterelated operators, combobox otherwise,
[ { "docid": "51e5467a8a863ef2b05f304c2c8e2e8e", "score": "0.65995044", "text": "function toggleDatePickers() {\n var lValue, lBetween, lAnd, lRecord;\n\n function _addDatePicker( pSelector, pRecordField, pValue ) {\n var lHasTime, lTime24, lDefHour, lDefPm...
[ { "docid": "03e67253ac3cfdde306fe3e07d70c10f", "score": "0.7022789", "text": "onDateSelected(value) {\n this.value = value;\n }", "title": "" }, { "docid": "07420f5e6889a7023fe913d3493294e2", "score": "0.67378676", "text": "function val_date () {\r\n\t\t\r\n\t\t//value sele...
b2494b8e893430e071ca8fae38bd2f85
generic query method that uses a connection from the tool
[ { "docid": "2054916e08018f7c2349b63f8155876f", "score": "0.0", "text": "function query(statement, data) {\n\tvar dfd = Q.defer();\n\tconnect().then(function(connection) {\n\t\tconnection.query(statement, data, function(err, result) {\n\t\t\t//release the connection back to the pool\n\t\t\tconnection.rel...
[ { "docid": "1eb18f89e6d44569ab860128fa703fa1", "score": "0.7089741", "text": "_query(connection, obj) {\n const client = this;\n if (!obj || typeof obj === 'string') obj = { sql: obj };\n return new Promise((resolver, rejecter) => {\n const { sql } = obj;\n if (!sql) return resolver()...
ffc4d888dd875642ae0b1aa19b1128df
Logs the redict URI to register.
[ { "docid": "e02f02709a6a332c25c4b629448811cd", "score": "0.60050035", "text": "function logRedirectUri() {\n Logger.log(getService().getRedirectUri());\n}", "title": "" } ]
[ { "docid": "e51c207575bd61e156ae9690a7b7ff51", "score": "0.60524803", "text": "log(urlObj) {\n this.emit('urlLogged', urlObj);\n }", "title": "" }, { "docid": "e4dc43a76e2c545643877b3a69ec9cf6", "score": "0.5923914", "text": "function logURL(requestDetails){\n Processor....
d276d6d36717f694f10935ad42565ba3
We use the async keyword to define functions that handle asynchronous operations
[ { "docid": "1b3141312e34d5eb7c0a28848eeb694d", "score": "0.62050825", "text": "async function sayHi() {\n return 'Hi'; // implicitylyt returning a Promise\n}", "title": "" } ]
[ { "docid": "59dd7372f873b7a43ad7103e6a55fbdd", "score": "0.79257077", "text": "async asyncMethod() {}", "title": "" }, { "docid": "d42c88961a882b6f0680edde240ae533", "score": "0.7704235", "text": "async function asyncFunction() {\n return \"hello\"\n}", "title": "" }, { ...
710e7ff24239c5d5fdb05b4617861c49
(C) 19952013 Jeanloup Gailly and Mark Adler (C) 20142017 Vitaly Puzrin and Andrey Tupitsin This software is provided 'asis', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software fo...
[ { "docid": "428d806bfe0c33e00f07f55891661958", "score": "0.0", "text": "function ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes...
[ { "docid": "fa54cf2238354fc1447177efb8296d61", "score": "0.5683079", "text": "function g5(){return typeof window>\"u\"&&(self.window=self),function(n){var e={parse:function(r){var s=e._bin,o=new Uint8Array(r);if(s.readASCII(o,0,4)==\"ttcf\"){var a=4;s.readUshort(o,a),a+=2,s.readUshort(o,a),a+=2;var l=s....
c3350732b033f53006e503c7a9d1032e
default error handler /DOM
[ { "docid": "cd133e33826755c228ff20a56a6b9879", "score": "0.0", "text": "function onError(/*Error*/ ex, /*JsonML*/ jml, /*function*/ filter) {\n\t\treturn document.createTextNode(\"[\" + ex + \"]\");\n\t}", "title": "" } ]
[ { "docid": "be178d9fe198d0e2d14828faadaa1c86", "score": "0.6926813", "text": "function errors() {}", "title": "" }, { "docid": "58b411aac6214ea0e726f124b05b05d4", "score": "0.68629074", "text": "function error() {\n\n }", "title": "" }, { "docid": "cbba33e0417e9c5be799...
44b35ee6a56d3d8d79c058e24f323db9
finds whether a section was hit, also finds which part of the section, also lets section respond to a hit
[ { "docid": "89bac16f9fef4512c5091965084d8f17", "score": "0.0", "text": "function _hit_the_composer(event){\n\n if(_hitx < 0 || _hity < 0 || _hitx > OBJ.width || _hity > OBJ.height){\n _hitx = -1;\n _hity = -1;\n return false;\n } else {\n ...
[ { "docid": "9feca32897f3e9f2def6875c24459de5", "score": "0.63476205", "text": "function isInSection(identifier, scrollPosition){\n var section = $(\"#\" + identifier);\n if (scrollPosition >= section.position().top && scrollPosition <= (section.position().top + section.outerHeight())){\n re...
0635fce77cc91aff7317fb66bd66538a
Remote command handler for Content beans.
[ { "docid": "ca090610116f8f6b5dfc80bf62ce4571", "score": "0.5582341", "text": "function handleContentRemotely$static(content/*:RemoteBean*/)/*:Boolean*/ {\n var contentToOpen/*:Content*/ =AS3.as( content, com.coremedia.cap.content.Content);\n if (contentToOpen) {\n contentToOpen.load(function...
[ { "docid": "af2eb3050f5a50868dc65eb025410394", "score": "0.54254276", "text": "function handleCommand() {}", "title": "" }, { "docid": "d370eec3cad28a8daee8bca4f6c58b9d", "score": "0.5155912", "text": "[$onCommand](e) {\n const { type } = e.detail;\n\n switch (type) {\n ca...
c74ea3f1dec90e124e7e65f0aa4403ee
Checks if two javascript objects are equivalent. Only top level properties are checked for equivalence.
[ { "docid": "37ff251e34fa2563f8a01a34b73694cc", "score": "0.7796736", "text": "isEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is different,\n // objects are...
[ { "docid": "ea98671ec06fe9d15967d38d64709b5e", "score": "0.79680544", "text": "function isEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a),\n bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is diff...
25883349389c304a15364399efc32109
A function that sets the stroke and fill of our "paint brush".
[ { "docid": "daad60ac4cecdfb652aaaa9a1acf6969", "score": "0.60368943", "text": "function chooseColors() {\n brushHue += 1;\n if (brushHue > 359) {\n brushHue = 0;\n }\n stroke(brushHue, 50, 80);\n fill(brushHue, 50, 80);\n}", "title": "" } ]
[ { "docid": "2929b54f4faed041e41a47630d6616a1", "score": "0.6763962", "text": "function setFill(){\n if (black === 0) {\n fill(255);\n black = 1;\n }\n else {\n fill(0);\n black = 0;\n }\n}", "title": "" }, { "docid": "f54e9232589700c51beb2cbff0d272ce", "score": "0.6676097...
38577d54f2b7c3e7ae3690c9803578e6
(public) this / a
[ { "docid": "43c36a8e2b29b6447c79000463b409d9", "score": "0.0", "text": "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "title": "" } ]
[ { "docid": "d0e09c5cb217bb19d492c329a624ff6d", "score": "0.7762959", "text": "get a() {\n\t\treturn this._a_;\n\t}", "title": "" }, { "docid": "2c1b4902653712192d41decb66478de2", "score": "0.70866776", "text": "function M(){this.a={}}", "title": "" }, { "docid": "2c1b4902...
d2c1912a800c63106730ce880a7d8d21
Creates a Map Object
[ { "docid": "e4a39f9d73ac8e50a6b5a6d53fe47a5f", "score": "0.0", "text": "constructor(allData) {\n //Width and height of map\n this.width = 760;\n this.height = 500;\n this.data = allData\n\n\n //Create SVG element and append map to the SVG\n this.svg = d3.select(...
[ { "docid": "7eaef53c1dedc492dd311f14d585c860", "score": "0.76216954", "text": "function createMap() {\n /// 创建一个原型为null的空对象\n return Object.create(null);\n}", "title": "" }, { "docid": "75c8026211cb078eed0d21960f339899", "score": "0.7329919", "text": "function createMap(){\n\t\twor...
c1db7d5695c787acc2984e72f2e275e1
Menu Administrativo Cadastro de Pesquisa
[ { "docid": "cee09b4fc9d231fa522c8c7aa500892e", "score": "0.5835473", "text": "function goCadastrarPesquisa(pesquisa, readonly) {\n if (pesquisa) {\n var query = new Parse.Query(Parse.Object.extend(\"Opcao\"));\n query.equalTo(\"parent\", pesquisa);\n query.ascending(\"numero\");\...
[ { "docid": "95c3ffb178ec3b98e68c8a5bf202fe29", "score": "0.67489237", "text": "function activarMenu() {\n CancelHideBAMenuTime();\n if (soporta.DHTML && menuActivo != this) {\n if (menuActivo) menuActivo.ocultar();\n menuActivo = this;\n this.mostrar();\n } \n}", "title": "" }, { ...
166137af3c869d04aa107a88e2905239
Identifies the quantity expected to be consumed in a given day.
[ { "docid": "c70032b621745f194241fbd231ed143c", "score": "0.0", "text": "get dailyAmount() {\n\t\treturn this.__dailyAmount;\n\t}", "title": "" } ]
[ { "docid": "a46478641643b36dc58e4839d0664acf", "score": "0.6381308", "text": "sell(quantity, numDay) {\n if (quantity > this.quantity) {\n return 0\n }\n this.quantity -= quantity;\n var value = quantity * this.dailyValue(numDay);\n // update stage\n ...
b207b5659973fdf168ca82d07758628a
show current position using latitude and longitude
[ { "docid": "55b19bda6e12f5318b3d2a14de147803", "score": "0.0", "text": "function currentPosition(position) {\n let units = \"imperial\";\n let apiKey = \"044e518b60304de98c4849e683a28d22\";\n let apiUrl = `https://api.openweathermap.org/data/2.5/weather?lat=${position.coords.latitude}&lon=${position....
[ { "docid": "1cd3796d35fa79ed0ebded7c7b1a9e2e", "score": "0.80553204", "text": "function showPosition(position) {\n\t\tconsole.log(position);\n\t\tcurrentLatitude = position.coords.latitude;\n\t\tcurrentLongitude = position.coords.longitude;\n\t}", "title": "" }, { "docid": "7f2ccf7384523c894...
289d59c75b49e7a0553d77e419d2d02e
Create page object used in template
[ { "docid": "909c71cf31b9f4c3d2d0a03c87187671", "score": "0.64066094", "text": "function makePage(number, text, isDisabled, isPrevious, isNext) {\n return {\n number: number,\n text: text,\n disabled: isDisabled,\n previous: ( align && isPrevious ),\n n...
[ { "docid": "ab0e693d71bbf8420f9838b90f78618f", "score": "0.7618371", "text": "function createPage(config) {\n if (Object.prototype.toString.call(config).match(/\\[object (\\w+)\\]/)[1].toLowerCase() !== 'object') return;\n this.pageName = config.name;\n}", "title": "" }, { "docid": "a3...
01ab1eb2774c8dd719e79ceccd5f792a
Creates contact form sent information (using jQuery)
[ { "docid": "39869e426fe0a38e110fad34c54536aa", "score": "0.5694344", "text": "function showFormData(){\n\n\t$(\"#main\").append($(\"<article id=\\\"dataContainer\\\"></article>\"));\n\t$(\"#dataContainer\").append($(\"<header id=\\\"formHeader\\\"></header\").text(\"Your order:\"));\n\t$(\"#dataContaine...
[ { "docid": "fcf06cfe446f2e3a787c209459ad63b7", "score": "0.68420935", "text": "function contactPage(){\n $(\"#contentText\").show().addClass(\"showFeed\");\n $(\".navMenu\").hide();\n $(\"#headerTxt\").html(\"<span onclick=\\\"homeScreen()\\\" style=\\\"float:left; margin-left:5px;\\\">&lt;</span>Con...
1d09817f6c262146be1cecdfaca8e3cd
attr, ="sd", a="amit's", a="sd"b="saf", ab cd=""
[ { "docid": "1a7932bb68397c39f20a3b819dafecd7", "score": "0.59404725", "text": "function validateAttributeString(attrStr, options, regxAttrName) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attr...
[ { "docid": "4264b40c1ece44310fc7ca5e7415f577", "score": "0.61053646", "text": "function validateAttributeString(attrStr, options, regxAttrName) {\n //console.log(\"start:\"+attrStr+\":end\");\n //if(attrStr.trim().length === 0) return true; //empty string\n var matches = util.getAllMatches(attrStr, v...
1860c9c709bc291e26e7cc6c7a642909
Creates an item and adds it to the scene.
[ { "docid": "aa245adbea7cb19f241376eaeb7e9bf5", "score": "0.6710885", "text": "function addItem(itemType, path, metadata, position, rotation, scale, fixed, options) {\n itemType = itemType || \"FloorItem\";\n var scope = this;\n var fileName = path + \"/\" + metadata.itemName + \".fb...
[ { "docid": "31a097068bb2ec80709d22b3d6587488", "score": "0.73019016", "text": "createNewItem(item) {\n if (!item) return;\n this.items.push(item);\n }", "title": "" }, { "docid": "3bbf565a8fd676859caa3ff6bd9130e2", "score": "0.7052357", "text": "add_item(item) { return t...
8f8fa477560b6d9b39b2fd68a15a4c85
For a directions route, returns the time it would take to traverse the route in seconds.
[ { "docid": "b97d3ed461ad4027ec8c4994994c30af", "score": "0.72935814", "text": "function getRouteDuration(route) {\n // For each route, display summary information.\n var routeDuration = 0;\n for (var i = 0; i < route.legs.length; i++) {\n \trouteDuration += route.legs[i].duration.value;\n }\t\t\t ...
[ { "docid": "422632b3f12cf76b1803129f1869f96f", "score": "0.73040694", "text": "function getRouteTraveltime() {\n if ((routes !== [])) {\n for (let i = 0; i < routes.length; i++) {\n if (routes[i].route === selectedRoute) {\n return `Estimated travel time: ${routes[i].traveltime}`...
8e1276f5abf70aebccf5202117f3f3c6
getUser() returns the currentUserData which contains both the uid and userName.
[ { "docid": "4477018e48ae4bf80e66ecda5704dd3f", "score": "0.66482216", "text": "getUser () {\n return new Promise(function (resolve, reject) {\n $http.get(`${firebaseURL}/user_data/${currentUserData}.json`)\n .success(\n userObj => resolve(userObj),\n error => reject(...
[ { "docid": "4e09e012bb585829692be8860802497b", "score": "0.7255582", "text": "function getUser() {\n return $http.get('users/current').then(\n function(res) {\n return currentUser = res.data[0];\n }, function(err) {\n notify.error(model, err);\n return $q.re...
ee32b32206f5a9fff26ce24361a3fba3
TODO rather than specialcase polygons, simply handle them separately. Ideally, coincident intersection points should be jittered to avoid clipping issues.
[ { "docid": "9eea9eb0268381c986d65534acef947c", "score": "0.0", "text": "function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeS...
[ { "docid": "9a4021709bff000bb41a14820ff67192", "score": "0.7063792", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &...
1a16346c58b65dde3933a0e96c3e8ead
Set New Slideshow Ad Properties
[ { "docid": "55e37799fdf628b8db6595a3f8c0bc48", "score": "0.0", "text": "function replaceOrd(adCallPrefix, ordNew) {\n var adCallHtml = '';\n\n if ($(\"div[data-prefix|='\" + adCallPrefix + \"']\") != null) {\n\n $(\"div[data-prefix|='\" + adCallPrefix + \"'] * iframe\").length ? adCallHtml ...
[ { "docid": "673dff68e9b9ac060fa39f6e625bdda4", "score": "0.72938085", "text": "function set_digitalData_slideshow_ad() {\n\tdigitalData.slideshowAdEvent = true;\n}", "title": "" }, { "docid": "5893aa9a323920dde948536517d27667", "score": "0.60257316", "text": "function ManageSlide() {...
4aa41fa3829a279587e2061883316b57
Here I set an onchange function who calculates the subtotal when qty input field changes and print it in the HTML
[ { "docid": "90d72b00bc786fe8b0a9d5c08a6ddbf0", "score": "0.7201709", "text": "function setOnChanges () {\n let price, rowSubtotal;\n document.querySelectorAll(`.product`).forEach(product => { \n product.querySelector(`.qty label input`).onchange = function (e) {\n price = +product.querySelecto...
[ { "docid": "3f6407086e8d319e2d62dfc6d7dd0319", "score": "0.79077506", "text": "function updateQty() {\n let val = document.getElementById(\"bunQuantity\").value;\n document.getElementById(\"qty\").innerHTML = val;\n updateSubtotal(val)\n}", "title": "" }, { "docid": "b20a74bc08e0d5f...
918ba5721771da4ddbe6eeb4dbfa5de1
function that handles response from Google containint the profiles information. It is called by Passport after the second time passport.authenticate is called (in /auth/accepted/)
[ { "docid": "52c13a1424018c457a435aab7be9e60c", "score": "0.6674523", "text": "function gotProfile(accessToken, refreshToken, profile, done) {\n //console.log(\"Google profile\",profile);\n console.log(\"Google Id: \", profile.id);\n \n // here is a good place to check if user is in DB,\n ...
[ { "docid": "71809c9129b1091a6878906fb21b3e41", "score": "0.6918533", "text": "function responseGoogle(response) {\n\t\tif (response.AccessToken) {\n\t\t\tlocalStorage.setItem('googleToken', response.accessToken);\n\t\t} else {\n\t\t\tlocalStorage.setItem('googleToken', response.Zi.access_token)\n\t\t}\n...
6f744723cf20dc0b4d4283c80273b26f
to payment for event
[ { "docid": "5942c7a2c9b50e15edf941a9f7caec1f", "score": "0.6252284", "text": "function eventMemPayment(token){\n \n // Insert the token ID into the form so it gets submitted to the server\n var form = document.getElementById('payment-form');\n var hiddenInput = document.creat...
[ { "docid": "0ca01f3bb9eb5f8fa0bbdbbfd2affb74", "score": "0.6741485", "text": "handlePaymentConfirm(event) {\n console.log('Confirm Payment', event);\n }", "title": "" }, { "docid": "6220be71890bd9fbbd4cdf349e56645e", "score": "0.6190144", "text": "function event(e, info) {\...
218063bec230bce0d45e433076a80a20
Throws a `Cancel` if cancellation has been requested.
[ { "docid": "6a0fca937f07778677fe281b073d49b6", "score": "0.71672016", "text": "function throwIfCancellationRequested(config){\nif(config.cancelToken){\nconfig.cancelToken.throwIfRequested();\n}\n}", "title": "" } ]
[ { "docid": "4a8d73b7484d09f67bf9a661ab6df83b", "score": "0.7674247", "text": "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}if(config.signal&&config.signal.aborted){throw new Cancel$1('canceled');}}", "title": "" }, { "docid": "ef...
7435a546e351e74f5530aadaef51a457
DESCRIPTION: Retrieves saved data for a player servant PARAMS: playerData (I,REQ) Saved player data servants (I,REQ) Servant unit to check for RETURNS: Servant data object (see addServant)
[ { "docid": "31ec3647936515729436587610e43785", "score": "0.75526154", "text": "function getServantData(playerData, servant) {\n if (!playerData) { return; }\n if (!servant) { return; }\n var load = servant.load + \"\";\n if (!load) { return; }\n\n // Check for Servant\n for (const servant...
[ { "docid": "90af240a212af8da19fc152639d282ac", "score": "0.65286094", "text": "function addServant(playerData, servant) {\n if (!playerData) { return; }\n if (!servant) { return; }\n var load = servant.load + \"\";\n if (!load) { return; }\n if (playerData.servants.includes(servant.load)) ...
2ea0a6c2428ef62b3fda548282ab63e1
Transforms a target DOM node to match the output of a new render, keeping subtrees that are unchanged.
[ { "docid": "ce5b55549efafdd2980732637a8c11fa", "score": "0.52948284", "text": "transplantDom (into, from, isroot) {\n let self = this;\n \n if (! isroot) {\n if (into.getAttribute) {\n let vstatic = into.getAttribute(\"v-static\");\n if (vsta...
[ { "docid": "d9f3084769fccbc7ccf725177b14c54e", "score": "0.6206981", "text": "render(node, domDestination) {\n while (domDestination.firstChild) {\n domDestination.removeChild(domDestination.firstChild);\n };\n \n domDestination.appendChild(this.renderNode(node));\n }", "title": ""...
edc2cbe8013e01e15d0c7a00aa00de57
export the chart to CSV file and let users download
[ { "docid": "2d7e186e08c68fb9f83da1b8c9767a09", "score": "0.8269307", "text": "function downloadCSV()\n{\n 'use strict';\n chart.downloadCSV();\n}", "title": "" } ]
[ { "docid": "7a4e21e59d6de21920acd93d9fc5bfd1", "score": "0.81715083", "text": "function chartToCSV() {\n function zip(arrays) {\n return arrays[0].map(function (_, i) {\n return arrays.map(function (array) {\n return array[i]\n })\n });\n }\n if (chartdata === {}) {\n alert(...
b1a0f38fa4fdc351e0332af90695e881
sets loading progressbar progress or hides it
[ { "docid": "fba299ef9a95dddc7af64741e66ae61b", "score": "0.7172986", "text": "function setLoading(progress) {\n \"use strict\";\n var loading = document.getElementById('loading');\n if (loading.MaterialProgress !== undefined) {\n if (progress === -1 || progress > 100) {\n load...
[ { "docid": "1ebf62922adfbbf626d5a562445ea7d8", "score": "0.7786244", "text": "loading (evt) {\r\n var progbar = document.getElementById(\"progressBar\");\r\n var perctext = document.getElementById(\"percentText\");\r\n progressBar.hidden= false;\r\n progressBackground.hidden = false;\r\n ...
d8e993b5cbd9b4a2d2a55c31f5f3431d
Resetting the object's ID property
[ { "docid": "6a4a964473cc5e555ec73ce65fac374e", "score": "0.0", "text": "function applyID() {\n for (i = 0; i < myLibrary.length; i++) {\n myLibrary[i].bookID = i;\n }\n}", "title": "" } ]
[ { "docid": "2f22059a8a5d3afdfa0855fd8d713fcf", "score": "0.74124146", "text": "reset() {\n this.ids.clear()\n }", "title": "" }, { "docid": "37c1acf37d2c028c2cec35bd0390832f", "score": "0.72321385", "text": "set ID(value) {\n this.__id = value;\n }", "title": ""...
3bd502a8b938e932721da6b3c83cb094
//////////////////////////////////////////////// call api url / routing /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////// functions
[ { "docid": "ecac8ff0a6e2baab02c1c99608599ac5", "score": "0.0", "text": "async function getUser() { \n const client = await mongodb.MongoClient.connect(process.env.MONGO_URL, {useNewUrlParser: true});\n return client.db('vue_express').collection('user');\n}", "title": "" } ]
[ { "docid": "fe169ba483b0c1d54d70cfd515e84623", "score": "0.7371816", "text": "function UrlApiController() {\n\t}", "title": "" }, { "docid": "a3026384d615475e8524cc17b2f17edc", "score": "0.69568735", "text": "function manageRouting()\n{\n\tfor(var url in rippleAPI)\n\t{\n\t\tapp.rout...
7c1c4667069332ce8dec0a1761f2eb3e
This assumes forms generate timestamps and which is in first column
[ { "docid": "740a0179747c189c79786ea5ba98ad01", "score": "0.0", "text": "function deleteOldLogs() {\n //Get active spreadsheet. Add this function into sheet script editor\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = ss.getSheets()[0];\n var data = sheet.getDataRange().getValues(); ...
[ { "docid": "23eb82901c4e2aaea19945dd3aaa9b91", "score": "0.5729284", "text": "function setTimeStamp() {\r\n\t//timestamp is required for DuplicateClickFilter to avoid sending duplicate requests (ex. doubleclick)\r\n\tvar date = new Date();\r\n\t//expecting a form with id \"Form\", sometimes may not be a...
c3d7ff18b9fa457c23f1bd366bff2f5d
en este caso no devuelve, solo cuando es invocada
[ { "docid": "d04954cc9e152a69270bf9ab0c32b362", "score": "0.0", "text": "function fibonacci(mes){\n\tvar n1= 0;\n\tvar n2= 1;\n\tvar n3;\n\n\tfor (var i =0; i<mes; i++){\n\t\tn3=n1+n2; /* X= fibonacci(mes-1)+fibonacci(mes-2)*/\n\t\tn1=n2;\n\t\tn2=n3;\n\t\t\n\t}\n\treturn n3;\n}", "title": "" } ]
[ { "docid": "7fe980773c997c0939708ed5013ec5bc", "score": "0.6119069", "text": "rejected() {\n }", "title": "" }, { "docid": "9e56fd3571dd240fd0df02faaa68a6d5", "score": "0.59084535", "text": "function confermaInvioValutazione(){\n\treturn confirm(\"Sei sicuro di voler inviare la ...
3634d458210cbbe59d6252418442ace8
Writes device and/or agent source files depending on the options. Parameters: options : Options impt options of the corresponding command Returns: Promise that resolves if the operation succeeded, or rejects with an error
[ { "docid": "3ed638cff2b370b93d2c7bdd66356177", "score": "0.7948661", "text": "_saveSourceFiles(options) {\n const writeDeviceCode = (!options.agentOnly) ? \n Utils.writeFile(this._deviceFileName, this.deviceCode) :\n Promise.resolve();\n const writeAgentCode = (!optio...
[ { "docid": "d16e1f9162daf64af1dedd78901dc70b", "score": "0.623327", "text": "_setFileOptions(options) {\n this._deviceFileName = options.deviceFile || (this._projectConfig.exists() ? this._projectConfig.deviceFile : null);\n this._agentFileName = options.agentFile || (this._projectConfig.e...
ae7ed68df629cd817c599b19ea5114b7
try and connect to mongodb
[ { "docid": "4026030be175e4f43c88e37e524cca11", "score": "0.7987715", "text": "function connect_to_mongo() {\n mongoose.connect(configDB.url, function (err) {\n if(err) {\n console.error(\"Failed to connect to MongoDB, retrying ...\");\n setTimeout(connect_to_mongo, 1000);\n }\n });\n}", ...
[ { "docid": "aab76e10d0fe4205ee5c92fbe23719e4", "score": "0.7815185", "text": "function connectWithMongo(){\n client.connect('mongodb://localhost:27017/stockscrapper', options, (error, mongodb) => {\n if(error){\n console.log('DB is Unavailable: '+error);\n db=null;\n }else{\n ...
583d92eeb44956b3c71e19f23078a2a6
Untuk validasi input email
[ { "docid": "da0b72004d7098e35c42d3ee9b547339", "score": "0.0", "text": "function isEmail(isi) {\n\tvar myExp = /^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/\n\treturn myExp.test(isi)\n}", "title": "" } ]
[ { "docid": "cb3be0cf2e6514b60a865e3d84bc5022", "score": "0.7176512", "text": "function verificationInputEmail(alerteElement, input) {\n let condition = !emailRegExp.test(input.value);\n alertInput(condition, alerteElement, input, verificationMessages.inputEmail);\n}", "title": "" }, { ...
720eaab9a90084c7c21a85fa615ba863
Assign creeps an EntityCreep object
[ { "docid": "7c1d0fa67e7ffac520604f9e91fedf69", "score": "0.5757713", "text": "getCreepsAsEntities()\n {\n let creepEntities = [];\n \n let creepsInRoom = this.room.find(FIND_MY_CREEPS);\n \n for(let creepKey in creepsInRoom) {\n let creepEntity = new Enti...
[ { "docid": "7c07556c251626bc08af1aea65bcf69f", "score": "0.5538679", "text": "relocate(creep) {\n if (creep.memory.city !== this.room.name) {\n creep.memory.city = this.room.name;\n this.citizens.push(creep);\n }\n }", "title": "" }, { "docid": "4b21376b1dbbf094e280776498804...
1527c8d510aad802a641a48a797514fb
SNE Vx, Vy Skip next instruction if Vx != Vy. The values of Vx and Vy are compared, and if they are not equal, the program counter is increased by 2.
[ { "docid": "6be51906624b5972d58d845d9a52e342", "score": "0.66050404", "text": "function OP_9xy0(opcode) {\n if (debug) console.log((PC-2).toString(16).padStart(3,'0').toUpperCase() + ' - ', numberToHexString(opcode), ` - SNE Vx, Vy`);\n if (V[(opcode & 0x0F00) >> 8] != V[(opcode & 0x00F0) >> 4])\n...
[ { "docid": "6a59ddcbda8956564ef323def046dcb0", "score": "0.7129275", "text": "skipEqualRegisters(registerX,registerY){\n if(this.vReg[registerX] === this.vReg[registerY]){\n this._skipInstruction();\n }\n }", "title": "" }, { "docid": "9f55eeb7885c2e415be3b7f1b1ce...
574480742ce5658fad221f03181c60c2
extension bar functions to change name, links, rank, discovery points, and regions, respectively (this functionality is not yet implemented in the system itself.)
[ { "docid": "267f56f2350459669637a5e2bdbf6cd4", "score": "0.0", "text": "function setName(name)\n{\n document.getElementById(\"name\").innerHTML = name;\n}", "title": "" } ]
[ { "docid": "06530278a7d0b800be6768cab2c58f5c", "score": "0.6440348", "text": "setBarLabel(text) { this._behavior('set bar label(text)'); }", "title": "" }, { "docid": "9ec459ddeda01ace3aa51bfb5ffbb472", "score": "0.61653614", "text": "function modifyBar(uiName, barName, varName, args...
c54ff8842d2e19670fa01e190f4fab5e
! moment.js locale configuration
[ { "docid": "7a3f267d70e175ebc12d8443ebc330d0", "score": "0.0", "text": "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ...
[ { "docid": "eba7a54915599f144e0f867b7640f6f1", "score": "0.81141967", "text": "function ys(e,t,n){var a={ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"мі...
c693be17243a5c619903c12d712a9eb2
Bubble Sort For every pair of adjacent indicies swap them if the item on the left is larger than the item on the right continue until array is fully sorted
[ { "docid": "6c818407cbc475752e1c5573da29bb1e", "score": "0.0", "text": "function bubbleSort(arr){ }", "title": "" } ]
[ { "docid": "4e8cc2520600ea7b60e7b7fd2f4bc6e9", "score": "0.7616863", "text": "function bubbleSortOptimized(arr){\n //iterate over array and keep moving largest value to the end\n for(let i=arr.length; i > 0; i--){ \n let anySwap = false;\n for(let j =0; j<i-1; j++){\n ...
c4d59e4ca0670dd64422a1b1768313c4
Get the value for a attribute on a node. Only used in DEV for SSR validation. The third argument is used as a hint of what the expected value is. Some attributes have multiple equivalent values.
[ { "docid": "d5a8f2cc54a2dc106639f17b03b2e0ad", "score": "0.0", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n va...
[ { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){retu...
9ec10876ed5a55ec109a60d1256abb2c
Show the file table of selected files for upload
[ { "docid": "abbeb42e01d61a2847c53f350e33136b", "score": "0.0", "text": "handleShow() {\n this.setState({ show: true });\n }", "title": "" } ]
[ { "docid": "1d847284f4a10a00436736eb4ea31ef5", "score": "0.7822107", "text": "function displayFiles() {\n var filesDf = [];\n for (var i=0; i<$scope.files.length; i++) {\n var file = {\n id: $scope.files[i]._id,\n fileName: $scope.files[i].originalName,\n date...
00f14518cdb3518ea710e8ac10f445ad
Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process. This merge function keeps the order of attrs same.
[ { "docid": "cb25ec57372618d03ca2ed71727d56ab", "score": "0.64879304", "text": "function mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n }\n else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\...
[ { "docid": "61830fc7c9fa308b46a15e5747611bbd", "score": "0.74229634", "text": "function mergeAttributes(src, dst) {\n Object.keys(src).forEach(function(k) { dst[k] = src[k]; });\n}", "title": "" }, { "docid": "ef769b3a7570d948c880c00a5e3adf07", "score": "0.67006963", "text": "functi...
9123914e85fd1a5441af2da6a7e27089
Numbers should preserve their sign; i.e. a negative number should still be negative when reversed.
[ { "docid": "ee61f615360d795e21c494b942d603b5", "score": "0.7339734", "text": "function reverseNumber(n) {\n let num = parseFloat(n.toString().split('').reverse().join(''))\n //multiply the reversed with the positive or negative of the original number passed through the function to keep the sign\n return...
[ { "docid": "e101edb90769a602109b9c915d72cba5", "score": "0.74190664", "text": "function reverseSign(num){\n return num * (-1);\n}", "title": "" }, { "docid": "7aaaf6d3950d5e821d3340f962b619d4", "score": "0.723753", "text": "function opposite(number) {\n return(-number);\n }", ...
61c7ea805efa229cd68d378cff179e9b
Determine if the argument is shaped like a Promise
[ { "docid": "d0befaac1a535fb92345bb557c91545e", "score": "0.64602005", "text": "function isPromise(obj) {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}", "title": "" ...
[ { "docid": "83405184c74d480246787a7e6c09627e", "score": "0.71709746", "text": "function isPromise(input){return typeof Promise!=='undefined'&&input instanceof Promise||input!==null&&typeof input==='object'&&typeof input.then==='function'&&typeof input.catch==='function';}", "title": "" }, { ...
9eb543f59e761fbafcd95996dbb7732a
HELPER METHODS & CONSTRUCTORS (INTERNAL)
[ { "docid": "1f04dc177c5a2e808a7525a14e23cbfa", "score": "0.0", "text": "function b(){return k.defaultDifficulty?k.defaultDifficulty:i((k.highestDifficulty-k.lowestDifficulty)/2)}// save the current deck to localStorage", "title": "" } ]
[ { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.6277497", "text": "function Utils() {}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.6277497", "text": "function Utils() {}", "title": "" }, { "docid": "a14a82fc30745b59820199a46d30b5...
511515438b60ea3065a23d471c902b39
get Icon for HTMLWindow
[ { "docid": "c6d22352fe923988bda5fb8f87d2f319", "score": "0.61823535", "text": "function getInfoicon(url) {\n // var url = url zum Icon\n if (url) {\n var inconhtml = \"<img src=\\\"\"+url+\"\\\" width=\\\"28\\\" height=\\\"40\\\" border=\\\"0\\\" alt=\\\"\\\" title=\...
[ { "docid": "ee121e2070ae32c66c11dc4f73565893", "score": "0.70071995", "text": "getIcon() {\r\n return undefined;\r\n }", "title": "" }, { "docid": "17cd8ac97272db430381feed79458591", "score": "0.6905634", "text": "get icon() {\n const { ORIGIN, EXTENSION_MAIN_FOL...
c01fbf32591f1fd2bfd81da567b948e6
Validates the email address from an input. The parameter is the input object, in format: document.formName.inputName.
[ { "docid": "a0889d9baed37506378bc7876dca0a38", "score": "0.66638845", "text": "function ValidateEmailAddress(objEmail) {\r\n\tvar strEmail = Trim(objEmail.value);\r\n\tif (strEmail == \"\"){\r\n\t\talert(\"Please fill in the E-mail field.\");\r\n\t\tobjEmail.focus();\r\n\t\treturn false;\r\n\t} else {\r...
[ { "docid": "135eabf8f35cf1b957c49577b126038f", "score": "0.7742196", "text": "function validateEmail(input){\n var re = /\\S+@\\S+\\.\\S+/;\n if(re.test(input.value)){\n success(input);\n }\n else{\n error(input, `Email is not valid. `);\n }\n}", "title": "" }, { ...
cb6c4b9941305ff49572ab224b93869f
Implements a host component that allows setting `value`, and `defaultValue`. This differs from the traditional DOM API because value is usually set as PCDATA children. If `value` is not supplied (or null/undefined), user actions that affect the value will trigger updates to the element. If `value` is supplied (and not ...
[ { "docid": "3213657b6e25b54806538ea7ea5ca5d7", "score": "0.0", "text": "function getHostProps$3(element, props) {\n var node = element;\n if (!(props.dangerouslySetInnerHTML == null)) throw Error(\"`dangerouslySetInnerHTML` does not make sense on <textarea>.\");\n // Always set chi...
[ { "docid": "f09f4d0f65eb41487bc50d2b59cc4799", "score": "0.62822247", "text": "_initializeInputValueProperty() {\n this._hostElement.value = `${this.value}`;\n }", "title": "" }, { "docid": "7943213bc14c2564bf215fd70935ab79", "score": "0.6239278", "text": "_delegateInitialV...
9b10d986d20516de233f67131deafb6c
Function for special characters
[ { "docid": "94db5e5e783d1f1ec1a356ecfdffb08c", "score": "0.59902287", "text": "function special() {\n let specialInput = prompt(\"Include special characters? Y or N\");\n \n switch(specialInput) {\n case \"Y\", \"y\":\n characters.push(\"!\", \"\\\"\", \"#\", \"$\", \"%\", \"&\", \"\...
[ { "docid": "0057d8b8ecf0bb6607d16abf87c576f6", "score": "0.7466165", "text": "function special_characters(input){\n if(input == '&' || input== '=' || input== '_'\n || input== '\\''||input== '-'||input== '+'\n ||input== ','||input== '<'||input== '>'){\n return true...
d9dab7f5b461aa4d6393dd1af751a086
Constructor for the Timer.
[ { "docid": "31b4c805063fa0993ebdbb7dcca722bc", "score": "0.61512667", "text": "function Timer(countDownLength, $clock, $play, $pause, $stop){\n\t//Expected to be in minutes.\n\tvar _countDownLength = countDownLength;\n\t//Cache DOM\n\tvar _$clock = $($clock);\n\tvar _$play = $($play);\n\tvar _$pause = $...
[ { "docid": "8cfca74bed616cad2fdc2d959730f72a", "score": "0.81365323", "text": "constructor() {\n super('Timer', ['OnTimer']);\n this.success();\n this.timerNames = [];\n this.timers = {};\n this.intervals = {};\n }", "title": "" }, { "docid": "bd609de6faba072b6ca5a307aef7527f...
d4b19da1590e57d00887a77ef8805d27
Parse the Accept header.
[ { "docid": "6da633414024929ad7aa1f9f7f9a07a2", "score": "0.69132143", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts...
[ { "docid": "19aa324b40274402bb932b00583eb94d", "score": "0.68859637", "text": "function parseAccept(accept) {\n\t var accepts = splitMediaTypes(accept);\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var mediaType = parseMediaType(accepts[i].trim(), i);\n\n\t if (mediaType) {\n\t ...
fc941ee7ed14d17bad6d7a9de1aa56a5
Fibonacci Recursive (This runtime is exponential 2^n)
[ { "docid": "3d04087ed7c27ed3db952b16ff6d8793", "score": "0.78416634", "text": "function fibonacci(n){\n if (n === 0){\n return 0;\n }\n if (n === 1 || n === 2){\n return 1;\n }\n\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" } ]
[ { "docid": "e63e9a16be43c08b34e881866a5647ad", "score": "0.81980413", "text": "function recursiveFibonacci(n) {\n if(n==1 || n==2){\n return 1;\n } else {\n return recursiveFibonacci(n-1) + recursiveFibonacci(n-2)\n }\n}", "title": "" }, { "docid": "8fcda79a9987ab62ac9...
c40295d10211765356dc5313470b9756
URL Stringify from lecture code
[ { "docid": "36203b3115800b39200022c61fabeb94", "score": "0.0", "text": "function urlStringify(obj, i){\n\tvar str = []\n\tfor(var prop in obj){\n\t\tvar s = encodeURIComponent(prop) + '=' + encodeURIComponent(i);\n\t\tstr.push(s);\n\t}\n\treturn str.join('&');\n}", "title": "" } ]
[ { "docid": "6248c3bf6e5262497a81f7ac75675f59", "score": "0.7669644", "text": "static stringRepresentURL(url){if(typeof url==='string')return url.replace(/^(https?)?:?\\/+/,'').replace(/\\/+$/,'').trim();return''}", "title": "" }, { "docid": "63e90f538185c49c741fc14cbcb796ab", "score": "0...
570a5d0b0b3528980ec092f157de5870
showing the tooltip of information for the graphs when user hovers mouse over a point on the graph.
[ { "docid": "579aa653ca4c9c5976c2fc226404f0e6", "score": "0.67423373", "text": "function setOnHoverForGraph(id,tableId,label,equakeType) {\r\n\r\n var previousPoint = null;\r\n\r\n $(\"[id='\" + id + \"Graph\" + tableId + \"']\").bind('plothover',function(event,pos,item){\r\n if(item){\r\n ...
[ { "docid": "e2fc93998f9ba89782d273cff31d72d1", "score": "0.7788339", "text": "function showTooltip() {}", "title": "" }, { "docid": "dba98c7fb8ffc8ca3beafedd6b49d69b", "score": "0.77166593", "text": "function tipMouseover(clientX, clientY, d) {\n var html = \"<span...
e134e2f3810dd76a09806ceda20e38a3
this traps enters in input fields
[ { "docid": "c24c1b9357f72668477cc1f47c77042e", "score": "0.0", "text": "function enterpressed(event){\n var keycode;\n if (window.event) keycode = window.event.keyCode;\n else if (event) keycode = event.which;\n else return false;\n\n if (keycode == 13)\n {\n return true;\n }...
[ { "docid": "b22f83c8b94c02d4d87da1dd35e2bed2", "score": "0.65953606", "text": "function initInputs() {\n $('#wizard-body').find('input[type=\"text\"]').keydown(function (event) {\n if (event.which == 13) {\n event.preventDefault();\n $(this).blur();\n ...