query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
64ddc6119f87a811d306d28c2b732ee8
convert from position along slider to a value that will be used to set the group level
[ { "docid": "a87b2d32cea3cd9f8047dd8a4d981fc2", "score": "0.662957", "text": "function get_slider_value(slider_position){\n\n // get to -2 and 2 range\n let inst_x = (slider_position/50 - 1 ) * 2\n\n // take inverse log2 to get opacity scale\n let inst_y = Math.pow(2, inst_x)\n\n return in...
[ { "docid": "5825b4ed88e7ceb9698090245274fb73", "score": "0.6812373", "text": "_Value(position) {\n if (this.scale === \"log\") {\n // Map from slider position range to log value range\n\n // Map from slider range to min-max value range\n let rangePos = (position -...
d46fc553385d3797b04d039b706d4271
Open the modal with the content of the layer
[ { "docid": "2e2af8e8611d0fd74d3363ed1ddb3228", "score": "0.7732296", "text": "OPEN_MODAL(store, layer) {\n store.state.modal.title = layer.attributions.title;\n store.state.modal.content = layer.attributions.content;\n store.state.modal.active = true;\n }", "title": "" } ]
[ { "docid": "16396d79736c4ebd69cd2e0d6908e8aa", "score": "0.7130298", "text": "function team_modal(){\n container.show();\n }", "title": "" }, { "docid": "e22c8d11f697bdafbcb571b9242b1579", "score": "0.7069989", "text": "function openModal(e) {\n\n\t\t// Add the overlay.\n\t\t\n ...
5004726c4a36f02f229735b1d61d008b
Produces a JavaScript value given a GraphQL Value AST. A GraphQL type must be provided, which will be used to interpret different GraphQL Value literals. Returns `undefined` when the value could not be validly coerced according to the provided type. | GraphQL Value | JSON Value | | | | | Input Object | Object | | List ...
[ { "docid": "0e33faa374eb43cba9358ef6ffa2fe23", "score": "0.65315133", "text": "function valueFromAST(valueNode, type, variables) {\n if (!valueNode) {\n // When there is no node, then there is also no value.\n // Importantly, this is different from returning the value null.\n return;\n }\n\n ...
[ { "docid": "7d7e6243791b28e34c6c2422dfb768e3", "score": "0.7408984", "text": "function valueFromASTUntyped(valueNode) {\n switch (valueNode.kind) {\n case graphql.Kind.NULL:\n return null;\n case graphql.Kind.INT:\n return parseInt(valueNode.value, 10);\n ca...
b39cb880d3f1b38c375deb84d579b143
Merge two option objects into a new one. Core utility used in both instantiation and inheritance.
[ { "docid": "452ee1e976f2e262f9c193671c47770d", "score": "0.0", "text": "function mergeOptions (\n parent,\n child,\n vm\n) {\n if (true) {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(chi...
[ { "docid": "f3170acad63671c5b584d719ae51ee55", "score": "0.73400927", "text": "function merge_options(obj1,obj2)\n{\n //create a new object, to contain all the attributes from both of the original objects\n\tvar obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for ...
19b6fc5948383d53b7ed8ffd77a86bd3
Returns the merkle path for a receipt statement or resolution linked to a block. The merkle path is the minimum number of nodes needed to calculate the merkle root. Steps to calculate the merkle root: 1. proofHash = hash (leaf). 2. Concatenate proofHash with the first unprocessed item from the merklePath list as follow...
[ { "docid": "7cb1db8aa5a5c5d620c622869981a7be", "score": "0.5363851", "text": "getMerkleReceiptsRaw(requestParameters) {\n return __awaiter(this, void 0, void 0, function* () {\n if (requestParameters.height === null || requestParameters.height === undefined) {\n throw ne...
[ { "docid": "054c2cc226edf7ccbe98dd655f997302", "score": "0.5747935", "text": "getMerkleReceipts(height, hash) {\n return this.call(this.blockRoutesApi.getMerkleReceipts(height.toString(), hash), (body) => new MerkleProofInfo_1.MerkleProofInfo(body.merklePath.map((payload) => new MerklePathItem_1....
fd6762840f707ffab2fed3b00f954bd3
++++++++++++++++++++++ / Missions Landing Gallery /++++++++++++++++++++++
[ { "docid": "4bfd6e794f99f144f525dfa5fc7179cb", "score": "0.0", "text": "function setItemHeight(el){\n\t\tvar e = el,\n\t\t\tp = $(e).parent().parent().parent(),\n\t\t\tiw = $(p).find('.img-window'),\n\t\t\tv = $(e).width();\n\t\t\t$(iw).css(\"height\", v);\n\t\t\tsetMissionsItemShadow();\n\t\t// if(v > ...
[ { "docid": "2b72ae330ec90006033316e52c77bde2", "score": "0.6763293", "text": "function loadLandingPage() {\r\n loadGallery('new');\r\n var imgURL = 'gallery/objects/Venus-Jupiter-Conjunction/Venus-Jupiter-Conjunction-2000.jpg';\r\n aspect = 1.5;\r\n loadBackgroundImage(imgURL);\r\n // var manifestF...
fe8c7a8cf757b90e6255a4f607bbe7c2
Pong code ========= Ball object
[ { "docid": "b256301fff6ba4678efc7a6ba5588dba", "score": "0.7346842", "text": "function Ball(x, y) {\n this.x = x;\n this.y = y;\n // this.x_speed = Math.random() * 4 + 1;\n // this.y_speed = Math.random() * 3 + 2;\n this.x_speed = 0;\n this.y_speed = 5;\n this.player_strikes = false;\n this.ai_s...
[ { "docid": "4f738a90253afdd5c9e49b5548c05a33", "score": "0.72748166", "text": "function Ball(posx, posy, vx, vy, color, border_color) {\n\n this.width = 10;\n this.height = 10;\n\n this.x = Math.floor(posx-this.width/2);\n this.y = Math.floor(posy-this.height/2);\n\n this.vx = vx;\n this.vy = vy;\...
bb400da0aca63c01614bd0dccbd54f37
Tokenizer for a bound `type`.
[ { "docid": "361923fd8db946b1ced6314f3096173c", "score": "0.0", "text": "function tokenize(value, location) {\n var self = this\n var offset = self.offset\n var tokens = []\n var methods = self[type + 'Methods']\n var tokenizers = self[type + 'Tokenizers']\n var line = location.line\n ...
[ { "docid": "c68da6b8ca86328ac2596eabf7048190", "score": "0.65945464", "text": "function factory$4(type) {\n return tokenize;\n\n /* Tokenizer for a bound `type`. */\n function tokenize(value, location) {\n var self = this;\n var offset...
2c13e88a2bfa5ce0515873ffa5e42a85
special case, script has strange escaping rules
[ { "docid": "89debdd7cf3c71422f707bede223e265", "score": "0.0", "text": "script (...args) {\n const attribs = args.find(x => typeof x === 'object' && x !== null /* I hate you */) || {}\n const stringContents = args.find(x => typeof x === 'string')\n if (stringContents) {\n // if there is an...
[ { "docid": "7108485706da83cae02153272b86d7e2", "score": "0.7134158", "text": "function escapeScript(s, escapeSingleQuotes, escapeDoubleQuotes){\n\tif (typeof(s) != \"string\") return \"\";\n\t\n\tvar result = \"\";\n\tfor (var i = 0; i < s.length; i++) {\n\t\tvar ch = s.charAt(i);\n\t\tswitch (ch) {\n\t...
4bed4a3a273559246bdbec6eba8881b0
Pick the first defined of two or three arguments.
[ { "docid": "c14ef70a28a5fb3de7e81fb296e820f7", "score": "0.0", "text": "function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }", "title": "" } ]
[ { "docid": "8adbd340e18864baa4cb555aea2f7494", "score": "0.7629101", "text": "function pick() {\n\tvar args = arguments,\n\t\ti,\n\t\targ,\n\t\tlength = args.length;\n\tfor (i = 0; i < length; i++) {\n\t\targ = args[i];\n\t\tif (typeof arg !== 'undefined' && arg !== null) {\n\t\t\treturn arg;\n\t\t}\n\t...
1cea7574e0cd3c4047f4e59e45dd4b7b
Clears whatever is on the screen and displays the beginning elements of the actual game
[ { "docid": "8bb2332b0c968755884851a8cb34ff63", "score": "0.0", "text": "function playAgain() {\n $(\"#playAgain\").click(function() {\n\n $(\".list, #playAgain,.result,#outcomeWin, #outcomeLose\").css(\"display\", \"none\");\n\n $(\"#toMainMenu\").css({\n \"ma...
[ { "docid": "7427da2be940ab6769ad99295dd59000", "score": "0.7780054", "text": "function clearBoard() {\n\thangImage.innerHTML = \"\";\n\tlogo.innerHTML = \"\";\n\tcurrentBlock.innerHTML = \"\";\n\ttypedBlock.innerHTML = \"\";\n\tscoreBoard.innerHTML = \"\";\n\twinBoard.innerHTML = \"\";\n\taudioBoard.inn...
4823d56a2a0ada75d277f727dc8776f6
Get common nodes IDs and fuse common nodes params = same as for function 'getFusedNodes' returns > commonNodeInfo array containing idNodesFused and newNodes. > idNodesFused is an array of ids of common nodes > newNodes is an array of the common nodes fused
[ { "docid": "06df8f9b00b56a2722ddf29f8cfd7a7e", "score": "0.7879949", "text": "function add_commonNodes(nodes1, nodes2, metadata1, metadata2) {\n //array to store new, fused nodes\n var newNodes = [];\n\n //IDs of the nodes already fused\n var idNodesFused = [];\n\n //pairwise comparison o...
[ { "docid": "8b377a446e9bebeaa3f82f39f7807240", "score": "0.7337882", "text": "function getFusedNodes(nodes1, nodes2, metadata1, metadata2) {\n\n //fusing the common nodes\n var commonNodeInfo = add_commonNodes(nodes1, nodes2, metadata1,\n metadata2);\n var idNodesFused = commonNodeIn...
8d9d163842d285e202d3b29352a4e5ba
based on minimist and generated from: " using: tsc t ES2019 deno_flags.ts
[ { "docid": "5b730fd6f104a75dd1054a70bd800841", "score": "0.0", "text": "function isNumber(x) {\n if (typeof x === 'number') return true;\n if (/^0x[0-9a-f]+$/i.test(String(x))) return true;\n return /^[-+]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(e[-+]?\\d+)?$/.test(String(x));\n}", "title": "" } ]
[ { "docid": "68d2f42c5c1ea411aefac22ffbd0ed1a", "score": "0.5632651", "text": "Program() {\n this.featureFlagIfStatements = [];\n this.featureFlags = this.opts.featureFlags || defaultFeatureFlags;\n this.importDeclarationScope = [];\n this.impor...
37542f0466f2759b5e4cfd375f2016f4
ignore above this line
[ { "docid": "46839482d0344b5267edf05d027a2ee5", "score": "0.0", "text": "function main() {\n var a_temp = readLine().split(' ');\n var a = parseInt(a_temp[0]);\n var b = parseInt(a_temp[1]);\n var c = parseInt(a_temp[2]);\n var d = parseInt(a_temp[3]);\n var e = parseInt(a_temp[4]);\n\n...
[ { "docid": "56f3ce043662389caa2f05f1de04862b", "score": "0.6974965", "text": "function Ignore() {\n\t\t}", "title": "" }, { "docid": "8bb307c46248b05a4ebc3d03c69eb139", "score": "0.6443727", "text": "function ignore() {\n\t\treturn null\n\t}", "title": "" }, { "docid": "d...
40ffbcc0fee187db8d32e139f1fde081
Copyright (C) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
[ { "docid": "0c69186da541150a119d2a050615a3c3", "score": "0.0", "text": "function test(Object)\n{\n try {\no259[o2.o3];\n}catch(e){}\n}", "title": "" } ]
[ { "docid": "23c456980a5333ec250339bb791b0946", "score": "0.50131935", "text": "static from() { return undefined; }", "title": "" }, { "docid": "6b1058340f927cec4da531568795c919", "score": "0.4858597", "text": "supportsPlatform() {\n return true;\n }", "title": "" }, { ...
9e39ef35dc881a560e55c22b5abc44d4
This is a fun new syntax that was brought forth in ES6, where we can define methods on an object with this shorthand!
[ { "docid": "9989594a71809b35044266d6fe568c9c", "score": "0.0", "text": "getUserById(id) {\n if (typeof id === \"string\") {\n id = ObjectId(id);\n }\n return users().then((userCollection) => {\n return userCollection.findOne({_id: id}).then((user) => {\n ...
[ { "docid": "24afc51515c6e5f8ea8ea64bfeb3bb41", "score": "0.6136842", "text": "function thisKeyword() {\n let object = {\n a: function () {\n console.log(this.b);\n },\n b: \"tony oluwajuwon michael\"\n }\n}", "title": "" }, { "docid": "a6d0cca520c81d5126...
c4586f41fb3b452d6a2eb029d9856c7b
/ API URL AND KEY
[ { "docid": "e8ee9099fa7090be488734f4f26becca", "score": "0.0", "text": "function fetchData(user_country){\n\tcountry_name_element.innerHTML = \"Loading...\";\n\t\n\tfetch(`https://coronavirus-19-api.herokuapp.com/countries/${user_country}`, {\n\t\t\"method\": \"GET\",\n\t})\n\t.then( response => {\n\t\t...
[ { "docid": "b59bda47fa6a10f4d404e9c98f37948e", "score": "0.6999765", "text": "static setAPIKey(key){\r\n\r\n }", "title": "" }, { "docid": "415cdc921c2c695727e57a197e9ce40c", "score": "0.6990479", "text": "get mapi_key() {return 'key-f1b2dcd4c4da8dba0d141870debd47a1'}", "t...
367df5f4b2acc4e83e27f5b259dc4a04
Boolean function to check if the game is joinable
[ { "docid": "ee8f977549ca70685e5332e63ec33faf", "score": "0.83070374", "text": "isJoinable() {\n return (this.players.length < 5 && !this.isStart)\n }", "title": "" } ]
[ { "docid": "ef8ede34eb6123f861c99f73cdfac557", "score": "0.68184304", "text": "get isJoin(): boolean {\n return this._rawEvent.type === 'join';\n }", "title": "" }, { "docid": "b109ffb63b96111e903021ff7c8a2af1", "score": "0.66245574", "text": "get isJoin() {\n return this._raw...
6b005083256e5c8d3da3878a78c7a5ee
Decimal separator: . Thousands separator: ,
[ { "docid": "d950cf62e5964365560b7d01a0a967dd", "score": "0.0", "text": "function regularPriceParser(price, currency) {\n return parseFloat(price.replace(/,/g, \"\"));\n}", "title": "" } ]
[ { "docid": "cdf789b256752c669fd5e5908bcde726", "score": "0.76698166", "text": "function thousands_separators(num)\n {\n var num_parts = num.toString().split(\".\");\n num_parts[0] = num_parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return num_pa...
d15bb4fbe91394f821f7380223330a13
Fetch movie with data from TMDb
[ { "docid": "ce9ec0a338dc14837f196cf6d4ad77be", "score": "0.0", "text": "async function getRandomMovie(selectedReleaseYears, urlGenres, pages) {\n const baseURL = `https://api.themoviedb.org/3/discover/movie?`;\n\n const randomYear = getRandomItem(selectedReleaseYears);\n const randomPage = getRandomI...
[ { "docid": "04976db2a8841c84785443f0dbae85c9", "score": "0.68212104", "text": "async function getData(movie) {\n try {\n return await fetch(`https://www.omdbapi.com/?apikey=cd273db5&t=${movie}`);\n } catch (err) {\n console.log(err);\n }\n}", "title": "" }, { "docid": ...
e73f9bd1b40705898dcb357e92ac433c
requires at least the objectId as the element id, subcategory.name, fName and lName can be appended later of during
[ { "docid": "49d6484a246c0583f108698d587ddebe", "score": "0.0", "text": "function construct(subcat, fName, lName, url) {\n var subcatText = \"<strong>\" + subcat + \"</strong> \",\n nameText = \"<strong>\" + fName + \" \" + lName.substr(0, 1) + \".\",\n listItem = $(\"<div></...
[ { "docid": "398b8d30b98d5879891244e1fd2189a4", "score": "0.5600826", "text": "function addCategory(id, categoryName) {\n let newItem;\n if (id) {\n newItem = {\n \"id\": ++lastTemporaryId,\n \"categoryname\": categoryName,\n \"parent_...
900a07edccdb66896d015c8759a8b493
Given a fromDateTime and a toDateTime, provides statistics on specified metric. Supported statistics : min, max, average
[ { "docid": "86b8914c9624c5223fbb623a968b6ee0", "score": "0.66930526", "text": "function getStatistics (req, res) {\n const startDate = req.query.fromDateTime;\n const endDate = req.query.toDateTime;\n const metric = req.query.metric;\n const stat = req.query.stat;\n\n ...
[ { "docid": "ad6313ab24119126a218c59a45670f8d", "score": "0.5702963", "text": "getAccountMonthStatistics(accountId, from, to) {\n const params = new Array();\n if (accountId != null) {\n params.push(`accountId=${accountId}`);\n }\n if (from != null) {\n p...
432dee5b7bc22aa92f96ddd95b1e761b
Each Days array from getDaysInMonth() function, create and append Td
[ { "docid": "beec06c4fb79d3ca04e460912af7932b", "score": "0.71712524", "text": "function appendDaysToTable( days, tbody ) {\n let check = 1;\n let tr;\n for ( let i = 0; i < days.length; i++ ) {\n let day = days[ i ].getDate(); // day of the Month\n let dayInWeek = days[ i ].getDa...
[ { "docid": "27c1b0c44f7b4629dfc3e9861149649d", "score": "0.7053854", "text": "function insertDays(data){\n var month = data.format('MMMM'); // Memorizzo in una var il mese.\n var year = data.format('YYYY'); // Memorizzo in una var l'anno.\n $(\"h1.month\").html(month + \" \" + year); // Ottengo mese ...
37b74013ea762036757387cba366dc3a
The following are needed for sorting:
[ { "docid": "a44ef7cefd2632a96cb964027605451c", "score": "0.0", "text": "function sortWaveNum(a,b) {\r\n return b.waveA - a.waveA;\r\n}", "title": "" } ]
[ { "docid": "b7c4aa7609ee3cecd40b33739a0db17a", "score": "0.7728617", "text": "Sort() {}", "title": "" }, { "docid": "d1b28837b27b5a21907e8ed2cf09c442", "score": "0.7337158", "text": "function SortObjects() {\n\t}", "title": "" }, { "docid": "0c4abcf94c0ccdb7ace4525b571c20...
5faf775595bc5eba208563f5edc524d6
Return a new ``uint72`` type for %%v%%.
[ { "docid": "7656d59449a40d8dd0ea34583357d6a2", "score": "0.75548846", "text": "static uint72(v) { return n(v, 72); }", "title": "" } ]
[ { "docid": "8dd90cee3e96daf64d75999fe5ca6f3f", "score": "0.6640104", "text": "static uint176(v) { return n(v, 176); }", "title": "" }, { "docid": "0db4abb715e876f595d5948ec4e50f49", "score": "0.6596516", "text": "static uint240(v) { return n(v, 240); }", "title": "" }, { ...
531fdce617df77f3d4f94d0090879bef
Don't emit readable right away in sync mode, because this can trigger another read() call => stack overflow. This way, it might trigger a nextTick recursion warning, but that's not so bad.
[ { "docid": "5f60aac8d94d5833ab0fc03e62e08f8e", "score": "0.0", "text": "function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)...
[ { "docid": "935276f3134afe98115dcb01f8477266", "score": "0.7117386", "text": "function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,strea...
3545103b471e3f432e8347c3b78e644d
Toggle the pub detail menu's visibility by showing the menu and stopping any scrolling within the page
[ { "docid": "500c52ccd68792e148cb371d447cfe0c", "score": "0.66706926", "text": "function openDetailsMenu() {\n body.classList.add('fixedScroll')\n searchPubsButton.classList.add('hidden')\n pubDetailsContainer.classList.add('menu--open')\n}", "title": "" } ]
[ { "docid": "d2e91cbb32daff44a00e610bc46d47b0", "score": "0.69138545", "text": "function toggle(e) {\n let menu = document.querySelector(\"main > section > section > article > div\");\n \n if (menu.style.visibility = \"hidden\") {\n menu.style.visibility = \"visible\";\n me...
2ba6a64bd5e536698390ad1528a1a45d
Decreases indentation by one blocklevel indent. If there are toplevel indents within the blocklevel indent, throws away these as well.
[ { "docid": "6d6720711579576922adcd9258431bb6", "score": "0.780529", "text": "decreaseBlockLevel() {\n while (this.indentTypes.length > 0) {\n const type = this.indentTypes.pop();\n if (type !== INDENT_TYPE_TOP_LEVEL) {\n break;\n }\n }\n }", "title": "" } ]
[ { "docid": "9a5eff32939b223e4c0a4732c55e05b0", "score": "0.69393367", "text": "decreaseTopLevel() {\n if (last(this.indentTypes) === INDENT_TYPE_TOP_LEVEL) {\n this.indentTypes.pop();\n }\n }", "title": "" }, { "docid": "294c905b94d439b4c8afaa5abfb00bb4", "score": "0.6666231"...
e11e8dea352f19349e256816cc78ae10
Unbinding the mousemove when the mouse's middle button is released
[ { "docid": "7e106188db18487b9a833e93f76cbd13", "score": "0.6726985", "text": "function removeMiddleWheelHandler(){\r\n container\r\n .off('mousedown', mouseDownHandler)\r\n .off('mouseup', mouseUpHandler);\r\n }", "title": "" } ]
[ { "docid": "b8e8cdd7c964d1ca5e8a738f4e326494", "score": "0.7780024", "text": "function mouseUpHandler(e){\n //middle button\n if (e.which == 2){\n container.off('mousemove');\n }\n }", "title": "" }, { "docid": "b8e8cdd7c964d1ca5e8a738f4...
5d9347e023286266d37ca155eb4f4824
Update the latitude and longitude inputs in the form from the value of the marker
[ { "docid": "844b39fa850e2d60f5ea07ecd4c4ad36", "score": "0.73805445", "text": "function updateForm(location) {\n $(\"#latitude\").val(location.lat);\n $(\"#longitude\").val(location.lng);\n}", "title": "" } ]
[ { "docid": "483258418c198550514853be1bddfb97", "score": "0.7896988", "text": "function markerLocation() {\r\n //Get location.\r\n var currentLocation = marker.getPosition();\r\n //Add lat and lng values to a field that we can save.\r\n document.getElementById('lat').value = currentLocation.l...
b8d66be092f8b041c56e5c98014c91ff
End Designer select box
[ { "docid": "754115e58eb470afd661c110d6cca313", "score": "0.0", "text": "function designerSelect(){\n $(\"select.designer\").change(function () {\n var ds1 = \"\";\n var deId = this.id;\n $(\"#\"+ deId +\" option:selected\").each(function () {\n ds1 = $(this).text();\n ...
[ { "docid": "214b22e9c953705ea7fac95b19fd29dc", "score": "0.66615796", "text": "function nm_field_release_blocks(v_obj_sel)\n{\n for (i = 0; i < v_obj_sel.length; i++)\n {\n if ((null != v_obj_sel.options[i]) &&\n (\"__blc__\" == v_obj_sel.options[i].value.substr(0, 7)) &&\n (v_obj_sel.options...
4f36a42f9f13c98183ad38ba91119d24
date and time from ref 2822 format
[ { "docid": "3273f879da90af59152807dff18d0bd1", "score": "0.0", "text": "function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], m...
[ { "docid": "5d5bb002cf2f8c6d17abf0bdcdb0a429", "score": "0.6528726", "text": "function createDrupalDateFromPieces(date, hour, minute, marker) {\n //Build time\n var time = hour + ':' + minute + ' ' + marker;\n //Build full date\n var dateTime = moment(date + ' ' + time, 'YYYY-MM-DD h...
7063b9d2d2119438bb4f509d082df292
Send the "cleared" event
[ { "docid": "8fae014d743ac8bc44b0671c9415f5af", "score": "0.0", "text": "triggerCleared(propagated = false) {\n console.log(this.prefix + \"::triggerCleared(\" + propagated +\")\")\n if (!propagated) {\n switchClass(this.heading, \"panel-.*\", \"panel-primary\")\n }\n ...
[ { "docid": "272c85e529b94cdff741093151c58682", "score": "0.7318461", "text": "onCleared(f) {\n this._onCleared = f\n }", "title": "" }, { "docid": "6edefe71346eeb137fed962579832a1d", "score": "0.7049726", "text": "clear() {\n this._unmarkAll();\n this._emitCha...
a9154fe4e0acf675900ae467923cf3b0
MAIN FUNCTION (called on each currency unit): function that returns the change (sum) in the current unit
[ { "docid": "cc11c5ef2aca60e996cbfd0ad273ce5f", "score": "0.6977636", "text": "function giveChangeInCurrentUnit(currentChange, curUnitValue, curUnit) {\n let availableSumInCurUnit = curUnit[1];\n let curUnitName = curUnit[0];\n\n // the following variable is used to check if change c...
[ { "docid": "9a252893c712b8d8c59aa2f612a278a9", "score": "0.65719295", "text": "function calculateChange() {\n var paid = $(\"#amount-received\").val();\n var price = $(\"#amount-due\").val();\n var change = parseFloat(paid) - parseFloat(price);\n console.log({paid, price, change})\n \n ...
a808baf447c99c89d13c3bee5b9c41ce
Buscar y seleccionar el grupo
[ { "docid": "000eafc20454b3b9e3811bd085d04e69", "score": "0.64598984", "text": "function search_grupo(data,grupo) \r\n{\r\n $('#grupo_edit').empty();\r\n $('#grupo_edit').append('<option value=\"\" disabled>...</option>');\r\n $.each(data, function(i, val) {\r\n if (val.nombre == grupo) \...
[ { "docid": "459f92fdc012aa98db253e426fa68ec8", "score": "0.6387824", "text": "function SeleccionaCategoriaComponer(hijo){\n\n\tvar padre = $(\"#\"+hijo).closest(\"div\").attr('id');\n\n\tif($(\"#\"+hijo).hasClass(\"seleccionada\")){\n\t\tif(padre == \"Padre0\"){\n\t\t\t//$(\"#\"+hijo).removeClass('selec...
2181724e7dbe7c32049a0981f725b7aa
adds a shadow and flashing animation to the button clicked
[ { "docid": "3a6500ea9e0c240e984e185891085d88", "score": "0.0", "text": "function animatePress(currentColour) {\n $(\"#\" + currentColour).addClass(\"pressed\");\n\n setTimeout(function () {\n $(\"#\" + currentColour).removeClass(\"pressed\");\n }, 100);\n}", "title": "" } ]
[ { "docid": "5d2aa82a5ec5108563d7b4e504c389da", "score": "0.67683536", "text": "function buttonAnimation(currentKey) {\r\n //we need to concatenate a fullstop in addition ti the currentkey(that got pressed),so that we have in this format(document.querySelector(\".w\"));\r\n //This is the button that wi...
a19d027d40a0077c93634a1490eafe2d
Function uploadtxt() will flash the code in the textbox to the connected device 1. POST code to builder to receive the hexfile 2. Send received hexfile to the extension 3. extension will flash a connected device
[ { "docid": "2086ea3e87cc5cb0c9577a4053bd9a18", "score": "0.60905755", "text": "function uploadCode(){\n var portType = document.getElementById('portType');\n var boardType = document.getElementById('boardType');\n var lblStatus = document.getElementById('lblStatus');\n lblStatus.innerHTML = ...
[ { "docid": "4e9e1977d94e35160ac43cad1a44061a", "score": "0.62448716", "text": "function flashFirmware(e) {\n project.save(document.querySelector('#input').value);\n e.preventDefault();\n\n // Create a hidden form with the correct values that sends back the file with\n // the correct headers to make ...
f442a89c65ac40acce4d97ee8b6cf256
General error handling function
[ { "docid": "ae0bd456346a87aa4e31f84fb23bbbb7", "score": "0.0", "text": "function errorHandler(err, req, res, next) {\n res.status(500);\n res.send('error');\n}", "title": "" } ]
[ { "docid": "c858e5d68bcc6ea0d31ebcb426caad32", "score": "0.6986716", "text": "function CustomError() {}", "title": "" }, { "docid": "c858e5d68bcc6ea0d31ebcb426caad32", "score": "0.6986716", "text": "function CustomError() {}", "title": "" }, { "docid": "81c9ba614e171170bd...
78c9ddb4bb1388eaf8cbe5f6e5af244e
let m_formatter = d.DateTimeFormatter.ofPattern('m').withLocale(d.JodaLocale.US)
[ { "docid": "5e90f22db85996c24e0e355ab8d7a26a", "score": "0.0", "text": "function Train(props) {\n let delta = d.Duration.between(d.LocalDateTime.now(), props.train.arrival)\n\n return (\n <p>\n {props.train.lineName}\n {': '}\n {props.train.arrival.format(hm_formatter)} {delta.toMinu...
[ { "docid": "851f966707675d3f89e6abb6e481cf01", "score": "0.6203375", "text": "function Copy$JGlobalizationDatePattern(s,d) {\n return d;\n}", "title": "" }, { "docid": "15141c91d5488fb003e33a76d1d8aefd", "score": "0.5954468", "text": "get monthFormatted() {\n return this.p...
64a3dcd6344180440b05205121bbb7c5
NOTE: There are many places in code where we explicitly check the last hello to do feature support detection. This should be done any other way, but for now we will just return the first hello seen, which should suffice.
[ { "docid": "5733bae24af4704f487e644f73ef8c87", "score": "0.5483857", "text": "lastHello() {\n const serverDescriptions = Array.from(this.description.servers.values());\n if (serverDescriptions.length === 0)\n return {};\n const sd = serverDescriptions.filter((sd) => sd.ty...
[ { "docid": "eb4c1f06f0afc96cac745bbf5fd15415", "score": "0.6279707", "text": "function isHello(doc) {\n return doc[constants_2.LEGACY_HELLO_COMMAND] || doc.hello ? true : false;\n}", "title": "" }, { "docid": "9368349773887761c00555c962b271fa", "score": "0.56930596", "text": "func...
d54586223be232b014301a6f8163f605
from the DummyId getting the index number in the dataset
[ { "docid": "3964eeaa82d3a3543225a909896cda19", "score": "0.0", "text": "function getPatientIDFromDummyID(patientDummyID){\r\n // console.log(self.patients[2][\"Dummy ID\"])\r\n for(let patient in self.patients){\r\n if(self.patients[patient][\"Dummy ID\"] == patientDummyID){\r\n...
[ { "docid": "bed9f7429dfcef2fd1ebb365755c5fad", "score": "0.6664721", "text": "function getDummyID(index){\r\n return self.patients[index][\"Dummy ID\"];\r\n }", "title": "" }, { "docid": "af14ddb4fcdbb7af5a24dc3101b47eb1", "score": "0.65651524", "text": "getIndex(id, data){...
58e48ab6cfafb5cf937ee0caa94e7318
var show = msglist.getAttribute("datalistsize");
[ { "docid": "59952eddf637a4618aed7f8ac291ab42", "score": "0.0", "text": "function sortUsingNestedText(parent, childSelector, keySelector) {\n let items = parent.children(childSelector).sort(function(a, b) {\n let vA = parseInt($(keySelector, a).text());\n let vB =...
[ { "docid": "394f00e10dcc1ecf27c0a8fdf9495384", "score": "0.60502917", "text": "getSize(attrName) {\n return this.getAttribute(attrName).size\n }", "title": "" }, { "docid": "f98df132b9c05180abea15917de64cba", "score": "0.6032865", "text": "function listLength(){\n\treturn listIte...
ba287a6d5c2f5bb95bb0cd6f3c1fbbd0
show list of data
[ { "docid": "37b30f76628abd79c652e3c9d8a5f6b6", "score": "0.0", "text": "function handleShowTag(data, event_id) {\n let tagLine = document.getElementById(\"tag-\"+event_id+\"-body\");\n tagLine.innerHTML = \"\";\n let addTag = addModalButton(\"addTag-button\", \"btn btn-primary\", \"addTag-moda...
[ { "docid": "4958d7af02f91218a1c368f4beb4c722", "score": "0.76338565", "text": "function displayData() {}", "title": "" }, { "docid": "a2da249fd48439fc98ccb80af67b1a38", "score": "0.7236319", "text": "display() {\n for (let d of this.data) {\n console.log(d + ',');\n...
a67659cce9e1ddd9b62c3cf67fdb02ea
This method loads the animation. lottie library is used to render the animation.
[ { "docid": "f012060d63ac9e74011c850e78022c8a", "score": "0.77790856", "text": "loadAnimation() {\n // Setting the animation properties.\n let animation = lottie.loadAnimation({\n container: document.querySelector(\"#alert-animation\"),\n animationData: alert,\n ...
[ { "docid": "59d0a28afc7b67f3ab987baf744b0d87", "score": "0.76621336", "text": "function addLottieAnim() {\n\n // on séléctionne avant l'elem qui va accueillir l'anim\n var elem = document.querySelector('.animation')\n\n lottie.loadAnimation({\n container: elem, // the dom element that will contain...
0cfd5180700098a9a8ee243a856ba3c0
Get all entries in the db
[ { "docid": "d488ec16efe576f5c9a806ea29980c5b", "score": "0.0", "text": "getAllUrls(req, res) {\n return res.status(200).json({\n success: \"true\",\n message: \"URLs derived successfully.\",\n urls: db\n });\n }", "title": "" } ]
[ { "docid": "655bba5eb4522e5c9e8fa1dae88fb712", "score": "0.76512414", "text": "allData() {\n const sql = 'SELECT * FROM incidents';\n return this.db.many(sql);\n }", "title": "" }, { "docid": "c38e81a139a260cbd364daaf48d1c71e", "score": "0.7616055", "text": "function getEntrie...
cce0a6754f733257fa6823805ed04705
Add resize handlers to siblings
[ { "docid": "1f929385dc39d5fe6b9d333509374678", "score": "0.64524746", "text": "removeResizeListeners_() {\n if (this.scope_) {\n dispatcher.getInstance().unlisten(ThemeSettingsChangeEvent, this.onResize_, false, this);\n this.vsm_.unlisten(GoogEventType.RESIZE, this.onResize_, false, this);...
[ { "docid": "64ae3f2df6644ab3f32f6447e8122e77", "score": "0.72325575", "text": "addResizeListeners_() {\n if (this.scope_) {\n dispatcher.getInstance().listen(ThemeSettingsChangeEvent, this.onResize_, false, this);\n this.vsm_.listen(GoogEventType.RESIZE, this.onResize_, false, this);\n\n ...
5d3cc9dd02ac57adea5b5e798aa3e97d
ref 5318 necessary to ensure parent rerender when deep bindings like :style and :class are used on slot nodes
[ { "docid": "a5eb3bd91d73d7602b0a44b65567381c", "score": "0.0", "text": "function registerDeepBindings (data) {\n if (isObject(data.style)) {\n traverse(data.style);\n }\n if (isObject(data.class)) {\n traverse(data.class);\n }\n}", "title": "" } ]
[ { "docid": "b0c4812ee060dcb782b3118faf8653f3", "score": "0.5874104", "text": "update(e){super.update(e);const t=this.render();t instanceof TemplateResult&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedSty...
2944ae728bdb58743796ec0226cd92b5
filternames: adds all relevant names to searchlist
[ { "docid": "20b6b72cd6cffd43eea17c36810dd2c5", "score": "0.6532505", "text": "function filternames() {\n\n let search = document.getElementById('search').value;\n search = search.toLowerCase();\n showsearch()\n\n let list = document.getElementById('searchlist');\n list.innerHTML = '';\n\n...
[ { "docid": "8294c0cf6c419a097deec6c907d1ec06", "score": "0.6986088", "text": "function searchName(searchInput, namesList) {\n\tremoveLinks();\n\tconst foundList = [];\n\tfor (let i = 0; i < namesList.length; i++) {\n\t\tnamesList[i].style.display = \"none\";\n\t\tconst name = namesList[\n\t\t\ti\n\t\t]....
629c6bd67c734ebc217ea3284391ffad
Complete the sockMerchant function below.
[ { "docid": "0cbc1d2817a0715bd86670c74c77646a", "score": "0.0", "text": "function sockMerchant(n, ar) {\n\n if (ar.length <= 1) {\n return 0\n }\n\n let count = 0;\n let tracker = {}\n for (let i = 0; i < ar.length; i++) {\n if (tracker[ar[i]] && tracker[ar[i]] !== 0) {\n ...
[ { "docid": "6549b6ae4051d76ba46903e1965d79da", "score": "0.65532035", "text": "function sockMerchant(n, array){\n // your code here\n return\n}", "title": "" }, { "docid": "029dc969722dd732575fd0447205b581", "score": "0.58084136", "text": "async function invoke(request, socket){\n ...
65ed2c462b19a0a94d386eeb8d64ae5d
If there is no license, return an empty string
[ { "docid": "15b1d34e474b06ae31af822b16b97d2b", "score": "0.0", "text": "function renderLicenseBadge(license) {\n\n switch(license) {\n case \"none\" :\n return \"no licensing\"\n break;\n\n case \"Apache 2.0 License\" :\n return \"![License](https://img.shields.io/badge/License-Apa...
[ { "docid": "28c2a914fb497d0aa089840d6ae3609b", "score": "0.7704375", "text": "function renderLicenseSection(license) {\n if (license !== \"none\") {\n return \"\";\n }\n}", "title": "" }, { "docid": "a4ccd775246c3b094ee132051d0acd34", "score": "0.7701038", "text": "function rend...
8b4b28967d9e4c8cbbb5405378727cec
VueLayers Web map Vue components with the power of OpenLayers
[ { "docid": "cedb7af4cd062b809d9d4e0bf02f316f", "score": "0.0", "text": "function dd(t,e){var n=ae()(t);if(Ut.a){var i=Ut()(t);e&&(i=Xt()(i).call(i,(function(e){return Jt()(t,e).enumerable}))),n.push.apply(n,i)}return n}", "title": "" } ]
[ { "docid": "38c230130f6410c077af46990d4fb73e", "score": "0.61362314", "text": "function lb(t,e,n,i,r,o,a,s){var c=(\"function\"===typeof n?n.options:n)||{};return c.__file=\"geom.vue\",c.render||(c.render=t.render,c.staticRenderFns=t.staticRenderFns,c._compiled=!0,r&&(c.functional=!0)),c._scopeId=i,c}",...
9aec869f906b21885837cba549972b5d
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////...
[ { "docid": "ea8c68d2161335c0c1dce6762f3282ce", "score": "0.68291026", "text": "function tile_select(a,b){\n if (unit_move === 2){\n x_2 = a;\n y_2 = b;\n\n var x_x = Math.abs(x_1 - x_2);\n var y_y = Math.abs(y_1 - y_2);\n\n unit_move = 0;\n\n // only allow the unit to move if it has r...
[ { "docid": "a6c21c819993b389d04038c5bbfcdef3", "score": "0.7881176", "text": "function checkClick(tile) {\n\tif (tile.type === 0) {\n\t\trevealTile(tile)\n\t\trevealBlanks(tile) \n\t} else if (tile.type > 0) \n\t\trevealTile(tile)\n\telse {\n\t\trevealMines(tile)\n\t\tdisplayLose(tile)\n\t}\n}", "ti...
17d4ce855dc7fef81cee8f2ac81cdba0
CREA UN LISTADO DE LOS TWEETS
[ { "docid": "5748020e206369f8280d5398928a9755", "score": "0.5713568", "text": "function crearHTML(){\n limpiarHtml();\n if(tweets.length > 0){\n tweets.forEach( tweet =>{\n //Agregar un boton para eliminar\n const btnEliminar = document.createElement('a');\n ...
[ { "docid": "7468ab948bf9cc4c763041f52ea610d1", "score": "0.6333677", "text": "function teclado() {\n var teclas = document.getElementById('buttons');\n var letras = document.createElement('ul');\n\n for (var i = 0; i < abecedario.length; i++) {\n letras.id = 'abecedario';\n var li...
be33343beacfebe7bae2d25bdba8182a
Get the department information on selection
[ { "docid": "4b8d7547b2d01808d8dd6f3251fcab24", "score": "0.0", "text": "GetItem(item) {\n Alert.alert(item);\n }", "title": "" } ]
[ { "docid": "8fca7d525d90bff0c0024d7e823d1ab3", "score": "0.7352759", "text": "function viewDepartment() {\n var queryString = `SELECT id AS Dept_ID, name AS departments FROM departments;`;\n connection.query(queryString, function(err, query){\n console.table(query);\n startCompany();\n ...
df084cb0cdaa841c8519d07de4ef13ea
return the (full length, i.e. scaled by radius) Z vector from the sphere transform
[ { "docid": "f11b6d2abd8187e13596974760c21fc6", "score": "0.60049486", "text": "cloneVectorZ() { return this._localToWorld.matrix.columnZ(); }", "title": "" } ]
[ { "docid": "7f9e8bb7181fe9061c67a5b50db98d37", "score": "0.6769943", "text": "static unitZ(scale = 1) { return new Vector3d(0, 0, scale); }", "title": "" }, { "docid": "7f9e8bb7181fe9061c67a5b50db98d37", "score": "0.6769943", "text": "static unitZ(scale = 1) { return new Vector3d(0, ...
e253b262034e8a9e048caa0ffa2441b8
Default view event handlers.
[ { "docid": "d083b74e80be292192c736390ea29316", "score": "0.0", "text": "function onFocus(){\n abortControlsAutoHide( this );\n}", "title": "" } ]
[ { "docid": "b7a37080aead7462fd553a93389dba3d", "score": "0.6652133", "text": "enableViewEventHandlers() {\n this.renderer.project.view.on('mousedown', this.mouseDownHandler);\n this.renderer.project.view.on('mousemove', this.mouseMoveHandler);\n this.renderer.project.view.on('mouseu...
e165a973afa1492c13ef168df69ea609
document cannot be overridden so we override a bunch of its methods directly on the instance.
[ { "docid": "bc5d12ae1503bfc1b395454165ac91e4", "score": "0.593757", "text": "function wrapMethod(name) {\n var original = document[name];\n Document.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }", "title": "" } ]
[ { "docid": "e2b22edebed453fe2d81b09df23c6ccf", "score": "0.72057265", "text": "constructor(doc) {\n super(doc);\n }", "title": "" }, { "docid": "5635a24ccf1e8e81d6ff665e8e66d0a3", "score": "0.7162124", "text": "constructor(doc) {\n super(doc);\n }", "title": "" ...
862b6dd9bd61f439c6df7f0e567ffa62
delete/remove a task stored in MongoDB.
[ { "docid": "6974e92eb0ba1903cd0c113c0001f2d2", "score": "0.76000255", "text": "function deleteTask(req, res) {\n let userCollection = loadUserCollection(req.webtaskContext);\n\n // removes a task based on its id.\n userCollection.remove({_id: mongojs.ObjectId(req.query.id)}, () => res.end());\n...
[ { "docid": "d1714658f5d3a73f0a9e49b3e876b8bb", "score": "0.7434723", "text": "function deleteTask(req, res) {\n Task.remove({ _id: req.params.id }, (err, result) => {\n if(err) res.send(err);\n res.json({ message: 'Task successfully deleted!', result });\n })\n}", "title": "" }, { "d...
5d108b845c0226c687dcfc3164e7e191
called each iteration of the game loop
[ { "docid": "7a0ce9dc82eb00ee48e996fb205be43f", "score": "0.0", "text": "function update(modifier) {\n\n // keypress handling\n if (38 in keysDown) //up movement - W\n ball.y -= ball.speed * modifier;\n if (40 in keysDown) //down movement - S\n ball.y += ball.sp...
[ { "docid": "cdbe24c8f3a203315c7688214bb3523d", "score": "0.73148435", "text": "function iterateGame(){\n\tboard.update();\n\tupdateBoardHtml();\n}", "title": "" }, { "docid": "0a2e18e059d92f69d7e2c37340afba03", "score": "0.71746397", "text": "function main(){\n // Repeatedly loop ...
95169c042b9f6df5a135d18d435764a8
Script data double escaped dash dash state
[ { "docid": "e450ef65f460bbe380f2b332cb6e0fe4", "score": "0.6492085", "text": "[SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE](cp) {\n if (cp === $.HYPHEN_MINUS) {\n this._emitChars('-');\n } else if (cp === $.LESS_THAN_SIGN) {\n this.state = SCRIPT_DATA_DOUBLE_ESCAPED_LE...
[ { "docid": "d3622d8c803c92dadbd7efaca240ce81", "score": "0.72409904", "text": "_stateScriptDataEscapedDashDash(cp) {\n switch (cp) {\n case unicode_js_1.CODE_POINTS.HYPHEN_MINUS: {\n this._emitChars('-');\n break;\n }\n case unicode_j...
74b622e4e3fc0f1641e69010544187e3
update node modules for current project
[ { "docid": "6f71c0d8e79716af6ed242338598f455", "score": "0.7370775", "text": "updateModules() {\n let packageJsonDir = conf.packageJsonDir();\n let update = shell.exec(`cd ${packageJsonDir} && yarn install || npm install`, { silent: true })\n \n if (!update.includes('Already ...
[ { "docid": "3d9acac405bec91e8a2e95aa47330adb", "score": "0.71610904", "text": "function doNpmUpdate() {\n\n\tnpmModules.forEach( function( modName ) {\n\n\t\tif( fs.existsSync( rootDir + \"node_modules/\" + modName ) ) {\n\t\t\tconsole.log( modName + \" already installed, doing an update\" );\n\t\t\tshe...
c4e17c3a7c7b0ab64a68a43b92ba52fa
search in the user table for a user with the email that was filled out, if we find a record it means that the message has already been taken, if not the email can be registered
[ { "docid": "68f182f9873ba5918a8e7bec076ea8b1", "score": "0.0", "text": "function searchMail() {\n $('#email_r').focusout(function () {\n var $email = $('#email_r').val();\n// console.log($email);\n xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = function () {\n i...
[ { "docid": "afb057c12ad0845bd7a92bb22106fa06", "score": "0.742465", "text": "function userExist(email, cb) {\n email = email.toLowerCase();\n User.findOne({email: email}, function (err, doc) {\n cb(err, doc);\n });\n }", "title": "" }, { "docid": "6c117e824...
27c260ebe2afe668fff26fe5eb811606
Creamos una funcion para ahorrar codigo
[ { "docid": "53570e43d8e925cc38f3dd637fe2b818", "score": "0.0", "text": "function listadoUsuarios(usuarios){\n usuarios.map((user,i)=>{\n let nombre = document.createElement('h3');\n nombre.innerHTML = i + \". \" + user.first_name + \" \" + user.last_name;\n div_us...
[ { "docid": "4210560d5fade577279b90b2025ad008", "score": "0.602595", "text": "_guardarArchivoDirectorio(path,nombre,datos,maxSize=false, encode=false){\n return new Promise((resolve, reject) => {\n //Si supera el max size regresa un reject\n if(maxSize){\n let ...
c012eb34d4e36a35cb4b864eee49fbd2
Returns navigation parameters Returns navigation parameters
[ { "docid": "12fcbceb6b1018a9179fdd7c122d3021", "score": "0.0", "text": "function getPagingParams(query, options, adapter) {\n if (!query) {\n return null;\n }\n var offset = query.getOffset();\n var limit = query.getLimit();\n var meta = query.getMeta();\n ...
[ { "docid": "342d4a4cb8f64aeec28359367f3c5e9c", "score": "0.62377954", "text": "static get parameters() {\n return [[NavController], [AuthService], [UserInfoService]];\n }", "title": "" }, { "docid": "d1292ca3b39eefa1f4f3c01c1ee919cc", "score": "0.58887553", "text": "getCurrentNav...
2af8c7f7c0d47329cf7c890b41fa60e1
winningRev and deleted are performancekillers, but in newer versions of PouchDB, they are cached on the metadata
[ { "docid": "5eb5b7ffc1addae61f1de17293ff7ca0", "score": "0.5159386", "text": "function getWinningRev(metadata) {\n return 'winningRev' in metadata ?\n metadata.winningRev : winningRev(metadata);\n}", "title": "" } ]
[ { "docid": "02ad4e1d4772f82cf8b074d86f14063e", "score": "0.5852141", "text": "function migrateMetadata(txn) {\n\n function decodeMetadataCompat(storedObject) {\n if (!storedObject.data) {\n // old format, when we didn't store it stringified\n storedObject.deleted = storedObject.del...
932078e5b4f92e2fc913ae957b5dffd9
gets the contents of the cert file
[ { "docid": "0837be9dbc055e34c98f3266cfa13ce6", "score": "0.71752185", "text": "async getCertFile () {\n let cert = ''\n if (this.dexAddrForm.page.certFile.value) {\n cert = await this.dexAddrForm.page.certFile.files[0].text()\n }\n return cert\n }", "title": "" } ]
[ { "docid": "fa1203ad5d54b5d4194ca372ff55aa32", "score": "0.7065992", "text": "async function _read_ssl_certificate(dir) {\n const [key, cert] = await Promise.all([\n fs.promises.readFile(path.join(dir, 'tls.key'), 'utf8'),\n fs.promises.readFile(path.join(dir, 'tls.crt'), 'utf8')\n ]...
880b0c1e0382ebd3d92831a8462d87d7
So how to we console.log after we setState???
[ { "docid": "a85b5f5184882d60a4106c3e1db88e21", "score": "0.0", "text": "function Dependencies(props) {\n const [count, setCount] = useState(0);\n const [name, setName] = useState(\"Susan\");\n\n useEffect(() => {\n console.log(count);\n setName(\"Counter\");\n }, [count]);\n\n useEffect(() =>...
[ { "docid": "c837dbd8a5c1173e76709cb431a283f2", "score": "0.75582016", "text": "logSetState(newState) {\n this.log.push(JSON.parse(JSON.stringify(\n this.log.length === 0 ? this.state : newState\n )));\n\n this.setState(newState);\n }", "title": "" }, { "doc...
755f58d2c59c1ed4221dd97dd1ba47fc
Duplicate the dashboard to your own account
[ { "docid": "3d94c5a4d9fef5b21d5f530300efd07e", "score": "0.6642001", "text": "async duplicate(dashboardID, dashboardObj) {\n const result = await this.doRequest({\n path: `/dashboard/${dashboardID}/duplicate`,\n method: \"POST\",\n body: dashboardObj || {},\n ...
[ { "docid": "c62d702f96e218eb3c50c5a55de214b6", "score": "0.5861034", "text": "function createDashboard(dashboard) {\n\t\tvar query = 'INSERT INTO `dashboard` (`title`, `icon`) \\\n\t\t\tVALUES (\"' + dashboard.title + '\", \\\n\t\t\t\"' + dashboard.icon + '\");';\n\n\t\treturn MysqlFactory.query(query);...
52679725065bb9f5103ea407b31bc834
This is done to register the method called with moment() without creating circular dependencies.
[ { "docid": "468e36b2f3a7a6e4ac070d402403f0f0", "score": "0.0", "text": "function setHookCallback(callback) {\n hookCallback = callback;\n }", "title": "" } ]
[ { "docid": "291903ba88f58460b325726f112b2229", "score": "0.6951959", "text": "function Moment() {}", "title": "" }, { "docid": "f753ab394756f0b21d57d7b23ea6429b", "score": "0.63718075", "text": "momentAPI( _moment, options ) {\n\n // If a moment was not given, and only the API was...
8af2578fd522c58849acac46f1ae2c5e
Base inspection function for prefilters and transports
[ { "docid": "ef8dc33ce532e008e91565884108dbd4", "score": "0.0", "text": "function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspec...
[ { "docid": "7eda0c188f8486e6c353982eca608e2f", "score": "0.65449744", "text": "function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[d...
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": "67eb58c95dddf9977addb16c56419fde", "score": "0.76737326", "text": "function inheritance() {}", "title": "" }, { "docid": "2f83124dd1e6ffd476e099b77d8f2081", "score": "0.7261122", "text": "function SuperclassBare() {}", "title": "" }, { "docid": "2f83124dd1e6ff...
bc9b3275db00dbc9ae7b1c817e0cb844
checks a cache object for emptiness
[ { "docid": "27554deac3f0bb7e34b795783bc800ca", "score": "0.0", "text": "function isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\n\t\t\tcontinue;...
[ { "docid": "f62db7f8c3689e5ca775bd273689d8f0", "score": "0.65723664", "text": "doesCacheEntryHasValue(entry){return entry?entry.value!==undefined:false;}", "title": "" }, { "docid": "f62db7f8c3689e5ca775bd273689d8f0", "score": "0.65723664", "text": "doesCacheEntryHasValue(entry){retu...
5828cb601ebdf090c8b15e67f6183412
clicking on the yellow tile
[ { "docid": "28eb061dbf3f56c2f28f0e0d8dd51908", "score": "0.0", "text": "function yellow() {\n if(gameOn == true && level > 0){\n setTimeout(function(){\n document.getElementById(\"yellow\").style.opacity=0.6;\n }, 0);\n setTimeout(function(){\n document.getElementById(\"yellow\")....
[ { "docid": "44fd2a87ccfccaf6dd83f22df0d26593", "score": "0.781122", "text": "function chooseTile(tile) {\n\tsimulateClick(tile.div);\n}", "title": "" }, { "docid": "592f2345300d39d5b98dd682050dab78", "score": "0.7557212", "text": "function tile_tap(event) { root.tile_tap(event.curren...
6b225f6b71f7ff7ba6c09ae3a4c73fca
Increase the quantity of an item when the + button is clicked
[ { "docid": "b303a4312ce6d392d498f95b579547aa", "score": "0.6805523", "text": "addMoreItem(itemId) {\n let list = this.state.cartItems;\n for (let i = 0; i < list.length; i++) {\n if (list[i].id === itemId) {\n list[i].quantity++;\n }\n }\n this.setState({cartItems: list});\n...
[ { "docid": "497486c3f449c4290387a1d6410abfbf", "score": "0.8035562", "text": "function increment() {\n setQuantity(+quantity + 1)\n }", "title": "" }, { "docid": "ebf75d0579057b3a3b7c114e51016b57", "score": "0.77884614", "text": "IncrementQuantity() {\n this.quantity++;\n ...
27b1582371b2cc00b21a4c46541f1424
set tool tips for truncated data
[ { "docid": "e663c1f293b1914a7bdddf3e376e7289", "score": "0.5912704", "text": "function setHistoryTips() {\n setTips('.author-pic', 'left'); \n setTips('.time-ago');\n setTips('.cut-content'); \n setTips('.cut-url', 'left'); \n setTimeAgo();\n}", "title": "" } ]
[ { "docid": "d81b5424af3742ad29cbfe2dc17bc328", "score": "0.6789613", "text": "function setMetaToolTips() {\n $scope.currentZpoint.metaData.metaData.forEach(function (metaField) {\n var tmpSrc = null,\n helpText = \"\";\n\n ...
884d3b7b35c6c7d12840435758a1b505
number of bytes available, we need to check if we end on a leading/high surrogate. In that case, we need to wait for the next two bytes in order to decode the last character properly.
[ { "docid": "27fc9ca10cd05fc9d3468431399966a7", "score": "0.0", "text": "function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString('utf16le',i);if(r){var c=r.charCodeAt(r.length-1);if(c>=0xD800&&c<=0xDBFF){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=bu...
[ { "docid": "d02050082405878dbcf7b54252ff85d6", "score": "0.66306984", "text": "function utf8CheckByte(byte){if(byte<=0x7F)return 0;else if(byte>>5===0x06)return 2;else if(byte>>4===0x0E)return 3;else if(byte>>3===0x1E)return 4;return-1;}// Checks at most 3 bytes at the end of a Buffer in order to detect...
354302653119980fcf3f8c7abd12f936
Generate "outer" loops that loop over blocks of data, applying "inner" loops to the blocks by manipulating the local variables in such a way that the inner loop only "sees" the current block. TODO: If this is used, then the previous declaration (done by generateCwiseOp) of s is essentially unnecessary. I believe the s ...
[ { "docid": "ec533124dbe4a79c078da5c2aa145313", "score": "0.5148336", "text": "function outerFill(matched, order, proc, body) {\n var dimension = order.length\n , nargs = proc.arrayArgs.length\n , blockSize = proc.blockSize\n , has_index = proc.indexArgs.length > 0\n , code = []\n for(var i...
[ { "docid": "1f98443cab092c2da2c3f5eb4e3fc5f3", "score": "0.70620036", "text": "function generateCWiseOp(proc, typesig) {\n\n//Compute dimension\n// Arrays get put first in typesig, and there are two entries per array (dtype and order), so this gets the number of dimensions in the first array arg.\nvar d...
2b15bb7704b80bf2393a2db3efcc48fb
Returns material with required materials if they can be found with same authority and location.
[ { "docid": "b3ea7b7da236f108c920fa7a76f0e853", "score": "0.56547064", "text": "function getWithRequired(id, callback) {\n get(id,function(err, material){\n if( err ) {\n return callback(err);\n }\n\n var result = {\n material : material,\n required : []\n };\n\n if( materi...
[ { "docid": "39723fbe419832084387564b0e4955d1", "score": "0.63630754", "text": "function hasRequired(id, callback) {\n get(id, function(err, material){\n if( err ) {\n return callback(err);\n }\n\n if( !material ) {\n return callback('Invalid material id');\n }\n\n if( !material...
88a612b85b8df3a86519f4464c130304
_ _ _ __ _ __(_)_ ____ _| |_ ___ | '_ \| '__| \ \ / / _` | __/ _ \ | |_) | | | |\ V / (_| | || __/ | .__/|_| |_| \_/ \__,_|\__\___| |_|
[ { "docid": "f1b6af10a594ad1adfa8b62bffbb1506", "score": "0.0", "text": "_cli (cmd, value) {\n if (this[cmd] == undefined) {\n console.log('Undefined command => ' + cmd)\n console.log('Aborting')\n process.exit(1)\n }\n return this[cmd](value)\n }"...
[ { "docid": "1ac507c5d6aac7c114c1a979ee26340d", "score": "0.614599", "text": "function __axO4V4GhxjCIJCmJ0hzrQQ() {}", "title": "" }, { "docid": "10f4afb80d955af0b4a0f7690ea4c94b", "score": "0.6008029", "text": "function _5Ra3VTLNPzq7ojEKUXMbvA() {}", "title": "" }, { "doc...
9bb3b3eb6fcdd3236d5de8a2169663f1
De tijd geeft mee hoe lang de hook er over doet om naar de bodem te komen, fps zie berekening speed
[ { "docid": "3e59ee87a58e466875435324e3151f2d", "score": "0.62140363", "text": "handle(time){\n this.stepSize = time * this.speed; // Hook speed\n /*\n controller voor de beweging van de hook\n * */\n\n if(keysPressed[this.user.rightButton] && !keysPressed[this.use...
[ { "docid": "d1aa31653b32837e667c9316ce4b92f7", "score": "0.7036204", "text": "function updateSpeed() {\n fps += 10;\n }", "title": "" }, { "docid": "070672cf68e075640453078aec12277b", "score": "0.68271136", "text": "_updateFps() {\n const MUL1 = 0.25;\n const MUL2 = 0.75;\n...
a1278ab0785c9c8aa90a1ad36e1f52a1
=========================================================================== Compress as much as possible from the input stream, return the current block state. This function does not perform lazy evaluation of matches and inserts new strings in the dictionary only for unmatched strings or for short matches. It is used ...
[ { "docid": "7ffc393048cc3eb3dbf729e51885f86f", "score": "0.0", "text": "function deflate_fast(s, flush) {\n\t var hash_head; /* head of the hash chain */\n\t var bflush; /* set if current block must be flushed */\n\t\n\t for (;;) {\n\t /* Make sure that we always have enough looka...
[ { "docid": "f7270f04a4e803be9ef4735a42ab0d3f", "score": "0.67821276", "text": "function zip_deflate_fast() {\n while (zip_lookahead != 0 && zip_qhead == null) {\n var flush; // set if current block must be flushed\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, ...
446695fb3c72bd5b81ba7956a93e5f49
This function is called when a dropdown menu item is selected
[ { "docid": "7ce2652c9318423850f425274dab5955", "score": "0.0", "text": "function updatePlotly() {\n // Use D3 to select the dropdown menu\n var dropdownMenu = d3.select(\"#selDataset\");\n // Assign the value of the dropdown menu option to a variable\n var dataset = dropdownMenu.property(\"v...
[ { "docid": "4617e901741ab7996c8b62829d6412cb", "score": "0.7269065", "text": "function handleDropdownSelection(e) {\n var $a = (0, _jquery2.default)(e.target);\n var value = $a.attr('data-value');\n updateOption(this, value, $a.hasClass('aui-dropdown2-checked'));\n}", "title": "" }, { ...
886a503e93359cebc2049276204bc7fe
adding profile to the dislike or like list
[ { "docid": "ef38610679b8192eeb48393fa30e4612", "score": "0.641493", "text": "function addToList(profile, type) {\r\n let listLikeDislike = JSON.parse(localStorage.getItem(type));\r\n console.log(listLikeDislike);\r\n if (listLikeDislike != null) {\r\n listLikeDislike.push(profile);\r\n ...
[ { "docid": "25d495a5fd5e46a87d7b08767be44a66", "score": "0.64328706", "text": "function addLike(){\n let profile = JSON.parse(localStorage.getItem(\"currentProfile\"));\n addObjectToIndexedDB(profile, true, false);\n addObjectToAPI(\"http://localhost:3000/catProfiles\", profile, true, false);\n...
0970c71188362d7e458eaa71bb5203b5
Collects all members of the iterator into a list. This is a terminal operation.
[ { "docid": "38a75376a2fcd9b6ac4d00be1a82b5c0", "score": "0.6949764", "text": "collect() {\n const collected = [];\n for (const x of this.iter) {\n collected.push(x);\n }\n return collected;\n }", "title": "" } ]
[ { "docid": "2e2633c1982c33dc2602c9ce591f09d7", "score": "0.58818173", "text": "function ListIterator() {}", "title": "" }, { "docid": "5533816dffdd78cef59aaa70de33853b", "score": "0.5686874", "text": "function collectList(){\n var listItems = [];\n for(var i=0; i<list.elements.leng...
0621fd67eb6823bcc2abd0a947aa9977
set the puzzle size
[ { "docid": "2e17115c8d34b27afd0efd6256e2c5c8", "score": "0.0", "text": "function getSize() {\n //choose the picture again\n Rechoose();\n\n //when press the size button, the web changed\n for (let f = 3; f < 6; f++) {\n document.getElementById(\...
[ { "docid": "6e7cc24a22c6294033284fd8258e3a02", "score": "0.70028275", "text": "set size(value) {}", "title": "" }, { "docid": "b76cb457b1617a2ae39b22891744ecce", "score": "0.65693533", "text": "function initPuzzle(){\n \"use strict\";\n var puzlst = formPuzzle(), \n max ...
ee856a245b2623e24869a50790cf6e80
open a grid with the result of the array of urls in a dialog
[ { "docid": "647ff607f44b243548040725b015ead6", "score": "0.7179398", "text": "function openGridDialog(values, fields, title) {\r\n\tvar dialog = jQuery('<div style=\"width=500px\"><div id=\"grid_dialog\"></div></div>');\r\n\tmainGrid.append(dialog);\r\n\tvar promises = [];\r\n\tvar result = [];\r\n\tval...
[ { "docid": "eac8114328025eff7a9fe0ab151bdc07", "score": "0.6092611", "text": "function query_result()\r\n{\r\n\t$(\"#win-query\").window(\"close\");\r\n\tvar str=app_url+\"/Trans/listFile\";\r\n\tif(ID(\"filename\").value!=\"\")\r\n\t\tstr=app_url+\"/Trans/listFile/filename/\"+ID(\"filename\").value;\r\...
8c838c7a286a58503c32dcb13b6330c6
Deletes a long term retention backup.
[ { "docid": "d8073374f9a8d9cca35adfb7a167f5da", "score": "0.5156408", "text": "beginDeleteAndWait(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const poller = yield this.beginDel...
[ { "docid": "f320691561c475fe7a7e2ec473b750c0", "score": "0.5925139", "text": "beginDeleteByResourceGroup(resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const d...
733d98ff0a1df296f544b48257b8853d
retourne le lien pour NZBIndex
[ { "docid": "307b52f232812b273fbe6223ab3cfec6", "score": "0.0", "text": "function getNZBIndexLink(titre) {\n return '<form style=\"display:inline;\" action=\"http://www.nzbindex.nl/search/?\" method=\"get\" target=\"_blank\"><input type=\"hidden\" name=\"q\" value=\"' + titre + '\"><a onClick=\"$(th...
[ { "docid": "0ae88e8bae8e69fcc97ce6fa5ad84b29", "score": "0.63794273", "text": "get index() {\n return this._b;\n }", "title": "" }, { "docid": "3ccedaedabef6f601a71f3bb74e26b9a", "score": "0.6343559", "text": "get_index() {\n let a = this.worksheet;\n if (a == null || this....
0529f7b47a28cbae13275a396e66ea2d
get information from the form
[ { "docid": "4b6fadc8f6da305266c35ffdd2624f0c", "score": "0.0", "text": "function getBookInformation() {\n\tconst bookInformation = {};\n\tbookInformation[\"title\"] = title.value;\n\tbookInformation[\"author\"] = author.value;\n\tbookInformation[\"isbn\"] = isbn.value;\n\tbookInformation[\"publishedYear...
[ { "docid": "d00b0a1357b45ad3613245f8b1798cf4", "score": "0.77665895", "text": "function getInfo(){\n return{\n title: formTitle.value,\n author: formAuthor.value,\n content: formContent.value\n }\n}", "title": "" }, { "docid": "e0eb38aed23302334f07401ea7cf39b9", "score": "0.68...
fb55a0196e9d407e7cb28339464dad65
listen for callback notification when the processing of the audio file is finished
[ { "docid": "afa7bceece76af9f9434a9abadbc5547", "score": "0.0", "text": "function onRequest(request, response) {\n\n response.writeHead(200, {'Content-Type': 'text/xml'});\n response.end();\n\n getTranscription();\n\n}", "title": "" } ]
[ { "docid": "8300b5e44394acff81dc7d6162163339", "score": "0.6701549", "text": "function onDecodeComplete(data) {\n webAudio.decodedBuffer = data;\n // Call all handlers that were waiting for this decode to finish, and clear the handler list.\n webAudio.onDecodeComplete.forEach(...
29bb217861b33b19c87a2420d353a6ee
return popular movies, 20 per time page: used for pagination
[ { "docid": "1cc9e6654039ae0e448e8f6992ba1a25", "score": "0.7410799", "text": "function getMovies(page) {\n return RequestFactory.request('movie/popular', page);\n }", "title": "" } ]
[ { "docid": "74f2e8cec44ad43d0cb6f9445894dac5", "score": "0.7397871", "text": "function popularMovie() {\n return $http.get(\"http://api.themoviedb.org/3/movie/top_rated?api_key=b4dc790fe4455d2de33988fec71923a1\")\n }", "title": "" }, { "docid": "ed9c7056c20e7c7557cfab4743c2...
b691aa03c635bd30f4705be7dd9e1aa9
Updates the editable colors form.
[ { "docid": "d7444830ecb806397a7eb647a76d9f5c", "score": "0.0", "text": "function updateForm(pal)\n {\n // Update match values to colour hash.\n updateMatchColorsToValues(pal);\n\n // Dynamic update of report.\n updateThematics(); \n\n // Update session config...
[ { "docid": "65131cd40d1882e428c3b06fddc3b447", "score": "0.66033417", "text": "update() {\n if (!this.colorpicker.colorHandler.hasColor() || !this.hasAddon()) {\n return;\n }\n\n let colorStr = this.colorpicker.colorHandler.getColorString();\n let styles = {'background': colorStr};\n\n ...
4572c4ac035e4acb495bc97ce25a304c
assemble string used for origins parameter of google Distance Matrix API call
[ { "docid": "994ffdab1d9ef9c10ad09242704eb92b", "score": "0.7132017", "text": "function getOriginsString(inputData){\n\n return inputData.address1.coordinates.lat + ',' +\n inputData.address1.coordinates.lng + '|' +\n inputData.address2.coordinates.lat + ',' +\n inputData.address...
[ { "docid": "55e1a42c3fa1cec08f09dd182e330eae", "score": "0.5878498", "text": "function getMapURL (coords) {\n\t\treturn [\n\t\t\t'https://maps.googleapis.com/maps/api/staticmap?center=' + coords,\n\t\t\t'zoom=4',\n\t\t\t'size=600x400',\n\t\t\t'scale=2',\n\t\t\t'format=jpg',\n\t\t\t'maptype=satellite',\n...
b296316c7b9d1f556e165bc8cc684be6
"this" should be the larger one if appropriate.
[ { "docid": "e824b433caa20e3b8cf8d013d61a1a77", "score": "0.0", "text": "function bnpMultiplyLowerTo(a,n,r){var i=Math.min(this.t+a.t,n);r.s=0;// assumes a,this >= 0\nr.t=i;while(i>0)r[--i]=0;var j;for(j=r.t-this.t;i<j;++i)r[i+this.t]=this.am(0,a[i],r,i,0,this.t);for(j=Math.min(a.t,n);i<j;++i)this.am(0,a...
[ { "docid": "fecad5687e7fe769f7dad00e0afea517", "score": "0.6495897", "text": "get ToLarger() {}", "title": "" }, { "docid": "2fa1ddc049b532a0da33bee0bf681939", "score": "0.64016366", "text": "get ToSmaller() {}", "title": "" }, { "docid": "32076202d1817e44069fa2fd23a8be44...
841dec64ee671ef86deb21fcdc99fca3
NEW /////// this spits a value or its negative at random
[ { "docid": "741d125fbf9b9409f6f94e4c101dd3b9", "score": "0.7948057", "text": "function randomNegative(value) {\n var r = random();\n var result;\n if (r < 0.5){\n result = value;\n }\n else {\n result = -value;\n }\n return result;\n}", "title": "" } ]
[ { "docid": "384d7ba07827710234e473e1bd114801", "score": "0.77672124", "text": "function randomNeg()\n {\n if (Math.random() < 0.5)\n {\n return -1;\n }\n else\n {\n return 1;\n }\n }", "title": "" }, { "docid": "ae10f448c7...
4d2ece567b68144aa6bec42c751da7f7
Wrap the result array with the default content, as the content is required by omnibox api.
[ { "docid": "d49a07742286ce30d9630a265edf1d71", "score": "0.6080292", "text": "wrap(result) {\n return result.map((description, index) => {\n return {content: `${index + 1}`, description};\n });\n }", "title": "" } ]
[ { "docid": "e652d6cd247cf16fad6a319ab308b83e", "score": "0.61590976", "text": "function resultWrapper(result) {\n if (result && typeof result.entries !== 'undefined') {\n if (result.entries && result.entries.length) {\n for (var i = 0, _i = result.entries.length; i < _i; i++) {\n ...
b71e3d53cb622090c13097c6ab2817d4
this function checks if the weapon hits the tank
[ { "docid": "25d9b604f3996a2011271729b8598dbc", "score": "0.6468521", "text": "function checkDirectHit(cx,cy,radius,hitPlayer){\n console.log(\"checking hit\",cx,cy,hitPlayer.getpx(), hitPlayer.getpy(),terrainY[hitPlayer.getpx()]);\n //check if weapon hits tank directly\n changeDelta(hitPlayer);...
[ { "docid": "4d7e8de376b3f9bb0875a7de9aff01d1", "score": "0.6852047", "text": "hurt(player){\n let hitbox = player.hitbox(player.hitDirection)\n\n let swordLeft = hitbox[0]\n let swordRight = hitbox[1]\n let swordUp = hitbox[2]\n let swordDown = hitbox[3]\n\n let...
bb97dfbffc111762a9fad5e353ed980b
4. Easy AI// Easy AI (random moves)
[ { "docid": "1a3e050a849be50e9b0e3b6b1c157c5b", "score": "0.0", "text": "function pickSquare (){\n var col =0\n var row =0\n col = Math.floor(Math.random() * dimensions)\n row = Math.floor(Math.random() * dimensions)\n actionMove(col,row)\n}", "title": "" } ]
[ { "docid": "eece4deec24d7b375e66675e90d6149f", "score": "0.75477034", "text": "function takeAEasyMove(turn) {\n var available = game.currentState.emptyCells();\n var randomCell = available[Math.floor(Math.random() * available.length)];\n var action = new AIAction(randomCell);\n\n ...
71f99a8caeef86996df7a36e8a358ace
Crossplatform code generation for component vmodel
[ { "docid": "a1220e2105387f698c72b5dc9e00e0bf", "score": "0.0", "text": "function genComponentModel (\n el,\n value,\n modifiers\n ) {\n var ref = modifiers || {};\n var number = ref.number;\n var trim = ref.trim;\n\n var baseValueExpression = '$$v';\n var valueExpression = baseV...
[ { "docid": "fcd2434984d75abd06a2146c6886c040", "score": "0.63596976", "text": "function genComponentModel(el, value, modifiers) {\n var ref = modifiers || {};\n var number = ref.number;\n var trim = ref.trim;\n var baseValueExpression = '$$v';\n var valueExpression = baseValueExpression;\n\n if (t...
52e86f91f5c7d9bf93a5c62104b871d2
Getter del flag checked
[ { "docid": "a5cc1940c86e8ede61d947324773aeb4", "score": "0.0", "text": "getChecked(){\n return this.#checked;\n }", "title": "" } ]
[ { "docid": "6c6a4e0e8decb9b98fa97b3c298bf9e3", "score": "0.71650505", "text": "delete() {\n return this.a < 0;\n }", "title": "" }, { "docid": "c0c70db87bde7e1ee266c8bc6e76e957", "score": "0.7129549", "text": "get deleted() {\n return this.d_newSha === null;\n }", "...