query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
31cac13e7c0fc467e865b437f2adc104
Alignment For every nearby boid in the system, calculate the average velocity
[ { "docid": "3f04f968143cdf58cd87d94383c1f65b", "score": "0.74886155", "text": "align(boids) {\n let neighborDist = this.drawingSize * 300;\n let sum = this.p.createVector(0, 0);\n let count = 0;\n for (let i = 0; i < boids.length; i++) {\n let d = p5.Vector.dist(this.position, boids[i]....
[ { "docid": "b5a5469334e72ccf19ac6ae14d4e2281", "score": "0.7268698", "text": "align( boids ) {\n var neighborDist = 150;\n var sum = new Victor();\n var steer = new Victor();\n var count = 0;\n for (var i = 0; i < boids.length; i++) {\n var dist = this.position.distance(boids[i].posi...
cba4467f26d75e3e3c687013c32fce94
Here to change the initial join
[ { "docid": "00e989add4ce8bfb15f8298ea5b134f0", "score": "0.0", "text": "getRawPath() {\n return this.path.join('/');\n }", "title": "" } ]
[ { "docid": "aca5163e1dd36a29874502a6b950ca1c", "score": "0.69491893", "text": "_makeJoinQuery () {\n var self = this\n const selectionKeys = [`${this.related.table}.*`, `${this.through.table}.${this.toKey}`]\n this.relatedQuery\n .select.apply(this.relatedQuery, selectionKeys)\n .innerJoi...
8cf02eebaedb6e6ed161b7f93122945e
Exercice 1 / Convert a string to a date
[ { "docid": "2d712d2d1040a2eccb4744b8cb3ae3eb", "score": "0.7349305", "text": "function convertDate(str)\n{\n\tvar re = /[0-9]+/g;\n\tvar result = re[Symbol.match](str);\n\tvar dateLoc = new Date(result[0],result[1],result[2]);\n\n\treturn dateLoc;\n}", "title": "" } ]
[ { "docid": "1af9de1568ac8eee090f81f75c2e960b", "score": "0.74859524", "text": "function stringToDate(str) {\r\n\t var dArr = str.split(\"/\");\r\n\t var date = new Date(Number(dArr[2]), Number(dArr[1]) - 1, dArr[0]);\r\n\t return date;\r\n\t}", "title": "" }, { "docid": "a50356e1e5e...
eb087b090d980c5722d50b07a4e7c3d9
This function is supposed to compare all the items in the array with the first item, in order to discover if they are all the same. stuff is the array. isUniform is the function the array is passed into. var first = stuff[0] defines that we are looking at the first item in the array. the forloop uses stuff.length to go...
[ { "docid": "cf93e4e2b8087c1823341875165e5e31", "score": "0.81177294", "text": "function isUniform(stuff){\n var first = stuff[0]\n for(var i = 1; i < stuff.length; i++){\n if(stuff[i] !== first){\n return false;\n }\n }\n return true;\n}", "title": "" } ]
[ { "docid": "e661ea7bc8a8a3e12a6e601fc86fbab8", "score": "0.76758605", "text": "function isUniform(myarray){\n var first = myarray[0];\n for (var i=0; i < myarray.length; i++){ //can start at i=1 to avoid first run\n if(myarray[i] !== first){\n return false\n }\n }\n return true;\n}", ...
5c81398a9bd2da999e0c825420dd16ce
Nazma Azam 20180626 end Nazma Azam 20180805 start
[ { "docid": "f77d846976f2900968fd8ee00fdda45e", "score": "0.0", "text": "function others_image() {\t\n\t\n\t\n\t\t\t\t\t\t\n\t//localStorage.linkStr_combo=linkStr_combo;\t\n\t//alert (localStorage.linkStr_combo)\t\t\t\t\t\t\t\t\n\t$('#page_link_lv').empty();\n\t$('#page_link_lv').append(localStorage.link...
[ { "docid": "be4becf6dd0d098905c2cdd00fe8d0b9", "score": "0.55412716", "text": "Es(){\n return 29000\n }", "title": "" }, { "docid": "8da04f2ae4b0e7313bfe90e59b204b81", "score": "0.53760946", "text": "function calculateZmaniKinsatVeyetziatShabbath(dayG,monthG,yearG)\n {\n ...
2e9ce5244071a866bc52c3e2ab5418b4
Returns true if the group header should be shown (if there is a filtered suggestion item for this group item)
[ { "docid": "3a0446746cd4e343be035824196052d0", "score": "0.48595613", "text": "static _groupItemFilter(item, idx, allItems, filteredItems) {\n if (item.isGroupItem) {\n let groupHasFilteredItems;\n while (allItems[idx] && !allItems[idx].isGroupItem && !groupHasFilteredItems) {\n ...
[ { "docid": "229c7ceb91c56d694c31e21f846a1824", "score": "0.66689074", "text": "isSubheader(option, previousOption, i) {\n // If it's a Dropdown, don't verify\n if (this.isDropdown) return\n\n if (!option.group) return\n // If it's first and has group property ...
362b0cc736b75fb97b27ca43ee99e22d
Get a style property value.
[ { "docid": "bc5945152744a2f75c22b54eec2b1367", "score": "0.6596365", "text": "function getPropertyValue(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop);\n }\n\n return cssRule.style.getPropertyValue(prop);\n ...
[ { "docid": "718f2f8fa80821f340be13fdb67410b0", "score": "0.75559884", "text": "function w3_getStyleValue(elmnt,style) {\n if (window.getComputedStyle) {\n return window.getComputedStyle(elmnt,null).getPropertyValue(style);\n } else {\n return elmnt.currentStyle[style];\n }\n}", "title":...
69e6f125093605760028793c04a59499
Create and populate the fields for spec.processings. This is an array of objects, each of which contains keys for how the Logicker should do postprocessing on the contentscript's galleryMap. Each holds a "match" regexp for the uri, "doDig", "doScrape", and array of "actions" of varying types.
[ { "docid": "c3a558cb166aaa7e7dea847079df1ef8", "score": "0.48347363", "text": "static layoutProcessings(processings) {\r\n Optionator.layoutSpecSection(C.OPT_CONF.SECTIONS.PROCESSINGS, processings);\r\n }", "title": "" } ]
[ { "docid": "0c8533f70161b31dd033cdad694327a1", "score": "0.4779882", "text": "buildProcessRelationships(experiment) {\n let samplesById = _.indexBy(experiment.samples, 'id');\n experiment.processes.forEach(p => {\n let inputSamples = experiment.relationships.process2sample\n ...
7c8cbdccb5137f2b16a484d0f6f8c895
function to get counters along with their customers
[ { "docid": "41b84bb026ab0cf3ac542124534340ac", "score": "0.7309344", "text": "function getCountersWithCustomers() {\n\tlet counterCardContainer = $('#counters-card-container');\n\tcounterCardContainer.empty();\n\t$.get('/admin/counters', function(counters) {\n\t\tfor(counter of counters){\n\t\t\tlet cus...
[ { "docid": "534de059d8572ace5f0b547d5c83bd83", "score": "0.6555594", "text": "function getCustomersCount() {\n return $http.get('/api/v1/customers/count');\n }", "title": "" }, { "docid": "fdb13b7fe80d65943349a97f20f8af55", "score": "0.62741446", "text": "function g...
1e98dc8eff91eb530a22a866538df9c4
Finalize the block's creation
[ { "docid": "31f742b8bd35c298c102a7adda59942d", "score": "0.0", "text": "freeze() {\n\t\tthis.timestamp = Date.now()\n\t\tthis.hash = this.generateHash()\n\t}", "title": "" } ]
[ { "docid": "7a32dba9e1500285b9b9339bb0ad7da8", "score": "0.7114395", "text": "finalize() {\n if (this.tr_buffer) {\n throw new Error(\"already finalized\");\n }\n this.ref_block_num = this.ref_block_num & 0xffff;\n this.ref_block_prefix = new Buffer(this.ref_block_...
a89d63d75d7f78182c0228cbeeaa9fee
date from string and format string
[ { "docid": "a05cb5e6d77665f7d9c2db9e18662715", "score": "0.0", "text": "function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n ret...
[ { "docid": "caccc85603abff625e5dd89e8d90c441", "score": "0.7544057", "text": "function makeDateFromStringAndFormat(string, format) {\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute ...
372bc59b18952f374879abd573483eab
The Behaviour class is the base for the other Behaviour
[ { "docid": "a901ed3f4a50ae4121f0cc932ed8e5ee", "score": "0.64462006", "text": "function Behaviour(life, easing) {\n\t\t/**\n\t\t * The behaviour's id;\n\t\t * @property id\n\t\t * @type {String} id\n\t\t */\n\t\tthis.id = 'Behaviour_' + Behaviour.id++;\n\t\tthis.life = Proton.Util.initValue(life, Infini...
[ { "docid": "23193aaafa06b5c698e36ba7f54d7a2b", "score": "0.6465405", "text": "createBehavior() {\n return undefined;\n }", "title": "" }, { "docid": "37cd6d6a308e39277847c5fad5094732", "score": "0.61646575", "text": "function FindWood() { //This would become [Look, BrainLook, Mov...
bd86f23890059a65716ae865cf9e494e
Top level functions make requests for the ham and spam dictionaries
[ { "docid": "2859c8cd112005b355542145466c18b3", "score": "0.0", "text": "function getHam(){\n\t\t$.ajax({\n url: '/ham',\n type: 'get',\n dataType: 'json',\n async: false,\n success: function(data) {\n result = data;\n }\n });\n return result;\...
[ { "docid": "8a9cf70902dcb7f65679abe7e20c1768", "score": "0.5535709", "text": "function main(){\t \t\n\tvar G = new Array();\n\tredisClient.keys(\"PaloRequest*\",function(err,data){\t\t// Read all requests from Redis Database\n\t\tG['arrKeys']=data;\n\t\tif(data.length >=1){\n\t\t\tprocess(0,G);\t\t\t\t\...
5394199c5475a54dca26baffd644af06
BI Variable object Contains information to describe a repository or session variable
[ { "docid": "bf1019948b0ced05e78e29ba82162a2d", "score": "0.7217074", "text": "function BIVariable(name, type) {\n\tthis.Name = name; // Variable name as defined in OBIEE\n\t\n\tthis.VarType = type || 'Repository'; // Type, repository or session\n\tif ($.inArray(this.VarType, ['Repository', 'Session']) =...
[ { "docid": "af7cd7fd0cfcca89dde718f195b138c2", "score": "0.64163244", "text": "getVariables() {\r\n return this.variableDesc;\r\n }", "title": "" }, { "docid": "d36d75b4bff25645849e54cb1b356f51", "score": "0.60860646", "text": "variable(value) {\n return new Variable_1...
eea155c3a1be5134480d065adc03fca5
Stops a sequence execution and resets its contents. LEDs linked to this sequence are not automatically updated anymore.
[ { "docid": "44cca10c4bf3023f101949f4ea8fcc0f", "score": "0.53425246", "text": "resetBlinkSeq(seqIndex)\n {\n this.liveFunc.resetBlinkSeq(seqIndex);\n return YAPI_SUCCESS;\n }", "title": "" } ]
[ { "docid": "3c0d041f311605201b49035b20a24a6a", "score": "0.6619432", "text": "stopSequence()\n {\n this.liveFunc.stopSequence();\n return YAPI_SUCCESS;\n }", "title": "" }, { "docid": "dfe933731e718dd5f8ecf8c9c7391819", "score": "0.62274224", "text": "function YCo...
17261b0016d264463bce7602110ac239
Evento que se dispara al seleccionar un mes
[ { "docid": "1e0eec874b6d160c1dcc4e9d5170880e", "score": "0.0", "text": "function month_selected() {\n require([\n \"esri/tasks/query\",\n \"esri/tasks/QueryTask\"\n ], function (\n Query, QueryTask\n ) {\n var p = dojo.byId(\"Year_find\");\n p.disabled = true;\n\n...
[ { "docid": "a761aa24b3a70a9884a963acdce7ff57", "score": "0.67069316", "text": "beforeUnSelect() {}", "title": "" }, { "docid": "3129b2c9a65e3a8296c5120ee49ba920", "score": "0.6658171", "text": "function deselectGizmo () {\n if(selectedGizmo != null) {\n selectedGizm...
0d6f18d07eb233616c01bbe5ec4919f6
Starts the subscription service, keeping up the added subscriptions.
[ { "docid": "d2abbab08463a6c6a4405f760ac4310f", "score": "0.603872", "text": "run() {\n if (this._interval) {\n throw new Error('The FirebaseSubscriptionService is already running');\n }\n\n this._interval = setInterval(() => {\n this._keepUpSubscriptions();\n }, SUBSCRIPTION_KEEP_U...
[ { "docid": "3eb1c808167dbdd8a3a816898901a59d", "score": "0.73294234", "text": "async start () {\n\t\tawait this._restoreTopicSubscriptions()\n\n\t\t// Periodically fetch the subscriptions\n\t\twindow.setInterval(() => {\n\t\t\tlet subscriptions = JSON.parse(window.localStorage.getItem('topicSubscription...
fcda00f6afbf1b5078ba301f2afb7104
Make a function named isFalsy(input)
[ { "docid": "ca781d8c658d89d4f1ce45990c1afc92", "score": "0.7942607", "text": "function isFalsy(input){\n return input == false;\n}", "title": "" } ]
[ { "docid": "d000905a6d8231dbdfa1804360dc6c6f", "score": "0.77649224", "text": "function isFalsy(input){\n return input == false;\n }", "title": "" }, { "docid": "495ec79d17abecae68c10da19ea1ced2", "score": "0.73364395", "text": "function isFalsy(input){\n if(input === fa...
2dfea8165fb047794c9498c36b3ad952
A nicer version with regex Found at
[ { "docid": "7ad49f714fb3c573a0f87ebbfdfe0e66", "score": "0.0", "text": "function gup() {\n var vars = {};\n var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, \n\t\t\t\t\t function(m,key,value) {\n\t\t\t\t\t\t vars[key] = value;\n\t\t\t\t\t });\n return vars;\n}", ...
[ { "docid": "db0e6994978f21371c2714381a1c2e59", "score": "0.6490275", "text": "function Regexp() {}", "title": "" }, { "docid": "35f9d0aa27d5aa3cdf9efef6e702fce6", "score": "0.6157109", "text": "function adjustRegexLiteral(e,t){\"use strict\";e===\"value\"&&t instanceof RegExp&&(t=t.t...
d03668dc541db5068d007cc45918fbd1
Executing both pixelPosition & boxSizingReliable tests require only one layout so they're executed at the same time to save the second computation.
[ { "docid": "267a9a3dbc96190ab433ee4e4fa4c918", "score": "0.0", "text": "function computeStyleTests(){// This is a singleton, we need to execute it only once\nif(!div){return;}div.style.cssText=\"box-sizing:border-box;\"+\"position:relative;display:block;\"+\"margin:auto;border:1px;padding:1px;\"+\"top:1...
[ { "docid": "734bd7937701bcfa8baf98d76927a716", "score": "0.7663661", "text": "function computePixelPositionAndBoxSizingReliable() {\n div[$fog$565][$fog$573] =\n // Support: Firefox<29, Android 2.3\n // Vendor-prefix box-sizing\n $fog$576 +\n $fog$577 +\n $fog$578;\n div[$...
28a143fae6a366415d372b51b1d0f64f
v8 likes predictible objects
[ { "docid": "5eda6cb4f4707fa36cbceb42f873714d", "score": "0.0", "text": "function Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}", "title": "" } ]
[ { "docid": "c7077755399a4f71bbeb1168c6f61419", "score": "0.50904286", "text": "function VObject() {\n\t\n}", "title": "" }, { "docid": "65b9b1fb78c9d3b68ca91fc431e8b540", "score": "0.5080385", "text": "function censor(censor) {\n var i = 0; \n return function(key, value) {\n...
e8cb375732d56cd8795ee8baf75414e1
Removing the menu element from the DOM and remove all associated event listeners and backdrop
[ { "docid": "6ec64b70831558846b16e047b74d4cc1", "score": "0.0", "text": "function onRemove(scope,element,opts){opts.cleanupInteraction();opts.cleanupResizing();opts.hideBackdrop();// For navigation $destroy events, do a quick, non-animated removal,\n// but for normal closes (from clicks, etc) animate the...
[ { "docid": "6a1d829dd4c80a333a7760a3adb4b190", "score": "0.7368978", "text": "function detach() {\n if (!isAttached) return;\n isAttached = false;\n\n state.menu = null;\n\n document.removeEventListener('keydown', onKeyDown);\n document.removeEventListener('focus', onFocus, true);\n document.remov...
da5211f79791523127604a5b280ef964
Parses end time into JSON object
[ { "docid": "ac63d52d55ed4e09c9893a59b987aac4", "score": "0.59029794", "text": "function end_time() \n{\n var time_string = $('#end_time').val() || \"01:00 AM\";\n var arr = time_string.replace(':',' ').split(' ');\n return{\n 'h' : parseInt( arr[0] ) + ( arr[2] == \"AM\" ? 0 : 12 ),\n ...
[ { "docid": "088b1bd66bf41110fae0cef8ac9c5b70", "score": "0.6286324", "text": "function getTimeRemaining(endtime) {\n var t = Date.parse(endtime) - Date.parse(new Date());\n var seconds = Math.floor((t / 1000) % 60);\n var minutes = Math.floor((t / 1000 / 60) % 60);\n return {\n 'total':...
507b5691f8fe63c816cd4aea7efa871e
=================================== getVerifyCode input parameter ===================================
[ { "docid": "124f88bb56ae1573739b1b277c19b8fd", "score": "0.0", "text": "async getHistoryDetail(io_data){\n try {\n const token = io_data.token;\n const iv_oid = io_data.oid;\n const reqData = {token,iv_oid};\n const res = await HistoryApi.getHistoryDetail(reqData);\n if(res.e...
[ { "docid": "2f02b8b171d1cf67106f2fe9a15f1212", "score": "0.6983274", "text": "function validateVerificationCode(verificationCode) {\n //\n // initially a no-op\n //\n return verificationCode;\n}", "title": "" }, { "docid": "b7d56aeecfb5cebda554dbe66cb8223e", "score": "0.69058216", ...
f9d7f9723b255009eb6d997de6918951
wrapper function for providing a more flexible interface without getting yelled at by flow
[ { "docid": "77e1fdc2990927809c99bc07ae82ea95", "score": "0.0", "text": "function createElement (\n context,\n tag,\n data,\n children,\n normalizationType,\n alwaysNormalize\n) {\n if (Array.isArray(data) || isPrimitive(data)) {\n normalizationType = children;\n children = data;\n data =...
[ { "docid": "95b70191bc05bb0097b59d3cc45bc98c", "score": "0.6185405", "text": "function Wrapper() {}", "title": "" }, { "docid": "1226bccfb9553b375fc0362f444496bc", "score": "0.60045", "text": "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emit"...
2ef12015f874072cb658a50a4507808a
operation(string/char), value1(number), value2(number). The function should return result of numbers after applying the chosen operation.
[ { "docid": "a72b6f2f32a434c6d59797c8fcf15d54", "score": "0.77289087", "text": "function basicOp(operation, value1, value2) {\n if (operation === \"+\") {\n return value1 + value2;\n }\n if (operation === \"-\") {\n return value1 - value2;\n }\n if (operation === \"*\") {\n return value1 * ...
[ { "docid": "99003ff4f2ce076b64befbbafd941d28", "score": "0.78949773", "text": "function basicOp(operation, value1, value2){\n if (operation === \"+\"){\n return value1 + value2;\n }\n else if (operation === \"-\"){\n return value1 - value2;\n }\n else if (o...
360ec83e69a6652bc0e45c1840b0d3a7
Regresa un arreglo con la serie completa, al cuadrado, de la serie Fibonacci dado un N
[ { "docid": "b2d285ebc7bae5dcfcdbaa618f241ac8", "score": "0.58859926", "text": "function fibonacciNthArray(n){\n //Init array as in FIBO_INIT\n fiboArray= [0,1]\n fibonacciNth(n)\n return fiboArray\n}", "title": "" } ]
[ { "docid": "59e770c799cb4cad830b1a734962a060", "score": "0.6632184", "text": "function acrescentar_ponto() {\n\n var n = lista_focos.length - 1\n B = lista_focos\n C = Array(n+2)\n \n C[0] = B[0]\n C[n+1] = B[n]\n for (var i = 1; i <= n; i++) {\n var a = i / (n+1)\n C[...
883e2aeacc4be8ccff276d723b569de0
SUBMIT FORM TO SERVER
[ { "docid": "cf6f18b5684f86d5540ae3c37235c326", "score": "0.0", "text": "function submitForm() {\n // Initiate Variables With Form Content\n var message = $(\"#message\").val();\n var name = $(\"#name\").val();\n var email = $(\"#email\").val();\n var phone = $(\"#phone\").val();\n cons...
[ { "docid": "059fded896c30badbd6a0fbd791a6ed0", "score": "0.78521407", "text": "function submitForm () {\n\n node.submit();\n\n }", "title": "" }, { "docid": "6c315de9b2941baccdc6599815d5047f", "score": "0.7709929", "text": "function submitForm() { }", "title": "...
8021d949f95171b39d5f3375308ac098
const weights = nj.random([MOVIE_FEATURE_SIZE 3, 2]);
[ { "docid": "3f22b85bf8dd0684d391911ca6473331", "score": "0.0", "text": "function getRecommendations(likes) {\n const userFeatures = nj.concatenate(mergeMovieFeatures(likes), nj.zeros([MOVIE_FEATURE_SIZE]));\n const results = movies.map((movie) => {\n const movieFeature = nj.array(movie.feature);\n ...
[ { "docid": "d9c4f9968bdb3cd645a62ce2bdc67f3d", "score": "0.69225603", "text": "getRandomWeight(weights){\n let weightSum = 0;\n weights.forEach(weight => weightSum += weight)\n\n return parseInt(random(weightSum)) + 1;\n }", "title": "" }, { "docid": "77236828c56ce4f97bbd29ffee2c31...
f993f2ddd768883ebd81e394c1fdbe9b
Register routes using same registrar settings for the whole group
[ { "docid": "3fc7c964c486b4faddef30d489f5ae6b", "score": "0.6898057", "text": "group(config, callback) {\r\n const registrar = new RouteGroupRegistrar(this, config);\r\n callback(registrar);\r\n }", "title": "" } ]
[ { "docid": "9c8d48581fe40b0685695ed5751e392b", "score": "0.7375497", "text": "registerRoutes() {\n this.registerRoute(\"\", routes.homeRouter);\n this.registerRoute(\"user\", routes.usersRouter);\n this.registerRoute(\"authenticate\", routes.authRouter)\n }", "title": "" }, { "doci...
177c006ab27aced9217d1ddba31cadfa
make and display the control field
[ { "docid": "b8f9d3773e8e65692195ef4bf9deb7e6", "score": "0.5708568", "text": "function makeControls() {\n var fieldset = $(String.prototype.concat(\n '<fieldset>',\n '<legend>' + i18n.msg('legendTop').escape() + '</legend>',\n '<table><tbody>',\n ...
[ { "docid": "dbaeb8041ecb7f1f4592ebe3ace9ac10", "score": "0.66189176", "text": "function AddDisplay(fieldName, fieldValue) {\r\n\r\n if (fieldName == \"Address Verification\") {\r\n var string = \"<div class=\\\"form-group\\\">\";\r\n string += \"<label class=\\\"col-md-4 con...
e76d79838be8b424a65759d7dddf772f
Another premise of this utility is that none of the event listeners are part of the server side rendering workflow. i.e. you will never need to callback from this function to complete the rendering process on the server This saves us having to guard in each ko function above. we know they will only ever be called on th...
[ { "docid": "4bbb17a3452c8780eb698c3e457cc06d", "score": "0.0", "text": "function devNull() {}", "title": "" } ]
[ { "docid": "9a97a56530aa3e127f63125bc911534e", "score": "0.59012574", "text": "_addClientEventHandlers() {}", "title": "" }, { "docid": "c664b748b5ff500e37495de0a70164b3", "score": "0.58025", "text": "function ko() {\n\n function nullObjectObjectFunction( someObject, someOtherObje...
ee9e5588d3324d17f33041275b01da91
player screeen fire button
[ { "docid": "0610b1786c606e157c3e87beb3b4028e", "score": "0.6649663", "text": "function screenButtonDown() {\n fireButton = true;\n}", "title": "" } ]
[ { "docid": "a7e61aff16ab0cdb29c85ca1ab8893b0", "score": "0.7312426", "text": "playerFire(){\n\t\t// check if there is any player\n\t\t// if not, the click doesn't fire\n\t\tif (this.player === null){\n\t\t\treturn;\n\t\t}\n\t\tthis.player.fire(this.mouseX, this.mouseY); // make the player fire in the g...
8b75298f88f910be92dce7698117954a
route for getting a patient's illnesses given their phone number
[ { "docid": "ec733143332a4bf84e3e242bd6753d7d", "score": "0.72613585", "text": "static async get_illness(phone_number) {\n const body = {\n phone: phone_number\n };\n\n return await Postman._post(body, \"/get/diagnosis\");\n }", "title": "" } ]
[ { "docid": "8be4fe4ed4c445c8a7b0d38b25ca9a3c", "score": "0.58645344", "text": "static async get_medicine(phone_number) {\n const body = {\n patient_phone: phone_number\n };\n\n return await Postman._post(body, \"/get/medicine\");\n }", "title": "" }, { "docid": "3dfeedf49c0c4f...
0eb918b5ceb845df5bdef72e9cb30414
Rename variables in a parsed formula tree so that variables are all integers and go 1,2,3,... without gaps. The formula is destructively changed. Allows the input clause set to contain both positive integer variables and string variables (no negative ones: all negative vars should be represented as terms ["","x"]). Ass...
[ { "docid": "1f43e18857050dc29ec488dd35c941dc", "score": "0.71713996", "text": "function rename_vars_in_formula(tree) {\r\n var renamedvars={}, origvars=[];\r\n var res,tmp;\r\n maxvarnr=0;\r\n if (typeof tree===\"number\" || typeof tree===\"string\") {\r\n // the tree is just a single...
[ { "docid": "6002de6f15dd816af37aefcc27503312", "score": "0.7350547", "text": "function rename_vars_in_formula_aux(tree,origvars,renamedvars) {\r\n var i,el,tmp;\r\n for(i=1;i<tree.length;i++) {\r\n // loop over all term arguments\r\n el=tree[i];\r\n tmp=typeof el;\r\n i...
dc24b7c6f5de24585b5319578fb21756
Increase weight of tag.
[ { "docid": "7d0bd1ec89ed30af2d23d914ae59f52f", "score": "0.0", "text": "increaseValue() {\n this.value++;\n }", "title": "" } ]
[ { "docid": "106798c0a311b31d5610178706ce3295", "score": "0.7412746", "text": "set weight(newWeight) {\n this._weight = newWeight\n }", "title": "" }, { "docid": "f6187a3a195988927bba7ce9c292803e", "score": "0.66167736", "text": "function setWeight(weight){\r\n\t\tmyWeight =...
2d29ceb00e1ae249a8a1eaa65b6b5fd2
=========== Player class Helper functions ===============
[ { "docid": "75121b252f9aed6d572cb5bc9601d020", "score": "0.0", "text": "function checkForFinish() {\n if (this.y < 0) {\n setTimeout(() => {\n this.x = 200;\n this.y = 400;\n }, 1100);\n };\n}", "title": "" } ]
[ { "docid": "d5cd02361646881404d9d79810e5c272", "score": "0.76705736", "text": "function Player(){}", "title": "" }, { "docid": "7d74c5461484aed0d081c09bd7f1700e", "score": "0.75115746", "text": "constructor (player) {\n this.player = player;\n }", "title": "" }, { "do...
7e3af209373632df4acaf21e63087ff4
Extend shape with parameters
[ { "docid": "e37e77e66e9ba3fc00c34547cf786ad5", "score": "0.68986076", "text": "function extendShape(opts) {\n\t return Path.extend(opts);\n\t}", "title": "" } ]
[ { "docid": "9e744638514a416825d896412acf7c7c", "score": "0.69294363", "text": "function extendShape(opts) {\n return Path.extend(opts);\n }", "title": "" }, { "docid": "7b4be314d1cf105ef7cd461beb7f1bb5", "score": "0.6895309", "text": "function extendShape(opts) {\n return ...
75ed4e52d0c8ff5bc3f3b994d063ddf5
NOTE: 'log' is dealt with at the bottom of this file to avoid cluttering up the more straightforward overrides for the other logging callbacks.
[ { "docid": "3704b9e779d9c5c5379cabd7a4f1c1c2", "score": "0.0", "text": "function notifyTestDone(theTest) {\n var results = {\n name: theTest.testName,\n module: currentModuleName,\n failed: ((theTest.status === 'failure' || theTest.status === 'error') ? 1 : 0),\n ...
[ { "docid": "93e8bd30b6fd769ff3fe13e03ed3d88e", "score": "0.7915854", "text": "function log() {}", "title": "" }, { "docid": "e3feb4b7be444adddc1c58dc4d52e29d", "score": "0.7686947", "text": "function logging() {}", "title": "" }, { "docid": "c205267715d6eb2c470361d6aa6658...
94b4b4b4b34ec78d2fe63e8d76a4cce6
function for check actual token
[ { "docid": "b0303e4e10c62f3addc691a5e65de293", "score": "0.66802174", "text": "function checkToken(){\n return localStorage.getItem('TOKEN')\n}", "title": "" } ]
[ { "docid": "7aa4e3a83a8dfe93eee272c9f347a5ce", "score": "0.7417651", "text": "function verify_token(req, res) {}", "title": "" }, { "docid": "94e7bb9e35cb205fb63781fc5a44caed", "score": "0.74175346", "text": "function hasToken() {\n return !!token();\n}", "title": "" }, { ...
aaba0c69453ff0fc723cc5c012684593
We must install signal handlers before grpc lib does it.
[ { "docid": "cd2074ea6f3b425d2330af618d30131c", "score": "0.0", "text": "async function cleanUp () {\n if (csiServer) csiServer.undoReady();\n if (apiServer) apiServer.stop();\n if (!opts.s) {\n if (volumeOper) await volumeOper.stop();\n }\n if (volumes) volumes.stop();\n if (!opts...
[ { "docid": "cbf03c9387f37ed02faed78a3264ce0a", "score": "0.6082739", "text": "handleSignal(data, callback) {\n\t\ttry {\n\t\t\tlet msg = messages.decodeMessage(data);\n\n\t\t\tswitch (msg.type) {\n\t\t\t\tcase types.SIGNAL:\n\t\t\t\t\t// decode the actual signal message\n\t\t\t\t\tlet payload = messages...
38c8f7ffee11d80daf177508d90667cf
makes the `entry` the freshEnd of the LRU linked list
[ { "docid": "a2a69d545549a1e172620199a74ae98c", "score": "0.70368665", "text": "function refresh(entry) {\n\t\t\t\t\tif (entry != freshEnd) {\n\t\t\t\t\t\tif (!staleEnd) {\n\t\t\t\t\t\t\tstaleEnd = entry;\n\t\t\t\t\t\t} else if (staleEnd == entry) {\n\t\t\t\t\t\t\tstaleEnd = entry.n;\n\t\t\t\t\t\t}\n\n\t...
[ { "docid": "ac42976b32fe555269399e9a8c09da8e", "score": "0.70475626", "text": "function refresh(entry) {\n\t if (entry !== freshEnd) {\n\t if (!staleEnd) {\n\t staleEnd = entry;\n\t } else if (staleEnd === entry) {\n\t staleEnd = entry.n;\n\t }\n\n...
22b5b3755f36767727ab31927e0c1062
Assignment: Explain what the push/pop functions do for this API. What effect would it have on the fluent API if we did not have them?
[ { "docid": "80f4d23a384b1797b026142624295d8a", "score": "0.0", "text": "function create(){\n let waitingFor={\n counters: {},\n push:function(verb){\n waitingFor.counters[verb]=waitingFor.counters[verb] || [];\n waitingFor.counters[verb].push(ve...
[ { "docid": "1b3865e4d78cfb6186f85ce36a8bebc6", "score": "0.62745786", "text": "get push() { return this._push; }", "title": "" }, { "docid": "1b3865e4d78cfb6186f85ce36a8bebc6", "score": "0.62745786", "text": "get push() { return this._push; }", "title": "" }, { "docid": "...
78ba5ef6d1a4d9294d026b5ee42fd39a
Begining of Input Processing //
[ { "docid": "2b722c881f58214d5b5fe6e31c17fe36", "score": "0.0", "text": "async function inputAsync(source) {\n try {\n if(source) {\n await validateFile(source);\n return await parseJSONFromFile(source);\n }\n else {\n return await parseJSONFromStd...
[ { "docid": "8d100496396a52d1e254a78bab8298a8", "score": "0.65628046", "text": "handleInput() {}", "title": "" }, { "docid": "1839e55dca53f03fda13d5c67dec2fd7", "score": "0.65451765", "text": "handleInput(input) {\n\t\t\n\t}", "title": "" }, { "docid": "5f3ebfc4d9b8e3d28a3...
e07fbb9052785363839ad94ca3f1daba
Do deep traversal of tree to find id that macthes
[ { "docid": "dbb5997aa81912f63eecda6a733ab7e0", "score": "0.70042974", "text": "function _findInTree(id, _tree, lc) {\n // console.log('_findInTree',id,_tree, lc)\n \n let found = false;\n let _obj = null\n \n while (!found) {\n ...
[ { "docid": "2b2f4dcfb853cfdc60052e9616c056ff", "score": "0.63910615", "text": "function nextAnythingOf (_id) {\r\n\r\n\t\tvar previousId = '0',\r\n\t\t\tresult = _id,\r\n\t\t\tdone = false;\r\n\r\n\t\tfunction r (_metaNode) {\r\n\t\t\r\n\t\t\tvar thisId = _metaNode[0].id;\r\n\r\n\t\t\t// Test for end co...
1e816746ba7205547a6361de1c9f3af3
todo B. Division return a / b
[ { "docid": "79af4c8971ee186b83a9c1474290a3b8", "score": "0.8253136", "text": "function division(a, b) {\n\treturn printResult(parseInt(a) / parseInt(b));\n}", "title": "" } ]
[ { "docid": "4ce411ad33e748e409ab78fe153952e8", "score": "0.87975955", "text": "function division(a, b) {\r\n\treturn a / b;\r\n}", "title": "" }, { "docid": "d561eb43f4b7b4ad1bedc9a026b46690", "score": "0.84993297", "text": "function divide(a,b) {\n\treturn a / b\n}", "title": ""...
8c63dda8042f5ac272e0875e5e56b178
DOCUMENT DATA STRUCTURE By default, updates that start and end at the beginning of a line are treated specially, in order to make the association of line widgets and marker elements with the text behave more intuitive.
[ { "docid": "76f88e081ef9322a6c59e2b119fb37d1", "score": "0.0", "text": "function isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore);\n }", "title": "" } ]
[ { "docid": "ae243f8d0f35522ba9581bc684460200", "score": "0.59927076", "text": "function isWholeLineUpdate(doc,change){return change.from.ch==0&&change.to.ch==0&&lst(change.text)==\"\"&&(!doc.cm||doc.cm.options.wholeLineUpdateBefore);} // Perform a change on the document data structure.", "title": ""...
3c210950c105ad5599234cba4509f39b
Make the phylogeny Panel small, and the minimap Panel big
[ { "docid": "f50aef9c72632fd7376eea8b2a768324", "score": "0.5780118", "text": "function fullSizeMinimap() {\n $(\"#zoom\").animate({\n height: screenHeight - 250 - $('#header').height()\n }, 500);\n\n $('#phylogenyContainer').animate({\n 'width': 30\n }, 1000, function () {\n ...
[ { "docid": "42f6fa2e4e7b03144313322f9a58cc88", "score": "0.6200275", "text": "function screenResize() {\n //If the width has changed since last time, update the width of the left sub panel accordingly\n if ($(window).width() != screenWidth) {\n $(\"#phylogenyContainer\").width(Math.ceil($(\...
5ab1332b5583952b37f25997ed94ad36
Configure and populate FontAwesome library faConfig.autoAddCss = false faLibrary.add(fasIcons) faLibrary.add(fabIcons) faLibrary.add(farIcons)
[ { "docid": "eed134ec3f03f7dc113aa2c4572960fd", "score": "0.0", "text": "function App(props) {\n\tconst {\n\t\tComponent,\n\t\tisServer,\n\t\tpageProps,\n\t\tstore,\n\t} = props\n\tconst router = useRouter()\n\n\tuseEffect(() => {\n\t\tNProgress.configure({ showSpinner: false })\n\t\tLocalForage.config({...
[ { "docid": "40b45e1ac51148c1c7da35e6d79afb9c", "score": "0.6603216", "text": "async function constructFontAwesome() {\n await cloneFACss();\n await cloneFAWebfonts();\n}", "title": "" }, { "docid": "100bb569f569edfb9968088ef0a00602", "score": "0.6143243", "text": "readConfig() ...
b5c191a658900bcd0006a40ea761f21c
Provides header/body/footer button support for Widgets that use the `WidgetStdMod` extension. This Widget extension makes it easy to declaratively configure a widget's buttons. It adds a `buttons` attribute along with button accessor and mutator methods. All button nodes have the `Y.Plugin.Button` plugin applied. This ...
[ { "docid": "807a62f46b54802cb55c1ba07c120716", "score": "0.70439684", "text": "function WidgetButtons() {\n // Has to be setup before the `initializer()`.\n this._buttonsHandles = {};\n}", "title": "" } ]
[ { "docid": "6fb0ec608f526a27c0a19f104932b55f", "score": "0.62102777", "text": "function createButtons(){\n\n for (i=0; i < moduleNames.length; i++){\n bttns[i] = new Button(moduleNames[i],moduleLinks[i], picFilenames[i], moduleDescriptions[i]);\n bttns[i].createButton();\n }\n\n for (i=0; i < m...
c74c0c174262f6fc82112c364bc72855
Resume the observers. Observers immediately receive change notifications to bring them to the current state of the database. Note that this is not just replaying all the changes that happened during the pause, it is a smarter 'coalesced' diff.
[ { "docid": "2f47f7c0d46f2273a2d06cbcee397d67", "score": "0.7793419", "text": "resumeObservers() {\n // No-op if not paused.\n if (!this.paused) {\n return;\n }\n\n // Unset the 'paused' flag. Make sure to do this first, otherwise\n // observer methods won't actually fire when we trig...
[ { "docid": "72c75d2c763a6cce590e48503472705f", "score": "0.65065014", "text": "pauseObservers() {\n // No-op if already paused.\n if (this.paused) {\n return;\n }\n\n // Set the 'paused' flag such that new observer messages don't fire.\n this.paused = true;\n\n // Take a snapshot ...
91fc951128b65d61ed966eb3d92e355d
Delete a user with id. DELETE user/:id
[ { "docid": "a71ee4274c6b9a8bd9172f5b4a048fcf", "score": "0.0", "text": "async destroy ({ params, response }) {\n // retrieve the data by given id\n const evaluation = await Evaluation.find(params.id)\n if (evaluation) {\n response.status(200).json({\n success: 'Deleted ...
[ { "docid": "29e7db5136b9bc10683aa61b9d640453", "score": "0.8365881", "text": "delete () {\n this.app.delete('/user/destroy/:id', (req, res) => {\n try {\n this.UserModel.findByIdAndRemove(req.params.id).exec().then(user => {\n res.status(204).json(user || {})\n }).catch(er...
d658be806737da8ecc6d21641f163962
Report Card. 5 points. Write a function that prompts the user to enter test, quiz, and homework grades for the marking period. Users can enter as many grades of each category, entering 1 to signal they are finished. Your function should output the user's final grade, where tests, quizzes, and homework are weighted at 6...
[ { "docid": "7026597cc2f7796629fc38e0595c1aa1", "score": "0.7730724", "text": "function reportCard() {\n\n ///////////////////////// DO NOT MODIFY\n let testTotal = 0; ////// DO NOT MODIFY\n let quizTotal = 0; ////// DO NOT MODIFY\n let homeworkTotal = 0; // DO NOT MODIFY\n /////////////////////////...
[ { "docid": "5783bd073dc97d5cc663797307b7fc17", "score": "0.73676294", "text": "function reportCard() {\n\n ///////////////////////// DO NOT MODIFY\n let testTotal = 0; ////// DO NOT MODIFY\n let quizTotal = 0; ////// DO NOT MODIFY\n let homeworkTotal = 0; // DO NOT MODIFY\n ////////////////////////...
80df5c5b32bb72bd70798af0ab3ae57a
function for cloning info block into form
[ { "docid": "5a556e1d7ef9ee109a75b4372ef3ba64", "score": "0.0", "text": "$doCheck() {\n let form = false;\n if (this.form.children[1].children[1] !== undefined) {\n if (this.form.children[1].children[1].children[0] !== undefined) {\n form = this.form.children[1].ch...
[ { "docid": "1b8d911f6b876c4a15ee359d774057fd", "score": "0.64843255", "text": "function createFormInfo() {\n createPizzaBasePart();\n createIngredientPart();\n }", "title": "" }, { "docid": "901ebacbb54753b2b157f5c84a084b4a", "score": "0.6451408", "text": "function c...
25f3f0ce73382e931202a74f9e6112c4
1: KEYWORD "function" 2: NAME of "functionName" 3: PARAMETER "currently empty" 4: STATEMENT "to process" 5: INVOKE "on switch" ? Function Declaration A chunk of code that performs a set action when it is invoked
[ { "docid": "32cc4dea801f4d6e7df96c9af96a5723", "score": "0.0", "text": "function funcOne(){\n console.log('Statement Here');\n }", "title": "" } ]
[ { "docid": "4797c7fcac1215a4ea85c3a5d4069969", "score": "0.7138908", "text": "function funcName(Parameter1, Parameter2)/*function definition*/{\n\t//code the function runs\n}", "title": "" }, { "docid": "0b92b02ea953abdf7ce1a1568e1c4003", "score": "0.6978282", "text": "function funct...
0baf8890fb1947b1aaaa57c5dd93871e
extend FactoryItem into any item we want to produce and have a getSchematic call. get the schematic from the prototype, all FactoryItems must hold a schematic (on their prototype) and will have a build method which takes the pos of the schem.prop and uses it to properly place the returned value
[ { "docid": "35db62c6ce0f1389fb341541935b6653", "score": "0.66446495", "text": "function FactoryItem ( schematic ) {\n\tthis.schematic = schematic;\n\tif (FactoryItem.counter>=0)\n\t\tFactoryItem.counter++;\n\telse\n\t\tFactoryItem.counter = 0;\n\tthis.id = FactoryItem.counter;\n}", "title": "" } ]
[ { "docid": "0ed4f328385cb8a855142cc05a331279", "score": "0.5472515", "text": "function ItemFactory() {\n return function (name, quantity, pricePerItem) {\n return {\n name: name,\n quantity: quantity,\n pricePerItem: pricePerItem\n ...
e295c097d3b9fc7dc34cde751d054dfd
Returns the parent folder of a given path "" > "" "/" > "" "a" > "" "/a" > "" "a/" > "" "/a/" > "" "a/b" > "/a" "/a/b" > "/a" "a/b/" > "/a" "/a/b/" > "/a"
[ { "docid": "19c94e35970b2bf3959e8c983536dc53", "score": "0.789645", "text": "function getParentFolder(path) {\n if (!path.startsWith(\"/\")) path = \"/\" + path;\n if (path.endsWith(\"/\")) path = path.slice(0, -1);\n return path.substring(0, path.lastIndexOf(\"/\")); \n}", "title": "" }...
[ { "docid": "b81bb51946ce9211c4cd3421e5bbe9dc", "score": "0.8263432", "text": "function parentFolder(path)\r\n{\r\n\tif(path.indexOf('/')!=-1)\r\n\t\treturn path.substr(0, path.lastIndexOf('/'));\r\n\telse\r\n\t\treturn path.substr(0, path.lastIndexOf('\\\\'));\r\n}", "title": "" }, { "docid"...
17f3b835a6ebcb7f8b88d6186c200116
...foods collects arbitrary number of arguments into an array
[ { "docid": "1ea9f2af884b4dd1195cffadd7aafcdf", "score": "0.0", "text": "constructor(...foods) {\n super();\n this.foods = [];\n foods.forEach((food) => this.foods.push(food))\n }", "title": "" } ]
[ { "docid": "e4244002324fdb99d51dd4ddf93b5acc", "score": "0.68797004", "text": "function arrayfromargs(){\n\treturn Array.prototype.slice.call(arguments, 0);\n}", "title": "" }, { "docid": "47ed95340d651ca269bcf3ba59b0e353", "score": "0.67406774", "text": "function makeArray() {\n ...
aae211a513f7ef22244225af65f7d1fb
Places text elements for the current frame.
[ { "docid": "66d92d96157c1c3e27284c06ee08cdc5", "score": "0.5382235", "text": "placeText(dataSourceTileList, time) {\n const tileTextElementsChanged = checkIfTextElementsChanged(dataSourceTileList);\n const textElementsAvailable = this.hasOverlayText() || tileTextElementsChanged;\n i...
[ { "docid": "30931cbde6974a63a3781538e6b7ea29", "score": "0.61167115", "text": "display() {\r\n push();\r\n translate(this.x, this.y, this.z);\r\n textAlign(CENTER, CENTER);\r\n textFont(font);\r\n textSize(100);\r\n\t\tfill(this.color);\r\n text(this.str, 0, 0);\r\n pop();\r\n }", ...
4244b6354bd880a1623d003723df7002
=========================== ignoreindoc This code is triggered in the UI process directly after the creation of the worker and sends the setup message to the worker for initializing it.
[ { "docid": "d4558e2ed2a33a0808dd1c247972032e", "score": "0.5931894", "text": "function init(options, worker) {\n exports.events.makeEmitter(worker);\n\n if (!options.scriptsToLoad) {\n options.scriptsToLoad = [\n 'base.js',\n 'events.js',\n 'object.js',\n ...
[ { "docid": "f4af0cc58b2bc9b0ae22595cb968b618", "score": "0.6984129", "text": "function workerSetupFunction() {\n var remoteWorker = self;\n remoteWorker.onmessage = function(evt) {\n if (evt.data.action !== \"setup\") {\n throw new Error(\"expected setup to be first message but...
3be4c6f9803610d09abd8c834185d739
Task Complete check function
[ { "docid": "358e154069463073486e25d48aa0cabc", "score": "0.0", "text": "function checkboxClicked(index) {\r\n let getLocalStorageData = localStorage.getItem(\"New Todo\");\r\n listArray = JSON.parse(getLocalStorageData);\r\n const element = document.getElementById(\"checkbox_\"+index);\r\n c...
[ { "docid": "d866021579aeda6431e5fc230d8741d5", "score": "0.76647866", "text": "function tasksComplete() {}", "title": "" }, { "docid": "9ee9ac791fc6add4d5398daf394bbda4", "score": "0.72366714", "text": "function U1_checkData(task) {\n return task.name && task.status == 'Complete' &&...
61ffcb4e884b4b2501a12363dea3c55c
This Componenet renders a a game interpretation of time synchronization with a time server. Users can click nodes to pause and continue their animation in an attempt to synchronize all nodes. This abstraction of time synchronization does not include RTT/2 which is an integral component of synchronization on a distribut...
[ { "docid": "2326d1061040a2e95034fccb26b57d76", "score": "0.56372947", "text": "function NodeGame() {\n return (\n\n <div>\n <div>\n <h2 className='flex-container wrap instructions'>Click on the nodes to pause and play.</h2>\n </div>\n <div classN...
[ { "docid": "27796357b603ac18ebe1d67f8b059d03", "score": "0.6239343", "text": "function TimeConductor() {\n EventEmitter.call(this);\n\n //The Time System\n this.system = undefined;\n //The Time Of Interest\n this.toi = undefined;\n\n this.boundsVal = {\n ...
026f25271742574f30cca8b675b2b558
bl_order of the last bit length code to send.
[ { "docid": "9388c08e76901547f3c5845f9be7ac1d", "score": "0.0", "text": "function build_bl_tree(){var max_blindex;// index of last bit length code of non zero freq\n// Determine the bit length frequencies for literal and distance trees\nscan_tree(dyn_ltree,l_desc.max_code);scan_tree(dyn_dtree,d_desc.max_...
[ { "docid": "5980bc6520e98da2a20a066b0ed67d9b", "score": "0.67989624", "text": "getBufferLength(order) {\n\t\treturn (2**order)**2*2\n\t}", "title": "" }, { "docid": "dbb5791d1dff85d3c5217e66e65c43df", "score": "0.5994928", "text": "function bnByteLength() {\n\t return this.bitLength...
8a12feef9be463757b741d4d9b2b12ca
Hover event handler for list items.
[ { "docid": "f4ed70e1e03543ef0c10d5524b12e7c9", "score": "0.65054", "text": "function handleItemHover() {\n $(this).toggleClass(\"item_hover\");\n}", "title": "" } ]
[ { "docid": "ebf65a470e00b1011d45b5adc9e430af", "score": "0.71404165", "text": "function allowListHover(i){\r\n $('.list:eq('+i+')').on('mouseover mouseout');\r\n}", "title": "" }, { "docid": "9321b0d6d7b7fcea83e2f2ee0e8d1264", "score": "0.7139063", "text": "function hoverItem (e) ...
5a4d2a21d9a8b58d8857d4aac9e54197
Clone and return a new ReactElement using element as the starting point. See
[ { "docid": "32218d3188f78fb856a639594bb5fd9b", "score": "0.0", "text": "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n\n var ...
[ { "docid": "c4bd64f7c825bd2365f035c52ab7bb22", "score": "0.7479347", "text": "cloneElement(element) {\nif (!element) debugger;\n if (!(element instanceof JSXElement)) return element;\n return element.clone();\n }", "title": "" }, { "docid": "78f3067dc4b9ae911a74b41f91195624", "sco...
ec284c7fd068ec2a78df5e67a2c3040e
Determine whether the given properties match those of a ``EbsProperty``
[ { "docid": "03630f357d969300c0799ad198a99a6b", "score": "0.65970075", "text": "function CfnInstance_EbsPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n errors.collect(cdk.propertyV...
[ { "docid": "f963bd455687991581c22853b3b603d8", "score": "0.6639124", "text": "function InstanceResource_EbsPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n erro...
e60af60d49a1cdb87fa0ba4411b256a0
"Class" to create an error Object (to handle validateMessages)
[ { "docid": "f9279f35d4f79008cce20d5a9770be1e", "score": "0.62448555", "text": "function errorObject()\n{\n\tthis.obj = document.getElementById(\"errors\");\t\t\t//div oder span as output\n\tthis.content = \"\";\t\t\t\t\t\t\t\t\t\t//content to display as error(s)\n\tthis.timer =0;\t\t\t\t\t\t\t\t\t\t\t//...
[ { "docid": "7cb3d13ce5293d1d64ed9871ceaf21fd", "score": "0.73871", "text": "function ValidationError(message) {\n this.message = message;\n}", "title": "" }, { "docid": "52b77ef33b085e75095ee0ce8efb4af6", "score": "0.71837264", "text": "function createErrorObject(msg){\n\tvar erro...
c42d3208d09e63da566494322eaa15c1
Outputs a number of spans to make up a line, taking highlighting and marked text into account.
[ { "docid": "2bc259428f5304a8fd853fa98c79320a", "score": "0.64424604", "text": "function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i = 1; i < styles.length; i+=2)\n builder.addToken(builder, allText...
[ { "docid": "4b0e131685290a8667fd41c17065a0eb", "score": "0.6637361", "text": "function insertLineContent(line, builder, styles) {\n\t var spans = line.markedSpans, allText = line.text, at = 0;\n\t if (!spans) {\n\t for (var i = 1; i < styles.length; i+=2)\n\t builder.addToken(builder, ...
a93f015856a85562c3feec41738a78ff
en la funcion getNews haremos nuestras peticiones
[ { "docid": "82349d146cf49d1eed8f98f98bcffeec", "score": "0.68687636", "text": "function getNews() {\n const articleRequest = new XMLHttpRequest();\n articleRequest.open('GET', `https://swapi.co/api/people/`);\n articleRequest.onload = addNews;\n articleRequest.onerror = handleError;\n articleReques...
[ { "docid": "9b2a29012a7f2fe3866151e5dcb8f28c", "score": "0.79436946", "text": "function getNews() {\n const collections = [\n 'general',\n 'business',\n 'health',\n 'science',\n 'entertainment',\n 'technology',\n 'sports'\n ];\n\n NewsPiece.find((err, news) =>...
4fdb744cb246406c57c60d0c5661aec5
PLAYER TRIES TO ATTACK
[ { "docid": "946fd69b23223c393f1a5e1e55aa473e", "score": "0.0", "text": "function doAttack(){statusMessage.delete(); setTimeout(doRealAttack,1000);}", "title": "" } ]
[ { "docid": "32137fe7ea390ec85850aebf47a69eee", "score": "0.66377115", "text": "function ATTACK (you, opp) {\n var attack = opp.health -= you.atk;\n var hit = you.health -= opp.counter;\n\n if(you.name===\"Baby Yoda\"){\n $('#yodaC > div > p').text(hit);\n if(op...
6a9e2082055f34e6404c85bcdb0a2d67
Constructor method for MongoAccess class
[ { "docid": "d6ec7597fee799f6ecfb036744433c47", "score": "0.0", "text": "constructor(){\n this.app = new App();\n this.div_title = this.app.add_div();\n this.div_form = this.app.add_div();\n this.load_title_div();\n }", "title": "" } ]
[ { "docid": "3f49e7e73b61dc1104d28e741b43a0c3", "score": "0.7198808", "text": "constructor() {\n this.collection = 'category'\n this.mongoDB = new MongoLib()\n }", "title": "" }, { "docid": "1f49960daf9e232f2b9a58debcf5f8aa", "score": "0.7092769", "text": "constructor() {\n ...
e14c139f1836726efaafa498be6c5027
TODO: Do I set scriptStarted to false? TODO: Use scriptstarted to set/restore a state
[ { "docid": "a3716049ddd6945e8138fbf4eebd3206", "score": "0.0", "text": "RenderPostMeta() {\n\t\tif (!this.script && !this.script.scriptStarted) {\n\t\t\tconsole.warn('The Meta will not post');\n\t\t\treturn;\n\t\t}\n\t\tconst postMetas = [];\n\t\tthis.script.metas.forEach((meta) => {\n\t\t\tif (meta.pos...
[ { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "score": "0.65704167", "text": "started() {}", "title": "" }, { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "score": "0.65704167", "text": "started() {}", "title": "" }, { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "sc...
ad19b20d4483141e562c0628d90a1cae
Convert boxes into JSON
[ { "docid": "dbc3ee08ea77ebf01efd18a7fab4fec0", "score": "0.788428", "text": "function boxesToJSON( boxes ) {\n var box_list = [];\n for ( var i=0; i<boxes.length; i++ ) {\n\tvar ne = boxes[i].getNorthEast();\n\tvar sw = boxes[i].getSouthWest();\n\n\tbox_list[i*4] = ne.lat();\n\tbox_list[i*4 + 1] =...
[ { "docid": "c5b7e66012ebd5f8e51be14ce3b8120e", "score": "0.60035586", "text": "toJSON() {\n let obj = { type: this.type.name };\n for (let _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n if (this.content.size)\n obj.content = this.content.toJSON();\n if (this.ma...
05475eb2332884254c40e375a3b15057
still need to finish submit
[ { "docid": "15bbbeeab587e7fab6cd0b622f3987b2", "score": "0.0", "text": "function onSubmit6() {\n EditService.updateFamily(vm.data)\n .then(function successCallback(response) {\n if (response.status === 200) {\n UtilityFactory.showTempla...
[ { "docid": "d95f520bc5a8351b7676c87f79ed97c8", "score": "0.74191684", "text": "function doSubmit() {\n \tsetTimeout(_doSubmit, 10); // this lets dom updates render\n }", "title": "" }, { "docid": "cb18c7b0658ef465b0fa925c6a9def5c", "score": "0.72688705", "text": "functi...
3ef20c827ffedb44bf6ecdcc714afe9c
Sets the request headers.
[ { "docid": "d12140123b2b2184f9b79ce6658e6d1e", "score": "0.72249836", "text": "function setHeaders(headers) {\n if (headers == null) return this;\n return {__proto__: this, _headers: headers};\n }", "title": "" } ]
[ { "docid": "216f4685264c53984fc0cb8366a3eb39", "score": "0.80943346", "text": "set headers(val) {\n\t\tthis.req.headers = val;\n\t}", "title": "" }, { "docid": "714c3f03388de35527cbadddb9af3e2c", "score": "0.8005784", "text": "set headers(val) {\n this.req.headers = val;\n }", ...
645b934a5a6e791a852e6d01e8c7e6ca
Case reducer Move widget in different order
[ { "docid": "f28dcb8a7485febb037db3319bda9d9f", "score": "0.60756487", "text": "function moveWidget(widgetState, action) {\n const from = widgetState.findIndex(widget => {\n return widget.id == action.from;\n });\n const to = widgetState.findIndex(widget => {\n return widget.id == action.to;\n ...
[ { "docid": "0815c7d3b5d06b668218d9001ca24915", "score": "0.65510875", "text": "_handleMoveItem(e) {\n this.activeItem = e.detail.item;\n this.moveItem(e.detail.item, e.detail.moveUp, e.detail.byGroup);\n }", "title": "" }, { "docid": "d4cf599305e619114a5f61e5fba0cca8", "score": "0...
034a277c4f1eb4fc5c6dd543df79470f
Renders the shoe product based on the incoming 'product' array/API call
[ { "docid": "912402b336c9f543c6c63c6bab2b5b20", "score": "0.6072076", "text": "function renderProduct(p) {\n return (\n <div key={p.id} className=\"product\">\n <Link to={`/${category}/${p.id}`}>\n <img src={`/images/${p.image}`} alt={p.name} />\n <h3>{p.name}</h3>\n ...
[ { "docid": "7dd014a91955523b97d76c1e629d7150", "score": "0.7338014", "text": "function renderProduct(data) {\n var product = data.data;\n var baseUrl = window.location.origin;\n\n for (x in product) {\n var strHtml = '';\n strHtml += '<!-- product -->';\n ...
c54ff8842d2e19670fa01e190f4fab5e
! moment.js locale configuration
[ { "docid": "dd9f0ee428963a5392ab8604e629004b", "score": "0.0", "text": "function e(t,e,n,a){var r={m:[\"eng Minutt\",\"enger Minutt\"],h:[\"eng Stonn\",\"enger Stonn\"],d:[\"een Dag\",\"engem Dag\"],M:[\"ee Mount\",\"engem Mount\"],y:[\"ee Joer\",\"engem Joer\"]};return e?r[n][0]:r[n][1]}", "title":...
[ { "docid": "178433e4b11f9ddcb88c4b6e193a2995", "score": "0.82468", "text": "function Wr(e,t,a){return\"m\"===a?t?\"хвилина\":\"хвилину\":\"h\"===a?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var a=e.split(\"_\");return t%10==1&&t%100!=11?a[0]:t%10>=2&&t%10<=4&&(t%...
21110feef32c3f0926dfab0954bbb45a
FRIEND UPDATER (LEVEL 2)
[ { "docid": "b6cc4550f5cf2faaa0b48e84eeb4768f", "score": "0.0", "text": "function TargetUpdater2 ( opts ) {\n this._opts = opts;\n return this;\n}", "title": "" } ]
[ { "docid": "4c29c0cbb043aee41a204de006adf9ef", "score": "0.6257076", "text": "function updateFriends() {\n\t\t// FriendFactory.getFriends takes a callback function that has the output as a parameter\n\t\tFriendFactory.getFriends(function(output) {\n\t\t\t$scope.friends = output;\n\n\t\t});\n\t}", "t...
e7e9b502402b76a1f3676e37f49d46f9
Used 'uni range + named function' from
[ { "docid": "0798ff1421964b5a7ea358631ea6618a", "score": "0.0", "text": "function match(a) {\n return DIACRITICS[a] || a;\n }", "title": "" } ]
[ { "docid": "4cc41fc5d8be19d2f163aa72e421c519", "score": "0.60926735", "text": "function range(start, end) {\n //your code goes here...\n\n}", "title": "" }, { "docid": "5e71dbb89dcad15b58c33eaa98090031", "score": "0.58813125", "text": "static namesRange(template, a, b) {\n re...
4b0b0d2fd75b6b7a69300cab0e936da4
Build and return a TriangleMesh
[ { "docid": "d676e5ba3802e5cc78fda290f6383d0e", "score": "0.7262752", "text": "create(runChecks=false) {\n // TODO: use Float32Array instead of this, so that we can\n // construct directly from points read in from a file\n let delaunator = Delaunator.from(this.points);\n let g...
[ { "docid": "e4cc2692e272b51b2ece12ac3030b41b", "score": "0.6984901", "text": "function gen_triangle( size, v1 = new THREE.Vector3(-1, 0, 0), v2 = new THREE.Vector3(1, 0, 0), v3 = new THREE.Vector3(-1, 1, 0) ) {\n var triangle_geometry = new THREE.Geometry();\n var triangle = new THREE.Triangle(v1,...
3d517134c0f63110767cae920af70ce8
Starts a brand new search for a particular subreddit Parameters: subredditName, the name of the subreddit to search ignoreWaiting, whether this function should ignore the fact that the progress bar is shown(presumably a request is waited on) afterParam, the parameter to send to reddit to get paginated results Returns: ...
[ { "docid": "cd0a3cfd45e2cb2a9c0b7ce2f50082f7", "score": "0.85951895", "text": "function searchSubreddit( subredditName, ignoreWaiting, afterParam )\n{\n // if the progress bar is being shown, then a search is currently being done so return(unless ignoreWaiting is true)\n if ( !ignoreWaiting && $( ...
[ { "docid": "9e150d0af4b50a35585d3cb3ce1eac4b", "score": "0.7175046", "text": "function requestSubreddit( subredditName, afterParam )\n{\n currentSubreddit = subredditName;\n var paramObj = { \"limit\" : 100 };\n if ( afterParam != undefined )\n {\n paramObj[ \"after\" ] = afterParam;\...
f41a00fd376c5fd66b3c8a163f2ab8c1
Changes the state with the new rating
[ { "docid": "64f70d03e4979023ea89fb38856606e7", "score": "0.71054816", "text": "onStarRatingPress(rating) {\n this.setState({\n starCount: rating\n });\n }", "title": "" } ]
[ { "docid": "530c3fb1fecb51c6c2a2a349510fed04", "score": "0.7572421", "text": "function setRating(rating) {\n newReview.rating = rating;\n let elements = $('.rating-list .col.d-inline');\n elements[rating-1].classList.add('active-rating');\n if (lastRating)\n lastRating.classList.remove('active-ra...
d183bd510d51618570e1838a68fc3647
Normalizes the path separators and trims the trailing separator (when safe). For example, `/foo/ => /foo` but `/ => /`
[ { "docid": "713b0dd6f35804b0dc4979a793c51847", "score": "0.71360266", "text": "function safeTrimTrailingSeparator(p) {\n // Short-circuit if empty\n if (!p) {\n return '';\n }\n // Normalize separators\n p = normalizeSeparators(p);\n // No trailing slash\n if (!p.endsWith(pat...
[ { "docid": "d3bcefcd1f496392ac7f9e1f387cad77", "score": "0.7493733", "text": "function normalizeSeparators(p) {\n p = p || '';\n // Windows\n if (IS_WINDOWS) {\n // Convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // Remove redundant slashes\n const isUn...
7b892089a6b3102fa1856f8067206e71
Overridden to notify STM about flat insert action
[ { "docid": "406c96dd6f4c455b59c11f289b7d40df", "score": "0.58933204", "text": "insert(index, records, silent = false) {\n let result;\n const stm = this.stm; // Tree inserting is routed via rootNode.insertChild() it has it's own\n // STM override thus if the store is tree we ignore the action\n...
[ { "docid": "b5cc16f1246f91e3ad00746afd02bc64", "score": "0.610334", "text": "insert() {\n this.runLocalHooks('change');\n }", "title": "" }, { "docid": "9670a3170c5bc1b2fee06787ebc0ba1c", "score": "0.60799724", "text": "localInsert(val, index, connections) {\n this.list.incCou...
d2873dc029e621bd103a7723912f6baf
Shows friend action buttons (add friend, delete friend, accept request, cancel request) depending on the friendship
[ { "docid": "2d0cd05dfccc35c238679902056c9e33", "score": "0.72791314", "text": "function showFriendActionButton() {\n getFriendship(function (error, response) {\n if (error) {\n console.log(error);\n } else {\n //console.log(response);\n if (response.length == 0) {\n $('.addf...
[ { "docid": "6016e77206f13c70b8bac904e3018d44", "score": "0.6598488", "text": "function initFriendActionButton() {\n $('.addfriendbutton').css('display', 'none');\n $('.addfriendbutton').attr('data-id', userId);\n $('.deletefriendbutton').css('display', 'none');\n $('.deletefriendbutton').attr('data-...
601ba7169c1bb209c5c0233654c61b32
Show & Hide Modal
[ { "docid": "d94255b03f4d6291f25d92e6a0ea6289", "score": "0.0", "text": "function hideModal() {\n document.body.style.overflowY = 'auto';\n modal.hidden = true;\n}", "title": "" } ]
[ { "docid": "9de66b77db3ad962bfe4e93c20f926ae", "score": "0.78207153", "text": "function show() {\n $$invalidate('modalIsVisible', modalIsVisible = true);\n }", "title": "" }, { "docid": "cdd9248545bc7e502e10c99cd103fcdc", "score": "0.7753842", "text": "function attShowModal()...
5daa48435255eefa94e42c866e4e1d71
===================================================== CHAMPION UPGRADES ===================================================== / All of this must be implemented in the champion object constructor, for easier future updates create a function that computes the cost of the lvl 18 upgrade (~ 100baseCost) championUpgrade obj...
[ { "docid": "de63a1436554920b842b418a6f223d14", "score": "0.7360277", "text": "function ChampionUpgrade (champion, name, cost) {\n\tthis.champion = champion;\n\tthis.name = name;\n\tthis.cost = cost;\n\tthis.owned = 0;\n}", "title": "" } ]
[ { "docid": "71abbbf43a6d990f75b7838c25ba5215", "score": "0.7061922", "text": "function levelUpChampion(champion) {\n\tif(gold>=champion.cost()) {\n\t\tgold = gold- champion.cost();\n\t\tchampion.level = champion.level + 1;\t\t\n\t\tcomputeGoldPerSecond();\n\t\tshowChampionsUpgrades ();\n showCham...
3a7c4c4504a15db7b467166d77c34789
Attach Gestures: hook document and check shouldHijack clicks
[ { "docid": "6fe8e0b3ac425bf015e6d97e684d65e9", "score": "0.6962256", "text": "function attachToDocument( $mdGesture, $$MdGestureHandler ) {\n\t\n\t // Polyfill document.contains for IE11.\n\t // TODO: move to util\n\t document.contains || (document.contains = function (node) {\n\t return document....
[ { "docid": "0bd4080015a2b09f372fd564b075ee1b", "score": "0.708695", "text": "function attachToDocument( $mdGesture, $$MdGestureHandler ) { // 2130\n ...
01caa544ab2e2fe8a3fd763471b7b9be
Get noUISlider Value and write on
[ { "docid": "b20d7bc93b6c1c511911c54118e8a02d", "score": "0.7605126", "text": "function getNoUISliderValue(slider, percentage) {\n slider.noUiSlider.on('update', function() {\n var val = slider.noUiSlider.get();\n if (percentage) {\n val = parseInt(val);\n val += '%...
[ { "docid": "14581cd054a21f858c4e95148504c8c8", "score": "0.76374483", "text": "function getNoUISliderValue(slider, percentage) {\n slider.noUiSlider.on('update', function () {\n var val = slider.noUiSlider.get();\n if (percentage) {\n val = parseInt(val);\n ...
9bd0e31ee1ec05f224aa698a88531726
Must force callback to be called on nextTick, so that we don't emit 'drain' before the write() consumer gets the 'false' return value, and has a chance to attach a 'drain' listener.
[ { "docid": "f2b2188d89bf563db1738c7ea23ec3ea", "score": "0.0", "text": "function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}", "title": "" } ]
[ { "docid": "97108fee10d3698f58fc9e1d41fb0712", "score": "0.68402886", "text": "function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit('drain');}}// if there's something in the buffer waiting, then process it", "title": "" }, { "docid": "97...
994b1ae1b3938a854f0d1c7594d28875
Handle the keyword player controls for the player
[ { "docid": "7be2cd5e18fcfd4c2f610763bd7d5237", "score": "0.5812031", "text": "playerControls(button) {\n\t\tswitch (button) {\n\t\t\tcase \"beginning\":\n\t\t\t\tthis.player().currentTime(0);\n\t\t\t\tbreak;\n\n\t\t\tcase \"backward\":\n\t\t\t\tthis.player().currentTime(this.player().currentTime() - 15)...
[ { "docid": "b400bfa389ffee3ff08f4b33be5b0ab6", "score": "0.67258704", "text": "setControls() {\n window.addEventListener(\"keydown\", e => {\n if (this.play === true) {\n this.setPlayControlsDown(e.keyCode);\n }\n else {\n ...
da85160ddff9785485b124ccf9ae773f
Perform Login via API
[ { "docid": "b76f2b8ac1e5b1b024f14ad3aab1a407", "score": "0.0", "text": "async handleSubmit(e) {\n e.preventDefault();\n const data = this.state;\n let responseData = null;\n \n // Call login function\n await axios.post('/api/login', data).then(response => { \...
[ { "docid": "1ae1d7d960ef842e6119ac7306d97222", "score": "0.75734144", "text": "function login() {\n var loginOptions = {\n host: 'rollbase.com',\n port: 443,\n // Note this is password not Password like in documentation\n path: '/rest/api/login?&output=json&password=' + pa...
8ea0e552796bb85ec3c241401f241f2b
Get source language. Unsupported in xmb/xtb. Try to guess it from master filename if any..
[ { "docid": "a5eff53bafe31377cd6b47a1087281f4", "score": "0.7998553", "text": "sourceLanguage() {\r\n if (this._masterFile) {\r\n return this._masterFile.sourceLanguage();\r\n }\r\n else {\r\n return null;\r\n }\r\n }", "title": "" } ]
[ { "docid": "1f00f3c7239bfdac582d031b985a0544", "score": "0.71987164", "text": "function determineSelectedLanguageCode() {\n var selectedLanguageCode,\n path = window.location.pathname;\n if (window.location.origin.indexOf(\"readthedocs\") > -1) {\n // path is like /en/<branch>/<lang>/bui...
19a5d8c303ad82002e967cf32a6d22cb
Creates and returns a new ValidationMessage instance in the SDK and on the server. The new ValidationMessage will be automatically stored in the 'widget' property of the parent MasterDetailRegion element passed as argument. Warning! Can only be used on models with the following Mendix meta model versions: 7.1.0 to 7.14...
[ { "docid": "7317a30e4c8da05714226c287bbf0cf6", "score": "0.60491425", "text": "static createInMasterDetailRegionUnderWidget(container) {\n internal.createInVersionCheck(container.model, ValidationMessage.structureTypeName, { start: \"7.1.0\", end: \"7.14.0\" });\n return internal.i...
[ { "docid": "fc362bd9d67f8673acd052b925751b72", "score": "0.5621685", "text": "static create(model) {\n return internal.instancehelpers.createElement(model, ValidationMessage);\n }", "title": "" }, { "docid": "5d3cd05f094107dd86a22382e3d1b283", "score": "0.5585917", ...
6f17033fcfbf683614f31dbb7740c38f
=========================================================================== Reverse the first len bits of a code, using straightforward code (a faster method would use a table) IN assertion: 1 <= len <= 15
[ { "docid": "6c01e704eb6da3ed5deeae62be823831", "score": "0.78896075", "text": "function bi_reverse(code, len) {\n var res = 0;\n\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n\n ...
[ { "docid": "5b75f38e678d1b945a8ac120001a8dfa", "score": "0.7962264", "text": "function bi_reverse$1(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n }", "title": "" }, { ...
a5094f6536fbc9fdfedd31ac99eb00f4
Handler for temporary usage for once implementation
[ { "docid": "955ada6f289388e87cbee05fb9809562", "score": "0.0", "text": "function onceHandler() {\n fn.apply(context || obj, arguments);\n self._off(obj, types, onceHandler, context);\n }", "title": "" } ]
[ { "docid": "acffe366305a123ddf65c9f97713c0bb", "score": "0.685861", "text": "function ___PRIVATE___(){}", "title": "" }, { "docid": "294c6044676ba1e79caf05a04d97862d", "score": "0.6752528", "text": "function Handler() {}", "title": "" }, { "docid": "294c6044676ba1e79caf05...
c9d8869ee3aad1867ff4f0f7b29b122c
Initialization after the window loads. Attaches event listeners to all the interactive elements
[ { "docid": "58de1e930167eef88dd2e9fc88f062f4", "score": "0.0", "text": "function init() {\n id(\"start\").addEventListener(\"click\", startGame);\n id(\"start-over\").addEventListener(\"click\", backToMenu);\n qs(\"button.player1\").addEventListener(\"click\", submit);\n qs(\"button.player2\...
[ { "docid": "4071f55840601956c5faa349c889adfe", "score": "0.72304463", "text": "function init() {\r\n contextListener();\r\n clickListener();\r\n keyupListener();\r\n }", "title": "" }, { "docid": "aeda2d004b2d4a8a82356f04e53f51fa", "score": "0.718244", "text":...
99eb522bcb0ca1cf3209d92fb10606e9
strip them. Otherwise, turn 'em into H2s.
[ { "docid": "2fa48f7163e125748070b2e76d64f440", "score": "0.0", "text": "function cleanHOnes$$1(article, $) {\n var $hOnes = $('h1', article);\n\n if ($hOnes.length < 3) {\n $hOnes.each(function (index, node) {\n return $(node).remove();\n });\n } else {\n $hOnes.each(function (index, no...
[ { "docid": "44078f92bd45e31890028c23fdec95ae", "score": "0.64941454", "text": "function baynote_removeHtml(raw) {\n\tif (!raw) return;\n\traw = raw.replace(/\\<[^>]*\\>/g, \"\");\n\traw = raw.replace(/\\<.*/, \"\");\n\traw = raw.replace(/\\&nbsp;/g, \" \");\n\traw = raw.replace(/^\\s+/, \"\");\n\traw = ...
2e151267b40b4ec251308060d8b738eb
CONSTRUCTOR FUNCTIONS Create new nodes (class):
[ { "docid": "2512a88b5ac014c253b265ce1a7eb2c4", "score": "0.0", "text": "function Node(value, next) {\n this.value = value;\n this.next = next;\n}", "title": "" } ]
[ { "docid": "4954cd04971e6c3aff542e89b23862d6", "score": "0.7619684", "text": "constructor(){\n this.nodes = {}\n }", "title": "" }, { "docid": "8ea4a0829acbb772970bec963ed7bec6", "score": "0.75901884", "text": "constructor(nodes) {\n this.nodes = nodes;\n }", ...