Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Removes the query if there are no observers left
maybeRemoveQuery(query) { if (query.observers.length === 0) { query.clear(); delete this._queries[buildTypeKey(query.types)]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n this.queries.length = 0;\n }", "destroy() {\n this.unmonitorForChanges();\n this.set('status', this.is(EMPTY) ? NON_EXISTENT : DESTROYED);\n this.get('store').removeQuery(this);\n Query.parent.destroy.call(this);\n }", "pauseObservers() {\n // No-op if al...
[ "0.68000877", "0.65006393", "0.6292902", "0.61663836", "0.616458", "0.60208726", "0.59936535", "0.5878699", "0.5870429", "0.5857479", "0.5772156", "0.57705003", "0.57393855", "0.56515247", "0.56174403", "0.56098485", "0.559088", "0.558772", "0.554541", "0.55254674", "0.552375...
0.771245
0
Adds the entity to any matching query in the query manage
addEntity(entity) { for (const queryType in this._queries) { if (this._queries[queryType]) { this._queries[queryType].addEntity(entity); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addQuery(query) {\n this._queries[buildTypeKey(query.types)] = query;\n for (const entity of this._world.entityManager.entities) {\n query.addEntity(entity);\n }\n }", "addEntity (entity) {\n this.entities.push(entity);\n }", "addEntity(entity) {\n t...
[ "0.66659504", "0.64482516", "0.6407551", "0.63641423", "0.6146503", "0.6057058", "0.57167757", "0.5668539", "0.55860686", "0.55819863", "0.5574176", "0.54522204", "0.5368904", "0.53462154", "0.52616423", "0.5253497", "0.5208746", "0.5176261", "0.51611817", "0.512795", "0.5123...
0.75402886
0
Removes an entity from queries if the removed component disqualifies it
removeComponent(entity, component) { for (const queryType in this._queries) { if (this._queries[queryType].matches(entity.types.concat([component.type]))) { this._queries[queryType].removeEntity(entity); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeEntity(entity) {\n for (const queryType in this._queries) {\n this._queries[queryType].removeEntity(entity);\n }\n }", "remove(entity) {\n if (this.contains(entity)) {\n const id = this.id(entity);\n internal(this).entityToID.delete(entity);\n i...
[ "0.6849256", "0.67407334", "0.6531023", "0.6510536", "0.64179003", "0.6371038", "0.59681", "0.5908622", "0.576808", "0.57184184", "0.55294013", "0.55294013", "0.5476722", "0.5445501", "0.542734", "0.5425583", "0.54112804", "0.5407641", "0.5383855", "0.53819346", "0.5364902", ...
0.6976353
0
Removes an entity from all queries it is currently a part of
removeEntity(entity) { for (const queryType in this._queries) { this._queries[queryType].removeEntity(entity); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeEntity(entity) {\n if (entity) {\n this.entities.remove(entity);\n }\n }", "reset() {\n this.entities().forEach(e => e.delete());\n }", "clear() {\n this.entities.clear()\n }", "removeLater(entity) {\n this.getUnitOfWork().remove(entity);\n }", "r...
[ "0.7251228", "0.7224377", "0.71298397", "0.70805216", "0.70382494", "0.69113696", "0.6815885", "0.6815885", "0.68040097", "0.6534566", "0.64966893", "0.64597785", "0.6390154", "0.63315433", "0.6274492", "0.6232372", "0.6223292", "0.6191424", "0.61596847", "0.6086402", "0.6075...
0.8073078
0
Creates a populated query and returns, if the query already exists that will be returned instead of a new instance
createQuery(types) { const maybeExistingQuery = this.getQuery(types); if (maybeExistingQuery) { return maybeExistingQuery; } const query = new Query(types); this._addQuery(query); return query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkExistingQuery () {\n\t\treturn null;\n\t}", "create(op, value) {\n this.operation = op;\n this.value = valueToJSONValue(value);\n if (this.query === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n this.query = new Query();\n ...
[ "0.69916874", "0.6236609", "0.62297994", "0.612967", "0.6042127", "0.5975313", "0.59446865", "0.5898047", "0.5815225", "0.57246757", "0.57151353", "0.5649129", "0.5614477", "0.558408", "0.55080014", "0.5446277", "0.5431758", "0.5426223", "0.54198706", "0.53821933", "0.5374019...
0.5781115
9
Retrieves an existing query by types if it exists otherwise returns null
getQuery(types) { const key = buildTypeKey(types); if (this._queries[key]) { return this._queries[key]; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createQuery(types) {\n const maybeExistingQuery = this.getQuery(types);\n if (maybeExistingQuery) {\n return maybeExistingQuery;\n }\n const query = new Query(types);\n this._addQuery(query);\n return query;\n }", "getQuery(queryType) {\n // let inDevMod...
[ "0.69419473", "0.6130834", "0.603947", "0.57758653", "0.5559515", "0.549817", "0.5457017", "0.5455176", "0.54428905", "0.540416", "0.5402368", "0.53993934", "0.5382512", "0.53397506", "0.5336497", "0.5264103", "0.52586424", "0.52418315", "0.5239234", "0.52175057", "0.5206119"...
0.8042855
0
Get the User with given email
function UserWithEmail(email) { return client.query('SELECT * FROM userdetails where email = $1;', [email]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getuserByEmail(email) {\n return User.findOne({\n where: {\n email\n }\n });\n }", "async getByEmail( email ) {\n /* Attempt to get the user with the specified email address */\n const user = await User.findOne({ email }).exec();\n \n /* If the user doesn't ...
[ "0.8516173", "0.84490275", "0.8440344", "0.8368928", "0.83097464", "0.8300622", "0.8183481", "0.8179334", "0.81373435", "0.8131393", "0.81057215", "0.7951219", "0.7920073", "0.7873781", "0.7859165", "0.78288174", "0.7814821", "0.7812987", "0.7807172", "0.7792309", "0.77851665...
0.80298233
11
kiem tra browser cho dung cookie khong
function checkBrowserEnableCookie() { var cookieEnabled = (navigator.cookieEnabled) ? true : false //if not IE4+ nor NS6+ if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) { document.cookie = "testcookie"; cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loggacookie() {\n //setCookie(\"nomexgenerale\", \"torino\", 100);\n console.log(getCookieName(\"coockiememoria\"));\n console.log(getCookie(\"coockiememoria\"));\n console.log(document.cookie);\n console.log(getCookieName(\"nomexgenerale\"));\n}", "function aceptarCookies () {\n // Oculta el HT...
[ "0.69084513", "0.68798757", "0.6830885", "0.682233", "0.6737165", "0.67280984", "0.6609647", "0.65678334", "0.6562805", "0.6522141", "0.65040445", "0.64854383", "0.64828247", "0.6454818", "0.6448082", "0.64468855", "0.6444379", "0.64318466", "0.64002514", "0.6399603", "0.6397...
0.0
-1
doc so luong san pham dang co trong gio hang
function countShoppingCart(name) { //tao cookie gio hang neu cua co if (readCookie(name) == "") { document.getElementById('count_shopping_cart').innerHTML = "<b>(0)</b>"; } else { //add gia tri vao shopping cart var current_cart = readCookie(name); var ca = current_cart.split...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function talk() {\n\tconsole.log(\"It's like well you know I wasn't really it's not this isn't so much as well anyway umm so like...\");\n}", "function help() {\n var helpmsg =\n '!ouste : déconnecte le bot\\n' +\n '!twss : ajoute la dernière phrase dans la liste des TWSS\\n' +\n '!nwss :...
[ "0.61444557", "0.61435086", "0.60251665", "0.60222495", "0.5913935", "0.5884654", "0.58413774", "0.5836567", "0.5795677", "0.5788048", "0.5759695", "0.56728727", "0.56551594", "0.56551594", "0.56551594", "0.5653677", "0.56514037", "0.5634887", "0.56152374", "0.56088036", "0.5...
0.0
-1
them san pham vao gio hang
function addToShoppingCart(productId, quantity, discount) { //tao cookie gio hang neu cua co if (readCookie('quick_shopping_cart') == null) { createCookie('quick_shopping_cart', '', 1); } //add gia tri vao shopping cart var current_cart = readCookie('quick_shopping_cart'); //kiem tra xe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function starts() {\r\nconst tobi = new WAConnection()\r\ntobi.logger.level = 'warn'\r\nconsole.log(banner.string) //_BANNER\r\nconsole.log(banner2.string) //_BANNER\r\ntobi.on('qr', () => {\r\nconsole.log(color('[','white'), color('!','red'), color(']','white'), color(' Scan the qr code above'))\r\n})\r\n\r...
[ "0.6057297", "0.59065336", "0.5857228", "0.57192", "0.5714104", "0.5707771", "0.5703645", "0.5674565", "0.5634211", "0.56192136", "0.5606192", "0.55769515", "0.5560597", "0.55297583", "0.5527671", "0.55266225", "0.5507321", "0.5505797", "0.54683214", "0.5451171", "0.54507786"...
0.0
-1
xoa bo item trong cart
function deleteFromCart(productId) { if (confirm('Bỏ mua sản phẩm này khỏi giỏ hàng? ')) { var current_cart = readCookie('quick_shopping_cart'); var newCart = current_cart.split('$$'); for (i = 0; i < newCart.length; i++) { var str = newCart[i].split("#"); if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItemToCart() {}", "function addItemToCart() {}", "function Cart(){}", "function addItemToCart(user, item) {}", "function onClickActionAddCartItem(e){\n\t\t\n\t\tvar html = '';\n\t\tlet itemId = parseInt(e.currentTarget.dataset.itemid);\n\t\tvar it = DB.getItemInfo( itemId );\n\t\tvar content = ...
[ "0.7238596", "0.7238596", "0.67683333", "0.6670737", "0.66588515", "0.6643911", "0.6619459", "0.6619459", "0.6619459", "0.6619459", "0.6619459", "0.6619459", "0.6523761", "0.6518858", "0.6514843", "0.6482707", "0.64597875", "0.6427061", "0.6413892", "0.6403408", "0.63866687",...
0.0
-1
cap nhat so luong san pham trong cart
function updateCart(productId, quantity, discount) { //var newquantity = document.getElementById("item_" + productId).value; var newquantity = parseInt(quantity); var newdiscount = parseInt(discount); if (newquantity > -1) { if (newquantity < 1) { //Nếu cập nhật số lượng < 1 thì coi ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildCart() {\n return `bc ${this.pos.x} ${this.pos.y}`;\n }", "function mapearCartas(nPares) {\r\n mapa = [];\r\n // adiciona pares de cartas em ordem no vetor\r\n for (i=1; i<=nPares; i++){\r\n for (j=0; j<2; j++){\r\n mapa.push(i)\r\n }\r\n }\r\n embaralhar(mapa)\r\...
[ "0.58716345", "0.55975777", "0.5530795", "0.5521426", "0.5438595", "0.5436563", "0.5383857", "0.5355238", "0.5354815", "0.5341951", "0.53220147", "0.52999294", "0.52578413", "0.5180488", "0.51159376", "0.5108036", "0.5107865", "0.5102318", "0.5084846", "0.5080084", "0.5080084...
0.0
-1
data.source_id data.target_id data.define data.present data.equate
function Relation(data) { this.source_id = data.source_id; this.target_id = data.target_id; this.define = new mode_1.Mode({ source_id: data.source_id, target_id: data.target_id, type: 'DEFINE', relationships: data.define }); this.pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcMetaDataField_assign(data,params,field)\n{\n // only one target field is used. Note that there is data normalization\n // that occurs, causing the assignment to always have something. But\n // the rules are slightly different.\n //\n // target doesn't exist ==> null\n // targe...
[ "0.5253341", "0.50184983", "0.49945545", "0.48893398", "0.4753184", "0.4716227", "0.47140837", "0.46830043", "0.46470252", "0.46379587", "0.46315533", "0.46128964", "0.46112266", "0.4609087", "0.45805556", "0.4565942", "0.45210257", "0.45102108", "0.45091653", "0.45006907", "...
0.5256117
0
Automatically reflect NetworkTables changes in the Redux store
function onNTValueChanged(key, value, isNew) { if(key.startsWith('/SmartDashboard/')) { store.dispatch({ 'type': 'sd-update', 'key': key.substr(16), 'value': value }); } else if(key.startsWith('/Preferences/')) { store.dispatch({ 'type': 'p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleConnectionChange() {\n const { dispatch } = store;\n const handleConnectionChange = (isConnected) => {\n if (!isConnected) {\n dispatch(AppActions.showError('You need an internet connection to use this app.'));\n }\n dispatch(AppActions.connected(isConnected));\n };\n const ...
[ "0.5858371", "0.5767778", "0.57495725", "0.5667884", "0.56308734", "0.5554107", "0.54614264", "0.54109126", "0.53942966", "0.5324374", "0.52989364", "0.52971005", "0.5249412", "0.522523", "0.5212201", "0.52072495", "0.5190336", "0.5175719", "0.5167671", "0.5160014", "0.515015...
0.0
-1
Constructs a new SamlConfigurationInformations.
constructor() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_conf()\n {\n sconf.default_tp_lightness = 22;\n sconf.rgShapesVisible = false;\n sconf.default_tp_stroke_width = 8;\n sconf.text_nonhover_width = 1;\n sconf.text_hover_width = 2; //needs hover-width cls at svg-text-el,\n //aka f...
[ "0.48294547", "0.46834555", "0.46143088", "0.45727324", "0.45324507", "0.4487755", "0.43662077", "0.43662077", "0.43232164", "0.43040246", "0.4284752", "0.4267604", "0.42652288", "0.426058", "0.42566893", "0.42552325", "0.42552325", "0.42424506", "0.42267326", "0.42149097", "...
0.0
-1
.force("alphaTarget",0.3) check the dictionary to see if nodes are linked
function isConnected(a, b) { return linkedByIndex[a.index + "," + b.index] || linkedByIndex[b.index + "," + a.index] || a.index == b.index; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appearLinks(node,scene) {\n if (node != null && node.x != node.posX){\n //tween for appearing links\n node.drawLinkToParent(scene);\n node.link.setAlpha(0);\n scene.add.tween({\n delay: 1500,\n tar...
[ "0.62835044", "0.5903841", "0.58763593", "0.58733606", "0.5869813", "0.57753146", "0.577445", "0.5753274", "0.5717064", "0.5683305", "0.5677436", "0.5635289", "0.5635289", "0.56086946", "0.5586862", "0.55788916", "0.5577596", "0.5561749", "0.5556357", "0.55495906", "0.5544848...
0.0
-1
fade nodes on hover
function mouseOver(opacity) { return function(d) { // fade node.style("stroke-opacity", function(o) { thisOpacity = isConnected(d, o) ? 1 : opacity; return thisOpacity; }); node.style("fill-opacity", function(o) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fade(opacity) {\r\n return d => {\r\n node.style('stroke-opacity', function (o) {\r\n const thisOpacity = isConnected(d, o) ? 1 : opacity;\r\n this.setAttribute('fill-opacity', thisOpacity);\r\n return thisOpacity;\r\n });\r\n\r\n text.style('fill-opacity', function ...
[ "0.6987669", "0.6834271", "0.6760359", "0.6669671", "0.66080177", "0.6602008", "0.6371316", "0.6339335", "0.63236505", "0.63008475", "0.6298114", "0.6258825", "0.6226555", "0.62216187", "0.6215756", "0.62004757", "0.6190107", "0.6188232", "0.6181176", "0.61793196", "0.6156601...
0.694928
1
BEGIN: Function find error image and replace with default image
function imgError(image) { image.onerror = ""; image.src = "images/no-image.png"; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function errorImage() {\n return '{\"es\":\"../assets/not-found-es.png\",\"fr\":\"../assets/not-found-fr.png\",\"de\":\"../assets/not-found-de.png\"}';\n}", "function imgErrorPhoto(image) {\n image.onerror = '';\n image.src = 'https://raw.githubusercontent.com/Stricks1/cap-twitter/feature/app/assets/images/...
[ "0.7045928", "0.6855608", "0.67151845", "0.6671178", "0.6620465", "0.65937227", "0.64929235", "0.64741987", "0.6377794", "0.6365873", "0.6365873", "0.6274796", "0.62579286", "0.62142986", "0.6167729", "0.61673814", "0.61653066", "0.61209506", "0.60854506", "0.60836005", "0.60...
0.66311765
4
Finds greatest common divisor of two numbers (Euclidean algorithm)
function gcd(a, b) { // a should be largest if (a < b) { [a, b] = [b, a]; } while (b !== 0) { const t = b; b = a % b; a = t; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function greatestCommonDivisor (a, b) {\n var gcd = 1;\n var low = a <= b ? a : b;\n for (var i = 2; i < low; i++) {\n if (a % i == 0 && b % i == 0 ) {\n gcd *= i;\n a /= i; \n b /= i;\n low /= i;\n }\n }\n return gcd;\n}", "function gcd(a,...
[ "0.8273046", "0.807558", "0.8053783", "0.80379367", "0.802733", "0.79954755", "0.79947585", "0.7982822", "0.79756814", "0.7970752", "0.7966788", "0.7927148", "0.78994787", "0.7899461", "0.7894937", "0.78942835", "0.7882512", "0.78773654", "0.78681827", "0.7854386", "0.7839787...
0.80038667
5
True modulo works for negative numbers too
function mod(n, m) { return ((n % m) + m) % m; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mod (x, y) {return x < 0? y - (-x % y) : x % y;}", "function mod( a, b ){ let v = a % b; return ( v < 0 )? b+v : v; }", "function testRemainder_17() {\n assertEquals(-0, -0 % Number.MAX_VALUE);\n}", "function safe_mod(a, b) {\n if (b === 0) {\n return 0\n }\n\n return a % b\n}", "...
[ "0.82096565", "0.8071498", "0.7847547", "0.76790774", "0.76464546", "0.75843614", "0.7574248", "0.7537439", "0.75275636", "0.7487831", "0.74685913", "0.7460458", "0.74441385", "0.74260104", "0.7410804", "0.73857814", "0.7375685", "0.73398757", "0.7329306", "0.73270273", "0.72...
0.6902991
94
Finds the multplicative inverse of a mod m
function modInv(a, m) { if (a == null || m == null) { throw new Error("Invalid arguments to inverseMod"); } // Extended Euclidian algorithm finds Bézout identity // (we don't need the second Bézout coefficient or the actual gcd): let t = 0, newT = 1, r = m, newR = a; while (newR !== 0) { const quoti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "modinverse(a){\n a = this.mod(a);\n for (var b = 0; b < this.p; b++) {\n if (this.mod(a*b) == 1) {\n return b;\n }\n }\n return 0\n }", "function mod (num, m) { return ((num % m) + m) % m; }", "function mod (num, m) { return ((num % m) + m) % m; }", "function mod (num, m...
[ "0.7721307", "0.74321544", "0.74321544", "0.74321544", "0.73594433", "0.72940546", "0.7293186", "0.7265511", "0.7265511", "0.7265511", "0.7265511", "0.7265511", "0.7265511", "0.7265511", "0.72531", "0.72531", "0.72531", "0.72531", "0.72531", "0.72531", "0.72531", "0.72531",...
0.7927429
0
Component to start a Local game
constructor() { super(); this.pressed = this.pressed.bind(this); this.state = { tracker: [["", "", ""], ["", "", ""], ["", "", ""]], //Array that handles current board state Xturn: true, moves: 0, isOver: false } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startGame () {\n game.state.start('ticTac')\n }", "StartGame(player, start){\n this.scene.start('level1');\n }", "start() {\n\t\tthis.emit(\"game_start\");\n\t}", "function startPlayComp() {\n startModule.game.playComp(startModule.game, startModule.deck, startModule.person1, startM...
[ "0.7033592", "0.6995621", "0.697563", "0.6957485", "0.68837655", "0.6799089", "0.6791679", "0.6790997", "0.67289555", "0.66907084", "0.6665112", "0.665961", "0.6657296", "0.66557735", "0.665333", "0.66447186", "0.6632161", "0.66196865", "0.66101635", "0.659414", "0.65922874",...
0.0
-1
Allows a new entry.
resetOnNextInput() { this._reset = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static addEntry(data) {\n if (!data || (typeof data) !== 'object') {\n return this.badRequest('the data pass are not right,pleas pass right data');\n }\n const error = DummyDataHelpers.validateEntry(data);\n if (!error) {\n if (DummyDataHelpers.titleExists(dummyEntries, data.title)) {\n ...
[ "0.65393966", "0.6532678", "0.65092325", "0.64769346", "0.6473234", "0.63192916", "0.62404245", "0.62276614", "0.621637", "0.6199692", "0.61826473", "0.6158973", "0.6155028", "0.6122313", "0.6112477", "0.6097214", "0.6030365", "0.60126054", "0.6006752", "0.5986035", "0.598332...
0.0
-1
Gets the current number from the screen.
get number() { return Number(this.view.value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDisplayedNumber() {\n switch (this.__DISPLAY) {\n case Calc.DISP.FIRST:\n return this.__FIRST;\n case Calc.DISP.SECOND:\n return this.__SECOND;\n case Calc.DISP.TRAILING:\n return this.__TRAILING;\n }\n throw new Error(\"Invalid display! BAD.\");\n }", "function g...
[ "0.66304505", "0.65787864", "0.6534505", "0.64917356", "0.6479795", "0.63019186", "0.6182256", "0.60056853", "0.5960449", "0.5882987", "0.5831428", "0.5830601", "0.5814142", "0.5813395", "0.57434773", "0.5705201", "0.5696783", "0.569332", "0.5676334", "0.56678337", "0.5654076...
0.5074357
96
Since we have all the book info in our Redux store, we no longer need a state or to send a request to the server when the page loads
render() { const book = this.props.books[this.props.match.params.id] if (!book) { return <Redirect to="/" />; } return ( <Container fluid> <Row> <Col size="md-12"> <Jumbotron> <h1> {book.title} by {book.author} </h1>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super()\n this.state = {\n books: null, // we will load the books via the API\n }\n }", "componentWillMount(){\n //getBooks(limit, start, order) from actions url parameters \n //DISPATCH accepts an ACTION and dispatches the data to the store which gives it full acc...
[ "0.7040776", "0.68242955", "0.67560816", "0.65018606", "0.6455739", "0.6436788", "0.6432288", "0.6415553", "0.6376444", "0.63723207", "0.63622874", "0.63590527", "0.63567746", "0.63566136", "0.6344991", "0.6344991", "0.63202286", "0.6317891", "0.6315531", "0.6314736", "0.6314...
0.0
-1
TODO(ihab.awad): Support sending more (variable) arguments with fire()
function fire(name) { if (!listeners[name]) { return; } for (var i = 0; i < listeners[name].length; i++) { listeners[name][i].call(undefined, name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fire (actionName, ...args) {\n const action = this._instances[actionName]\n\n if (!_.isNil(action)) {\n action.apply(...args)\n }\n }", "fire(sender, args) {\n this.handlers.forEach((callback) => callback(sender, args));\n }", "function setFire( args ){\n\tif(!onFire){\n \t\tonFireObject = I...
[ "0.65011203", "0.6408801", "0.6312458", "0.6286971", "0.6253455", "0.6095943", "0.605506", "0.57974017", "0.5789107", "0.5758342", "0.5755426", "0.57487375", "0.5680706", "0.5661845", "0.5628457", "0.558727", "0.5562698", "0.5531989", "0.55280304", "0.55208504", "0.5492941", ...
0.57135344
12
Write password to the password input
function writePassword() { var password = generatePassword(); var passwordText = document.querySelector("#password"); passwordText.value = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writePassword() {}", "function writePassword() {\n var password = getPasswordOptions();\n var passwordText = document.querySelector('#password');\n \n passwordText.value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.qu...
[ "0.88605946", "0.85434437", "0.8511256", "0.8500835", "0.84896296", "0.84846", "0.84719414", "0.84686357", "0.8454292", "0.8443738", "0.8431387", "0.8419759", "0.8418786", "0.8406216", "0.8403772", "0.8400314", "0.8392802", "0.83758265", "0.8370068", "0.83642554", "0.836013",...
0.0
-1
Make magic happen repull the Cart, clear out the screen and redraw it
function renderCart() { loadCart(); clearCart(); showCart(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "fun...
[ "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7275139", "0.7199092", "0.71844906", "0.70829767", "0.67994064", ...
0.7303217
0
TODO: Remove all of the rows (tr) in the cart table (tbody)
function clearCart() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearCart() {\n let tableRows = document.querySelectorAll('#cart tbody tr');\n for(let i = 0; i < tableRows.length; i++){\n if(tableRows[i]){\n tableRows[i].remove();\n }\n}\n}", "function clearCart() {\n var tableRows = document.querySelectorAll('#cart tbody tr');\n\n for (var i = 0; i <...
[ "0.85063016", "0.84518296", "0.8372188", "0.8201828", "0.8143874", "0.81236744", "0.8115239", "0.8026448", "0.7883292", "0.77473444", "0.76036507", "0.758348", "0.74866754", "0.74255645", "0.7425032", "0.7354088", "0.72783417", "0.7253195", "0.7236757", "0.712355", "0.7080059...
0.0
-1
POST /admin/product/baseTrademark/save /admin/product/baseTrademark/update / admin / product / saveAttrInfo
addOrUpdate (attr) { return request({ url: `${api_name}/saveAttrInfo`, method: 'post', data: attr }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveProduct() {\n // configuramos el tipo de gruardado\n if (type_form == 'put') {\n url = base_api_url + id_product + '/';\n method = 'put';\n } else {\n url = base_api_url;\n method = 'post';\n }\n\n data = {\n \"code39\": $('#code39').prop('checked'),\n...
[ "0.5581457", "0.558079", "0.5568145", "0.55296904", "0.53735745", "0.5340913", "0.5321011", "0.5223748", "0.5211897", "0.5144146", "0.51064324", "0.51003593", "0.5069927", "0.50390756", "0.4964999", "0.49532312", "0.4894164", "0.48856658", "0.48701835", "0.48518106", "0.48432...
0.6108269
0
Initialize all fields once both the dialog and the description textfield RTE have loaded
function init($dialog, dialogContent) { titleTuple = new CheckboxTextfieldTuple(dialogContent, titleCheckboxSelector, titleTextfieldSelector, false); descriptionTuple = new CheckboxTextfieldTuple(dialogContent, descriptionCheckboxSelector, descriptionTextfieldSelector, true); $cqFileUpload =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupFields() {\r\n this.foreach(function (field) {\r\n // Exclude layout container elements\r\n if (/^(?!vbox|hbox)/.test(field.type)) {\r\n if (!field.setup) {\r\n // Read the dialog fields values from the specified\r\n ...
[ "0.6543457", "0.64723325", "0.6441351", "0.6441351", "0.64099133", "0.6348562", "0.6245134", "0.62197787", "0.6215576", "0.61536217", "0.61474913", "0.6131572", "0.6101978", "0.6099574", "0.6043801", "0.6032711", "0.60160285", "0.5995045", "0.59924966", "0.598298", "0.5970449...
0.6801463
0
Helper method for defining associations. This method is not a part of Sequelize lifecycle. The `models/index` file will call this method automatically.
static associate(models) { // define association here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n // define association here\n // This is how Sequelize knows to create \"magic methods\"\n // These are functions that can automatically pull\n // related data.\n // For example: If I have a User object\n // I can call `await user.getContacts()` to get an\n...
[ "0.76422983", "0.75086445", "0.73133695", "0.73076123", "0.73076123", "0.73076123", "0.7295073", "0.7285413", "0.7279436", "0.7260075", "0.7260075", "0.7260075", "0.7260075", "0.7260075", "0.7260075", "0.7260075", "0.7260075", "0.7260075", "0.7260075", "0.7260075", "0.7260075...
0.0
-1
Preprogrammed synth presets begin here Eventually there should be a way to save and load these as a JSON or something
function create_temperature_synth(){ var bus_num = create_new_bus(context.destination); var convolver = add_convolution(bus_num); dry_wet(bus_num, 1, 10); var filter = add_filter(bus_num, "lowpass", 3000, 30); var mod1 = add_osc_modulator(bus_num, 0, 0, "frequency", 440, 4, 25) var mod2 = add_os...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPresets() {\n\n //check the buttons id, whatever id it has is the preset it needs to select\n let myID = event.srcElement.id;\n presetID = myID\n\n let idArray = myID.split(\" \")\n let seqID = parseInt(idArray[0]) + 1\n let preID = idArray[1]\n\n console.log(seqID, preID)\n\n let whichButton =...
[ "0.63650376", "0.6129821", "0.60974556", "0.60785306", "0.6053093", "0.5994274", "0.5962916", "0.59402716", "0.5934255", "0.5923611", "0.5916058", "0.58928025", "0.58664846", "0.585391", "0.58375716", "0.58179814", "0.58038193", "0.57051563", "0.5681634", "0.5667185", "0.5640...
0.0
-1
Adapted from convertsourcemap (MIT)
function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractSourceMap(fs, logger, file) {\n var inline = convert_source_map_1.commentRegex.test(file.text);\n var external = convert_source_map_1.mapFileCommentRegex.exec(file.text);\n if (inline) {\n var inlineSourceMap = convert_source_map_1.fromSource(file.text);\n ...
[ "0.69679236", "0.69377637", "0.67660517", "0.644171", "0.63287604", "0.62983114", "0.6256009", "0.6210124", "0.61941147", "0.61812603", "0.6174446", "0.6158444", "0.6158444", "0.6158444", "0.6154958", "0.60953784", "0.6039884", "0.5989862", "0.5980611", "0.5979347", "0.597915...
0.0
-1
CONCATENATED MODULE: ./node_modules/vuestyleloader/lib/listToStyles.js Translates the list format produced by cssloader into something easier to manipulate.
function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: medi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id...
[ "0.6929006" ]
0.0
-1
CONCATENATED MODULE: ./node_modules/vueloader/lib/runtime/componentNormalizer.js / globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.option...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __vue_normalize__(a,b,c,d,e){var f=(\"function\"==typeof c?c.options:c)||{};// For security concerns, we use only base name in production mode.\nreturn f.__file=\"/Users/hadefication/Packages/vue-chartisan/src/components/Pie.vue\",f.render||(f.render=a.render,f.staticRenderFns=a.staticRenderFns,f._compile...
[ "0.67441785", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649653", "0.649...
0.0
-1
Lesson: Build tone / semitone Objective: learn tones and semitones
function runToneSemitone() { enablePiano(); hideButtons(); hideAllLessonSettings(); showLesson3Settings(); setTask('...'); selectRandomOctave(); setRandomKey(); debug && console.log('task key: ', taskKey); if (debug && mode === MODE.TONE) { addClass(findElement(taskKey.getTone()), 'debug'); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storyOne() {\n console.log(\"story there\");\n $('#instructions').text('story time');\n// varible to make a random story\n var story = {\n \"start\": \"Once upon a time, #name# the #animal# #action# #moment# #place#\",\n// the different variable that the player chose\n \"name\": [chosenName],\n ...
[ "0.6536722", "0.6364553", "0.63464016", "0.63117623", "0.620366", "0.6106105", "0.60948557", "0.60172546", "0.59930754", "0.5928659", "0.59183705", "0.591677", "0.5834334", "0.5804562", "0.57013464", "0.56970936", "0.5675973", "0.56739724", "0.5621439", "0.5614097", "0.560928...
0.6829278
0
Returns the item specified by the key.
function get(key) { return JSON.parse(self.storage.getItem(key)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getItem(key) {\n return this.store.get(key);\n }", "retrieveItem(key) {\n let item = null\n // Try to get the item first\n if (this.hasItem(key)) {\n item = this.getItem(key) || null // getItem returns undefined\n }\n\n if (item === null) {\n // Throw an error?\n }\n\n return i...
[ "0.7769411", "0.7766282", "0.7745738", "0.7669287", "0.7658445", "0.7584581", "0.7207422", "0.71100175", "0.70739937", "0.70719236", "0.70286983", "0.69902366", "0.69727194", "0.6956863", "0.6955925", "0.69199044", "0.69093424", "0.68819416", "0.6849554", "0.68294704", "0.681...
0.6466154
46
Stores a key value pair.
function set(key, value) { self.storage.setItem(key, JSON.stringify(value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function store(key, value) {\r var storage = getStorage();\r var existing = null;\r if (key != null && storage != null) {\r existing = retrieve(key); \r /* In case the fall back store is being used that won't automatically store as a String. */ \r if (value != null && val...
[ "0.7105014", "0.68704414", "0.6870389", "0.6870389", "0.6870389", "0.6870389", "0.6870389", "0.68450034", "0.6794073", "0.6780033", "0.676828", "0.67673373", "0.67487305", "0.6641363", "0.66301656", "0.66149896", "0.65757537", "0.6545875", "0.65397906", "0.65324676", "0.65264...
0.6976066
2
and should disable the inputs of the unused boxes
function usernameSelection(type) { const element = document.getElementById(type); const elementsOfUsernameGroup = document.getElementsByClassName( "username-group" ); // if you are emptying a field, re-enable all the input boxes if (element.value.length === 0) { resetBoxes(); } else { const unu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disable_inputs(){\n\t$('#annotation-title').prop('disabled', true);\n\t$('#annotation-text').prop('disabled', true);\n\t$('#add-annotation').prop('disabled', true);\n}", "disableInputs() {\n if(!this.app.isRunning){\n if(this.app.disabledInputs){\n for(let input of this....
[ "0.6831027", "0.6755661", "0.6747418", "0.6739858", "0.663204", "0.658502", "0.65811765", "0.6574726", "0.65640575", "0.655464", "0.6542094", "0.6535258", "0.6513056", "0.6501909", "0.65004265", "0.6485004", "0.64702576", "0.64299047", "0.6422111", "0.6382604", "0.63777584", ...
0.6011999
87
Helper function to clear input from boxes and reenable types. Separated with the intention of adding an (x) to quickly clear input. However, I'm not sure how to implement that cleanly, so it has not been added.
function resetBoxes() { const elementsOfUsernameGroup = document.getElementsByClassName( "username-group" ); for (let i = 0; i < elementsOfUsernameGroup.length; i++) { elementsOfUsernameGroup[i].disabled = false; elementsOfUsernameGroup[i].setAttribute("aria-disabled", "false"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearBox(){\r\n\t\tthis.value = \"\";\r\n\t}", "function clear(){\n\tdocument.getElementById('userInputBox').value = '';\n}", "function clearInputs() {\n num1 = '';\n num2 = '';\n inputOperator = '';\n clearHighlight();\n enableDecimal();\n isFirstNumSet = false;\n}", "static clear...
[ "0.74197435", "0.7228184", "0.71720463", "0.7166789", "0.71649307", "0.7157984", "0.71481407", "0.7119542", "0.70936733", "0.7084084", "0.70755917", "0.7012525", "0.6995463", "0.69383186", "0.6919904", "0.68861634", "0.6872259", "0.6871093", "0.6843514", "0.6836124", "0.68071...
0.0
-1
This function checks if the changelog was modified, doing the following steps: get packages which were modified but don't have changes in `CHANGELOG.md` parse PR body to get suggested entries for those packages run `et addchangelog` for each package to apply the suggestion create a new PR add a comment to inform about ...
async function checkChangelog() { const modifiedPackages = lodash_1.groupBy(danger.git.modified_files.filter(file => file.startsWith('packages')), file => file.split(path.sep)[1]); console.log('🔎 Searching for packages without changelog...'); const packagesWithoutChangelog = Object.entries(modifiedPackages...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static validate(newChangeFilePaths, changedPackages) {\n const changedSet = new Set();\n newChangeFilePaths.forEach((filePath) => {\n console.log(`Found change file: ${filePath}`);\n const changeRequest = node_core_library_1.JsonFile.load(filePath);\n if (changeReques...
[ "0.5765542", "0.5622853", "0.5519942", "0.5471394", "0.5426663", "0.5368154", "0.5365102", "0.53336203", "0.52566487", "0.5248289", "0.5234922", "0.5215012", "0.5195231", "0.5191456", "0.5190392", "0.51871973", "0.51243734", "0.51164466", "0.5091813", "0.5076019", "0.5023574"...
0.8260803
0
===================================================================== PRINTANSWER FUNCTION =====================================================================
function printAnswer(sAns) { console.log("Answer to print: ", sAns); var lol = document.getElementById("TicketPseudoReply").children; lol.FwdButton.click(); var derp = document.getElementsByClassName("redactor_editor")[0].children; derp[1].children[2].innerText = sAns; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function answersQuestionPrint() {\n questionChooser();\n answerChooser(currentQuestion);\n }", "function printIt(answer){\n console.log(\"the answer is: \", answer);\n}", "function printAns(answer) {\n const TITLE = document.querySelector('#title');\n TITLE.textContent = 'You got: '+RESULTS_MAP[answe...
[ "0.71575373", "0.699826", "0.6990018", "0.67100435", "0.66920894", "0.66507727", "0.651306", "0.6458432", "0.6294383", "0.6260286", "0.6223655", "0.62019116", "0.61968815", "0.6181494", "0.6147332", "0.61403173", "0.611549", "0.60830104", "0.60750896", "0.606073", "0.60531837...
0.6326438
8
===================================================================== CHECKIFSEENBEFORE CHECK QUESTION AND ANSWER ARRAYS =====================================================================
function checkifseenbefore(array) { var bFound; console.log("Question: ", arQuestions, " Answer: ", arAnswers, " DankAnswer: ", sAns, " Array: ", array); for (var i = 0; i < array.length; i++) { for (var j = 1; j < arQuestions.length; j++) { var arQuestionWords = arQuestions[j].slice(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAnswers() {\n\n}", "performFullValidation() {\r\n const validateCompleted = this.state.pages[this.state.index].questions.map(\r\n (question, index) => {\r\n if (!question.required || question.questionType === \"Label\") {\r\n return true;\r\n }\r\n const answer...
[ "0.6502716", "0.63613313", "0.629626", "0.6291386", "0.62276834", "0.6223851", "0.6200357", "0.6082619", "0.60784626", "0.6074186", "0.6028343", "0.5999758", "0.5981705", "0.5955138", "0.59370095", "0.5925682", "0.5913245", "0.591061", "0.58812207", "0.5876158", "0.58646464",...
0.5698635
48
===================================================================== CHECKFORKEYWORDS FUNCTION =====================================================================
function checkForKeyWords(arsTest) { console.log("arstest, ", arsTest); arsKeyWords = []; arsKeyTot = []; bCheck = false; for (var i = 0; i < arsTest.length; i++) { arsKeyWords = []; var nStartCheck, nEndCheck; console.log("sStartIndexForEachLength: ", sStartIndexForEachLengt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isKeyword(word) { return this.keywords.test(word) }", "function checkKeywords(product, keywords) {\n if (!keywords.length) {\n return true;\n }\n\n let productName = product.getElementsByClassName('name-value')[0].innerText.trim().toLowerCase();\n let specs = product.getElementsByClassName('chipset-value'...
[ "0.66412836", "0.66337526", "0.65954626", "0.6373847", "0.63572663", "0.63225174", "0.62951726", "0.62951726", "0.62951726", "0.62951726", "0.6290249", "0.6255012", "0.6234078", "0.6167008", "0.6162134", "0.61276126", "0.6087309", "0.5999544", "0.599472", "0.59941036", "0.598...
0.0
-1
Called when the screen is shown to handle initial focus.
focusMarkedElement(root) { if (!root) { return; } var focusedElements = root.getElementsByClassName('focus-on-show'); var focused = false; for (var i = 0; i < focusedElements.length; ++i) { if (focusedElements[i].hidden) { continue; } focused = true; afterNextR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\r\n isWindowFocused = true;\r\n }", "function focused() {\n\t\t\tsettings.userActivity = time();\n\n\t\t\t// Resum...
[ "0.7072978", "0.7072978", "0.705041", "0.70014936", "0.69505763", "0.69388825", "0.68870693", "0.67587405", "0.6701718", "0.6700709", "0.6693287", "0.66403216", "0.663286", "0.6589148", "0.6582094", "0.65806884", "0.65791184", "0.653245", "0.649028", "0.6440661", "0.64321667"...
0.0
-1
subscribe to get messages about the loading status of the graph
function subscribeToGraphStatus() { var socket = new SockJS('/pp-websocket'); stompClient = Stomp.over(socket); stompClient.connect({}, function (frame) { console.log('Connected: ' + frame); stompClient.subscribe('/topic/graphStatus', function (graphStatus){ if(graphStatus.body==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onLoadStarted() {\n this.messageLoading = true;\n this.messageLoaded = false;\n }", "function checkGraphStatus() {\n $.get(\"graphStatus\", function (graphStatus) {\n if(graphStatus){\n switchView();\n }else{\n subscribeToGraphStatus();\n }\n })\n}", "fun...
[ "0.6517965", "0.62382275", "0.62227607", "0.6179741", "0.61415935", "0.59168637", "0.5866138", "0.5756419", "0.57397723", "0.56841934", "0.5682308", "0.5673753", "0.5650984", "0.5625744", "0.5622035", "0.56142014", "0.56057304", "0.559881", "0.5586522", "0.55747336", "0.55700...
0.63289726
1
switch view if the graph is loaded
function switchView() { $("#loading").hide(); $("#main-content").show(); setTimeout(function(){ mymap.invalidateSize()}, 400); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshView() {\n\tchangeView(currentView[0], currentView[1], true);\n}", "function checkGraphStatus() {\n $.get(\"graphStatus\", function (graphStatus) {\n if(graphStatus){\n switchView();\n }else{\n subscribeToGraphStatus();\n }\n })\n}", "viewMode() ...
[ "0.69105846", "0.6740193", "0.6711284", "0.66129935", "0.65582585", "0.63915235", "0.6335929", "0.6269356", "0.6247188", "0.62066126", "0.6204175", "0.6163528", "0.6162033", "0.61502445", "0.61295086", "0.61037815", "0.61037815", "0.60833454", "0.60815775", "0.60583687", "0.6...
0.5852779
37
if the graph is already loaded switch the view else
function checkGraphStatus() { $.get("graphStatus", function (graphStatus) { if(graphStatus){ switchView(); }else{ subscribeToGraphStatus(); } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshView() {\n\tchangeView(currentView[0], currentView[1], true);\n}", "viewMode() {\n this.initChart();\n }", "function loadGraphVis() {\n // Initialization\n if (!$scope.gvdata) {\n $scope.gvdata = {};\n }\n\n // Set the...
[ "0.6279257", "0.62361795", "0.62230295", "0.6213427", "0.6212795", "0.6053612", "0.6017475", "0.60097915", "0.5985834", "0.5979296", "0.5926225", "0.5916866", "0.5916866", "0.5875129", "0.5846939", "0.5845371", "0.5844272", "0.5820389", "0.5819743", "0.5783888", "0.5766701", ...
0.65495515
0
uppercase for api events, lower case for webhooks
processEvent(e) { // having each type directly access methods to avoid one long switch try { return this[e.type](e) } catch (e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventName(name) {\n return name.charAt(2).toLowerCase() + name.substring(3);\n }", "function normalizeEventName (eventName) {\n\t if (eventName.indexOf('on') !== 0) {\n\t if (eventName[0] !== eventName[0].toUpperCase()) {\n\t eventName = 'on' + eventNa...
[ "0.63839674", "0.63682", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6350206", "0.6349279", "0.63439703", "0.63439703", "0.63439703", ...
0.0
-1
serialize parts to a string by considering only the type and literal.
function serializeTypesAndLiteral(parts) { let types = parts.map(part => { if (part.type == "literal") { return `${part.type}(${part.value})`; } return part.type; }); return types.join(":"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rewritePart(part){\n if(typeof(part) === 'string'){\n return part;\n } else if(part instanceof symbolExpr){\n return '[\"span\", [[\"class\", \"SchemeValue-Symbol\"]], '+part.val+']';\n return part.val;\n } else if(part.location !== undefined){\n return {text: part.text, type:...
[ "0.574157", "0.56076807", "0.5595833", "0.55247575", "0.54941416", "0.54941416", "0.54278874", "0.5411447", "0.5399745", "0.5378067", "0.5264499", "0.5262618", "0.5262618", "0.5259172", "0.52028507", "0.51664263", "0.51658934", "0.51600486", "0.5144473", "0.5144473", "0.51444...
0.8236209
0
Navigate to the create new user page
function navigateToNewUser(userEmail) { $.mobile.changePage("#newUser"); initializeNewUserFields(userEmail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCreationPage() {\n\n this.props.history.push(\"/UserCreationPage\");\n\n }", "function newUser() {\r\n\tvar hppurl;\r\n var language = getLanguage();\r\n\tvar country = getCountry();\r\n\t\r\n\tif( language_support == 'y' || language_support == 'Y') {\r\n hppurl = cfserver + \"/hppcf/crea...
[ "0.70852584", "0.69420904", "0.6915682", "0.687673", "0.68271154", "0.6809433", "0.6741769", "0.67244387", "0.6722841", "0.67147076", "0.66227186", "0.65995973", "0.6577705", "0.6540436", "0.6494272", "0.6492713", "0.6489578", "0.6480723", "0.64697427", "0.64011544", "0.63947...
0.7024381
1
creates the new user sets the current user navigate to the home page
function createUserAndContinue() { /* * Check for phone numver if using sms * check for email address if using email * check for paypal email if using paypal */ console.log("creating"); var firstName = $('input#newUser_firstNameInput').val(); var lastName = $('input#newUser_lastNameInput').val(); var emai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createUser(userData) {\n\t\tuserAuth.register(userData, function(err) {\n\t\t\tif(err){ \n\t\t\t\t$rootScope.flashMessage = {data: \"Something went wrong please try again\", type: \"error\"}\n\t\t\t}else{\n\t\t\t\tif($rootScope.currentUser.role == \"Author\"){\n\t\t\t\t\t$location.path('/info');\n\t\t\t\t...
[ "0.7295332", "0.7145506", "0.69983035", "0.6883361", "0.68813604", "0.68513095", "0.6827431", "0.67595387", "0.6746462", "0.6740893", "0.66952306", "0.66570395", "0.6600225", "0.6479914", "0.64786667", "0.64643687", "0.64407533", "0.642043", "0.6397542", "0.6383446", "0.63739...
0.0
-1
create first prompt for user to review about how many characters (8128)
function generatePassword() { enter = parseInt(prompt("How many characters would you like your password? Choose between 8 and 128")); // make sure they select a number to place in the field. if (!enter) { alert("This needs a value"); } else if (enter < 8 || enter > 128) { // alert if they choose a number l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function totallen(){\n var totalCharacters = Number(prompt(\"Choose the password length to be at least 8 characters and no more than 128 characters\"));\n while ((totalCharacters < 8 || totalCharacters > 128) || isNaN(totalCharacters)){\n totalCharacters = window.prompt(\"Choose a length between 8 to 128 char...
[ "0.7212087", "0.71412057", "0.70717084", "0.7044004", "0.7038043", "0.7034278", "0.68751913", "0.67638373", "0.6738951", "0.66879374", "0.6677126", "0.66573405", "0.6630853", "0.6589273", "0.6557096", "0.65535975", "0.6542306", "0.65266824", "0.6502645", "0.6494821", "0.64906...
0.5963473
85
put result into the textbox
function UserInput(ps) { document.getElementById("password").textContent = ps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayResult(result){\n document.getElementById(\"result\").value = result;\n}", "function setText(ntext){\n document.getElementsByClassName(\"newText\")[0].value = ntext;\n var resdiv = document.getElementsByClassName(\"result\")[0];\n resdiv.innerHTML = \...
[ "0.75480396", "0.73203284", "0.68721217", "0.68031174", "0.67872876", "0.67305267", "0.6726901", "0.66724086", "0.66527444", "0.6565288", "0.65318817", "0.65247166", "0.6490229", "0.6488518", "0.64668685", "0.6444884", "0.64289135", "0.64272636", "0.63933057", "0.6390826", "0...
0.0
-1
Get User Status By ID
function updateUserStatusById(user) { const query = `UPDATE userTable SET ? WHERE id = "${user.id}"`; const values = user; return execQuery(query, values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStatusUserByStatus(statusID) {\n\n}", "function getStatus(username, id, callback) {\n // Error checking\n if (!id) {\n callback(null, \"Status ID must be well-defined\");\n } else if (!username) {\n callback(null, \"Username must be well-defined\");\n } else {\n // If the id is properly ...
[ "0.79776275", "0.77202773", "0.6796959", "0.65796816", "0.6501625", "0.64222234", "0.6390609", "0.6363534", "0.63083863", "0.6300806", "0.6295744", "0.6291771", "0.6288763", "0.62865585", "0.62792784", "0.6277636", "0.6275692", "0.62588096", "0.62562466", "0.62443745", "0.622...
0.593173
46
Get book info for search
@action getBooks(currentSearchText) { ApiService.getBooks() .then((res) => { if (!res) throw res.error; let searchItems = []; console.log(currentSearchText); console.log(res.items); for (let i=0; i < res.items.length...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findBook(req, res) {\n\n let url = 'https://www.googleapis.com/books/v1/volumes?q=';\n\n if (req.body.search[1] === 'title') { url += `+intitle:${req.body.search[0]}`; }\n\n if (req.body.search[1] === 'author') { url += `+inauthor:${req.body.search[0]}`; }\n\n superagent.get(url)\n\n .then(data => ...
[ "0.76261646", "0.7401046", "0.7328723", "0.7044313", "0.69978464", "0.6927828", "0.69240016", "0.67977744", "0.67689097", "0.67485815", "0.6737793", "0.66974646", "0.66710144", "0.6627566", "0.6622679", "0.66062486", "0.6601208", "0.6594828", "0.6538406", "0.64989024", "0.647...
0.6376056
29
Setup variables or objects before the preloading starts.
init() { this.background = null; this.logo = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preload() {\n\tclickablesManager = new ClickableManager('data/clickableLayout.csv');\n\tadventureManager = new AdventureManager('data/adventureStates.csv', 'data/interactionTable.csv', 'data/clickableLayout.csv');\n}", "function preload() {\n clickablesManager = new ClickableManager('data/clickableLayo...
[ "0.72213584", "0.71316534", "0.7115329", "0.7061555", "0.69657874", "0.6943869", "0.69057196", "0.6883148", "0.6696712", "0.6693944", "0.6676454", "0.667371", "0.6671266", "0.66681796", "0.66321063", "0.6628813", "0.66233623", "0.66226375", "0.6612708", "0.6603992", "0.659905...
0.0
-1
A couple of Sprites, tweens to make them appear. Then the game waits for an input event before fading out and starting the Game class.
create() { this.background = this.add.sprite(0, 0, 'menuBackground'); this.background.alpha = 0; this.logo = this.add.sprite(this.world.centerX, -300, 'logo'); this.logo.anchor.setTo(0.5, 0.5); this.add.tween(this.background).to( { alpha: 1 }, 2000, Phaser.Easing.Bounce.InOut, true ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fadeOut() {\n const tween = this.add.tween(this.logo).to(\n { y: 800 }, 2000, Phaser.Easing.Linear.None, true\n );\n\n this.add.tween(this.background).to(\n { alpha: 0 }, 2000, Phaser.Easing.Linear.None, true\n );\n\n tween.onComplete.add(this.startGame, this);\n }", "function setupGame...
[ "0.66747034", "0.6530141", "0.64424765", "0.64326876", "0.63983345", "0.6393174", "0.6319586", "0.6291267", "0.6276287", "0.6251326", "0.6225977", "0.62212807", "0.6216524", "0.6214791", "0.6206286", "0.6173355", "0.6164867", "0.61575574", "0.61520445", "0.61439353", "0.61427...
0.58268607
66
Hide background and move logo.
fadeOut() { const tween = this.add.tween(this.logo).to( { y: 800 }, 2000, Phaser.Easing.Linear.None, true ); this.add.tween(this.background).to( { alpha: 0 }, 2000, Phaser.Easing.Linear.None, true ); tween.onComplete.add(this.startGame, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideLogo() {\n // toggle center logo\n $(\".right-side\").css({\n animation: \"scaleX-hide 1s forwards\"\n });\n $(\".left-side\").css({\n animation: \"scaleX-hide 1s forwards\"\n });\n }", "function stopLogoAnimation() {\n if (typeof window.showlogo_iv !...
[ "0.7267409", "0.69605446", "0.67286325", "0.6476863", "0.6474144", "0.6455992", "0.6375326", "0.62648493", "0.6225065", "0.622073", "0.6182795", "0.6173026", "0.61466205", "0.61310875", "0.61088234", "0.6103399", "0.61005", "0.6098168", "0.6085945", "0.6080625", "0.60328203",...
0.0
-1
Move on to the game state.
startGame() { this.state.start('GameState'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "prepareNextState() {\n this.gameOrchestrator.changeState(new CheckGameOverState(this.gameOrchestrator));\n }", "function switchState(state_) {\n\t\t\tgame.stop();\n\t\t\tgame = state_;\n\t\t\tgame.start();\n\t\t}", "function startGame() {\n\tupdateGameState()\n\tmoveTetroDown()\n}", "function goToG...
[ "0.74886173", "0.72861123", "0.71489096", "0.7029512", "0.6920799", "0.6886759", "0.68388313", "0.6830647", "0.68103385", "0.67856085", "0.67347616", "0.67241335", "0.67148376", "0.67075413", "0.6669463", "0.66021305", "0.656196", "0.6536309", "0.6526044", "0.65049076", "0.64...
0.6298133
35
Add thickbox to href & area elements that have a class of .thickbox. Remove the loading indicator when content in an iframe has loaded.
function tb_init(domChunk){ jQuery( 'body' ) .on( 'click', domChunk, tb_click ) .on( 'thickbox:iframe:loaded', function() { jQuery( '#TB_window' ).removeClass( 'thickbox-loading' ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fBox() {\n\t$('#fbox').append('<iframe marginheight=\"0\" marginwidth=\"0\" src=\"http://www.facebook.com/connect/connect.php?id=126686564044617&amp;connections=10\" align=\"top\" frameborder=\"0\" width=\"300\" height=\"250\" scrolling=\"no\" />');\n}", "function load_custombb () {\n document.qu...
[ "0.59112376", "0.5873491", "0.5802915", "0.57511044", "0.5687475", "0.56748694", "0.56715703", "0.56589705", "0.55955404", "0.55812615", "0.55293524", "0.5519648", "0.5519345", "0.54779947", "0.54115474", "0.53970736", "0.5342755", "0.53415185", "0.52848935", "0.52741396", "0...
0.58044785
2
Shows a dialog, which provides the possibility to create a node breakpoint.
function showCreateNodeBreakpointForm(definitionId, nodeId, nodeFrame) { var dialog = $('#create-node-breakpoint-dialog.dialog'); var form = $('form#create-node-breakpoint', dialog); // // set the hidden fields // $("input[name=breakpoint-node-id]", form).val(nodeId); $("input...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCreateDialog() {\n\t$(\"#createWorkspaceDialog\").dialog({\n\t\tmodal : true,\n\t\tdraggable : false,\n\t\tbuttons : {\n\t\t\tCancel : function () {\n\t\t\t\t$(this).dialog(\"close\");\n\t\t\t},\n\t\t\t\"Create\" : function () {\n\t\t\t\tif($('form').parsley().isValid())\n\t\t\t\t{\n\t\t\t\t\tcreateNe...
[ "0.58408517", "0.5736662", "0.5623588", "0.5555381", "0.5536502", "0.5475572", "0.54657644", "0.54615796", "0.5421812", "0.53865814", "0.5382009", "0.5379897", "0.5300524", "0.5278439", "0.5257286", "0.5249694", "0.52167636", "0.5194652", "0.5189785", "0.5189107", "0.5185197"...
0.743637
0
Click handler method for svg node elements.
function svgNodeClicked(svgNodeId, svgDefinitionId, nodeContainer, nodeFrame) { nodeFrame.prop('previous-fill', nodeFrame.attr('fill')); nodeFrame.attr('fill', 'red'); var resolvedDefinitionId = resolveSvgDefinitionId(svgDefinitionId); var resolvedNodeId = resolveSvgNodeId(resolvedDefinitionId, svgNodeI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleSVGClick(event) {\n // Figure out what was clicked\n var clickedNode = event.target;\n if (clickedNode.correspondingUseElement) {\n // If it's an instantiation of a <defs> item, let's target the <use> (aka the instance)\n // (TODO: option to target the node...
[ "0.79724", "0.7420932", "0.7109704", "0.6962855", "0.68468493", "0.67292917", "0.6660248", "0.6614648", "0.6576706", "0.65352905", "0.64914364", "0.6484", "0.6413609", "0.63865125", "0.63661355", "0.6359242", "0.6350046", "0.632062", "0.631724", "0.63171095", "0.62742084", ...
0.6161758
29
Refresh the breakpoint lists for a certain definition.
function refreshDefinitionBreakpoints(definitionId) { var breakpointsCell = $('tr[definition-id="' + definitionId + '"] td.breakpoint-cell'); breakpointsCell.addClass('loading-data'); loadDefinitionBreakpoints(definitionId, function(breakpoints) { var breakpointData = null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearBreakpoints() {\n this.$breakpoints = [];\n this._signal(\"changeBreakpoint\", {});\n }", "function bindBreakpointUpdate() {\n $(document).off(\"breakpoint-updated\");\n $(document).on(\"breakpoint-updated\", function () {\n changeModuleName();\n })\n }", "function enumBrea...
[ "0.6297503", "0.62518334", "0.59488606", "0.58442885", "0.5819628", "0.5693141", "0.569078", "0.5564053", "0.55511385", "0.5530579", "0.5426507", "0.5385687", "0.5356279", "0.52363545", "0.5128515", "0.504633", "0.5027287", "0.5024512", "0.50210714", "0.50088245", "0.49960446...
0.65304697
0
filter for attrs only in request primitive
generate_prim_attrs(op) { var prim_attrs = {}; for (let ra in this.attrs) { switch (ra) { // universal case 'rn': if(op == 1) prim_attrs['rn'] = this.attrs['rn']; break; case 'cr': if(op == 1) prim_attrs['cr'] = this.attrs['cr']; break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "matchAttributes(context, obj) {\n return this.attribute_whitelist(context).intersect(Object.keys(obj));\n }", "getFilteredAttributes() {\n const attributes = this._attributes;\n if (Object.keys(attributes).length) {\n const attr = Object.entries(attributes).\n filter(([key, value]) => {\n...
[ "0.6518947", "0.6454667", "0.63393915", "0.6310208", "0.6241348", "0.6134195", "0.57888806", "0.5786954", "0.5786954", "0.5786954", "0.5786954", "0.5786954", "0.5786954", "0.5786954", "0.5786954", "0.5786954", "0.5763751", "0.57002467", "0.5655747", "0.5582437", "0.5521902", ...
0.0
-1
Given an array of meta tags to check, looks for them in the HTML. Returns the content of first meta tag found, or undefined if none were found.
function retrieve_meta_tag($, meta_properties) { for (var i = 0; i < meta_properties.length; i++) { var $tag = $('meta[property="' + meta_properties[i] + '"]') if (!$tag.length) { // both meta 'property' and 'name' are valid HTML $tag = $('meta[name="' + meta_properties[i] + '"]') } if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SDM_getMetaContents(mn) {\n var m = document.getElementsByTagName('meta');\n for (var i in m) {\n if (m[i].name == mn) return m[i].content;\n }\n}", "function meta_tags(document)\n{\n return document.querySelectorAll(\"meta\").length;\n}", "function getKeywords(){\n\t\tvar _tags = document.ge...
[ "0.5673146", "0.5639219", "0.5526026", "0.5464948", "0.5420764", "0.5402072", "0.5314538", "0.5224243", "0.5209129", "0.5175678", "0.51579547", "0.5156831", "0.51519364", "0.514854", "0.514854", "0.5125056", "0.51112366", "0.5008326", "0.5006624", "0.49450958", "0.49278563", ...
0.6608688
0
returns 1 if item is not found in table returns the index of the row otherwise
function findRowIndex(item){ let table = document.getElementById("cart"); for(let i = 1;i< table.rows.length;i++){ if(table.rows[i].cells[0].innerHTML === item){ return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findIdx(table, val) {\n }", "function getItemPosition(userID, item) {\n var tables = document.getElementsByTagName(\"table\");\n for (let i = 0; i < tables.length; i++) {\n var tableRows = tables[i].getElementsByTagName(\"tr\");\n //Indexes of the table rows\n for (let j = 1; j...
[ "0.7108276", "0.70753044", "0.70030665", "0.69587153", "0.69207656", "0.68441474", "0.68356717", "0.68286", "0.67871666", "0.678486", "0.6747345", "0.66740656", "0.66421926", "0.66120994", "0.6603628", "0.65924394", "0.6586743", "0.6560033", "0.65233797", "0.6523125", "0.6487...
0.76922715
0
adds row to Cart table
function addToCart(id){ let src = document.getElementById(id).src; let item = src.substring(src.indexOf("/img/")+6,src.length -4); if(findRowIndex(item) === -1) { //if item is not in cart let table = document.getElementById("cart"); let row = table.insertRow(1); let cell = row.inse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addProductToCart(index) {\n\tvar row = document.createElement('tr');\n\n\tfor(var item in appData.selectedItems[index]) {\n\t\tvar column = document.createElement('td');\n\t\tcolumn.setAttribute('class', item);\n\t\t\n\t\tvar columnText;\n\t\tif(item !== 'quantity') {\n\t\t\tcolumnText = document.createTe...
[ "0.7310814", "0.7272772", "0.7172094", "0.71250415", "0.7086738", "0.70858914", "0.7079123", "0.7061453", "0.6992661", "0.69327193", "0.69322187", "0.6927241", "0.6927241", "0.6912196", "0.690812", "0.6893913", "0.68415827", "0.68172616", "0.68121785", "0.6790913", "0.6775278...
0.722705
2
Found on: Last update january 22, 2018 Adapted by Johan Jobin march 23 2018 because the above code was not working with D3 v.4 and the style was not corresponding to the style of the dashboard Description: Draw a clock with current time /function clock: width: width of the SVG height: height of the SVG id: id of the SV...
function clock(width, height, id, parentDiv){ var fields = [ {value: 24, size: 24, label: "h", update: function(date) { return date.getHours(); }}, {value: 60, size: 60, label: "m", update: function(date) { return date.getMinutes(); }}, {value: 60, size: 60, label: "s", update: function(date) { return dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function svgClock() {\n\t\t\t// Get current time.. again\n\t\t\tvar now = new Date();\n\t\t\tvar h, m, s;\n\t\t\th = 30 * ((now.getHours() % 12) + now.getMinutes() / 60);\n\t\t\tm = 6 * now.getMinutes();\n\t\t\ts = 6 * now.getSeconds();\n\n\t\t\t// Find pointers of the clock, rotate\n\t\t\tdocument.getElementById(...
[ "0.6937734", "0.6824487", "0.6610457", "0.6590693", "0.6532197", "0.6441696", "0.64358765", "0.63721645", "0.6323842", "0.6313608", "0.6295477", "0.6286356", "0.6264613", "0.62612444", "0.62415427", "0.6228075", "0.62063795", "0.62008834", "0.6178074", "0.6163012", "0.6135050...
0.8017754
0
d3.interpolate returns a function (interpolator) in i, b is the object containing the object with value, previous, size, update fields
function arcTween(b) { var i = d3.interpolate({value: b.previous}, b); return function(t) { return arc(i(t)); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInterpolation(data) {\n return function (d, i, a) {\n var interpolate = d3.scale.linear()\n .domain([0,1])\n .range([1, data.length + 1]);\n\n return function(t) {\n var flooredX = Math.floor(interpolate(t));\n var weight = interpolate(t) - flooredX;\n ...
[ "0.7033063", "0.6734205", "0.6147221", "0.6101691", "0.6053301", "0.60508454", "0.5909123", "0.5909123", "0.58623177", "0.5844305", "0.5843508", "0.58358824", "0.5821142", "0.58068573", "0.5800063", "0.5795417", "0.57926154", "0.5773287", "0.57711524", "0.57711524", "0.574794...
0.5700927
23
Write a function `cubeNum` that takes a number as an argument and returns the cube of the argument
function cubeNum(num) { // -------------------- Your Code Here -------------------- return num * num * num; // --------------------- End Code Area -------------------- }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cube(num) {\n return (Math.pow(num, 3));\n}", "function cube(number) {\n\treturn (number * number * number);\n}", "function calculateCube(num) {\n\tconsole.log(Math.pow(num,3));\n}", "function cube(num3) {\n return (num3 * num3 * num3);\n }", "function cube(n) {\n return n * n * n; \...
[ "0.82627857", "0.7968443", "0.77982676", "0.745698", "0.74447894", "0.7256087", "0.72504264", "0.71296275", "0.7112715", "0.7091563", "0.7070982", "0.70495206", "0.7025185", "0.685737", "0.6671543", "0.664785", "0.6605053", "0.658424", "0.6582488", "0.6561985", "0.64959913", ...
0.76744044
3
Write a function `twoAverage` that takes two numbers as arguments and returns the average of those two numbers
function twoAverage(num1, num2) { // -------------------- Your Code Here -------------------- return (num1 + num2) /2; // --------------------- End Code Area -------------------- }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function avgTwoNumbers(a, b) {\n\treturn (a+b)/2;\n}", "function average(a, b) {\n return (a + b) / 2;\n}", "function average(num1, num2) {\n //return the average of those numbers\n return (num1 + num2) / 2;\n}", "function average(n1, n2){\n\treturn (n1 + n2) / 2;\n}", "function avg(num1, num2) {\...
[ "0.86325806", "0.81933683", "0.81076175", "0.8050048", "0.8025445", "0.80155116", "0.7980979", "0.77627355", "0.7726394", "0.76332754", "0.73118025", "0.72291213", "0.7101871", "0.68238527", "0.68238527", "0.6695985", "0.6631411", "0.6631411", "0.6625037", "0.65554065", "0.65...
0.848044
1
Write a function `prepend` that takes an array and an element as arguments and adds the element to the front of the array. The changes should be made directly to the argument and should change the array without any reassignment
function prepend(arr, elem) { // -------------------- Your Code Here -------------------- arr.unshift(elem); // --------------------- End Code Area -------------------- }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prependArray(element, array) {\n \n array.unshift(element);\n\n return array;\n // let newList = [];\n\n // for (let i = 0; i < list.length; i++) {\n // newList.push(list[i]);\n // }\n // newList.unshift(element);\n\n // return newList;\n}", "function destructivelyAddEleme...
[ "0.84694797", "0.81147534", "0.8054488", "0.80438006", "0.7912518", "0.7910218", "0.7782431", "0.75693876", "0.7562925", "0.75527847", "0.75475025", "0.7534405", "0.7520025", "0.75074035", "0.74935913", "0.7471642", "0.7440749", "0.74036545", "0.7340804", "0.7227542", "0.7199...
0.83130705
1
Write a function `addToObject` that takes an object, a key, and an array as arguments and adds the array to the object as the value of the given key. The changes should be made directly to the argument and should change the object without any reassignment
function addToObject(obj, key, arr) { // -------------------- Your Code Here -------------------- obj[key] = arr; // --------------------- End Code Area -------------------- }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addKeyAndValue(array, key, value) {\n\tarray.forEach(function(val) {\n\t\tval[key] = value;\n\t})\n}", "function addToObject(obj, key, val) {\n obj[key] = val;\n return obj;\n}", "function updateObject(object, key, value) {\n object[arguments[1]] = value;\n return object;\n}", "function addKeyAn...
[ "0.6566641", "0.6532666", "0.63807285", "0.6254433", "0.6185467", "0.61546826", "0.61459035", "0.6097348", "0.6084032", "0.60816544", "0.60682094", "0.6066397", "0.6043027", "0.60077095", "0.59875345", "0.5977622", "0.5969552", "0.5964885", "0.5961318", "0.59566134", "0.59563...
0.7692211
0
Write a function `strToArray` that takes a string as the argument and returns an array that consists of every word in that string. Words are delimited by spaces. Punctuation will count as part of the word it's attached to. Beware of extra spaces in strings! They should be ignored.
function strToArray(str) { // -------------------- Your Code Here -------------------- var arr = []; var currentWord = ""; for (var i = 0; i < str.length; i++) { if ((str[i] === " ") && (currentWord !== "")){ arr.push(currentWord); currentWord = ""; } else if (str...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringToArray(string) {\n // split a string into individual words\n // index each word into one array\n // split returns an array\n return array = string.split(' ')\n}", "function convertStrToArrOfWords(str) {\n return str.split(\" \");\n}", "function StringToWordArr(str){\n var ne...
[ "0.8024258", "0.8016364", "0.78226715", "0.762855", "0.7612167", "0.7431138", "0.74290425", "0.7349721", "0.72298527", "0.6970542", "0.6966302", "0.6931768", "0.6901421", "0.6819911", "0.67810446", "0.6772088", "0.67566216", "0.67505383", "0.6739059", "0.6708127", "0.6632157"...
0.7372022
7
Write a function `getFullName` that takes two strings as arguments and returns a string with those two arguments concatenated together with a space in the middle.
function getFullName(firstName, lastName) { // -------------------- Your Code Here -------------------- return firstName + " " + lastName; // --------------------- End Code Area -------------------- }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFullName(a, b){\n return a + ' ' + b;\n}", "function getFullName(a, b){\n return a + ' ' + b;\n }", "function getFullName(firstName, secondName, familyName) {\r\n return firstName + \" \" + secondName;\r\n\r\n return firstName + \" \" + secondName + \" \" + familyName;\r\n\r\n}", "...
[ "0.8406698", "0.8277438", "0.79231346", "0.78809065", "0.7852291", "0.78415316", "0.781173", "0.7748711", "0.7727216", "0.7697551", "0.7663163", "0.7663163", "0.76542145", "0.7615183", "0.7590099", "0.75834626", "0.75268483", "0.75179243", "0.7437862", "0.7361504", "0.7358939...
0.6928824
43
Write a function `getFirstElem` that takes an array as an argument and returns the first element of that array.
function getFirstElem(arr) { // -------------------- Your Code Here -------------------- return arr[0]; // --------------------- End Code Area -------------------- }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstElement(array) {\r\n return array[0];\r\n}", "function firstElement(array) {\r\n return array[0];\r\n}", "function getFirstElement(array) {\n\t// EDGE CASE\n\t// if the array's length is equal to zero\n\tif (array.length === 0) {\n\t\t// then return undefined\n\t\treturn undefined;\n\t}\n\t//...
[ "0.7971098", "0.7955599", "0.7857946", "0.7755488", "0.77476996", "0.7694239", "0.7649399", "0.7623762", "0.7486249", "0.7412142", "0.7357753", "0.7331177", "0.73248875", "0.7309824", "0.730898", "0.730898", "0.730898", "0.730898", "0.71657574", "0.69389737", "0.6925631", "...
0.79667103
1
Make the actual CORS request.
function makeCorsRequest() { // All HTML5 Rocks properties support CORS. var url = "http://gurghet.com/static/iss.html"; var xhr = new XMLHttpRequest(); xhr.open("GET", url, true); // Response handlers. xhr.onload = function() { if (xhr.status != 0) { window.location.replace(url); } };...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCorsRequest() {\n // This is a sample server that supports CORS.\n var url = 'https://cs490-sales.herokuapp.com/api/orders?start_date=2019-03-01&end_date=2019-03-31';\n\n var xhr = createCORSRequest('GET', url);\n if (!xhr) {\n alert('CORS not supported');\n return;\n }\n\...
[ "0.7572051", "0.73591083", "0.73212737", "0.7158591", "0.7153839", "0.7146449", "0.7099925", "0.7054334", "0.7049666", "0.6957583", "0.6824425", "0.68235344", "0.68235344", "0.6819502", "0.6819502", "0.6815479", "0.6805372", "0.6731444", "0.67300117", "0.67076707", "0.6702124...
0.6390763
48
function pour un panier vide
function showCart() { //si le panier est égale à 0 if (panier.length == 0) { //mise forme css annulé $("#cart").css("display", "none"); $('#ssTotal').css("display", "none"); $('.formulaire').css("display", "none"); //insertion message dans le html $('#messPanier').html("Votre panier est vide...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function panier() {\n for(i=0; i<objPanier.length; i++) {\n afficheCamera(i);\n }\n //affiche le prix total de la commande\n prixTotal();\n}", "function visUre() {\n container.textContent = \"\";\n alleUre.forEach((ur) => {\n if (filter == ur.Farve || filter == \"alle\") {\n let klon...
[ "0.6763634", "0.6275034", "0.6091354", "0.6081445", "0.6043705", "0.60419446", "0.6025562", "0.59753174", "0.5967902", "0.59628177", "0.5951057", "0.59445477", "0.59270895", "0.5861803", "0.58559686", "0.5849035", "0.58236676", "0.57965934", "0.57965934", "0.57946587", "0.579...
0.0
-1
================ User Admin Pannel config ======================= example of custom renderer function
function change(val) { if (val > 0) { return '<span style="color:green;">' + val + '</span>'; } else if (val < 0) { return '<span style="color:red;">' + val + '</span>'; } return val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAdmin(){\n addTemplate(\"admin\");\n userAdmin();\n}", "render() {\n\t\treturn (\n\t\t\t<div>[User Panel Placeholder]</div>\n\t\t)\n\t}", "function renderShowUserAdmin(data){\n $('#users_info_admin').html(\"<h3 id=admin_user>\"+ \"ID: \" +data.id+ \" Name: \"+ data.name + \" Email: \" + data....
[ "0.6244434", "0.59802574", "0.5805642", "0.57439214", "0.5699684", "0.56956744", "0.5568128", "0.5563146", "0.5555457", "0.55268985", "0.5452951", "0.5421912", "0.5409434", "0.5350401", "0.5350401", "0.5350401", "0.5350401", "0.5350401", "0.5350401", "0.532645", "0.53165734",...
0.0
-1
Constructor isn't part of the stable API
constructor(result) { if (result instanceof pb.ContractFunctionResult) { this.bytes = result.getContractcallresult_asU8(); this.contractId = result.hasContractid() ? ContractId_1.ContractId._fromProto(result.getContractid()) : null; this.errorM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n\t\t// ...\n\t}", "constructor (){}", "constructur() {}", "constructor( ) {}", "consructor() {\n }", "constructor() {\n throw new Error('Not implemented');\n }", "constructor() {\r\n // ohne Inhalt\r\n }", "function _construct()\n\t\t{;\n\t\t}", "constr...
[ "0.8169135", "0.810877", "0.8044528", "0.7964181", "0.7935073", "0.79275274", "0.7794435", "0.7738602", "0.77378637", "0.77378637", "0.77378637", "0.77378637", "0.77378637", "0.77378637", "0.77378637", "0.7663649", "0.7657266", "0.7630301", "0.7630301", "0.7629826", "0.762460...
0.0
-1
NOT A STABLE API
_getBytes32(index) { return this.bytes.subarray((index !== null && index !== void 0 ? index : 0) * 32, (index !== null && index !== void 0 ? index : 0) * 32 + 32); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function API(){}", "function API(){}", "private public function m246() {}", "transient private protected internal function m182() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "function DataApi() { }", "function DataApi() { }", "transient private int...
[ "0.70959604", "0.70959604", "0.6697398", "0.6371817", "0.63191134", "0.6299221", "0.6298852", "0.6298852", "0.62868595", "0.626714", "0.59815633", "0.5931179", "0.59093124", "0.5857731", "0.58130974", "0.58007807", "0.5790722", "0.57864636", "0.57864636", "0.57864636", "0.575...
0.0
-1
Create the Model Class
function DbxUserAlerts(defaultValues) { var privateState = {}; //Using parent constructor to create other properties req. to kony sdk BaseModel.call(this); //Defining Getter/Setters Object.defineProperties(this, {}); //converts model object to json object. this.to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Model() {}", "function Model() {\n\n }", "function Model() {\n}", "function createModel() {\n var model = new Model();\n\n // give model the default values provided by the service\n model.color = DEFAULT_COLOR;\n model.shape = DEFAULT_SHAPE;\n model.texture = DEFAULT_TEXTURE;\n\n ...
[ "0.7571185", "0.7502446", "0.7362998", "0.7231747", "0.7013781", "0.7013781", "0.68957925", "0.68461996", "0.67336154", "0.663488", "0.662471", "0.65511125", "0.65296316", "0.6501116", "0.64499426", "0.6444946", "0.64107853", "0.6399771", "0.6394952", "0.6393367", "0.6385768"...
0.0
-1
Restarts Game, provides new random number, assigns each gem by id a random
function restartGame() { targetNumber = Math.floor(Math.random() * 101) + 19; $("#number-to-guess").text(targetNumber); gem1 = Math.floor(Math.random() * 11) + 1; gem2 = Math.floor(Math.random() * 11) + 1; gem3 = Math.floor(Math.random() * 11) + 1; gem4 = Math.floor(Math.random() * 11) + 1; counter = 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restart() {\n randomNumber = Math.floor(Math.random() * 101) + 19;\n $(\"#randomNumber\").html(randomNumber);\n gem1 = Math.floor(Math.random() * 11) + 1;\n gem2 = Math.floor(Math.random() * 11) + 1;\n gem3 = Math.floor(Math.random() * 11) + 1;\n gem4 = Math.floor(Math.random() * 11) + 1...
[ "0.76368433", "0.7125591", "0.67992747", "0.6793561", "0.6787646", "0.67772555", "0.67238474", "0.66803485", "0.663342", "0.66192544", "0.661247", "0.660103", "0.6594772", "0.65406066", "0.651291", "0.6509756", "0.648883", "0.64274204", "0.64109516", "0.63906103", "0.635408",...
0.75731725
1
Consts const cdnUrlBase = " // "currying": this string is incomplete, needs the IDs and filename. NOTE we now use edge.forgecdn.net too (see examples returned from API):
async function getFtbRevelation() { // return "https://media.forgecdn.net/files/2778/975/FTBRevelationServer_3.2.0.zip"; return "https://media.forgecdn.net/files/2690/320/FTB+Presents+Direwolf20+1.12-1.12.2-2.5.0-Server.zip"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCdnUrl(version) {\n if (version === void 0) { version = DEFAULT_VERSION; }\n return \"https://js.arcgis.com/\" + version + \"/\";\n}", "function getImageBaseUrl (url, config, item) {\n var baseUrl = ''\n if (item.use_file_server) {\n baseUrl = config.file_server\n }\n return baseUrl\n}",...
[ "0.6262754", "0.6158571", "0.6135605", "0.6119443", "0.6113467", "0.6056642", "0.6056642", "0.6030502", "0.5918885", "0.5900498", "0.5897083", "0.5897083", "0.5879322", "0.5841102", "0.5796405", "0.5750295", "0.5713454", "0.5703554", "0.5699802", "0.5682852", "0.5664376", "...
0.0
-1
This function will determine how many characters we want in the password
function determineLength(){ passwordLength = prompt("Pick how many characters you want in your password 8-20 characters only:"); if (passwordLength<8){ alert("Password should be a number between 8-20"); determineLength(); }else if (passwordLength>20){ alert("Password should be a number betw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function idPassLength(user, pw) {\n\treturn user.length >= 6 && pw.length >= 6;\n}", "function getPassswordLength() {\n let passwordLength = 0;\n let isInputNumber = true;\n\n while (passwordLength < 8 || passwordLength > 128 || isInputNumber == false) {\n passwordLength = parseInt(\n window.prompt(\"...
[ "0.7412824", "0.7410243", "0.73741657", "0.7302442", "0.72776353", "0.725878", "0.7252974", "0.7123863", "0.7112903", "0.70397246", "0.6968316", "0.6946213", "0.69209903", "0.69145787", "0.6911715", "0.6898487", "0.68899024", "0.68882877", "0.68878084", "0.68846244", "0.68778...
0.69640344
11
Functiom for uppercase letters in our password.
function determineUppercase(){ uppercaseCheck = prompt("Would you like uppercase letters? \n(Yes or No)"); uppercaseCheck = uppercaseCheck.toLowerCase(); if (uppercaseCheck === null || uppercaseCheck === ""){ alert("Aanswer Yes or No"); determineUppercase(); }else if (uppercaseCheck === "yes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uppercase(input) {}", "function upperCaseCheck(password){\n \n for(let a=0; a<password.length; a++){\n \n let char_num = password.charCodeAt(a);\n\n if(char_num >= 65 && char_num <= 90){\n return true;\n }\n\n }\n return false;\n}", "function addUpper(password){\n // Change a...
[ "0.78182554", "0.71280885", "0.70499057", "0.69936335", "0.69347155", "0.690037", "0.6857599", "0.68320954", "0.67269766", "0.6649407", "0.66426516", "0.66381514", "0.6627742", "0.6613592", "0.66016537", "0.6576344", "0.6575592", "0.6574659", "0.6552819", "0.65060925", "0.650...
0.0
-1
This function will determine if we need numbers in the password.
function determineNumbers(){ numberCheck = prompt("Do you want some numbers in your password? \n(Yes or No)"); numberCheck = numberCheck.toLowerCase(); if (numberCheck === null || numberCheck === ""){ alert("Answer Yes or No"); determineNumbers(); }else if (numberCheck === "yes" || numberCh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isContainNumber(password) {\n pattern = /[0-9]/;\n if(password.match(pattern))\n return true;\n else \n return false;\n}", "static checkForOneNumber(password) {\n if (!password) {\n return false;\n }\n const m = password.match(/(\\d+)/);\n re...
[ "0.77964103", "0.77304024", "0.76151425", "0.72416055", "0.7239536", "0.7212139", "0.7208439", "0.7073255", "0.68978816", "0.68965226", "0.6809992", "0.6769382", "0.67530817", "0.6735949", "0.6725694", "0.6718335", "0.6649997", "0.6638268", "0.6607575", "0.6607575", "0.658710...
0.0
-1
This function will determine if we want special characters.
function determineSpecial(){ specialCheck = prompt("Do you want to include special characters in your password? \n(Yes or No)"); specialCheck = specialCheck.toLowerCase(); if (specialCheck === null || specialCheck === ""){ alert("Answer Yes or No"); determineSpecial(); }else if (specialCheck...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isSpecialCharacter(str){\n return /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g.test(str);\n}", "function checkSpecialChar(data){\n\tvar iChars = \"!@#$%^&*()+=-[]\\\\\\';,./{}|\\\":<>?~_\";\n\tisvalid=true;\n\tfor (var i = 0; i < data.length; i++) {\n\t\tif (iChars.indexOf(data.charAt(i)) != -1) {...
[ "0.80446947", "0.7886212", "0.78855294", "0.7771303", "0.7732179", "0.7659984", "0.75923556", "0.75133336", "0.74536145", "0.7373184", "0.7371271", "0.7124746", "0.7100098", "0.70879453", "0.70848185", "0.701708", "0.696752", "0.6939488", "0.6924315", "0.6876704", "0.68304247...
0.0
-1
this funcion will take all the function above to create a random password.
function generatePassword(){ determineLength(); console.log(passwordLength); determineUppercase(); console.log(uppercaseCheck); determineNumbers(); console.log(numberCheck); determineSpecial(); console.log(specialCheck); var characters = lowercaseChar; var password = ""; if (uppercaseCheck && numberChe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static generatePassword() {\n return Math.floor(Math.random() * 10000);\n }", "function generate() {\n\tvar charset = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~\";\n\t//charset = removeDuplicates(charset);\n\tcharset = charset.replace(/ /, \"\\u00A0...
[ "0.8514901", "0.8379784", "0.8362627", "0.83619255", "0.8324453", "0.8314123", "0.8308704", "0.8230846", "0.8214897", "0.82013214", "0.8175798", "0.8144228", "0.8132968", "0.81321424", "0.811785", "0.8098315", "0.80932325", "0.80909276", "0.8089068", "0.8082826", "0.80788594"...
0.0
-1
Function that will run when entering command [ concertthis ]
function concertThis(user) { if (user.length === 0) { user = "Drake"; } axios .get( "https://rest.bandsintown.com/artists/" + user + "/events?app_id=codingbootcamp" ) .then(function(response) { console.log(""); console.log( "===== CONCERT ==========[ Searc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterCommand(ctx) {\n\t}", "enterCallCommand(ctx) {\n\t}", "function liriCommand(c, t){\n // if(c === \"concert-this\" ){\n // concertThis(commandParam)\n // }\n // if neither are stated propts the user to select functionality\n if(!c && !t){\n selectFunction();\n // if no topic specified propts t...
[ "0.70445037", "0.6681736", "0.63991076", "0.63936484", "0.6272547", "0.6233759", "0.62288547", "0.61342895", "0.61322147", "0.610828", "0.6097183", "0.6094918", "0.60890734", "0.60668427", "0.6055188", "0.60495037", "0.5981115", "0.5973063", "0.5963724", "0.5932738", "0.59183...
0.0
-1
Function that will run when entering command [ spotifythissong ]
function spotifyThis(user) { if (user.length === 0) { user = "All the small things"; } // API spotify .search({ type: "track", query: user }) .then(function(response) { console.log(""); console.log("===== SPOTIFY ==========[ Searched: " + user + " ]====="); console.log(""); /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spotifyCommand() {\n var trackName;\n // If the user does not type a search value, default to ace of base - the sign.\n if (process.argv[3] === undefined && randomSearch === undefined) {\n trackName = \"ace the sign\"\n } else if (randomSearch !== undefined) {\n trackName = rando...
[ "0.7416185", "0.7151558", "0.69392973", "0.6736419", "0.673617", "0.6694188", "0.65593606", "0.6558136", "0.6532253", "0.6493049", "0.64824045", "0.64779514", "0.639387", "0.6391776", "0.63867456", "0.6373126", "0.63730085", "0.63720846", "0.6356729", "0.63393563", "0.6329168...
0.0
-1
Function that will run when entering command [ moviethis ]
function movieThis(user) { if (user.length === 0) { user = "Mr.Nobody"; } axios .get("http://www.omdbapi.com/?apikey=trilogy&t=" + user) .then(function(response) { // console.log(response); // console.log(response.data); var rottenTomatoes = response.data.Ratings[1]; // con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thisMovie(movieName) {\n}", "function omdbCommand(){\n inquirer.prompt([\n {\n name: \"movie\",\n message:\"What movie would you like to search?\"\n }\n ]).then(function(answer){\n if(answer.movie === \"\"){\n movieThis(defaulted.movie);\n } else {\n commandParam = answ...
[ "0.68269956", "0.64995843", "0.649164", "0.6349839", "0.61912966", "0.61891496", "0.60709834", "0.6065448", "0.6057761", "0.60372484", "0.6027446", "0.60048234", "0.6004399", "0.598713", "0.59570974", "0.5935633", "0.59347147", "0.59107816", "0.58892745", "0.586694", "0.58535...
0.0
-1
Function that will run when entering command [ dowhatitsays ]
function doThis() { fs.readFile("random.txt", "utf8", function(error, data) { if (error) { return console.log(error); } var dataArr = data.split(","); for (var i = 0; i < dataArr.length; i++) { if (dataArr[i] === concert) { theConcert = dataArr[++i]; concertThis(theCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function commands(input){\n\tswitch(input){\n\t\tcase \"my-tweets\" : \n\t\t\tmyTweets();\n\t\t\tbreak;\n\t\tcase \"spotify-this-song\":\n\t\t\tsearchSpotify(userSearch);\n\t\t\tbreak;\n\t\tcase \"movie-this\":\n\t\t\tsearchMovie(userSearch);\n\t\t\tbreak;\n\t\tcase \"do-what-it-says\":\n\t\t\tdoWhatItSays();\n\t\...
[ "0.6625207", "0.64531696", "0.6310596", "0.62040883", "0.6150531", "0.61230564", "0.60822403", "0.607827", "0.60466516", "0.60302925", "0.6030173", "0.5994334", "0.59918374", "0.59483254", "0.5942406", "0.5927455", "0.5901518", "0.5880201", "0.58473647", "0.58438754", "0.5837...
0.0
-1
Function that will run when entering command [ dowhatitsays ]
function logThis() { fs.readFile('log.txt', "utf8", function(error, data) { if (error) { return console.log(error); } var dataArr = data.split(","); for (var i = 0; i < dataArr.length; i++) { if (dataArr[i] === concert) { theConcert = dataArr[++i]; concertThis(theConc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function commands(input){\n\tswitch(input){\n\t\tcase \"my-tweets\" : \n\t\t\tmyTweets();\n\t\t\tbreak;\n\t\tcase \"spotify-this-song\":\n\t\t\tsearchSpotify(userSearch);\n\t\t\tbreak;\n\t\tcase \"movie-this\":\n\t\t\tsearchMovie(userSearch);\n\t\t\tbreak;\n\t\tcase \"do-what-it-says\":\n\t\t\tdoWhatItSays();\n\t\...
[ "0.66247904", "0.64525145", "0.6309309", "0.6203671", "0.61496896", "0.6121979", "0.60816103", "0.6078604", "0.60458064", "0.60306364", "0.6029574", "0.599428", "0.59916544", "0.5947182", "0.5941699", "0.59270984", "0.5902422", "0.58811194", "0.5846473", "0.58441323", "0.5837...
0.0
-1
fourth method invoked by react, after dom has been rendered
componentDidMount() { console.log('component did mount') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onAfterRendering() {}", "afterRender() { }", "afterRender() { }", "_didRender(_props, _changedProps, _prevProps) { }", "didRender() {\n console.log('didRender ejecutado!');\n }", "componentDidMount() {\n if(typeof componentHandler !== 'undefined')\n componentHandler.upgradeDom();\n ...
[ "0.73867524", "0.7287539", "0.7287539", "0.68615943", "0.6716037", "0.6695963", "0.66361415", "0.65883124", "0.6558169", "0.652782", "0.652782", "0.652782", "0.6526183", "0.6526183", "0.6524822", "0.6497276", "0.6496904", "0.64788747", "0.6473705", "0.64275485", "0.6420754", ...
0.0
-1
/ Scene : TITLE [melon]
function initialControl() { [g_sWidth, g_sHeight] = [ setVal($id(`canvas-frame`).width, 600, C_TYP_FLOAT), setVal($id(`canvas-frame`).height, 500, C_TYP_FLOAT) ]; const stage = document.querySelector(`#canvas-frame`); const divRoot = createEmptySprite(stage, `divRoot`, { margin: `auto`, letterSpacing: `normal` ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Scene() {}", "function SceneOver()\n{\n\tthis.title = \"Game Over\";\n\t\n\t\n}", "function title() {\r\n drawScene(gl);\r\n if (!cube_title.isScrambling)\r\n cube_title.scramble();\r\n moveCamera({ movementX: velX, movementY: velY });\r\n cube_title.update(1 / 60);\r\n cube_title....
[ "0.6805922", "0.67402697", "0.66513073", "0.6497037", "0.6315787", "0.62484205", "0.61930776", "0.61792743", "0.6117712", "0.6063206", "0.60358036", "0.60179555", "0.5996068", "0.598108", "0.59505236", "0.5912537", "0.5904321", "0.5895344", "0.58887213", "0.58739626", "0.5864...
0.0
-1
/ Scene : SETTINGSDISPLAY [lemon]
function settingsDisplayInit() { clearWindow(true); const divRoot = document.querySelector(`#divRoot`); g_baseDisp = `Display`; g_currentPage = `settingsDisplay`; // 譜面初期情報ロード許可フラグ g_canLoadDifInfoFlg = false; // タイトル文字描画 divRoot.appendChild(getTitleDivLabel(`lblTitle`, g_lblNameObj.display, 0, 15, `settings...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set scenes(value) {}", "function run () {\n var autoMove = m.Settings.getAutoMove(),\n playSounds = m.Settings.getPlaySounds();\n \n if (m.debug > m.NODEBUG) { console.log('screens.settingsScreen.run' +\n ' auto move: ' + autoMove +\n ...
[ "0.6145189", "0.61204374", "0.6003965", "0.5932378", "0.592898", "0.5912546", "0.57820565", "0.5766211", "0.57585025", "0.57568735", "0.57332176", "0.5726683", "0.5632706", "0.56267464", "0.56266356", "0.5605055", "0.56032026", "0.55993587", "0.5597079", "0.5589027", "0.55484...
0.0
-1
Number of Guests this.numberOfGuests.html(model.getNumberOfGuests());
function update(obj){ if (obj === "guests") { loadNbGuests(); } loadMenuOverview() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNumberOfGuests() {\n return this.nrGuests;\n }", "setNumberOfGuests(num) {\n if(num < 1)\n num = 1;\n this.nrGuests = num;\n }", "set numGuests(val) {\n this._numGuests = typeof val !== 'number' || val < 1 ? 1 : val;\n // if (typeof val !== 'number' || val < 1) {\n // this._numGue...
[ "0.7945763", "0.718451", "0.6781712", "0.6368015", "0.6339031", "0.6319605", "0.629469", "0.6131393", "0.6131393", "0.6131393", "0.6074863", "0.6070644", "0.5974603", "0.5942715", "0.5940122", "0.5809515", "0.5795534", "0.57905406", "0.5787201", "0.57658875", "0.5731312", "...
0.0
-1