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
Adds polyfills requireed for the Uploader.
addPolyfills(){// Polyfill for canvas.toBlob(). if(!HTMLCanvasElement.prototype.toBlob){Object.defineProperty(HTMLCanvasElement.prototype,'toBlob',{value:function(callback,type,quality){var binStr=atob(this.toDataURL(type,quality).split(',')[1]);var len=binStr.length;var arr=new Uint8Array(len);for(var i=0;i<len;i++){a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "prependPolyfills() {\n\t\tif ((Utils.isServerSide && !global._babelPolyfill) || (Utils.isBrowserSide && !window._babelPolyfill))\n\t\t\trequire('@babel/polyfill')\n\t}", "function installPolyfills() {\n\tfor (const name in globals) {\n\t\tObject.defineProperty(globalThis, name, {\n\t\t\tenumerable: true,\n\t\t\t...
[ "0.6564893", "0.62400186", "0.61980075", "0.61629736", "0.5946459", "0.5740605", "0.5619283", "0.5509674", "0.54950243", "0.5452172", "0.54452103", "0.54207563", "0.53356326", "0.5327671", "0.5327064", "0.525645", "0.525645", "0.525645", "0.524001", "0.517887", "0.5177763", ...
0.5066321
24
Start taking a picture.
initiatePictureCapture(){this.imageInput.trigger('click')}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function takePicture() {\n\t\n navigator.camera.getPicture(\n function(uri) {\n var img = document.getElementById('camera_image');\n img.style.visibility = \"visible\";\n \n img.src = uri;\n },\n function(e) {\n ...
[ "0.65641737", "0.65150476", "0.63522524", "0.6223583", "0.6210503", "0.6207826", "0.6207384", "0.6202262", "0.61949724", "0.6171221", "0.6162027", "0.61586535", "0.61497986", "0.613985", "0.6102562", "0.610143", "0.6098916", "0.60988075", "0.60626435", "0.60626435", "0.604288...
0.6090709
18
Displays the given pic in the New Pic Upload dialog.
displayPicture(url){this.newPictureContainer.attr('src',url);page('/add');this.imageCaptionInput.focus();this.uploadButton.prop('disabled',true)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayUploadedImage( cropOptions ) {\n\n\t\t// display image,\n\t\t// assign its properties as data attributes\n\t\t// initialise crop tool with settings\t\t\n\t\t$( '#img' ).attr( 'src', imgPath ).data( {\n\t\t\tname : imgName,\n\t\t\twidth : imgWidth,\n\t\t\theight : imgHeight,\n\t\t\tsize : imgSize,\n...
[ "0.65428215", "0.6361212", "0.6287213", "0.6196574", "0.618901", "0.61739886", "0.614664", "0.6110339", "0.6086105", "0.60774356", "0.6073495", "0.60713106", "0.6071131", "0.6055338", "0.6042835", "0.60320556", "0.60298395", "0.602691", "0.6020381", "0.59990853", "0.599117", ...
0.69496125
0
Enables or disables the UI. Typically while the image is uploading.
disableUploadUi(disabled){this.uploadButton.prop('disabled',disabled);this.addButton.prop('disabled',disabled);this.addButtonFloating.prop('disabled',disabled);this.imageCaptionInput.prop('disabled',disabled);this.overlay.toggle(disabled)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enable() {\n\t // leave empty in Widget.js\n\t }", "enable() {\n this._enabled = true;\n }", "function uiEnableButtons() {\n const appendButtonElement = document.getElementById('selectfile-append');\n if (appendButtonElement) {\n appendButtonElement.classList.remove('disabled');\n }\n...
[ "0.65232366", "0.6295402", "0.6263055", "0.6250026", "0.62420565", "0.62210935", "0.614029", "0.60914564", "0.6039109", "0.60239774", "0.60157996", "0.60144293", "0.6004599", "0.6000674", "0.5989664", "0.5976659", "0.592928", "0.5903017", "0.5902117", "0.58805835", "0.5873372...
0.7174152
0
Reads the picture the has been selected by the file picker.
readPicture(event){this.clear();var file=event.target.files[0];// FileList object this.currentFile=file;// Clear the selection in the file picker input. this.imageInput.wrap('<form>').closest('form').get(0).reset();this.imageInput.unwrap();// Only process image files. if(file.type.match('image.*')){var reader=new FileR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFileSelect() {\n var picture = document.getElementById('picture_input').files.item(0);\n displayPicturePreview(picture);\n }", "function getImg() {\n filepicker.setKey(\"ABDI6UIw6SzCfmtCVzEI3z\");\n filepicker.pick({\n mimetypes: [\"image/*\"],\n container: \"mod...
[ "0.70555276", "0.6760061", "0.6710093", "0.66413593", "0.6504615", "0.64354163", "0.64259744", "0.64159477", "0.640216", "0.6366635", "0.636245", "0.63546467", "0.6340056", "0.6289773", "0.6278218", "0.62618876", "0.62592316", "0.6249223", "0.61922956", "0.61879116", "0.61477...
0.67669845
1
Returns a Canvas containing the given image scaled down to the given max dimension.
static _getScaledCanvas(image,maxDimension){const thumbCanvas=document.createElement('canvas');if(image.width>maxDimension||image.height>maxDimension){if(image.width>image.height){thumbCanvas.width=maxDimension;thumbCanvas.height=maxDimension*image.height/image.width}else{thumbCanvas.width=maxDimension*image.width/imag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scaleCanvas(){\n scaledCanvasCtx.drawImage(drawCanvas, 0, 0, 1280, 720, 0, 0, scaledCanvas.width, scaledCanvas.height);\n}", "adjustCanvasDimension() {\n const canvasImage = this.canvasImage.scale(1);\n const {width, height} = canvasImage.getBoundingRect();\n const maxDimension =...
[ "0.6565788", "0.6490433", "0.60856247", "0.60226065", "0.57214", "0.5687866", "0.56501406", "0.5576184", "0.5552235", "0.55350775", "0.5467605", "0.5466256", "0.54492015", "0.5448135", "0.5397365", "0.5373587", "0.53580517", "0.53444713", "0.53421354", "0.5318558", "0.5306492...
0.8183483
0
Generates the full size image and image thumb using canvas and returns them in a promise.
generateImages(){const fullDeferred=new $.Deferred;const thumbDeferred=new $.Deferred;const resolveFullBlob=blob=>fullDeferred.resolve(blob);const resolveThumbBlob=blob=>thumbDeferred.resolve(blob);const displayPicture=url=>{const image=new Image;image.src=url;// Generate thumb. const maxThumbDimension=friendlyPix.Uplo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thumb_loaded(event) {\n \"use strict\";\n // prepare the output canvas\n var newImg = new Image();\n newImg.src = event.target.src;\n\n aspectRatio = newImg.width / newImg.height;\n output_canvas.height = defaults.output_height;\n output_canvas.width = defaults.output_height * aspectRatio;\n\n // ...
[ "0.65997267", "0.6432297", "0.6236912", "0.6152659", "0.60529006", "0.59305465", "0.5793159", "0.5786052", "0.5762019", "0.56659627", "0.5654963", "0.56283414", "0.557777", "0.55672985", "0.55629665", "0.5554979", "0.5466658", "0.5455097", "0.54112667", "0.5395007", "0.535454...
0.721252
0
Uploads the pic to Firebase Storage and add a new post into the Firebase Database.
uploadPic(e){e.preventDefault();this.disableUploadUi(true);var imageCaption=this.imageCaptionInput.val();this.generateImages().then(pics=>{// Upload the File upload to Firebase Storage and create new post. friendlyPix.firebase.uploadNewPic(pics.full,pics.thumb,this.currentFile.name,imageCaption).then(postId=>{page(`/us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addImage(postId) {\r\n // upload the file\r\n const storage = firebase.storage();\r\n const user = firebase.auth().currentUser;\r\n const ref = storage.ref('posts').child(postId).child('post-image');\r\n \r\n const promise = ref.put(file);\r\n\r\n promise.then(function(image) {\r\n ...
[ "0.7587003", "0.7283115", "0.7147682", "0.6964573", "0.6824142", "0.6820319", "0.6755512", "0.6744392", "0.67313796", "0.66950464", "0.66301554", "0.6613633", "0.6586328", "0.6575451", "0.6568229", "0.65633786", "0.6553931", "0.64848894", "0.64804184", "0.6474965", "0.6450912...
0.74801576
1
Preenche o select com os tipos de transacoes
function getOptionsTransactionType() { let listTransactionType = []; props.param.state.listTransactionType.forEach(element => { listTransactionType.push(<option key={element} value={element}>{element}</option>) }); return listTransactionType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "select(value) {\n\n \n let selectables = this.object_item(value).selectables;\n let selections = this.object_item(value).selections;\n\n\n\n if (selectables.length > 0) {\n\n selectables.addClass('OPTION-selected')\n .hide(1000);\n\n...
[ "0.639305", "0.6329163", "0.6249135", "0.6242289", "0.62044924", "0.61939037", "0.61828464", "0.61644095", "0.6148832", "0.60488605", "0.5995414", "0.5984191", "0.5959421", "0.5930936", "0.5930936", "0.5912982", "0.59011745", "0.5899916", "0.5898685", "0.5891646", "0.5887851"...
0.0
-1
Gets data from persistent storage by the given key and returns it
async function getPersistent(key) { return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get(key) {\n return JSON.parse(self.storage.getItem(key));\n }", "function get(key) {\n return JSON.parse(self.storage.getItem(key));\n }", "function retrieveData(key) {\n var retrieved = JSON.parse(window.localStorage.getItem(key));\n return retrieved;\n ...
[ "0.7849637", "0.7849637", "0.7728735", "0.75246376", "0.74092954", "0.7385773", "0.7372604", "0.73676074", "0.7355277", "0.7350186", "0.7347885", "0.73342556", "0.7332024", "0.73117507", "0.7306963", "0.73023766", "0.7292734", "0.7278329", "0.7258146", "0.72492796", "0.723592...
0.0
-1
Saves the given data into persistent storage by the given key. Returns 'true' on success.
async function setPersistent(key, data) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save(key, data) {\n window.localStorage.setItem(key, data);\n }", "function save(key, value) { return local.save(key, value); }", "function saveLocally(key, data){\n\t//https://stackoverflow.com/questions/43116179/localstorage-detect-if-local-storage-is-already-full\n\ttry {\n\t\tloc...
[ "0.736093", "0.7048472", "0.6724873", "0.6653417", "0.648786", "0.6454486", "0.64086926", "0.635063", "0.63401103", "0.6314625", "0.63057315", "0.6299399", "0.6283091", "0.627545", "0.62423354", "0.6233113", "0.6233113", "0.61971396", "0.6185708", "0.6160869", "0.61530685", ...
0.73170483
1
process.on('exit', onExit()); process.on('SIGINT', onExit()); // CTRL+C process.on('SIGTERM', onExit()); // KILL process.on('uncaughtException', onExit()); // UNCAUGHT EXCEPTIONS
function onExit() { httpServer.kill('SIGINT'); process.exit(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setupTerminationHandlers() {\n // Process on exit and signals.\n process.on('exit', () => { this.terminator(); });\n\n // Removed 'SIGPIPE' from the list - bugz 852598.\n ['SIGHUP', 'SIGINT', 'SIGQUIT', 'SIGILL', 'SIGTRAP', 'SIGABRT',\n 'SIGBUS', 'SIGFPE', 'SIGUSR1', 'SIGSEGV',...
[ "0.781814", "0.7600897", "0.7126223", "0.68665606", "0.68467575", "0.6830069", "0.67720383", "0.67056453", "0.6662374", "0.6624854", "0.657779", "0.6549203", "0.6512128", "0.64884114", "0.64455926", "0.64214957", "0.6415785", "0.6415785", "0.6415785", "0.6392702", "0.63850784...
0.7227773
2
set the autopilot mode
function autoPilot(boolean) { if (boolean === 'true' || boolean === 'false') { state.autoPilot = true; console.log(`autoPilot changed because value is valid. Value: ${boolean}`) } else { console.log(`autoPilot not changed because value is invalid. Value: ${boo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setMode(mode) {\n this._mode = mode;\n }", "function setMode(incoming) {\n return incoming.set(\"mode\", (function () {\n if (incoming.get(\"server\")) {\n return \"server\";\n }\n if (incoming.get(\"proxy\")) {\n return \"proxy\";\n }\n return \"sn...
[ "0.63296324", "0.6272314", "0.6230522", "0.613472", "0.60921466", "0.6053512", "0.59674364", "0.59509003", "0.5901993", "0.58933717", "0.5862936", "0.5813724", "0.5804941", "0.5804941", "0.5804941", "0.5804941", "0.5804941", "0.5804941", "0.5804941", "0.5804941", "0.5804941",...
0.0
-1
Pizza Constructor and Methods
function Pizza(){ this.pizzaId = 0, this.size = "", this.toppings = [], this.pizzaTotal = 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Pizza (topping, size, price) {\n this.topping = topping;\n this.size = size;\n this.price = price;\n}", "function Pizza (topping, size) {\n this.topping = topping;\n this.size = size;\n this.price = 0;\n}", "function Pizza(size, crust, sauce, cheese) {\n this.size = size;\n this.crust = crust;...
[ "0.84626436", "0.83101034", "0.82987344", "0.8275933", "0.8233906", "0.81610155", "0.8149712", "0.8110759", "0.8098466", "0.806855", "0.79966164", "0.7883154", "0.7839083", "0.78040767", "0.7679807", "0.7556589", "0.7309519", "0.7099958", "0.70162827", "0.7009085", "0.6996531...
0.81769884
5
Modifiers and ModType objects and methods
function Modifiers() { this.modTypes = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "makeModifier(mod, reason) {\n let m = displayMod(mod)\n return {\n mod: m,\n modint: parseInt(m),\n desc: reason,\n plus: m[0] == '+',\n }\n }", "static defineModifier() {\n let mod = new Modifier;\n return (tag) => {\n if (tag.modified.indexOf(mod) > -1)\n ...
[ "0.6844998", "0.6690295", "0.65750176", "0.6323437", "0.63084894", "0.63084894", "0.6290331", "0.6214848", "0.6168137", "0.6168137", "0.6116455", "0.59617525", "0.59438217", "0.5901868", "0.5816388", "0.5803947", "0.5799888", "0.5799888", "0.5771298", "0.57379663", "0.5698354...
0.745239
0
Display Builder Object and Display methods // DisplayBuilder assists in creating output strings for display methods
function DisplayBuilder() { this.p = "<p>", this.cp = "</p>" this.ul = "<ul>", this.cul = "</u>", this.li = "<li>", this.cli = "</li>", this.div = "<div>", this.cdiv = "</div>", this.h3 = "<h3>", this.ch3 = "</h3>" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createDisplay() {\n const { text, fontSize = 36 } = this.conf;\n this.display = Pool.get(this.type, () => new Label());\n this.display.attr({ text, fontSize });\n }", "createDisplay() {\n const { text, fontSize = 36, color = '#000000' } = this.conf;\n this.display = new ProxyObj();\n // this.s...
[ "0.69724816", "0.69534117", "0.6791639", "0.6621151", "0.6534909", "0.6489381", "0.644806", "0.6438916", "0.63403666", "0.6313265", "0.63024145", "0.6279184", "0.62733865", "0.6243854", "0.62436336", "0.62436336", "0.62436336", "0.6202214", "0.61958545", "0.61958545", "0.6191...
0.7808566
0
The API always uses the route :orderName, we can move checking for the order into an applicationlevel middleware
function pizzaParser(req, res, next){ // this no longer works, we have to query the database (use Order.find()!) // if (req.params.orderName in orders){ /* TODO: uncomment this and fill in the ???? with the query Order.find( ????, (err, orders)=>{ if (err || orders.length === 0) { res.json({resul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function findOrder(req, res) {}", "function orderExists(req, res, next) {\n const orderId = req.params.orderId;\n const { data: order = {} } = req.body;\n\n const foundOrder = orders.find((order) => order.id === orderId);\n\n if (foundOrder) {\n res.locals.order = foundOrder;\n return next();\n ...
[ "0.671381", "0.6394105", "0.63680583", "0.63585997", "0.6354584", "0.6139265", "0.6129141", "0.6127082", "0.60969126", "0.6078192", "0.6005743", "0.5999504", "0.59346795", "0.5865474", "0.5854652", "0.5847387", "0.5806485", "0.5805696", "0.5778004", "0.57309985", "0.57293737"...
0.62340856
5
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.6966464", "0.69360375", "0.6764034", "0.64398926", "0.6327182", "0.62972784", "0.625466", "0.62094045", "0.619243", "0.6179658", "0.6173272", "0.6158152", "0.6158152", "0.6158152", "0.6154658", "0.60939026", "0.603713", "0.5988026", "0.59799474", "0.5977742", "0.59769917",...
0.0
-1
calBack de post es post
function Post($resource,BaseUrl){//nos permite pillar datos de esta url return $resource(BaseUrl + 'posts/:id', {id:'@id'}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doPost(e) {\r\n // data e kita verifikasi\r\n var update = tg.doPost(e);\r\n\r\n // jika data valid proses pesan\r\n if (update) {\r\n prosesPesan(update);\r\n }\r\n}", "function Post() {}", "function POST(){\n \n}", "function Post () {\n}", "watch_post ( ) {\n let _t...
[ "0.7203251", "0.6862141", "0.6801987", "0.66878754", "0.6611754", "0.6548482", "0.65372145", "0.6526541", "0.64490813", "0.62842524", "0.6272927", "0.6239784", "0.6197897", "0.61599123", "0.6145857", "0.6103665", "0.60963243", "0.608649", "0.6080657", "0.60800856", "0.60549",...
0.0
-1
Converts a string to PascalCase / RGP 09/15/2017
function ToPascalCase(input) { var rtn = ""; if (input.includes("_")) { var splitstring = input.split("_"); for (var i = 0; i < splitstring.length; i++) { rtn = rtn + splitstring[i].titlecase("EN"); } } else { rtn = input; } return rtn.replaceAll(" ", "")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toPascalCase() {\n var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var string = input.toString(); // Convert kebab case\n\n string = replaceAll(string, '-', ' '); // Convert snake case\n\n string = replaceAll(string, '_', ' '); // Convert to title case\n\n...
[ "0.809637", "0.8032627", "0.7979027", "0.78718525", "0.78718525", "0.7860168", "0.7860168", "0.7857397", "0.78136027", "0.7811002", "0.7805698", "0.7805698", "0.7796899", "0.7796899", "0.77838516", "0.77314746", "0.6943964", "0.67093474", "0.6611297", "0.64698", "0.6396254", ...
0.7708396
16
Converts the database type to a C type / RGP 09/15/2017
function DatabaseTypeToSystemType(datatype, isNullable) { var rtnString = "string"; if (datatype == "int") { rtnString = isNullable ? "int?" : "int"; } else if (datatype == "smallint" || datatype == "tinyint") { rtnString = isNullable ? "short?" : "short"; } else if (datatype == "d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "convertTypesForDb(input) {\n\t\tswitch (input?.constructor.name) {\n\t\t\tcase 'Long':\n\t\t\t\treturn input.toString();\n\t\t\tdefault: return input;\n\t\t}\n\t}", "function sqlTypeCast(type) {\n\t\ttype = type.toLowerCase();\n\n\t\tswitch (type) {\n\t\t\tcase 'string':\n\t\t\t\treturn 'TEXT';\n\n\t\t\tcase 'in...
[ "0.67266035", "0.6454413", "0.5916918", "0.58662915", "0.5843477", "0.5833625", "0.58186156", "0.57694644", "0.5699975", "0.5689745", "0.56822294", "0.56510854", "0.5632287", "0.56201094", "0.5610669", "0.56003296", "0.5599675", "0.5581353", "0.5503119", "0.5496002", "0.54653...
0.6373606
2
(experimental) Import an existing HTTP Authorizer into this CDK app.
static fromHttpAuthorizerAttributes(scope, id, attrs) { class Import extends core_1.Resource { constructor() { super(...arguments); this.authorizerId = attrs.authorizerId; this.authorizerType = attrs.authorizerType; } bind() { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _addAuthorization(url, options = {}) {\n const oAuthToken = this.getTokenFromLS();\n\n let bearer = \"Bearer \" + oAuthToken;\n\n // Append token to header. Create header if it does not exist\n if (options.headers === undefined) {\n options.headers = {};\n }\n options.headers[\"Author...
[ "0.52791244", "0.5127641", "0.5092333", "0.49304464", "0.48773387", "0.4862704", "0.48621616", "0.48621616", "0.48621616", "0.48621616", "0.48621616", "0.4856879", "0.48514605", "0.48514605", "0.48514605", "0.48477653", "0.48460308", "0.4845778", "0.48228648", "0.48216185", "...
0.61985415
0
(experimental) Bind this authorizer to a specified Http route.
bind(_) { return { authorizationType: HttpAuthorizerType.NONE, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "bindRouteHandler() {\n\t\tthis.app.singleton('router.handler', Handler);\n\t}", "_updateRouter(route) {\n\n /*\n (R.intersection(getMetods(route), verbs)).forEach(routeVerb => {\n route.log(`found route handler for '${routeVerb}' method`);\n route.router[routeVerb]('/', route[routeVerb].bind(rout...
[ "0.58831346", "0.5794099", "0.57246894", "0.5700441", "0.5638002", "0.534748", "0.5258647", "0.5200228", "0.5114247", "0.5080799", "0.507489", "0.50733924", "0.50418717", "0.5029353", "0.50008863", "0.49857676", "0.49819896", "0.49755603", "0.4967683", "0.49461636", "0.493874...
0.5075993
10
end getConversionFunnelTable / Returns the part of the report configuration that configures a chart
function getMainChart1Config() { return { type: charts.NVD3.Types.DailyBars, format: charts.NVD3.Formats.Full, metrics: [ 'conversionValue' ], postProcessors: { conversionValue: [ dataFormatters.orderPeriodsChronologically, dataFormatters.unifyChannelPeriods ] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Charting() {}", "function getChartConfig(subDemographic, outcomes, colors){ \n\n var chartConfig = {\n id: \"chart-\" + subDemographic,\n \n options: {\n colors: colors,\n ...
[ "0.60443735", "0.5994478", "0.58642274", "0.5859779", "0.5820435", "0.5540055", "0.5443566", "0.54393923", "0.52823126", "0.5274812", "0.5264109", "0.52416027", "0.5215546", "0.5197409", "0.5178706", "0.5143015", "0.5113425", "0.5036129", "0.5023813", "0.5017644", "0.49930635...
0.5298354
8
end conversionDetailsTable / / Chart Data Configuration / / Returns the metric "data mappings" part of a visualisation's configuration
function getConversionFunnelMap() { return { impressionsFunnelValue: { metric: 'impressions', getter: commonGetters.getChannelsSeparatelyGetter('totalValue') }, reachFunnelValue: { metric: 'reach', getter: commonGetters.getChannelsSeparatelyGetter('totalValue') }, clicksFun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMainDataMap() {\n return {\n conversionValue: {\n metric: 'conversionValue',\n getter: commonGetters.getChannelsSeparatelyGetter('breakdownValues')\n },\n conversionValueValue: {\n metric: 'conversionValue',\n getter: commonGetters.getOnlyFromChannelsGetter('totalValue')\n...
[ "0.62448883", "0.582945", "0.5698949", "0.567646", "0.5540036", "0.5482983", "0.5457116", "0.5428025", "0.5420268", "0.53703517", "0.53388876", "0.53251696", "0.53145987", "0.52914196", "0.52735585", "0.5270893", "0.5259293", "0.525083", "0.5240151", "0.52158856", "0.52156985...
0.54832935
5
end getConversionFunnelMap / Returns the metric "data mappings" part of a visualisation's configuration
function getMainDataMap() { return { conversionValue: { metric: 'conversionValue', getter: commonGetters.getChannelsSeparatelyGetter('breakdownValues') }, conversionValueValue: { metric: 'conversionValue', getter: commonGetters.getOnlyFromChannelsGetter('totalValue') }, con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getConversionFunnelMap() {\n return {\n impressionsFunnelValue: {\n metric: 'impressions',\n getter: commonGetters.getChannelsSeparatelyGetter('totalValue')\n },\n reachFunnelValue: {\n metric: 'reach',\n getter: commonGetters.getChannelsSeparatelyGetter('totalValue')\n },...
[ "0.7495992", "0.6860603", "0.67246234", "0.6124001", "0.56722534", "0.5634696", "0.54492706", "0.54226404", "0.5315096", "0.52976406", "0.51854354", "0.5132169", "0.5130189", "0.5128185", "0.5089467", "0.5084998", "0.5062375", "0.50433606", "0.5025664", "0.50108206", "0.49889...
0.5756604
4
random colors for the plot lines
function getRandomColor() { var letters = "0123456789ABCDEF"; var color = "#"; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateRandomColors() {\r\n color1.value = getRandom();\r\n color2.value = getRandom();\r\n setGradient();\r\n}", "function randomizeColors() {\n background(random(0, 255), random(0, 255), random(0, 255));\n fill(random(0, 255), random(0, 255), random(0, 255));\n}", "function randomColors(...
[ "0.71609914", "0.7101425", "0.6937486", "0.6885664", "0.6875811", "0.6784631", "0.67782414", "0.6741217", "0.6725843", "0.6701445", "0.66931254", "0.6688982", "0.6687447", "0.6682767", "0.6676762", "0.6675144", "0.66674584", "0.6655443", "0.6648477", "0.66404325", "0.66311634...
0.0
-1
Invoked immediately after a component is mounted.
componentDidMount() { this.setupCodemirror(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.componentLoaded = true;\n }", "componentDidMount(){\n console.log(\"component DID MOUNT!\")\n }", "componentDidMount(){ //Cuando un compoennte se monta y se muestra en pantalla se llama este método\n console.log(\"did Mount\");\n }", "componenetWillMount() { }",...
[ "0.7219526", "0.7055323", "0.7050532", "0.70249915", "0.70203406", "0.6961942", "0.6939973", "0.6939973", "0.6929861", "0.6884153", "0.68630445", "0.6849117", "0.6849076", "0.68381095", "0.68321896", "0.67818004", "0.6775595", "0.6772637", "0.6756169", "0.6708661", "0.6695580...
0.0
-1
Invoked immediately before a component is unmounted and destroyed
componentWillUnmount() { this.destroyCodemirror(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillUnmount() {\n this.mounted = false;\n }", "componentWillUnmount() {\n this.mounted = false;\n }", "componentWillUnmount() {\n this.mounted = false;\n }", "componentWillUnmount() {\n this.mounted = false;\n }", "componentWillUnmount() {\n this.mounted = false;\n ...
[ "0.74288064", "0.74288064", "0.74115705", "0.74115705", "0.74115705", "0.74115705", "0.74087286", "0.7405284", "0.7405284", "0.73836714", "0.7322852", "0.73064196", "0.7286693", "0.72779846", "0.7273444", "0.727063", "0.727063", "0.725759", "0.7207802", "0.7207802", "0.716984...
0.0
-1
Initializes the codemirror instance
setupCodemirror() { this.destroyCodemirror(); const themes = this.props.theme.split(',').map(s => s.trim()); let theme = 'default'; for (let i = 0; i < themes.length; i++) { if (THEMES.indexOf(themes[i]) === -1) { theme = themes[i]; break; } } const options = objectA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initialize(options) {\n this.options = options;\n\n const codeMirrorOptions = {\n mode: {\n highlightFormatting: true,\n name: 'gfm',\n\n /*\n * The following token type overrides will be prefixed with\n * ``cm-``...
[ "0.7176693", "0.6994073", "0.69207746", "0.69018644", "0.6876599", "0.68680894", "0.6786112", "0.6650162", "0.651127", "0.64840543", "0.64663076", "0.6436813", "0.6426708", "0.6426708", "0.6425328", "0.6423302", "0.6419038", "0.6416334", "0.6415827", "0.6407029", "0.6402801",...
0.73918265
0
Destroys the codemirror instance
destroyCodemirror() { if (this.codemirror) { this.codemirror.toTextArea(); this.codemirror = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillUnmount() {\n this.destroyCodemirror();\n }", "destroy() {\n this.editorview.dispose();\n this.editor.dispose();\n }", "uninstall() {\n this._destroyEditor()\n }", "destroy () {\n if (this.modes && this._mode) {\n this.modes[this._mode].destroy();\n }\n ...
[ "0.71618843", "0.70218146", "0.65654373", "0.6532233", "0.63696057", "0.6362101", "0.6239154", "0.6180601", "0.6170303", "0.61581963", "0.61140347", "0.6071063", "0.6068486", "0.6031782", "0.5995852", "0.59912014", "0.5970493", "0.59259397", "0.5924931", "0.5924931", "0.59249...
0.8580154
0
convert resolution to same minus 1 so that we can draw a 1px block
function conv(val) { return Math.round((val / resolution) * (resolution-1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vidRescale(){\n\tvar w = $(window).width(),\n\t\th = $(window).height();\n\n\tif (w/h > 16/9){\n\t\ttv.setSize(w, w/16*9);\n\t\t$('.lx-youtube-background .lx-youtube-screen').css({'left': '0px'});\n\t} else {\n\t\ttv.setSize(h/9*16, h);\n\t\t$('.lx-youtube-background .lx-youtube-screen').css({'left': -($(...
[ "0.636423", "0.63169545", "0.6192045", "0.60508436", "0.6017095", "0.60122854", "0.6011726", "0.58973575", "0.58549833", "0.5852907", "0.58490574", "0.5835283", "0.5833908", "0.5833118", "0.5800213", "0.5790923", "0.5789847", "0.5771855", "0.57505643", "0.57372713", "0.572820...
0.6115785
3
Examples of TimeDistributed Layer More info:
async function one2one() { console.log(kleur.bgGreen(kleur.black("one2one"))); let xInput = tf.tensor([0.0, 0.2, 0.4, 0.6, 0.8]); let yExpected = tf.tensor([0.1, 0.3, 0.5, 0.7, 0.9]); // Reshape xInput = xInput.reshape([5, 1, 1]); // xInput.print(); console.log(xInput.shape); yExpected = yExpected.res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "trainNetwork(inp){\r\n let input = inp.slice();\r\n //Input in an array with 2 strings. Get the strings to normal data a LSTM cell can handle.\r\n for(let i = 0; i < input.length; i++){\r\n input[i] = this.toData(input[i]);\r\n }\r\n input = neuralNetwork.ctd(input);\r\n\r\n //Train the netw...
[ "0.5426891", "0.5082134", "0.4901771", "0.4881877", "0.4864477", "0.48549876", "0.47607595", "0.47375157", "0.4716455", "0.46946767", "0.4691572", "0.46547455", "0.46416718", "0.46384504", "0.4634638", "0.46331042", "0.4613097", "0.45818275", "0.4565096", "0.4559708", "0.4530...
0.42361313
62
adds layer to map with with points
function addLayer(url) { GMO.downloadXml(url); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPointLayer() {\n var dummySource = map.getSource('taskai-src');\n if (typeof dummySource == 'undefined') {\n map.addSource('taskai-src', { 'type': 'geojson', 'data': urlTaskai });\n }\n map.addLayer({\n 'id': 'taskai',\n 'type': 'circle',\n 'source': 'taskai-src',\n 'paint': {\n ...
[ "0.77580816", "0.7488073", "0.74501467", "0.7296271", "0.7141129", "0.70703006", "0.7007783", "0.69574285", "0.694341", "0.6934359", "0.6880921", "0.6834219", "0.68202585", "0.68121773", "0.68051016", "0.6765266", "0.67190087", "0.669272", "0.6676303", "0.66694343", "0.664198...
0.0
-1
add a point to the map
function addPoint(latLng, nameString, description) { var xmlSheet = GMO.createPointXml(nameString, latLng, description); GMO.processXml(xmlSheet); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPoint(point) {\n this._points.push(point);\n }", "function addPoint(geometry) {\n var marker = new PictureMarkerSymbol({\n url: \"/Content/assets/img/map-pin.png\",\n width: 32,\n height: 32\n });\n graphicsLayer.add({\n ...
[ "0.74488753", "0.73872083", "0.7232048", "0.72230744", "0.71312284", "0.7120238", "0.6987911", "0.69590276", "0.6920362", "0.6907364", "0.68346906", "0.68330824", "0.6782251", "0.67595905", "0.6746337", "0.6724885", "0.67183256", "0.6695002", "0.667083", "0.6620402", "0.65780...
0.6934533
8
finds an address on the map, similar to the opening page of maps.google.com
function findAddress(address) { GMO.showAddress(address); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function locateAddressonMap() {\n\tvar mapOptions = {\n\t\tzoom : 8,\n\t};\n\tgeocoder = new google.maps.Geocoder();\n\tmap = new google.maps.Map(document.getElementById('riForm:map-canvas'), mapOptions);\n\n\tvar address = document.getElementById('riForm:locId').value;\n\tgeocoder.geocode({\n\t\t'address' : addre...
[ "0.7278509", "0.7145035", "0.67482644", "0.6746895", "0.6736635", "0.6707593", "0.66642934", "0.66302353", "0.6617792", "0.6584276", "0.65809387", "0.6560108", "0.6558146", "0.6548367", "0.64995766", "0.64920074", "0.6487253", "0.64859533", "0.6466334", "0.6463244", "0.644756...
0.67459476
4
shows a route for preselected locations
function findRoute() { GMO.showRoute(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showRoute(route) {\r\n // create line to represent route\r\n var polyroute = new google.maps.Polyline({\r\n strokeColor: '#3366FF',\r\n strokeWeight: 7\r\n });\r\n\r\n // for ensuring correct bounds/zoom level\r\n var bounds = new google.maps.LatLngBounds();\r\n\r\n $(route.legs).each(function...
[ "0.7208099", "0.68814397", "0.6746308", "0.6744445", "0.6671088", "0.6609735", "0.6603493", "0.65754807", "0.6516649", "0.6510107", "0.6501336", "0.64390254", "0.6435375", "0.6416625", "0.64005405", "0.6391423", "0.63797474", "0.635281", "0.6340305", "0.6271476", "0.6269811",...
0.5750952
76
saves your current location on the map
function savePosition() { //map.savePosition(); GMO.savePosition(map); GMO.updateStatus("Position saved."); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveLocation() {\n centre = map.getCenter();\n lat=centre.lat();\n lng=centre.lng();\n loc = \"\" + lat + \",\" + lng;\n setCookie( \"WepocoLatLng\", loc, 20 );\n zoom = map.getZoom();\n setCookie( \"WepocoZoom\", \"\" + zoom, 20 );\n return;\n}", "function saveLocation() {\n ...
[ "0.77544266", "0.77544266", "0.7468851", "0.72733706", "0.7062396", "0.7051519", "0.6797957", "0.6686658", "0.66507876", "0.6648411", "0.65918267", "0.6583188", "0.65503854", "0.65119684", "0.6449427", "0.64155257", "0.6393794", "0.63835347", "0.6372676", "0.6372185", "0.6347...
0.7456986
3
resets the map to last saved position
function goToSavedPosition() { //map.returnToSavedPosition(); GMO.returnToSavedPosition(map); GMO.updateStatus("Returned to saved position."); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\n this.map = new Map();\n this.size = 0;\n this.keys = [];\n this.cursor = -1;\n }", "function resetMap() {\n clearMap();\n removePolygon();\n }", "resetMap() {\n if (custom_maps[this.id]) {\n delete custom_maps[this.id];\n\n const map = getMap(t...
[ "0.76330316", "0.7466666", "0.7316264", "0.7079089", "0.7072101", "0.70302284", "0.6970934", "0.6936228", "0.6900841", "0.6882363", "0.6844797", "0.6842772", "0.6832532", "0.6816485", "0.678266", "0.6777703", "0.67695284", "0.67610776", "0.67153275", "0.67083395", "0.66767323...
0.0
-1
main METHOD to encapsulate a map You use this as follows: var GMO = new GMC()
function GMC(mapDivName, url, opts) { // store the parameters this.opts = opts || {}; this.mapDivName = mapDivName; this.mapIsZoomed = false; this.mapOriginalSize = {}; this.defaultUrl = url || ""; this.latestUrl = url || ""; this.currentPageURL = location.href.replace(/#/g,""); //replaces all # // ot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Map() {\n\t\n}", "function Map() {\n\t\n}", "function initMap() {\n}", "function example() {\n var map = new MapSpec(61, 61, {height: 0, material: 'road'});\n map.set(45, 45, {height: 20, material: 'building'});\n map.log();\n}", "function MAP() {\n\n}", "function Init()\n{\n // write code...
[ "0.75824505", "0.75824505", "0.70555365", "0.70461625", "0.6955854", "0.694218", "0.6920181", "0.6913941", "0.6870079", "0.68688995", "0.68680996", "0.67202836", "0.67070305", "0.66635484", "0.6594808", "0.65740734", "0.65350366", "0.65294236", "0.65033776", "0.6492759", "0.6...
0.61796254
57
tests to see if map function is defined
function mapFunctionIsDefined(variable) { return (typeof(window[variable]) == "undefined")? false: true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function map() {\n\n}", "function isAMap(map){\n\treturn (availableMaps.indexOf(map) != -1);\n}", "function isMapLike(value) {\n return value && typeof value.get === 'function' && typeof value.set === 'function';\n }", "function Map() {}", "function mapTest() {\n return \"Hello\"\n}", "functio...
[ "0.68627363", "0.68592155", "0.6705089", "0.66201717", "0.6617666", "0.6366139", "0.6361817", "0.6340213", "0.6328139", "0.63261396", "0.63261396", "0.63200533", "0.63200533", "0.63200533", "0.63200533", "0.63200533", "0.63200533", "0.63200533", "0.63200533", "0.63200533", "0...
0.68008214
2
Leverages `numeral` for number formatting
formatNumber (format: string, number: number): string { return numeral(number).format(format) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatNumeral (n, format, roundingFunction) {\n\t var output;\n\t\n\t // figure out what kind of format we are dealing with\n\t if (format.indexOf('$') > -1) { // currency!!!!!\n\t output = formatCurrency(n, format, roundingFunction);\n\t } else if (format.indexOf('%...
[ "0.73885757", "0.7370599", "0.7354363", "0.7354363", "0.72858983", "0.72858983", "0.72858983", "0.72858983", "0.71508145", "0.71508145", "0.69023514", "0.6880527", "0.6880527", "0.6880527", "0.6880527", "0.66978633", "0.6584049", "0.65704066", "0.6537153", "0.6489165", "0.644...
0.7692319
0
Retrieves a key from the translations object.
getKey (path: string): mixed | string { return _.at(this.translations[this.locale], path)[0] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getKey(translation) {\n return translation.key;\n }", "function getTranslation(the_key) {\n\n var key_to_lookup = the_key;\n var translated_string = \"\";\n\n try {\n translated_string = EC.Dictionary[language][key_to_lookup];\n } catch (error) {\n ...
[ "0.7552111", "0.6749087", "0.6458105", "0.6223788", "0.6076121", "0.60556424", "0.60320157", "0.5927494", "0.5907477", "0.5878348", "0.58372736", "0.5814577", "0.5748896", "0.5637839", "0.5593651", "0.55822766", "0.55822766", "0.555615", "0.5528486", "0.55120665", "0.53935635...
0.7490285
1
Below function shows a preview of the image being uploaded in the 'add book' page
function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { $('#preview').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayImage(event){ // display selected image function\n if(event.target.files.length > 0){// get the image src and append it to the preview which is the default image holder\n let src = URL.createObjectURL(event.target.files[0]);\n let preview = document.getElementById(\"document\");\...
[ "0.7173424", "0.704044", "0.6954746", "0.693707", "0.68885183", "0.68720067", "0.6815975", "0.6790711", "0.67795956", "0.67641854", "0.67614204", "0.6760899", "0.67167944", "0.6663617", "0.664894", "0.66391385", "0.6635128", "0.66214645", "0.66053665", "0.66011626", "0.659649...
0.0
-1
update the _index_ place holder inside each list item
function updateIndex(index, item) { return $(item).children(".key").find(":input.arrayKeyField").val(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addIndices() {\n const children = this.getAllChildren()\n children.each((index, item) => {\n $(item).attr('data-index', index)\n })\n }", "function updateIndex() {\n var i,\n orders = $scope.orders.filter(function (n) { return n; }),\n ...
[ "0.7390225", "0.7116115", "0.70915085", "0.7051314", "0.70308787", "0.69526416", "0.69084334", "0.68267083", "0.6693926", "0.668462", "0.6677257", "0.66462344", "0.659674", "0.6571243", "0.6563992", "0.6549115", "0.649604", "0.64823943", "0.64314723", "0.6370505", "0.62435186...
0.64972335
16
0 None 1 Action 2 Status
function loadFilterOptions(elem) { var value = $(elem).val(); if (value == 0) { $('#FilterOptionDiv').hide(); } else if (value == 1) { GetActionList(); } else if (value == 2) { GetStatusList(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start() {\n status = -1;\n action(1,0,0);\n}", "action() {}", "static get SUCCESS() { return 0; }", "function start() {\r\n status = -1;\r\n action(1, 0, 0);\r\n}", "function start() {\n status = -1;\n action(1, 0, 0);\n}", "function statusAction (type, status, data) {\n return {\n ...
[ "0.6626864", "0.659545", "0.6548136", "0.6411399", "0.63647455", "0.63371843", "0.63261133", "0.63128966", "0.626742", "0.61537325", "0.60451186", "0.5979152", "0.5924847", "0.5890808", "0.58614236", "0.58504003", "0.5812926", "0.5807657", "0.5801359", "0.5793313", "0.5741291...
0.0
-1
clear all the songs with `location` not in the dbs
function clearNotIn(list) { app.db.songs.remove({location: { $nin: list }}, {multi: true}, function(err, numRemoved) { console.log(numRemoved + ' tracks deleted'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_clearSong() {\n if (this.howl) this.howl.stop().unload();\n if (this.interval) clearInterval(this.interval);\n }", "function clearLocAll() {\n var roomcode = sessionStorage[\"code\"];\n var ul = document.getElementById(\"loclist\");\n var items = ul.getElementsByTagName(\"li\");\n for (var i ...
[ "0.64329326", "0.642265", "0.61323166", "0.61202174", "0.6113141", "0.6076986", "0.6070915", "0.60561657", "0.6021299", "0.59810555", "0.59803253", "0.5920352", "0.5911363", "0.5879927", "0.58412707", "0.5815891", "0.57768786", "0.5732024", "0.57040054", "0.5703293", "0.56896...
0.69020677
0
removes the items that have already been scanned from the list so that the scan can focus on items not scanned yet. Only used when not a hard scan
function remove_scanned(list, callback) { app.db.songs.find({}, function(err, songs) { if (!err) { var unscanned_list = []; for (var list_cnt = 0; list_cnt < list.length; list_cnt++) { var add = true; for (var song_cnt = 0; song_cnt < songs.length; song_cnt++) { // if the son...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeItems() {\n\n // uncompleted items\n for (var i = 0; i < listComponent.selected.length; i++) {\n var itemJson = JSON.parse(listComponent.selected[i].dataset.item);\n\n // Find uncompleted item that matches\n for (var j = 0; j < listComponent.unCompleted.length; j++) {\n i...
[ "0.6655444", "0.6282158", "0.6198565", "0.61256284", "0.61122906", "0.61079794", "0.61075735", "0.6104407", "0.60839593", "0.6070335", "0.6049089", "0.6046159", "0.6024348", "0.6003343", "0.59794277", "0.5975296", "0.5972559", "0.596816", "0.59640354", "0.5955159", "0.5953147...
0.6396666
1
download an entire youtube playlist, makes use of ytDownload below
function ytPlaylistDownload(playlistId, callback) { // fetch the playlist information youtubePlaylistInfo(app.get('config').youtube.api, playlistId).then(function(results) { console.log(`${results.length} items queued from playlist download!`); // setup a queue, to run this function in parallel, the concurr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function downloadYoutubeVideo(url, mode, count){\n try{\n if(mode === \"audio\"){\n await ytdl(url, { filter: 'audioonly' }).pipe(fs.createWriteStream(`./downloads/audio_${count}.mp3`));\n }else{\n await ytdl(url).pipe(fs.createWriteStream(`./downloads/yt-video_${count}...
[ "0.66105217", "0.65650856", "0.65222013", "0.6517685", "0.6284281", "0.62723917", "0.62641543", "0.6259335", "0.62090015", "0.61860263", "0.6180532", "0.61662626", "0.60505646", "0.6029831", "0.60273284", "0.60240394", "0.60153455", "0.5989776", "0.5976359", "0.5976338", "0.5...
0.75820076
0
fetch coverart for url
function downloadCoverArt(url, callback) { request({url: url, encoding: null}, function(error, response, body) { // where are we storing the cover art? var cover_location = md5(body) + '.jpg'; var filename = app.get('configDir') + '/dbs/covers/' + cover_location; // does it exist? fs.exists(filen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getCatts() {\n const response = await fetch('https://api.giphy.com/v1/gifs/translate?api_key=MA7ohxIYwTdEkW4gq9ieDD4NzeQmKE9k&s=cat', { mode: 'cors' })\n response.json().then(response => {\n img2.src = response.data.images.original.url\n })\n}", "async function getCattts() {\n const respons...
[ "0.6606068", "0.6590003", "0.6490294", "0.6470688", "0.64028895", "0.6332011", "0.62633246", "0.6120103", "0.6109542", "0.6103316", "0.6098424", "0.6094616", "0.6071487", "0.6047908", "0.60415417", "0.6035086", "0.6029339", "0.5999068", "0.59849346", "0.59791195", "0.5971595"...
0.6570311
2
makes property act like a promise independent of its promise o nonpromise nature
function makePromise(tgt) { return new Ember.RSVP.Promise(function (resolve) { resolve(tgt); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get promise() {\n return this.deferred.promise;\n }", "function QuerablePromise(promise) {\n\n var isPending = true;\n var result = promise.then(\n () => { isPending = false }\n )\n result.isPending = function () { return isPending }\n return result;\n}", "then(onFulfilled) {\n con...
[ "0.65746814", "0.6423979", "0.64079857", "0.6335325", "0.6305998", "0.6264149", "0.62461126", "0.6233314", "0.62249607", "0.62081236", "0.61502886", "0.6133237", "0.6101583", "0.608731", "0.60626477", "0.60624415", "0.6052681", "0.6011871", "0.59935105", "0.59761995", "0.5967...
0.5665764
60
Sends the request to log in into an existing account.
handleSignIn() { const loginRequest = {}; loginRequest[USERNAME_ID] = this.state.formFields[USERNAME_ID]; loginRequest[PASSWORD_ID] = this.state.formFields[PASSWORD_ID]; sendLoginRequest(loginRequest, true, this.state.formFields[USERNAME_ID], null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login() {\n const options = {\n method: 'POST',\n uri: `${config.apiUrl}/login`,\n body: {\n email: config.email,\n password: config.password,\n },\n json: true,\n jar: true,\n };\n return rp(options);\n}", "function login() {\n var userName = document.getElementByI...
[ "0.6099407", "0.60687095", "0.5951552", "0.59325504", "0.5932293", "0.5892955", "0.58879197", "0.5881038", "0.58636683", "0.58636683", "0.5835075", "0.5811068", "0.576331", "0.5756426", "0.5708101", "0.5657542", "0.56437695", "0.56226635", "0.5619453", "0.5597869", "0.5595452...
0.51460296
83
Confirms the request to create a new user account.
onSubmit(newUserData) { signup(newUserData) .then(response => { generateSuccessDialog('Your account has been created!', 'Okay').then((result) => { // Log into the newly created account. (result.value) && this.handleSignIn(); }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async createUser () {\n\t\t// first create the user, unregistered...\n\t\tconst { email, fullName, username, passwordHash, timeZone, preferences } = this.request.body.user;\n\t\tconst user = await new UserCreator({\n\t\t\trequest: this,\n\t\t\texistingUser: this.existingUser\n\t\t}).createUser({\n\t\t\temail,\n\t\...
[ "0.7356507", "0.6886356", "0.6846425", "0.6842702", "0.6639316", "0.6570335", "0.65551394", "0.6427573", "0.6383594", "0.6376054", "0.6349593", "0.63425577", "0.6336647", "0.6305478", "0.6304194", "0.6291719", "0.62675923", "0.62505627", "0.62413025", "0.62329596", "0.6227787...
0.62732625
16
Sends the request to create a new user account.
handleSubmit(e) { e.preventDefault(); const formFields = this.state.formFields; if (formFields[PASSWORD_ID] !== formFields[CONFIRM_PASSWORD_ID]) { generateErrorDialog('Both passwords do not match. Please try again.'); } else { this.setState({ isCreating: true })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateUserAccount(pUsername, pPassword, pEmail) {\n return new Promise( (resolve , reject) => {\n Logg('Starting account creation request for ' + pUsername);\n let requestData = JSON.stringify({\n 'user': {\n 'username': pU...
[ "0.72453004", "0.7205028", "0.70556253", "0.69564104", "0.6889363", "0.6845343", "0.6803283", "0.6780884", "0.6780485", "0.6737235", "0.6693659", "0.6689691", "0.66717887", "0.6663871", "0.6531419", "0.64841294", "0.6466282", "0.6464748", "0.6464509", "0.64549726", "0.6444462...
0.0
-1
Updates a new user account field value within the component's state.
handleChange(formField, event) { const { formFields, formValidationStates } = this.state; formFields[formField] = event.target.value; formValidationStates[formField] = (event.target.value.length <= 0) ? "error" : null; this.setState({ formFields, formValidationStates }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateUser (field, newValue) {\n this.state[field] = newValue\n this.setState(this.state)\n }", "SET_ACCOUNT (state, account) {\n state.account = account\n }", "function setValuesToUpdate(account, name) {\n accountInput.value = account;\n nameInput.value = name;\n newPasswordInput.value...
[ "0.73588026", "0.66704375", "0.6667822", "0.66371036", "0.6627908", "0.6551804", "0.65430474", "0.65176374", "0.6434096", "0.64052576", "0.637144", "0.63606745", "0.63030636", "0.6302212", "0.6238706", "0.6231914", "0.62267387", "0.62229484", "0.62229484", "0.62169886", "0.61...
0.0
-1
Updates the component's state to indicate whether a username is chosen.
onChangeUsername() { this.setState({ isUsernameChosen: false }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUsername() {\n\t\tif(this.usernameText.textContent !== username)\n\t\t\trequestUsername(this.usernameText.textContent);\n\t}", "updateUser(textInput) {\n \n this.setState({ username: textInput });\n return true;\n }", "_changeUsername(evt) {\n var newState = this._mergeWithCurre...
[ "0.7114875", "0.70980275", "0.70294", "0.69885814", "0.6803222", "0.6798023", "0.66352105", "0.6622784", "0.66206056", "0.66206056", "0.66150194", "0.6606127", "0.6604691", "0.6582152", "0.6577458", "0.65674937", "0.6567267", "0.65463865", "0.65418273", "0.6534692", "0.652606...
0.7784254
0
Checks whether a given username is available to be taken.
checkUsernameAvailability(e) { e.preventDefault(); this.setState({ isCheckingUsername: true }); checkUsernameAvailability(this.state.formFields[USERNAME_ID]) .then(response => { if (!response.usernameExists) { // Assumes the username is available....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isUsernameAvailable(username) {\n return __awaiter(this, void 0, void 0, function* () {\n if (username == null) {\n throw new nullargumenterror_1.NullArgumentError('username');\n }\n return this.users.find(u => u.username == username) != null;\n });\n ...
[ "0.78064364", "0.7781808", "0.73387253", "0.72468525", "0.7148533", "0.71134466", "0.71086967", "0.7102897", "0.71020365", "0.70493", "0.70045525", "0.6943472", "0.69399345", "0.6937493", "0.6928069", "0.69212794", "0.68966115", "0.6867435", "0.68455946", "0.6844771", "0.6818...
0.62135994
82
Generates a popover to inform the user of restrictions on the password.
static generatePasswordPopover() { return <Popover id={"password-info-popover"}>Your password must be between 5 and 21 characters.</Popover>; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function password(){\n\t\t\n\t\t\tvar a = document.getElementById(\"pwd1\").value;\n\t\t\tif(a.length <= 8 ){\n\t\t\t\tdocument.getElementById(\"pwd1Hint\").style.display ='block';\n\t\t\t\n\t\t\t}\n\t\t\tif(a.length >= 8){\n\t\t\t\tdocument.getElementById(\"pwd1Hint\").style.display ='none';\n\t\t\t}\n\t\t\n\t\t\...
[ "0.65975875", "0.64820236", "0.6377314", "0.63514036", "0.6343221", "0.62805563", "0.62452173", "0.62052304", "0.6171983", "0.6144349", "0.61305934", "0.610919", "0.605453", "0.6009256", "0.5997442", "0.59919155", "0.59819686", "0.59665024", "0.59512836", "0.5939791", "0.5920...
0.8611343
0
Generates a form for the user to enter the details of the new account.
generateUserDetailForm() { const { formValidationStates, formFields, isCreating } = this.state; return ( <Panel> <Panel.Heading> <Panel.Title componentClass="h3">2. Fill out your details</Panel.Title> </Panel.Heading> <Pane...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializePage_createAccount()\r\n{\r\n page_createAccount.initializeForm(page_createUserAccount);\r\n}", "createAccount() {\n if (document.getElementById('newaccount-name').value == '')\n return;\n let options = {\n username: '',\n group: '',\n ...
[ "0.6774513", "0.65525466", "0.6470031", "0.6387814", "0.6265893", "0.62107235", "0.6182267", "0.6173267", "0.61721617", "0.6167479", "0.61238843", "0.6100848", "0.6088673", "0.60762495", "0.6059975", "0.60151786", "0.5991663", "0.5988557", "0.5986785", "0.5955528", "0.5946619...
0.5791977
34
if not vertical, then horizontal
function createWall(wallLenght, startTileX, startTileZ, vertical, name) { wallLenght = TILE_SIZE * wallLenght; var thisWallTexture = new THREE.TextureLoader().load("./Assets/Textures/wall.png"); thisWallTexture.wrapS = THREE.RepeatWrapping; thisWallTexture.wrapT = THREE.RepeatWrapping; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get isHorizontal() {\n return true;\n }", "get isHorizontal() {\n return true;\n }", "_isHorizontal() {\n return this.orientation === 'horizontal';\n }", "isVertical(position) {\n return position === 'left';\n }", "get horizontalOrientation() {\n return this.navBarLocation === ...
[ "0.7700206", "0.7700206", "0.74257845", "0.6818467", "0.6464", "0.63224506", "0.63224506", "0.63133293", "0.6277719", "0.62086403", "0.6158792", "0.61194986", "0.60096747", "0.59580505", "0.5929478", "0.5913392", "0.590738", "0.584129", "0.5822217", "0.5816648", "0.58161545",...
0.0
-1
Window Resize Event Handler
function onWindowResize() { camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); renderer.setSize(window.innerWidth, window.innerHeight); canvas.style.width = "100%"; stage.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onWindowResize() {\n updateSizes();\n }", "function onWindowResize() {\n\n\t\t\t}", "function edgtfOnWindowResize() {\n }", "function windowResized() {\n resize();\n redraw();\n}", "function onWindowResize() {\n\tonAggregateResize();\n}", "function handleResize(){\r\n console.log...
[ "0.8553968", "0.84318626", "0.8233521", "0.8222991", "0.8089492", "0.808056", "0.8061946", "0.80494857", "0.80315614", "0.8011325", "0.79331565", "0.7932174", "0.79200506", "0.78974986", "0.78883576", "0.7872633", "0.7872633", "0.7872633", "0.7872633", "0.7872633", "0.7872633...
0.0
-1
Add Frame Rate Stats to the Scene
function addStatsObject() { stats = new Stats(); stats.setMode(0); stats.domElement.style.position = 'absolute'; stats.domElement.style.left = '0px'; stats.domElement.style.top = '0px'; document.body.appendChild(stats.domElement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupStats() {\n stats = new Stats();\n stats.setMode(0); // set to fps\n // align bottom-right\n stats.domElement.style.position = 'absolute';\n stats.domElement.style.left = '650px';\n stats.domElement.style.top = '10px';\n document.body.appendChild(stats.domElement);\n}", "functi...
[ "0.6703742", "0.6703742", "0.6703742", "0.66859853", "0.66695374", "0.6648791", "0.66316944", "0.66316944", "0.66316944", "0.65845966", "0.65845966", "0.6486333", "0.63329804", "0.6331787", "0.6283833", "0.6261741", "0.6242634", "0.61993587", "0.61993587", "0.61843", "0.61764...
0.60491765
28
Setup main game loop
function gameLoop() { if (!gameFinished) { scoreValue += clock.getDelta(); scoreLabel.text = "Time: " + Math.round(scoreValue); checkControls(); } stats.update(); stage.update(); // render using requestAnimationFrame requestAnimationFra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() {\n\tsetup();\n\tmainLoop();\n}", "function init() {\n\t\t// reset will display start game screen when screen is designed\n\t\treset();\n\n\t\t// lastTime required for game loop\n\t\tlastTime = Date.now();\n\n\t\tmain();\n\t}", "function main_loop()\n{\n /* Update mouse position */\n\tu...
[ "0.7783325", "0.7544473", "0.74189484", "0.732637", "0.7296907", "0.727944", "0.7266212", "0.7207931", "0.718726", "0.70931095", "0.70901656", "0.70546186", "0.7043976", "0.70107347", "0.69646513", "0.6957796", "0.69133556", "0.6877622", "0.6875008", "0.68655", "0.68328935", ...
0.0
-1
Setup main camera for the scene
function setupCamera() { camera = new PerspectiveCamera(35, config.Screen.RATIO, 0.1, 300); camera.position.set(0, 8, 20); //camera.rotation.set(0,0,0); //camera.lookAt(player.position); console.log("Finished setting up Camera..." + "with x" + camera.rotation.x + " y:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupCamera() {\r\n //camera = new PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);\r\n camera = new PerspectiveCamera(85, window.innerWidth / window.innerHeight, 0.1, 1000);\r\n camera.position.x = 30;\r\n camera.position.y = 20;\r\n camera.position.z = 0;\r\n c...
[ "0.7707577", "0.7695122", "0.7599863", "0.7579661", "0.7574333", "0.7532702", "0.7512882", "0.75049806", "0.7439028", "0.73965245", "0.7366085", "0.7349715", "0.7318774", "0.73019814", "0.7275818", "0.7246716", "0.7238197", "0.72380316", "0.7230736", "0.71991736", "0.7171043"...
0.78421336
0
Update the row for the given login, setting the unit associations and permissions
function UpdateRecord(login){ var row = GetRowFor(login); //The current row in the table var rowElement = row.get(0); //Get the user's roles and permissions, then push them into arrays and then join them into readable strings var roles = $("#user-info-roles tbody tr td:first-child"); var units = $("#user...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateAdminUser(properties, success, failure) {\n if (!self.loggedInUser) {\n failure();\n }\n apiRequest(\"PUT\", \"/management/users/\" + self.loggedInUser.uuid, null, JSON.stringify(properties), success, failure);\n }", "function updateFunit(adSql,params, asObjectRow){\n ...
[ "0.5539005", "0.54793644", "0.5331002", "0.5296418", "0.5295291", "0.5251523", "0.52443826", "0.52146447", "0.5144595", "0.5096695", "0.50508356", "0.50317633", "0.5023991", "0.5012915", "0.5008351", "0.49933764", "0.4986359", "0.49849543", "0.49710602", "0.49671718", "0.4966...
0.6893549
0
Initializes the statusbar and the onscreen console.
init() { // Store required containers for faster access. this._userContainer = document.querySelector("#statusbar-user-position"); this._pointerContainer = document.querySelector("#statusbar-pointer-position"); this._speedContainer = document.querySelector("#statusbar-speed"); this._inputField...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialization(){\n try{\n statusBar('Inicializando...');\n \n setContextMenu();\n ChangedItens = new Hash();\n startChangedMonitor();\n\n }catch(E){\n raiseException(E);\n }finally{\n statusBar('');\n }\n\n}", "function initGoStatusBar() {\n return __awaiter(this, void 0, voi...
[ "0.69824123", "0.6504204", "0.63879114", "0.63551265", "0.63307846", "0.6302387", "0.6295368", "0.6218914", "0.61401796", "0.6110941", "0.61078", "0.60890466", "0.60861254", "0.6044785", "0.6029048", "0.6007909", "0.5985576", "0.59805804", "0.5945205", "0.5917768", "0.5845707...
0.6224353
7
This is called once a frame and updates all status div's of the statusbar.
update() { let pos = CosmoScout.state.pointerPosition; if (pos !== undefined) { this._pointerContainer.innerText = `${CosmoScout.utils.formatLongitude(pos[0]) + CosmoScout.utils.formatLatitude(pos[1])}(${ CosmoScout.utils.formatHeight(pos[2])})`; } else { this._pointerCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStatusBar(text) {\n $('#status-bar').html(text);\n}", "function initStatusBar() {\n if(OBJECTS.STATUS_TIMER == null) {\n var html = '<li class=\"status-item hide\"><span class=\"bold\">Hi <span id=\"jbmnpls-status-user-name\"></span>!</span></li>';\n html += '<li class=\"status-it...
[ "0.7050215", "0.67449415", "0.6651992", "0.645126", "0.64230704", "0.6378549", "0.63644433", "0.63593453", "0.63311183", "0.63099617", "0.6253378", "0.6229583", "0.6224215", "0.62080616", "0.6199325", "0.6191897", "0.61790484", "0.61228144", "0.61082417", "0.609719", "0.60800...
0.0
-1
Function to display course subject section
function Tasks() { const listTasks = tasksObj.map(task => ( <Col> {/*--- subject cards with icons --- */} <Card style={{ width: "18rem" }}> <Card.Img variant="top" src={task.task_img} alt="logo" width="50" height="120" /> <Card....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubjects(val) {\n fetch(`get_student.php?sectionid=${val}`).then(s => s).then(s => s.text()).then(s => {\n if (s) {\n document.getElementById('subject').innerHTML = s;\n document.getElementById('subjectName').style.display = \"block\";\n } else {\n docu...
[ "0.6740486", "0.63614744", "0.63027394", "0.62931526", "0.6247182", "0.6210447", "0.6199832", "0.60910636", "0.60317725", "0.5919496", "0.58925825", "0.5892223", "0.5882084", "0.58676827", "0.5856808", "0.5790793", "0.5758433", "0.57442963", "0.574292", "0.5740218", "0.571629...
0.0
-1
Complete the startDbAndServer function, which connects to the MongoDB server and creates a Node web server listening to port 3000.
async function startDbAndServer() { db = await mongodb.connect(MONGO_URL); collection = db.collection('card'); await app.listen(3000); console.log('It is on 3000'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start() {\n\n\tMongoClient.connect(settings.MONGO_CONNECTION_STRING, function (err, database) {\n\t\tif (err) {\n\t\t\tlog.error(err, 'Couldn\\'t connect to MongoDB. Did you start it?\\n' +\n\t\t\t\t'Try running `mongod` in another terminal window.');\n\t\t\tlog.error('Killing server process');\n\t\t\t// ...
[ "0.7623248", "0.7475686", "0.7342288", "0.72181326", "0.7187202", "0.71813303", "0.7036124", "0.689427", "0.6883802", "0.6795782", "0.67877656", "0.6777123", "0.67315537", "0.6695948", "0.6677498", "0.6664704", "0.66158193", "0.65832436", "0.6569474", "0.6559589", "0.6555646"...
0.7899811
0
Complete the onGetCard function, which takes in an HTTP request 'req'. 'req' is sent when _loadCard() in "public/js/cardview.js" is executed or when a URL (e.g., is entered in your browser. The request sends a cardID to the Node server. The cardID is also a document ID in MongoDB. After receiving the request, the Node ...
async function onGetCard(req, res) { const cardId = req.params.cardId; const response = await collection.findOne({_id: ObjectID(cardId)}); await res.json({message: response.message, style: response.style}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCard(req, res, next) {\n cardsDB.findById(req.params.id)\n .then((card) => {\n res.locals.card = card;\n next();\n })\n .catch(err => next(err));\n }", "function getCard() {\n if (!this.classList.contains(\"unfound\")) {\n let id = this.id;\n let u...
[ "0.6510219", "0.5955331", "0.5927862", "0.5837637", "0.57371974", "0.5717702", "0.56913257", "0.5590093", "0.55449057", "0.55445904", "0.55437666", "0.5470973", "0.54274863", "0.5393747", "0.53357786", "0.5332203", "0.52334756", "0.52284217", "0.52277744", "0.5227675", "0.521...
0.73726755
0
Start the express app
function init() { app.listen(port, function() { console.log('You\'re app is now ready at http://localhost:' + port); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startExpress() {\n\n http.createServer(app).listen(app.get('port'), () => {\n console.log('Web server is running on ', app.get('port'));\n });\n}", "function startExpress() {\n var express = require('express');\n var app = express();\n app.use(express.static(__dirname));\n app.l...
[ "0.8054079", "0.79073715", "0.78363925", "0.7764529", "0.77635664", "0.76756865", "0.75669897", "0.7561625", "0.7549896", "0.74055666", "0.7386084", "0.73726916", "0.7365759", "0.7351787", "0.7284473", "0.7246946", "0.718945", "0.718638", "0.7171967", "0.7156616", "0.7151783"...
0.0
-1
Marcar student como flunked se a grade for menor que 5 e enviar mensagem
function markAsFlunked(student) { student.flunked = false; if (student.grade < 5) { student.flunked = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gradecalc(firstInSem, secondInSem, finalSem, assignment, attendance)\r\n {\r\n\tvar total = (firstInSem * 30) / 100 + (secondInSem * 30) / 100 + (finalSem * 50) / 100 + (assignment) + (attendance);\r\n\tvar grade = total.toFixed(2);\r\n\tdocument.getElementById('gradeObject').innerHTML = (\"Your Marks :-\...
[ "0.6932025", "0.6874126", "0.68239474", "0.68138117", "0.68046016", "0.68045396", "0.67403406", "0.6737629", "0.6704175", "0.66527027", "0.66496545", "0.6626211", "0.65962714", "0.6581479", "0.6573007", "0.65646577", "0.6544897", "0.6529168", "0.6519407", "0.6493893", "0.6471...
0.0
-1
this is on the front end , we need to access the backend
async unlockEthAccount(password) { var self = this; var address = transferComponent.selectedAddress; var data = await this.socketClient.emitToSocket('unlockAccount',{address:address,password:password}); var error = null; var account; if(data.success) { account = data.account; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doSomethingAfterRendering(){\n displayLoading() // 로딩화면 보여주기\n fetchServer(); // 서버에서 데이터 가져오기\n }", "async index({request, response}) {\r\n\r\n\t\t\r\n\t}", "print(request, response) {\n let repoSeller = new repoSellers();\n // console.log('ici 3')\n repoSeller.getallSelle...
[ "0.61693096", "0.6022307", "0.5959701", "0.588759", "0.58839756", "0.57479393", "0.5728417", "0.57109934", "0.5708563", "0.5704965", "0.56111276", "0.56086105", "0.5596504", "0.5579279", "0.5577978", "0.557751", "0.556877", "0.5532668", "0.55316675", "0.5524958", "0.55245954"...
0.0
-1
preloading all the images and sound from the asset folder
function preload(){ tree = loadImage("assets/tree.png"); bgImage = loadImage("assets/bgImage.jpg"); basket = loadImage("assets/Plate.png"); apple = loadImage("assets/apple.png"); reset = loadImage("assets/reset.png"); startImg = loadImage("assets/startimg.png"); mysound =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preload() {\n\n\n //LoadSounds();\n //LoadAssets();\n \n\n}", "preload() {\n // this.load.audio('start', './assets/start.wav');\n // this.load.audio('siren', './assets/siren.wav');\n this.load.path = \"./assets/\"\n this.load.image('logo', 'Title.png');\n this.load.i...
[ "0.8000429", "0.7618543", "0.75934964", "0.75934964", "0.75474644", "0.7538099", "0.75307107", "0.75182635", "0.7501781", "0.74655914", "0.7455154", "0.7447129", "0.74356216", "0.7434526", "0.7425502", "0.7386632", "0.7381344", "0.73711115", "0.7365639", "0.7355957", "0.73507...
0.74641633
10
creating the canvas, also some variables that uses width and height of the canvas
function setup() { createCanvas(windowWidth, windowHeight); x = width/2; y = height/2; basketY = height - 10; basketX = x; startX = width - resetSize; startY = 100; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createCanvas() {\n this.canvas = document.createElement('canvas');\n this.canvas.width = this.width * this.resolution;\n this.canvas.height = this.height * this.resolution;\n this.context = this.canvas.getContext('2d');\n }", "createCanvas(){\n this.myCanvasHolder = document.querySelector(\"....
[ "0.79813766", "0.7858365", "0.7829185", "0.78273916", "0.77015716", "0.7600792", "0.76006126", "0.75800395", "0.75665206", "0.75590605", "0.7498578", "0.746777", "0.7426931", "0.7386584", "0.7383763", "0.7311903", "0.72538215", "0.7250221", "0.7248208", "0.723652", "0.7199297...
0.0
-1
draw all the functions
function draw() { imageMode(CORNER); background(bgImage); displaystart(); // explainning screen if (state === "starting"){ startscreen(); } // playing screen else if (state === "playing"){ gameplaying(); } // showing the screen when game ends else if (state == "end"){ gameEnded();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_draw_all(){\r\n\t\tthis._draw_bg();\r\n\t\tthis._draw_fg();\r\n\t}", "draw() {}", "draw() {}", "draw() {}", "draw() {}", "draw(){\n }", "_draw() {\n\n }", "function draw() {}", "function draw() {}", "draw() {\n }", "draw() { }", "draw() { }", "draw() { }", "draw() {\n ...
[ "0.77652967", "0.7412131", "0.7412131", "0.7412131", "0.7412131", "0.739529", "0.73921686", "0.73906064", "0.73906064", "0.7334329", "0.7305027", "0.7305027", "0.7305027", "0.7295741", "0.7290142", "0.7217505", "0.7215575", "0.7215575", "0.7215575", "0.70530695", "0.7002938",...
0.0
-1
resizing window, if it's not fullscreen
function windowResized() { setup(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onExitFullscreen() {\n this.setSize(this._initWidth, this._initHeight)\n }", "function windowResized() {\n\n getWrapperWidth();\n resizeCanvas(wrapperWide, wrapperWide);\n\n widthVar = (width - 40) / 100;\n drawArea = (width - 40);\n\n switchBox();\n}", "function windowResized() {\n resize();\n ...
[ "0.78422815", "0.76980966", "0.76822996", "0.75447416", "0.7537683", "0.7514025", "0.7514025", "0.7514025", "0.7514025", "0.7487619", "0.74771726", "0.74732536", "0.7390868", "0.7389162", "0.73871076", "0.7386664", "0.7386664", "0.73815066", "0.7367857", "0.7340399", "0.73403...
0.7285359
64
state or screen of beginning of the game
function startscreen(){ instruction(); restart(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n if (this.state == STATES.WAITING || this.state == STATES.GAMEOVER) {\n var d = new Date();\n var t = d.getTime();\n this.gameStart = t;\n this.gameStart2 = t;\n this.gameMode = this.scene.gameMode;\n this.gameLevel = this.scene.ga...
[ "0.7533316", "0.74962276", "0.7192422", "0.7100645", "0.7084994", "0.7054337", "0.7040786", "0.70314264", "0.70158875", "0.6994162", "0.69798744", "0.69677055", "0.6965938", "0.6943564", "0.69067013", "0.6883194", "0.6852126", "0.68345314", "0.6815062", "0.6813001", "0.680832...
0.0
-1
state or screen while playing the game. Basket touching the apple, showing score, tree,
function gameplaying(){ displayreset(); displayTree(); displayApple(); fill(0); textSize(35); text("SCORE = " + score, 120, 40); movingBasket(); appleHitsBasket(); dead(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eatApple() {\n if (snake[snake.length - 1] === apple) {\n squares[apple].classList.remove(\"apple\");\n snake.push(apple);\n insertApple();\n level++;\n currentScore.textContent = level;\n }\n}", "function appleHitsBasket(){\n if (appleY > basketY && appleX < basketX + basketSize/2 && ...
[ "0.6401659", "0.6360555", "0.6242438", "0.6223387", "0.6214072", "0.61869544", "0.61679536", "0.6151675", "0.6146315", "0.61065847", "0.6087154", "0.6044564", "0.6036197", "0.6035781", "0.6016443", "0.6003666", "0.5980839", "0.59795755", "0.5971298", "0.59510297", "0.5936512"...
0.7556344
0
the state or screen at the end of the game. Showing score and instruction
function gameEnded(){ textAlign(CENTER); fill (0); textSize(50); text ("Game Over!!", x, y); text ("SCORE = " + score, x, y + 70); textSize(45); fill(255); text ("Click on the 'start button' to go back to the menu page", x , y + 185); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGame() {\n // Overlay\n // Show score\n // Show table \n // Give user chance to restart\n // TODO: add high score to renderGUI\n\n uploadScore(score);\n score = 0;\n}", "function gameEnd(){\n\t\tconsole.log(\"gameend FN works!\")\n\t\t$(\".triviascreen\").hide();\n\t\t$(\".scores...
[ "0.7518922", "0.73393214", "0.7289404", "0.71328866", "0.70526403", "0.70111465", "0.69679946", "0.69074535", "0.69060314", "0.6869517", "0.68670505", "0.686412", "0.68615717", "0.6860134", "0.6856417", "0.6846406", "0.67968374", "0.67882246", "0.6772767", "0.67717487", "0.67...
0.66423976
35
showup the apple while moving
function displayApple(){ noStroke(); image(apple, appleX, appleY, appleSize, appleSize); appleY += speed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "show() {\n // Fill Red\n fill(255, 0, 0);\n // draw a rectangle to show food\n rect(this.pos.x, this.pos.y, scl, scl);\n }", "function displayFood() {\n push();\n noStroke();\n fill(food.color);\n ellipse(food.x,food.y,food.size);\n pop();\n}", "show() {\n fill(this.c);\n stroke...
[ "0.68363947", "0.656111", "0.65321374", "0.65086836", "0.65033925", "0.6282714", "0.62819254", "0.62714297", "0.6217967", "0.621236", "0.61524636", "0.61479235", "0.61031485", "0.61025316", "0.6098173", "0.60582167", "0.6055181", "0.60071856", "0.59985775", "0.5967545", "0.59...
0.758189
0
moving the basket using arrow keys
function movingBasket() { noStroke(); imageMode(CENTER); image(basket, basketX, basketY, basketSize, basketSize); if (keyIsPressed){ if (keyCode === LEFT_ARROW) { basketX = basketX - 12; } else if (keyCode === RIGHT_ARROW) { basketX = basketX + 12; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveBear() {\n if (key == 'w') {\n bearY--;\n } else if (key == 'a') {\n bearX--;\n } else if (key == 's') {\n bearY++;\n } else if (key == 'd') {\n bearX++;\n }\n}", "function move_car(e)\n{\n switch(e.keyCode)\n {\n case 37:\n //left key pressed\n bl...
[ "0.66070783", "0.65877366", "0.6493196", "0.6493099", "0.6440329", "0.64223313", "0.6417962", "0.64074373", "0.63983965", "0.6391703", "0.6361332", "0.63386244", "0.6316058", "0.63012713", "0.6297922", "0.6283392", "0.6276319", "0.62379515", "0.6216673", "0.6214974", "0.62052...
0.75556576
0
picking a random x cor for apple
function choosingRandomAppleX(){ appleX = random(300, width-300); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomizeApple(){\n let x = Math.random() * canvas.width;\n let y = Math.random() * canvas.height;\n \n x -= x % 10;\n y -= y % 10;\n\n let apple = new Apple(x, y);\n\n apple.correctPosition();\n\n appleArr.push(apple)...
[ "0.71361494", "0.6760814", "0.6734702", "0.6700748", "0.6670777", "0.66631454", "0.6642321", "0.6637043", "0.6612682", "0.65947217", "0.65932494", "0.6572753", "0.6535278", "0.65310794", "0.65310794", "0.6521313", "0.64901525", "0.64649844", "0.64640075", "0.6428693", "0.6404...
0.7907559
0
when apple hits basket, add score, increase speed, play sound, and picking random apple x cor
function appleHitsBasket(){ if (appleY > basketY && appleX < basketX + basketSize/2 && appleX > basketX - basketSize/2){ appleY = 200; speed += 0.3; score ++; mysound.play(); choosingRandomAppleX(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function elfAndApple(hitApple) {\n var point1 = new createjs.Point();\n var point2 = new createjs.Point();\n\n point1.x = elf.image.x;\n point1.y = elf.image.y;\n point2.x = hitApple.image.x;\n point2.y = hitApple.image.y;\n if (distance(point1, point2) < ((elf.width * 0.5) + (hitApple.width *...
[ "0.7046207", "0.6923221", "0.6902621", "0.69004154", "0.67695695", "0.6667465", "0.66656166", "0.6658754", "0.6643408", "0.65930134", "0.6585753", "0.653678", "0.6520092", "0.65048766", "0.64973515", "0.64351165", "0.6434735", "0.6390069", "0.6347868", "0.6330748", "0.6324894...
0.8528614
0
changes the states if mouse clicks the start button
function mousePressed(){ let ds = dist (mouseX, mouseY, startX, startY); if (ds < startSize) { lastTimeSwitched = millis(); if(state=== "starting"){ state = "playing"; } else if(state === "end"){ state = "starting"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseClicked() {\n if (start.buttonEnabled) {\n if (start.clicked()) {\n console.log(\"Start Clicked\");\n turbo.shouldMove = true;\n start.visible = false;\n start.buttonEnabled = false;\n gameState = \"Running\";\n }\n }\n\n if (reset.buttonEnabled) {\n if (reset.cli...
[ "0.7561114", "0.7548142", "0.71074986", "0.7067674", "0.7031265", "0.6990007", "0.67971104", "0.6793022", "0.67893684", "0.67644095", "0.6689642", "0.6687042", "0.6677767", "0.6667143", "0.6660345", "0.663303", "0.6602663", "0.66015047", "0.65552396", "0.65502554", "0.6534338...
0.679548
7
if apple doesn't get touched by the basket game ends also the time limit is 1 min before the game ends
function dead(){ if (appleY > height){ state = "end"; } else if (millis() > lastTimeSwitched + gametime){ state = "end"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appleHitsBasket(){\n if (appleY > basketY && appleX < basketX + basketSize/2 && appleX > basketX - basketSize/2){\n appleY = 200;\n speed += 0.3;\n score ++;\n mysound.play();\n choosingRandomAppleX();\n\n }\n}", "checkApples() {\r\n let collision=collideRectRect(this.x, this.y, this...
[ "0.6602694", "0.6369515", "0.6346846", "0.62884897", "0.6278094", "0.6277589", "0.62735164", "0.62456095", "0.6191946", "0.61744934", "0.61514825", "0.6140933", "0.6116213", "0.6112252", "0.6057899", "0.6051034", "0.6050526", "0.60100883", "0.6007741", "0.5996868", "0.5996774...
0.63033044
3
restart to how it started
function restart(){ speed = 1; score = 0; appleY = 200; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "restart() {}", "function restart() {}", "Restart() {\n\n }", "restart() {\n super.restart()\n }", "relaunch() {}", "function restart() {\n let restartBtn = document.querySelector('#restart');\n restartBtn.addEventListener('click', reload);\n function re...
[ "0.88911533", "0.8590362", "0.8199279", "0.8154054", "0.75048375", "0.7450369", "0.73137534", "0.73117113", "0.72731626", "0.7219127", "0.7195313", "0.7194149", "0.7192208", "0.7143687", "0.7133564", "0.7115678", "0.7099722", "0.7086906", "0.7086906", "0.70751977", "0.7066343...
0.0
-1
restart everything if reset button clicked
function mouseClicked(){ let dr = dist (mouseX, mouseY, resetX, resetY); if ( dr < resetSize){ restart(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function actionOnResetClick () {\n gameRestart();\n }", "function reset() { }", "function resetear() {\n eliminarIntegrantesAnteriores();\n ocultarbotonCalculo();\n ocultarIntegrantes();\n ocultarTextoResultado();\n vaciarValorInput();\n}", "function reset() {\n\n ...
[ "0.7934787", "0.78014654", "0.7750658", "0.7697406", "0.7666171", "0.76424605", "0.76158434", "0.75424796", "0.7512282", "0.7419596", "0.74154717", "0.74031377", "0.7393669", "0.73860705", "0.73368394", "0.73306346", "0.73048884", "0.73008806", "0.7288792", "0.7266308", "0.72...
0.0
-1
write a function that takes an integer, n, and prints out a triangle of base n to the console, ex: using a for loop, start at 1 and count to n for each count, print a row with '' repeated n times
function makeTriangle(n) { for (let i = 1; i <= n; i++) { console.log('#'.repeat(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numericalTriangle(n) {\n let str = '';\n for (let i = 1; i <= n; i++) {\n for (let j = 1; j <= i; j++) {\n if (j === i) str += i;\n else str += i + ' ';\n }\n if (i !== n) str += '\\n';\n }\n return str;\n}", "function printTriangle (n) {\r\n \r\n var line = '';\r\n\r\n f...
[ "0.8151221", "0.80827653", "0.80551666", "0.77673346", "0.767482", "0.76399386", "0.75984085", "0.7580686", "0.7550513", "0.7542905", "0.75359154", "0.75289404", "0.75136787", "0.7474583", "0.7392114", "0.73710424", "0.7315524", "0.73027575", "0.729358", "0.72596", "0.7237812...
0.8562831
0
create a product option data
create(OrderOptionData) { return tslib_1.__awaiter(this, void 0, void 0, function* () { this.log.info('create order option data'); return this.orderOptionRepository.save(OrderOptionData); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createPayloadOption(selection, data) {\r\n // Grab the name and option value\r\n let name = selection.data.option.name\r\n let type = selection.data.option.type\r\n let value = selection.data.name\r\n \r\n // Grab any server generated IDs related to the orderOption\r\n ...
[ "0.70898545", "0.63850474", "0.62182796", "0.6197729", "0.6196173", "0.6133398", "0.61045283", "0.60968375", "0.60804266", "0.60750943", "0.6050384", "0.60416806", "0.60248286", "0.601532", "0.59711456", "0.59385365", "0.59291923", "0.59153265", "0.59135795", "0.59059864", "0...
0.59105426
19
findone product option a data
findOne(id) { this.log.info('Find a order option data'); return this.orderOptionRepository.findOne(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseProduct(el){\n return searchProduct($(el).closest(\"section\").data(\"store\"), $(el).data(\"productid\"));\n }", "function obtenerDatosProducto(producto) {\n console.log(producto)\n const productoAgregado = menu.find((item) => producto === `sku_${item.id}`)\n}", "selectProduct(selec...
[ "0.73888373", "0.6433652", "0.61072856", "0.6095629", "0.60936093", "0.5980876", "0.597871", "0.5944176", "0.5923551", "0.5917732", "0.58803034", "0.5842637", "0.58219755", "0.5815235", "0.5815144", "0.57953244", "0.5794215", "0.5791206", "0.57587886", "0.57504207", "0.571449...
0.5555738
36
find product option a data
find(option) { this.log.info('Find a order option data'); return this.orderOptionRepository.find(option); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseProduct(el){\n return searchProduct($(el).closest(\"section\").data(\"store\"), $(el).data(\"productid\"));\n }", "function findOpt(data, searchon, searchval, retrieve){\n for (i=0; i<data.length; i++) { \n if (data[i][searchon] == searchval){\n return data[i][retrie...
[ "0.72596735", "0.63173777", "0.6261341", "0.5887848", "0.586939", "0.586752", "0.5858933", "0.58501077", "0.58344895", "0.58143336", "0.5794064", "0.57752246", "0.57056665", "0.5692823", "0.56707215", "0.5644603", "0.5632634", "0.56227213", "0.5611033", "0.5585847", "0.557938...
0.59600526
3
end document ready / set skill percent ===========================================
function set_skill_percent(){ $('.skill-percent-line').each(function() { var width = $(this).data( "width" ); $( this ).animate({width: width+'%'}, 1000 ); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPercents() {\n\t\tfor (i = 0; i < skill.length; i++) {\n\t $('#skills ul li' + '#' + skill[i].name).css( {width: skill[i].percent} );\n\t }\n\t}", "get skillChance() {\n return (this.Dexterity + this.Intelligence + this.Luck)/2;\n }", "function set_skill_percent() {\n $('.skill...
[ "0.70850897", "0.6882511", "0.6827038", "0.6400523", "0.6340604", "0.62812775", "0.6247698", "0.62113917", "0.62113917", "0.61840016", "0.6169479", "0.6145999", "0.61426187", "0.612503", "0.6112573", "0.6074771", "0.60699266", "0.60686475", "0.6058603", "0.60300916", "0.59290...
0.67957264
3
scroll to section by id ===========================================
function goToByScroll(id){ id = id.replace("link", ""); $('html,body').animate({scrollTop: $("#"+id).offset().top},'slow'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function navigate_to(id){\n\t\t\t$('html, body').animate({scrollTop: $(\".section\"+id).offset().top}, 500);\n\t}", "function scrollTo( id ) {\n scroller.scrollTo( id );\n}", "function scrollToID(id) {\n document.querySelector('#'+id).scrollIntoView({\n behavior: 'smooth'\n });\n}", "function clFun(sec...
[ "0.8453114", "0.80713767", "0.79844415", "0.79533374", "0.77802694", "0.7775545", "0.7764904", "0.7764904", "0.7764236", "0.768055", "0.7652558", "0.76238036", "0.7607542", "0.75798887", "0.75729597", "0.7549395", "0.75150037", "0.75065494", "0.7499081", "0.7492982", "0.74575...
0.7576386
14
set up position ===========================================
function position_up(){ if ($(window).width() < 1024) { $('#up').css({right:'20px', bottom:'20px'}); } else { $('#up').removeAttr('style'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPosition() {\n if (container) {\n if (x < 0) {\n //out of left scope\n x = 0;\n } else if (x > container.width - width) {\n //out of right scope\n x = contain...
[ "0.76682943", "0.76142126", "0.7599374", "0.74216926", "0.7421647", "0.740197", "0.73580635", "0.7349603", "0.7227067", "0.72188914", "0.71990687", "0.71847016", "0.7140746", "0.7082697", "0.7047378", "0.7039368", "0.7021912", "0.70148736", "0.6970179", "0.693467", "0.6918628...
0.0
-1
Setting player choice function on hand1 left hand
function lefthand1() { hand1 = 0 document.getElementById("playerhand1").innerHTML = hand1; document.getElementById("playerhand1").style.backgroundImage = "url('../2ndproject-minigame/assets/images/fist.png')"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playerOneMadeChoice() {\n console.log(\"this is the player 1 choice: \", player1.choice);\n player1.choice ? true : false;\n }", "function decidePlayerOrComputer() {\r\n choiceComputerPlayer = this.value;\r\n}", "static choosingOpponent(){\n //console.info(\"step5\")\n ...
[ "0.7094685", "0.69087934", "0.6883218", "0.674505", "0.6683211", "0.6643047", "0.6537128", "0.6518152", "0.6444304", "0.64356905", "0.6419928", "0.6413087", "0.6394739", "0.63720715", "0.63578284", "0.63215417", "0.6321113", "0.6316006", "0.6314647", "0.6314439", "0.6311148",...
0.0
-1
Setting player choice function on hand 2 right hand
function righthand1() { hand2 = 0 document.getElementById("playerhand2").innerHTML = hand2 document.getElementById("playerhand2").style.backgroundImage = "url('../2ndproject-minigame/assets/images/fist.png')"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playerOneMadeChoice() {\n console.log(\"this is the player 1 choice: \", player1.choice);\n player1.choice ? true : false;\n }", "static choosingOpponent(){\n //console.info(\"step5\")\n KB.listen([\n {key: Const.KEYBOARD_INT, callback: Lands.choiceQttOst}, // 0-9\n ...
[ "0.7235167", "0.7212914", "0.7210394", "0.7017235", "0.69137675", "0.69006854", "0.6893495", "0.6886924", "0.6745501", "0.6735029", "0.67022437", "0.6687999", "0.66524714", "0.66409737", "0.66319656", "0.66319364", "0.66127264", "0.65691847", "0.65601295", "0.65426433", "0.65...
0.0
-1
Setting player guess function
function bet0() { playerguess = 0 document.getElementById("playerguess").innerHTML = "Player Guess: " + playerguess }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Guess() {\n var guessField = document.querySelector('#guessField');\r\n var userGuess = guessField.value;\n handleGuess(userGuess);\n}", "handleGuessHook() {}", "function processValidGuess(guess) {\n if (guess < aRandomNumber) {\n $('.result-line').text(\"That is too low\");\n } el...
[ "0.7154496", "0.705671", "0.6996814", "0.6950064", "0.6902323", "0.69006306", "0.6887068", "0.6878912", "0.68452495", "0.6830194", "0.6817989", "0.67903465", "0.6771837", "0.6770044", "0.6727705", "0.67101645", "0.67090845", "0.6702357", "0.66359985", "0.66347003", "0.6618696...
0.6260607
63
logic for restarting the game
function restartFunction() { if (gamecount === 10) { highscoreFunction() backtomenu() } else { var remain = 10 - gamecount $("#\\warning").modal({ backdrop: 'static', keyboard: false, }); $('#roundwarning').html("<span>There are still </spa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restart() {\n game.state.restart();\n}", "function restart() {}", "function onRestart() {\n setGame({\n cards: helpers.generateCards(),\n firstCard: undefined,\n });\n setStartTime(0);\n setElapsedTime(0);\n timeoutIds.current.forEach((id) => clearTimeout(id));\n timeoutId...
[ "0.8285474", "0.8128908", "0.808882", "0.7972618", "0.79123855", "0.7906112", "0.7865664", "0.78415984", "0.78000754", "0.7704406", "0.76932216", "0.768297", "0.76721", "0.7672033", "0.7659872", "0.76510686", "0.7650672", "0.76249754", "0.76013714", "0.75855833", "0.75854975"...
0.0
-1
function go back to menu
function backtomenu() { $(document).ready(function () { $("#menu").fadeIn("500"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function backToMenu() {\n location.reload();\n }", "function goBack(){\n // *Navigating back:\n window.history.back();\n }", "function actionOnClickBack() {\n\t\t\t//alert('Saldras de la carrera');\n\t\t\tgame.state.start('mainMenuState')\n\t\t}", "function Back() {\n\tmainMenuController.GetC...
[ "0.7930968", "0.7722553", "0.76973474", "0.7687385", "0.76608", "0.7621881", "0.7582861", "0.75682384", "0.7560906", "0.7524335", "0.7500245", "0.7500245", "0.7500245", "0.7479936", "0.7479607", "0.74540645", "0.7445473", "0.74390036", "0.7422211", "0.7415042", "0.74149305", ...
0.0
-1