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
Support: IE 8 only IE 8 doesn't resolve inherit to visible/hidden for computed values
function visible( element ) { var visibility = element.css( "visibility" ); while ( visibility === "inherit" ) { element = element.parent(); visibility = element.css( "visibility" ); } return visibility !== "hidden"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visible(element){var visibility=element.css(\"visibility\");while(visibility===\"inherit\"){element=element.parent();visibility=element.css(\"visibility\");}return visibility!==\"hidden\";}", "function visible(element){var visibility=element.css(\"visibility\");while(visibility===\"inherit\"){element=el...
[ "0.66355544", "0.66355544", "0.66355544", "0.6487797", "0.6461023", "0.6438592", "0.6343612", "0.6238187", "0.6237038", "0.6211611", "0.61272633", "0.60957015", "0.6080291", "0.60510796", "0.5942221", "0.59330004", "0.5923252", "0.5923252", "0.5923252", "0.58855456", "0.58851...
0.56517816
50
Date picker manager. Use the singleton instance of this class, $.datepicker, to interact with the date picker. Settings for (groups of) date pickers are maintained in an instance object, allowing multiple different settings on the same page.
function Datepicker() { this._curInst = null; // The current instance in use this._keyEvent = false; // If the last event was a key event this._disabledInputs = []; // List of date picker inputs that have been disabled this._datepickerShowing = false; // True if the popup picker is showing , false if not this._inD...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Datepicker() {\r\n\tthis.debug = false; // Change this to true to start debugging\r\n\tthis._nextId = 0; // Next ID for a date picker instance\r\n\tthis._inst = []; // List of instances indexed by ID\r\n\tthis._curInst = null; // The current instance in use\r\n\tthis._disabledInputs = []; // List of date ...
[ "0.74273753", "0.72829443", "0.72829443", "0.72829443", "0.72829443", "0.72829443", "0.72829443", "0.72829443", "0.72829443", "0.72829443", "0.71955395", "0.71955395", "0.7186703", "0.7186703", "0.7186703", "0.7186703", "0.7186703", "0.7186703", "0.7186703", "0.7186703", "0.7...
0.7161838
66
Bind hover events for datepicker elements. Done via delegate so the binding only occurs once in the lifetime of the parent div. Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
function datepicker_bindHover( dpDiv ) { var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; return dpDiv.on( "mouseout", selector, function() { $( this ).removeClass( "ui-state-hover" ); if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) { $( this ).re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function datepicker_bindHover(dpDiv){var selector=\"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";return dpDiv.delegate(selector,\"mouseout\",function(){$(this).removeClass(\"ui-state-hover\");if(this.className.indexOf(\"ui-datepicker-prev\") !== -1){$(this).removeClass(\"ui-date...
[ "0.7935252", "0.7904617", "0.7903467", "0.7903467", "0.7903467", "0.7887177", "0.78756547", "0.7867355", "0.7743127", "0.7694955", "0.7694955", "0.7694955", "0.7694955", "0.7694955", "0.7694955", "0.7694955", "0.7694955", "0.7694955", "0.7694955", "0.7694955", "0.7694955", ...
0.77573377
24
jQuery extend now ignores nulls!
function datepicker_extendRemove( target, props ) { $.extend( target, props ); for ( var name in props ) { if ( props[ name ] == null ) { target[ name ] = props[ name ]; } } return target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jQueryExtend() {\n var options, name, src, copy, copyIsArray, clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false;\n\n // Handle a deep copy situation\n if ( typeof target ==...
[ "0.7345751", "0.69615793", "0.6948535", "0.64522874", "0.61104524", "0.61104524", "0.6051032", "0.6051032", "0.5964918", "0.59626436", "0.59626436", "0.59626436", "0.59626436", "0.59626436", "0.59626436", "0.5940364", "0.59288716", "0.59288716", "0.59161204", "0.5907001", "0....
0.0
-1
Post events to containers
function delayEvent( type, instance, container ) { return function( event ) { container._trigger( type, event, instance._uiHash( instance ) ); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postEvents(req, res, next) {\n jackalopeApp.jackrabbitConnection.publish('queue.simple', req.body);\n res.status(200).end();\n }", "function registerEvents(Remci) {\n for(var e in events) {\n let event = events[e];\n Remci.post(e, emitEvent(event));\n }\n}", "function onContai...
[ "0.6496375", "0.63010883", "0.5960383", "0.5890177", "0.5843974", "0.5827947", "0.5778853", "0.57435614", "0.5645402", "0.56397086", "0.55770916", "0.55728555", "0.5566734", "0.5565772", "0.55490434", "0.55484766", "0.55384415", "0.5507436", "0.5482938", "0.54693615", "0.5421...
0.0
-1
! jQuery UI Spinner 1.12.1 Copyright jQuery Foundation and other contributors Released under the MIT license. >>label: Spinner >>group: Widgets >>description: Displays buttons to easily input numbers via the keyboard or mouse. >>docs: >>demos: >>css.structure: ../../themes/base/core.css >>css.structure: ../../themes/ba...
function spinnerModifer( fn ) { return function() { var previous = this.element.val(); fn.apply( this, arguments ); this._refresh(); if ( previous !== this.element.val() ) { this._trigger( "change" ); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function customSpinner() {\n\t$(\".spinner\").spinner({\n\t\tnumberFormat: \"n\",\n\t\tmin: 0\n\t});\n}", "_initQuantitySpinner() {\n $('#spinnerQuantity').spinner();\n }", "function loading() {\n\n var opts = {\n lines: 13, // The number of lines to draw\n length: 7, // The length of each...
[ "0.7480407", "0.72747725", "0.6951026", "0.6838331", "0.68114835", "0.66085505", "0.6585339", "0.65607965", "0.656062", "0.6557318", "0.655325", "0.65526116", "0.6364848", "0.6330671", "0.63282835", "0.63166267", "0.63128227", "0.6304382", "0.6275497", "0.6247222", "0.6246567...
0.0
-1
Create consent event in the Didomi API The organization user ID passed to the API is the user email by default. Update the `organization_user_id` field in the call to POST /consents/events to use a different organization user ID.
async function createConsentEvent(data, context) { if (!context.auth) { // The user is not authenticated, stop here throw new functions.https.HttpsError( "failed-precondition", "The function must be called while authenticated." ); } if (!data.consents || typeof data.consents !== "object")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createEvent() { \n \n var event = {\n 'summary': 'Google I/O 2015',\n 'location': '800 Howard St., San Francisco, CA 94103',\n 'description': 'A chance to hear more about Google\\'s developer products.',\n 'start': {\n 'dateTim...
[ "0.5885132", "0.5843879", "0.5825398", "0.5591217", "0.52640945", "0.5248725", "0.5159867", "0.5130848", "0.49998823", "0.49558407", "0.4911466", "0.49044278", "0.48894393", "0.48489395", "0.48193246", "0.48020336", "0.4786826", "0.47763467", "0.47721565", "0.47591147", "0.47...
0.7224993
0
set theme to materialui components
getChildContext() { return { muiTheme: getMuiTheme(baseTheme) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set theme(val) {\n this._theme = val;\n }", "setTheme(theme) {\n this.theme = theme;\n }", "setTheme(theme = {}) {\n this.colors.foreground = this._parseColor(theme.foreground, DEFAULT_FOREGROUND);\n this.colors.background = this._parseColor(theme.background, DEFAULT_BACKGROUN...
[ "0.73981756", "0.7251204", "0.7139327", "0.7134278", "0.7010736", "0.6988761", "0.6832381", "0.6832381", "0.6832381", "0.6832381", "0.6832381", "0.6809141", "0.676301", "0.6738511", "0.66836864", "0.6662906", "0.6662906", "0.6620187", "0.66078985", "0.6603392", "0.6603392", ...
0.61431277
93
allow selection of multiple homestays
activateMultipleChoice(event) { this.setState({"multipleChoice": true}) Session.set("limit",2) $(event.currentTarget).prop('disabled',true) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "selectHomestay(event) {\n let homestayId = $(event.currentTarget).attr('data-id');\n this.setState({\"error\": \"\"})\n if($(event.currentTarget).text()===\"Select\") {\n if(this.state.selectedHomestay.length<2) {\n this.state.selectedHomestay.push(homestayId)\n $(event.currentTarget).p...
[ "0.61863834", "0.5883219", "0.5865961", "0.57484424", "0.5575376", "0.553027", "0.55298096", "0.5459846", "0.5426037", "0.5389851", "0.5388478", "0.5372416", "0.53710085", "0.5359134", "0.5359134", "0.5354344", "0.5345407", "0.5338316", "0.53191143", "0.5258151", "0.5255799",...
0.0
-1
function to load more homestay suggestions
loadMoreSearchResult(event){ Session.set("limit",Session.get("limit")+6) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "suggestions() {\r\n return this.clone(MySocialQuery_1, \"suggestions\").get().then(r => {\r\n return hOP(r, \"Suggestions\") ? r.Suggestions.results : r;\r\n });\r\n }", "requestNewSuggestions () {\n let delay = atom.config.get('autocomplete-plus.autoActivationDelay')\n\n if (th...
[ "0.66134244", "0.6555335", "0.6473412", "0.645323", "0.64471394", "0.6421393", "0.63845575", "0.634447", "0.6309103", "0.6305559", "0.6300343", "0.6273734", "0.6260173", "0.62468195", "0.6239224", "0.6232954", "0.6230624", "0.6219333", "0.62168413", "0.62107223", "0.6181217",...
0.0
-1
function to select homestay
selectHomestay(event) { let homestayId = $(event.currentTarget).attr('data-id'); this.setState({"error": ""}) if($(event.currentTarget).text()==="Select") { if(this.state.selectedHomestay.length<2) { this.state.selectedHomestay.push(homestayId) $(event.currentTarget).parents(".homestay...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnHomeDetection(){\n if (state === 'piano' || state === 'guitar'){\n if(mouseIsPressed){\n if (mouseX > 25 && mouseX < 75 &&\n mouseY > 25 && mouseY < 75){\n state = 'menu';\n }\n }\n }\n}", "function gohome(){\n mouse_down = false;\n clearinfo();\n if (track_obj && ...
[ "0.6901648", "0.6803977", "0.6483608", "0.6455382", "0.63747734", "0.6370565", "0.62535447", "0.6233446", "0.6228535", "0.6213278", "0.61986494", "0.6182469", "0.6170044", "0.6169356", "0.61667234", "0.6164697", "0.6158482", "0.61532444", "0.6144141", "0.6108427", "0.6101875"...
0.58719414
28
function to redirect to payment page and store choices in db
paymentHandle(event){ let self = this; let bookingDetail = { choice2 : (this.state.selectedHomestay.length)? this.state.selectedHomestay[0] : "", choice3 : (this.state.selectedHomestay.length ===2) ? this.state.selectedHomestay[1]:"", multipleChoice : this.state.multipleChoice } if(thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkout() {\n if (bike_selected()) window.location.href = './payment.html';\n else alert('You must check out with a bike selection.');\n}", "function pay_installment(payment_id,from_action)\n{\n pass_info = payment_id;\n pass_info += \"&\"+from_action;\n window.location = \"/customer/pay_insta...
[ "0.6581998", "0.64076686", "0.6386283", "0.63676494", "0.6360001", "0.633275", "0.63254696", "0.63132435", "0.63100946", "0.61924845", "0.6166145", "0.61300254", "0.61115456", "0.6063281", "0.6055488", "0.6044877", "0.6038798", "0.60223675", "0.5967977", "0.59667265", "0.5958...
0.6081356
13
Function to show error message
getErrorMessage() { if(this.state.error) { return (<div className="col-sm-8"> <div className="error-message">{this.state.error} </div> </div>) } if (this.state.success) { return (<div className="col-sm-8"> <div cla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showError() {}", "function showError(type, text) {}", "function showErrorMessage(msg) { }", "function showError() {\n showStatus('error');\n}", "showErrorMessage() {}", "function showError() {\r\n console.log(\"There is some error\");\r\n}", "function showError() {\n console.log(\"There w...
[ "0.88052225", "0.85115325", "0.8288968", "0.7982601", "0.79784805", "0.7831271", "0.7709637", "0.7602008", "0.7529469", "0.7504558", "0.7496937", "0.7475748", "0.73552173", "0.73069674", "0.72870135", "0.72399205", "0.72365826", "0.72362757", "0.72360927", "0.7235165", "0.722...
0.0
-1
show homestay choices based on search query
renderHomestaySuggestions () { Session.set('homestayCity',this.props.homestay.city); if(this.state.multipleChoice) { let self = this; let bookingPrice = ""; // for (var i = 0; i < this.props.searchResult.length - 1; i++) { // var j = i + Math.floor(Math.random() * (this.props.searc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userSearch() {\n\n inquirer.prompt([\n {\n type: \"list\",\n name: \"choice\",\n message: \"What would you like to do:\",\n choices: [\"View product sales by Department\", \"Create new department\", \"Exit Supervisor Mode\"]\n ...
[ "0.65058833", "0.62927973", "0.62786806", "0.62654924", "0.6250579", "0.6233019", "0.6211422", "0.620033", "0.6182673", "0.61317754", "0.6118618", "0.6106595", "0.60714847", "0.6037759", "0.60355693", "0.6027542", "0.60256577", "0.60207695", "0.60014963", "0.59900796", "0.596...
0.62767714
3
Keep a global reference to the window object so it's not garbage collected, which would close the window
function createWindow() { win = new BrowserWindow({width: 800, height: 600}); // Create the browser window win.loadURL("file://" + __dirname + "/index.html"); // Load the page of the app win.webContents.openDevTools(); // Open the developer tools win.on("closed", function() { // The user closed the window win = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeWindowInternally() {\n windowClosedInternally = true;\n appWindow.close();\n appWindow = null;\n}", "function window_close() {\n window.close()\n}", "closeWindow() {\r\n\r\n }", "destroy(keepAlive) {\n if (this.next) {\n this.next.destroy(keepAlive || this.window);\n this....
[ "0.7729913", "0.7461504", "0.73516756", "0.73328805", "0.73104566", "0.7294572", "0.7294572", "0.7227673", "0.7214403", "0.71793854", "0.715616", "0.71524686", "0.71356976", "0.7135115", "0.7135115", "0.7108463", "0.70888525", "0.7087344", "0.7080825", "0.7039794", "0.7009020...
0.0
-1
Support Key press commands
function keyPressed() { if( key === 's' || key === 'S' ) { save(); }else if( key === 'z' || key === 'Z' ) { toggleGrid(); }else if( key === 'x' || key === 'X' ) { toggleQuarterLine(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "keyDown(event) {\n var keyCode = event.which || event.keyCode;\n this.activeCommands[keyCode] = true;\n }", "keyDown(event) {\n var keyCode = event.which || event.keyCode;\n this.activeCommands[keyCode] = true;\n }", "keyPress({\n key\n }) {\n if (this.isActive && (key ==...
[ "0.79852766", "0.79852766", "0.76112086", "0.7444586", "0.74215186", "0.7391705", "0.73009634", "0.72654647", "0.7219327", "0.71967727", "0.7184113", "0.7135811", "0.7129135", "0.71232283", "0.711023", "0.7094522", "0.7085869", "0.7085869", "0.7060843", "0.7052781", "0.705278...
0.68821895
30
they should include first and last name, id, array with grades (without subject names, just grades) , a method printing first and last name and grade average of a student
function Student(id, name, surname, grades){ this.id = id, this.name = name, this.surname = surname, this.grades = grades, this.getAverage = function(){ var temp = 0; for (var g in grades){ temp = temp + parseInt(g); } return temp / grades.length ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAverageGrades() {\n let total = 0\n for (let i = 0; i < students.length; i++) {\n const student = students[i];\n total += student.getAverageGrades();\n }\n return total / students.length\n }", "function addstudent(event) {\n event.preventDefault();\n clic...
[ "0.68268406", "0.67100495", "0.6622924", "0.65539116", "0.65124756", "0.6492616", "0.6480309", "0.64801747", "0.64177537", "0.640693", "0.63884366", "0.63612753", "0.63272667", "0.630481", "0.6289065", "0.6284623", "0.628424", "0.62815565", "0.6268257", "0.6223225", "0.622088...
0.7750034
0
poll for new entries at remote TSV spreadsheets and add them to the dictionary every now and then
function sync_resources() { let time = +new Date, cf = config(), changed = false; Promise.all( Object.entries(cf).map( ([name, {source, user, format, ...rest}]) => request.get(source) .catch(err => console.log(`on resource '${name}': ${err.stack}`)) .then(async data => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_spreadsheet_info(){\n $.getJSON( \"json/spreadsheet_info.json\", function(obj) { \n for(var i=0; i<obj.length;i++){\n if(obj[i].id == device_number){\n current_uri = obj[i].uri;\n current_latitude = obj[i].latitude;\n current_longitude = obj[i].longitude;\n ...
[ "0.574664", "0.5729961", "0.56305635", "0.56185883", "0.5455141", "0.54515684", "0.5430488", "0.54247993", "0.5369363", "0.53340083", "0.5325534", "0.5299385", "0.5269799", "0.52598983", "0.5258398", "0.5235527", "0.52047366", "0.5198573", "0.519247", "0.5174817", "0.51526505...
0.48449835
70
Dynamically update value attribute
_changeHandler(e) { this.setState({ text : e.target.value }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setValue(value, {update=true} = {}) {\n let numpad = this.numpad.querySelector('.value')\n if (numpad) numpad.setAttribute('text', {value})\n this.el.setAttribute('text', {value})\n this.inputField.value = value\n if (update && this.data.target)\n {\n this.data.target.setAttribute(this.data....
[ "0.7034027", "0.69463176", "0.68307084", "0.6751925", "0.67363775", "0.6721471", "0.6709574", "0.66950065", "0.6689642", "0.6682901", "0.6639447", "0.65875477", "0.6582089", "0.65724486", "0.65687054", "0.65609497", "0.6509185", "0.6489847", "0.6484947", "0.647755", "0.647755...
0.0
-1
Encontrar cartoes da empresa
async getCardByAccountID(req, res) { const { _id: id } = req.params; // Puxa da URL o id da conta const findCard = await cardModel.find({ account_id: id }); // if (findCard) // return res.status(400).json({erro: "Usuario de cartao nao encontrado"}) return res.status(200).json({ findCard }); // Qua...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editarempresa(req,res){\n\n\tlet empresaid = req.params.id_empresa;\n\tlet empresa = new Empresa(\n\t\t\n\t\treq.body.nombre_empresa,\n\t\treq.body.id_status\n\t\t\n\t\t);\n\n\tCONN('empresa').where('id_empresa',empresaid).update({nombre_empresa:req.body.nombre_empresa,id_status:req.body.id_status}).then(...
[ "0.62520117", "0.6163541", "0.6065371", "0.6055287", "0.60425425", "0.60323286", "0.5999142", "0.5977646", "0.5949011", "0.5909863", "0.5905418", "0.5897184", "0.58798826", "0.5862767", "0.58261245", "0.5808457", "0.5763047", "0.576268", "0.57599634", "0.5732619", "0.5697194"...
0.0
-1
maneja likes y dislikes
setDislike() { this.setState({ dislikeActive: !this.state.dislikeActive, dislike: this.state.dislikeActive ? this.state.dislike - 1 : this.state.dislike + 1 }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addLikes() {\n if (propLike?.includes(user.username)) {\n let index = propLike.indexOf(user.username);\n let removeLike = [\n ...propLike.slice(0, index),\n ...propLike.slice(index + 1),\n ];\n setLikeGet(removeLike);\n setPropLike(removeLike);\n setRedLike(\...
[ "0.67189735", "0.6692142", "0.66464317", "0.65288705", "0.6372904", "0.637023", "0.63344157", "0.6290926", "0.6288958", "0.6277551", "0.6259408", "0.6258477", "0.6249324", "0.6175934", "0.61624706", "0.61558867", "0.6113125", "0.61081123", "0.6035549", "0.6016851", "0.5992491...
0.59255666
25
fin maneja likes y dislikes
render(){ return ( <div> {/*========RESULTADoS DE BUSQUEDA =============== */} <div className='row text-left my-2'> <div className='col-md-12'> <h5 className=''>Pregunta- ID {parseInt(this.props.pregunta._id.slice(18,24),16)}</h5> <p className='text-left ones-chars' >{this.pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dislike() {\n LikeService.delete(vm.user.username, $stateParams.id, vm.currentUser._id)\n .then(() => {\n // remove like from local array\n vm.likes.splice(vm.likes.findIndex(x => x._id == vm.currentUser._id), 1);\n\n vm.isLiked = false;\n ...
[ "0.6933176", "0.67869395", "0.6655884", "0.6644042", "0.6633726", "0.6606265", "0.65714234", "0.6382007", "0.63798606", "0.6321598", "0.6304145", "0.6299156", "0.62716764", "0.62198544", "0.62033474", "0.6160182", "0.6157635", "0.6155433", "0.6137325", "0.60728955", "0.606548...
0.0
-1
Display an error notification.
error(e, message) { notify.onError({ title: this.title, message: message + ': <%= error.message %>', onLast: true })(e); log.error(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function error(err) {\r\n notificationElement.style.display = \"block\"\r\n notificationElement.innerHTML = `<p>${err.message}</p>`\r\n}", "function showError(error) {\n notification.style.display = 'block';\n notification.innerHTML = `<p> ${error.message} </p>`;\n}", "function Error(error) {\r\n ...
[ "0.8262303", "0.7996851", "0.7976483", "0.7877501", "0.7877169", "0.78600305", "0.7846028", "0.7844142", "0.7839169", "0.7820598", "0.78089255", "0.7794975", "0.77882135", "0.7779952", "0.77409756", "0.77379763", "0.7732414", "0.7698784", "0.76987755", "0.7481246", "0.7332842...
0.6651321
47
constant variables that we declare
function Asteroid(pos, game) { const CONSTANTS = {COLOR: 'gray', RADIUS: 5, VEL:Util.randomVec(1+(Math.random()*5))}; MovingObject.call(this, pos, CONSTANTS.VEL, CONSTANTS.RADIUS, CONSTANTS.COLOR, game) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Constants() {}", "function Constants() {}", "_constants()\n {\n this.CREATED_AT = CREATED_AT;\n this.UPDATED_AT = UPDATED_AT;\n this.PRIMARY_KEY = PRIMARY_KEY;\n }", "function Constants() {\n if (currentToken() == \"constantes\") {\n nextToken();\n if (current...
[ "0.75293934", "0.75293934", "0.6588831", "0.6404392", "0.6388386", "0.6313928", "0.6304465", "0.62870383", "0.61789656", "0.6065686", "0.60047776", "0.5982288", "0.59443694", "0.5905066", "0.5903553", "0.59014", "0.5886717", "0.58657193", "0.58486056", "0.5826094", "0.5799231...
0.0
-1
Clears the caches of all GEPs This will mark this register as having no writes pending
clearGEPCaches(ignore) { let frag = new LLVM.Fragment(); for (let sig in this.inner) { if (ignore !== null && sig == ignore) { continue; } this.inner[sig].clearCache(); } this.writePending = false; return frag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n this.cache.clear();\n }", "clear() {\n this.cache.clear();\n }", "clear() {\n this._cache = [];\n this._updated = false;\n }", "clear() {\n this.map = {};\n if (this.store) this.store.clear();\n }", "function clear () {\n\tcache = {};\n}", "function...
[ "0.6905472", "0.6905472", "0.6900932", "0.68160295", "0.68129534", "0.681268", "0.6785738", "0.676995", "0.67483175", "0.6744733", "0.6740449", "0.6736946", "0.6736946", "0.6736946", "0.6735815", "0.67074156", "0.66863847", "0.6668813", "0.6617868", "0.6610539", "0.6610539", ...
0.0
-1
Marks this copy as the original instead of a clone Applies recursively
declone() { this.isClone = false; if (this.cache) { this.cache.declone(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clone(original) {\n return merge(true, {}, original);\n }", "function Clone(){\n }", "clone() {\n const cloner = new Cloner();\n return cloner.clone(this);\n }", "function Clone() {}", "function Clone() {}", "function Clone() {}", "function Clone() {}", "function ...
[ "0.6705864", "0.65944964", "0.6495704", "0.6407388", "0.6407388", "0.6407388", "0.6407388", "0.6356657", "0.6356657", "0.6356657", "0.62441516", "0.62389845", "0.62312776", "0.6216052", "0.61769104", "0.61601573", "0.61601573", "0.61601573", "0.61601573", "0.61432564", "0.608...
0.56425774
50
goes through the file to check that the user isn't registered
function isInitialized(guildmember){ //checks if user is in tendieMap //iterate over keys in tendieMap until found or not for(var key of tendieMap.keys()){ if(key === guildmember.id){ return true; } } console.log("not registered"); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkUserStatus() {\n if (firebase.auth().currentUser === null) { loadLoginPage(); }\n else { loadHomePage(); }\n }", "function isRegister(request, response, fromPost) {\r\n\tfromPost = queryString.parse(fromPost);\r\n var userInfo = fs.readFileSync(\"../user.txt\", \"utf-8\");\r...
[ "0.63335305", "0.6308146", "0.6298362", "0.6298362", "0.6215546", "0.6168358", "0.616415", "0.6090003", "0.60814184", "0.60745895", "0.6058372", "0.5965367", "0.5957337", "0.59541655", "0.59478706", "0.59163", "0.5914872", "0.586824", "0.5847975", "0.5826649", "0.58211476", ...
0.5717874
32
gets the current file to update the map
function updateMap(){ //nullifying tendieMap to rewrite it tendieMap = new Map(); //getting the tendielist file var tendieList = fs.readFileSync('./tendie/tendiebox.txt', 'utf8'); //splitting up the tendie list var tendieArray = tendieList.split("|"); //now storing the data in tendie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getLocateFile() {\n\t\treturn OS.Path.join(_getLocateDirectory(), LOCATE_FILE_NAME);\n\t}", "function File() {\n this.lastFileName = \"untitled.map\";\n}", "function getExistingIfNotChanged() {\n if (!mainFile && existingComponentMap) {\n return existingComponentMap.mainFile;\n }\n\n r...
[ "0.5833399", "0.5688609", "0.5668346", "0.5557675", "0.55518734", "0.5551158", "0.55485296", "0.54531145", "0.54326916", "0.5374038", "0.5346941", "0.5340615", "0.5329243", "0.52839404", "0.52795273", "0.5262645", "0.52369124", "0.52189875", "0.5213899", "0.5176953", "0.51721...
0.51978475
19
updates the file given the player and information
function updateFile(){ var logger = fs.createWriteStream('./tendie/tendiebox.txt', { //flags: 'a' // 'a' means appending (old data will be preserved) }) //going through the tendie map and setting the file to it for(var key of tendieMap.keys()){ logger.write(key + "|" + tendieMap.get(key...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editFile(file, currentPlayer) {\n\n let fs = require('fs');\n\n // read the given file \n fs.readFile('./public/files/' + file, 'utf-8', function(err, data){\n if (err) throw err;\n \n // change username and password to correct values \n let username = currentPlayer.oppone...
[ "0.66326225", "0.6319032", "0.6272841", "0.6204093", "0.6094185", "0.603906", "0.59591657", "0.5931577", "0.5807507", "0.5747336", "0.57211256", "0.572042", "0.56605905", "0.5606475", "0.55599797", "0.55490685", "0.5544135", "0.55417585", "0.5534849", "0.5527405", "0.5498651"...
0.56153053
13
var date = messages.datetime; var date = new Date().toGMTString(); var date = "";
function getServerTime() { return $.ajax({async: false}).getResponseHeader( 'Date' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDateString () {\n var time = new Date();\n // 14400000 is (GMT-4 Montreal)\n // for your timezone just multiply +/-GMT by 3600000\n var datestr = new Date(time - 14400000).toISOString().replace(/T/, ' ').replace(/Z/, '');\n return datestr;\n}", "function date(){\n return ;\n }", "lastAcc...
[ "0.64242274", "0.6383622", "0.63710463", "0.6289705", "0.6282997", "0.627532", "0.6260291", "0.62598026", "0.6255607", "0.6238089", "0.623207", "0.6189568", "0.6184454", "0.6175169", "0.61512524", "0.6120665", "0.6110877", "0.6083163", "0.6066204", "0.6062507", "0.60596925", ...
0.0
-1
var date = new Date().toGMTString();
function getServerTime() { return $.ajax({async: false}).getResponseHeader( 'Date' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDateString() {\n var time = new Date().getTime();\n // 32400000 is (GMT+9 Japan)\n // for your timezone just multiply +/-GMT by 36000000\n var datestr = new Date(time +32400000).toISOString().replace(/T/, ' ').replace(/Z/, '');\n return datestr;\n}", "function getDateString() {\n va...
[ "0.751058", "0.74892706", "0.73916006", "0.7041884", "0.70268834", "0.701844", "0.69559467", "0.6877291", "0.68749267", "0.6816827", "0.66925925", "0.66371334", "0.659897", "0.6578697", "0.6573823", "0.6564147", "0.6564147", "0.64768237", "0.6473126", "0.6466456", "0.6452775"...
0.0
-1
Checks whether a cookie exists Derived from:
function hasCookie(sKey) { if (!sKey) { return false; } return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cookieExists(cookie_name) {\n return (getCookie(cookie_name) !== \"\");\n}", "function cookieExists(c_name)\n{\n if (document.cookie.length>0)\n {\n\tc_start=document.cookie.indexOf(c_name + \"=\");\n\tif (c_start!=-1)\n\t{\n\t c_start=c_start + c_name.length+1;\n\t c_end=document.cookie.indexOf(\"...
[ "0.8311426", "0.79962677", "0.781893", "0.7661088", "0.7622243", "0.7551143", "0.7538379", "0.75315267", "0.75234", "0.7420741", "0.7379726", "0.7373678", "0.7335305", "0.7248476", "0.7098498", "0.7075293", "0.70045793", "0.6933355", "0.6890201", "0.68879193", "0.6884704", ...
0.74394923
9
Gets value of cookie Derived from:
function getCookie(sKey) { if (!sKey) { return null; } return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCookie() {\n return $cookies.get(\"role\");\n }", "function getCookieVal(offset) {\n var endstr = document.cookie.indexOf(\";\", offset);\n if (endstr == -1) {\n endstr = document.cookie.length;\n }\n return unescape(document.cookie.substring(offset, e...
[ "0.7243243", "0.7138469", "0.70916194", "0.7086828", "0.7082768", "0.70681363", "0.7062949", "0.7062885", "0.7062885", "0.7058447", "0.70565224", "0.70490974", "0.7033225", "0.7017045", "0.70064974", "0.70051306", "0.69886494", "0.6977044", "0.6933631", "0.69330007", "0.69247...
0.0
-1
Helper method for defining associations. This method is not a part of Sequelize lifecycle. The `models/index` file will call this method automatically.
static associate(models) { // define association here this.belongsTo(models.Tournament); this.belongsTo(models.Person); this.hasOne(models.Team,{as: 'Speaker1'}); this.hasOne(models.Team,{as: 'Speaker2'}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n // define association here\n // This is how Sequelize knows to create \"magic methods\"\n // These are functions that can automatically pull\n // related data.\n // For example: If I have a User object\n // I can call `await user.getContacts()` to get an\n...
[ "0.76423585", "0.75082916", "0.7312812", "0.7307368", "0.7307368", "0.7307368", "0.7294376", "0.7284563", "0.72789294", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985"...
0.0
-1
Implementation of a ship. it will have a fixed amount of health point, a specific name and the cases where it is in the grid
constructor(name, health){ this.ship_case = {}; this.health_point = health; this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Ship(name){\n\tthis.name = name;\n\tthis.length = 0;\n\tthis.hitPoints = [];\n\t// Hits for Horizontal Ships //\n\tthis.populateHorzHits = function(start) {\n\t\tfor (var i = 0; i < this.length; i++, start++) {\n\t\t\tthis.hitPoints[i] = start;\n\t\t}\n\t};\n\t// Hits for Vertical Ships //\n\tthis.populat...
[ "0.74264556", "0.74264556", "0.71003693", "0.6956362", "0.6852337", "0.68009776", "0.67954427", "0.67728907", "0.67248756", "0.6686744", "0.66853905", "0.66409826", "0.66383976", "0.6635049", "0.6617808", "0.6607642", "0.65928113", "0.6582773", "0.65692335", "0.6467926", "0.6...
0.68838286
4
to add the new node at the end of the Linked list.
push(data) { const node = new Node(data); if (!this.head) { this.head = node; this.tail = node; } else { node.prev = this.tail; this.tail.next = node; this.tail = node; } this.length++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addToEnd(newNode) {\n\n // check if empty\n if (head == null) {\n head = newNode;\n tail = newNode;\n } else {\n tail.next = newNode;\n tail = newNode;\n\n }\n }", "insert_end(newnode) {\r\n let ...
[ "0.78412133", "0.77646226", "0.7652006", "0.76462966", "0.763595", "0.75033903", "0.74734634", "0.7378384", "0.73240066", "0.7304765", "0.72077245", "0.71922785", "0.71621364", "0.7139281", "0.71390104", "0.712961", "0.7103133", "0.70799935", "0.7075365", "0.7064958", "0.7034...
0.0
-1
to remove the last node from the list.
pop() { if (!this.head) return null // tail is the last node so that we take the // prev property from the tail const prevNode = this.tail.prev if (prevNode) { prevNode.next = null; this.tail = prevNode; // updating the tail } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeLast () {\n\t\tthis.remove(this.length - 1);\n\t}", "removeLast() {\n if (!this.head) {\n return;\n }\n // Handles lists < 2 in lenghht\n if (!this.head.next) {\n this.head = null;\n return;\n }\n\n let node = this.head;\n let previous = node;\n\n while (node.next) {\...
[ "0.80201966", "0.79771644", "0.76456344", "0.7577108", "0.75582534", "0.7522641", "0.7446279", "0.74210376", "0.73408586", "0.7301323", "0.7299", "0.7286617", "0.7279657", "0.72755617", "0.71714884", "0.7159918", "0.7148152", "0.7147734", "0.713579", "0.70550615", "0.70550615...
0.7315852
9
load result of apis definitions
loadApis(data) { for (var key in data.links) { if (data.links[key].rel !== 'self') { this.apis.push(data.links[key]); } } this.$log.debug('ApisService', 'available apis', this.apis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadAPI() {\n // wait for all classes to be loaded\n // on attend que les classes soient chargées\n if (checkApiLoading('loadAPI();',['OpenLayers','Geoportal','Geoportal.Viewer','Geoportal.Viewer.Simple'])===false) {\n return;\n }\n\n // load API keys configuration, then load the int...
[ "0.6579525", "0.6569276", "0.6568872", "0.6274966", "0.59341216", "0.5869272", "0.5832764", "0.5810235", "0.5758039", "0.5739052", "0.56307584", "0.56307584", "0.5629898", "0.56285214", "0.5612161", "0.5597404", "0.5589401", "0.5576795", "0.5518404", "0.54744035", "0.54507965...
0.6006227
4
Called when editing is finished
function finish() { scope.editing = false; if (!element.hasClass("editing")) { return; } element.removeClass("editing"); inputElement.blur(); if (scope.updated === "") { scope.updated = scope.value; } if (scope.new |...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onEditComplete() {}", "onEditComplete() {}", "onEditComplete_() {\n this['editing'] = false;\n }", "onEditComplete() {\n const me = this,\n { record, dataField, inputField, oldValue, lastAlignSpec } = me,\n { target } = lastAlignSpec,\n { value } = inputField;\n\n if (!me.isFinishing...
[ "0.8175641", "0.8175641", "0.7538304", "0.74620444", "0.73347735", "0.70869756", "0.6917125", "0.68468314", "0.66751605", "0.66557723", "0.6636655", "0.66033167", "0.66022223", "0.6555298", "0.6550549", "0.65367305", "0.6444683", "0.6357219", "0.6303952", "0.6278712", "0.6245...
0.73061395
5
fs.exists is depreciated, this is future tolerant
function existsSync(filename) { try { fs.accessSync(filename); return true; } catch (ex) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exists(path){if(fs.existsSync(path)){return true;}else{return false;};}", "function fileExists( path ) { try { return !!fs.statSync(path) } catch (err) {} }", "async exists(filepath, options = {}) {\n try {\n await this._stat(filepath);\n return true\n } catch (err) {\n if (err.co...
[ "0.7822264", "0.7750495", "0.76027495", "0.7529381", "0.7449901", "0.73783064", "0.73701346", "0.7272812", "0.7223221", "0.72211516", "0.7186383", "0.71640867", "0.71595734", "0.71489364", "0.7146111", "0.71127486", "0.70871115", "0.7064776", "0.70097387", "0.7004363", "0.699...
0.69659644
23
Constructor the function that is called when you instantiate a new object
constructor(){ this.name = 'vehicle'; this.speedX = 1; this.speedY = 0; this.x = 0; this.y = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "function _construct()\n\t\t{;\n\t\t}", "function _ctor() {\n\t}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function Ctor() {}", "function Ctor() {\r\n }", "function construct() { }", "function Ctor() {\n\t// Empty...\n}", "cons...
[ "0.8457307", "0.8214148", "0.8187897", "0.81766224", "0.81766224", "0.81766224", "0.81330705", "0.79532874", "0.7912091", "0.775618", "0.7682161", "0.7653553", "0.7653553", "0.7653553", "0.7653553", "0.7653553", "0.7653553", "0.7653553", "0.76453847", "0.7645142", "0.75266", ...
0.0
-1
MARK: Set up guard rails based on the initial settings
async function setGuardRails() { if (isInNativeApp) { document.documentElement.classList.add('is-in-native-app'); } if (discussArticleOnly) { document.documentElement.classList.add('discuss-article-only'); } if (surveyOnly) { document.documentElement.classList.add('survey-only'); } const ftid ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static prepare(app) {\n app.configure(auth({\n // todo: use custom storage in order to obtain the token either from localStorage or the URL\n storage: window.localStorage,\n }));\n }", "function configure_first_start()\n{\n check_first_start((is_first_start) => {\n cons...
[ "0.6092812", "0.5696284", "0.55389297", "0.54749006", "0.5464541", "0.54033357", "0.53994554", "0.5398885", "0.5398458", "0.5391913", "0.53839654", "0.5379629", "0.5368252", "0.5334188", "0.53249335", "0.5269131", "0.5255428", "0.5236133", "0.52128226", "0.52014875", "0.51880...
0.59814453
1
MARK: Chat page Related functions
function initChat() { setConfigurations(); greet(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chatMessageListener (fromClient, message) {\r\n //displayChatMessage(\"User\" + fromClient.getClientID() + \": \" + message);\r\n //Some string HACK\r\n console.log(message);\r\n var messageArray = message.split(',');\r\n var msgType = messageArray[0];\r\n\r\n if(msgType==='p'){\r\n var pageNum =...
[ "0.6923308", "0.671697", "0.671697", "0.6690988", "0.6668811", "0.6626807", "0.65442264", "0.6517349", "0.64219433", "0.64204043", "0.6393684", "0.6358719", "0.63525337", "0.63458276", "0.63458014", "0.6316103", "0.6285995", "0.62649393", "0.62564456", "0.6244026", "0.6212255...
0.0
-1
const algoliasearch = require('algoliasearch'); var contentful = require('contentful');
function App() { const [recipes, setRecipes] = useState([]); //const [api, setApi] = useState(''); useEffect(()=> { fetch("https://ourrecipebook.herokuapp.com/") .then(res => res.json()) .then(res => { setRecipes(res) console.log(res) } ); }, []); // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jsonapi (search, callback){\n var stackexchange = require('stackexchange-node');\n var options = { version: 2.2 };\n\tvar context = new stackexchange(options);\n\tvar re=/<pre><code>([\\s\\S]*?)<\\/code><\\/pre>/gm;\n\tvar re2=/<(.*?)>/g;\n\tvar m;\n var complete = {\n concept: [],\n ...
[ "0.5633261", "0.5466417", "0.5393131", "0.5260798", "0.52601236", "0.5202207", "0.51972806", "0.51924986", "0.518805", "0.5155181", "0.512644", "0.50638336", "0.5050327", "0.50234616", "0.5010703", "0.5005018", "0.49875998", "0.49745753", "0.49630976", "0.49345252", "0.493410...
0.0
-1
Define a function that returns a currying calculator. The currying calculator will keep returning a function until 5 parameters are passed in total. Then it returns the sum of all 5 params.
function createCurryCalc() { var calcArgArray = []; return function curryCalc(...args){ for (var i=0; i<args.length; i++){ calcArgArray.push(args[i]); if (calcArgArray.length === 5) { return calcArgArray.reduce(function(sum, val) { return sum + val }); } } return curryCalc; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curry5(f) {\n return function(v) {\n return function(w) {\n return function(x) {\n return function(y) {\n return function(z) {\n return f (v, w, x, y, z);\n };\n };\n };\n };\n };\n }", "function curriedSum(numArgs){\n ...
[ "0.73214513", "0.70077914", "0.6929087", "0.69268906", "0.6884108", "0.6871547", "0.68245834", "0.68223", "0.6805136", "0.68025285", "0.67662144", "0.67482114", "0.6739822", "0.67175895", "0.6707966", "0.6676953", "0.66760397", "0.66468817", "0.6629966", "0.6621542", "0.65712...
0.84988606
0
CURRY Define your curry function implementation. curry expects a function, any function, and returns a curried version of it
function cury(fn) { var curyArgArray; var expArg = fn.length; return function indivCury(...args) { for (var i=0; i<args.length; i++) { curyArgArray.push(args[i]); if (curyArgArray.length === expArg) fn(...curyArgArray); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curry(func) {\n // Your code goes here\n}", "function curry(cal,x){\n return function(y){\n return cal(y,x);\n };\n}", "function curry( func ) {\n var args = aps.call( arguments, 1 );\n \n return function() {\n return func.apply( this, args.concat( aps.call( arguments ) ) );\...
[ "0.8245186", "0.79174876", "0.78344923", "0.7809494", "0.76744723", "0.7652264", "0.7629548", "0.7590949", "0.75800025", "0.7536176", "0.74424624", "0.74147755", "0.7389147", "0.73629504", "0.7349838", "0.7311019", "0.7311019", "0.7311019", "0.7311019", "0.7311019", "0.731101...
0.5964389
72
Define a myEach function that simulates the forEach method on Array.
function myEach(arr, fn) { var tasksNo = arr.length; for (var i =0; i < tasksNo; i++){ fn(arr[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forEach(myArray, myFunction) {\n for (var i = 0; i < myArray.length; i++) {\n myFunction(myArray[i]);\n }\n}", "function myforEach (array, myFunction){\n for(let i=0; i<array.length;i++){\n myFunction(array[i]);\n }\n}", "function myForEach(array, callback) {\n\n}", "function myFor...
[ "0.7876708", "0.7869398", "0.78664815", "0.78226423", "0.7750687", "0.77458733", "0.7729211", "0.76714987", "0.75802714", "0.7564411", "0.74749494", "0.74266213", "0.74266213", "0.7425617", "0.74123603", "0.7408468", "0.7389435", "0.7375916", "0.7375193", "0.7343645", "0.7338...
0.7118868
28
Define a myMap function that simulates the map method on Array.
function myMap(arr, fn) { var tasksNo = arr.length; var resultArray = []; for (var i =0; i < tasksNo; i++){ // resultArray.push(fn(arr[i])); resultArray[i] = fn(arr[i]); } return resultArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function map(an_array, a_function) {\n return a_function(an_array);\n }", "function mapArray() {\n return myArr.map(function(elem) {\n return elem * 2;\n })\n}", "function map(arr, fn) {\n return arr.map(fn);\n}", "function myMap(arr, fn) {\n const arrOutput = [];\n for(let i = 0; i < arr.l...
[ "0.787427", "0.7660527", "0.76533306", "0.76121604", "0.7549987", "0.75301975", "0.7507677", "0.75011533", "0.7495614", "0.7458236", "0.74305356", "0.7372158", "0.7350831", "0.7287193", "0.7261302", "0.72440064", "0.72311336", "0.7229253", "0.7218988", "0.718587", "0.7166865"...
0.66126436
80
start/stop map shader drawing
drawStart() { let n; let light,viewLight; let gl=this.core.gl; gl.useProgram(this.program); // matrix // normal is set on a per mesh level as some have // model matrixes which need to be calculated in gl.uniformMatrix4fv(this.perspective...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n this.program.use();\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n for (let elem of this.drawables) {\n elem.use(this.program);\n elem.draw();\n }\n\n window.requestAnimationFrame(() => this.start());\n }", "start() {\r\n\r\n ...
[ "0.6507326", "0.6285705", "0.62305284", "0.6209955", "0.61408615", "0.603154", "0.6004195", "0.5979693", "0.59670717", "0.59333515", "0.59207714", "0.58974105", "0.5858328", "0.5797004", "0.57716393", "0.57693636", "0.5763562", "0.5754352", "0.5743802", "0.57417524", "0.57367...
0.6346521
1
Functions Create arrays if they do not already exist
function setupStorage(){ if(localStorage['addressBook'] === undefined){ localStorage['addressBook'] = ''; } if(localStorage['orgBook'] === undefined){ localStorage['orgBook'] = ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeArray(use1,use2,use3,use4,use5,use6,use7,use8,use9,use10) {\n //Check USE1\n if(!use1) {\n return send(\"You have tried to create an empty array! Not good!\");\n } else {\n var arr = new Array;\n arr.push(use1);\n }\n //Check USE2\n if(!use2) {\n return arr;\n } else {\n arr.push...
[ "0.698285", "0.6851681", "0.623508", "0.61986166", "0.60559464", "0.60260373", "0.60089034", "0.6007132", "0.5960082", "0.59248513", "0.5915593", "0.59149706", "0.59139204", "0.5908138", "0.59061944", "0.5900815", "0.5896753", "0.58830726", "0.587772", "0.5836333", "0.5806128...
0.0
-1
Two JSON structures: one for people and one for organisations
function jsonStructure(fullname,org,phone,address,postcode,email){ this.fullname = fullname; this.organisation = org; this.phone = phone; this.address = address; this.postcode = postcode; this.email = email; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchOrganizations() {\n $http({\n method: 'POST',\n url : CLB_FRONT_BASE_URL + 'select/queryOrganizationName'\n }).then((response) => {\n let responseData = response.data;\n\n if (responseData.flag === 'success') {\n ...
[ "0.557233", "0.5510022", "0.52951103", "0.52723014", "0.52670115", "0.5201032", "0.51912427", "0.5175932", "0.5148142", "0.51226276", "0.50978255", "0.5081217", "0.5059976", "0.50352126", "0.5033636", "0.5026117", "0.50119585", "0.5011906", "0.4993916", "0.4973172", "0.495375...
0.52187157
5
Add a person to the address book. Update existing person if update == true
function addToBook(update){ var isNotNull = fullname.value!='' && organisation.value!='' && phone.value!='' && address.value!='' && postcode.value!='' && email.value!=''; // check if any form fields are null if(isNotNull){ // check if organisation entered exists // if not, ask whether they would like to cre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPerson() {\n if (!haveNewValue) {\n return;\n }\n\n var name = $newName.val();\n var location = $newFrom.val();\n var mode = $(\"input[name='newMode']:checked\", $newPersonForm).val();\n\n geocoder.geocode({\n \"address\": location, \"region\": \"GB\", compon...
[ "0.7216247", "0.6694709", "0.61275864", "0.6093782", "0.6047505", "0.601794", "0.6003563", "0.597077", "0.59459394", "0.5928008", "0.5921805", "0.58877534", "0.5880148", "0.5871619", "0.5834864", "0.5820595", "0.57962346", "0.5794838", "0.5786148", "0.5740754", "0.5727629", ...
0.6976671
1
Add an organisation to the organisation book. Update a contact if update == true
function addToOrgBook(update){ var isNotNull = orgName.value!='' && orgPhone.value!='' && orgAddress.value!='' && orgPostcode.value!='' && orgEmail.value!=''; // check if all form fields are completed if(isNotNull){ // check if updating existing contact and remove it if (update) { var index = orgBook.in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToBook(update){\n\t\tvar isNotNull = fullname.value!='' && organisation.value!='' && phone.value!='' && address.value!='' && postcode.value!='' && email.value!='';\n\t\t// check if any form fields are null\n\t\tif(isNotNull){\n\t\t\t// check if organisation entered exists\n\t\t\t// if not, ask whether ...
[ "0.751974", "0.59096587", "0.5878782", "0.5865252", "0.57594776", "0.5679115", "0.5678143", "0.55941325", "0.5571939", "0.55388975", "0.5461467", "0.5360787", "0.5347675", "0.53108895", "0.5293013", "0.528988", "0.52844065", "0.52842385", "0.5199009", "0.51802075", "0.5169506...
0.7620551
0
Carry out actions of updating a contacat, deleting a contact, or viewing an organisation's employees
function entryBtnActions(e){ // Get ID of entry var remID = e.target.getAttribute('data-id'); // Remove an entry from the addressbook if (e.target.classList.contains('delbutton')){ addressBook.splice(remID,1); localStorage['addressBook'] = JSON.stringify(addressBook); showAddressBook(); // Remove an ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateEmployee() {\n // Call chooseEmployee with action to update\n chooseEmployee(\"update\");\n}", "function updateEmployee() {\n\n}", "function onEdit(){\n var statusChange = new StatusObject();\n while (true){\n getChangeIndex(statusChange);\n if (statusChange.index == -1){\n return...
[ "0.65469", "0.572428", "0.5683367", "0.56584966", "0.56530637", "0.5640282", "0.5615498", "0.5614409", "0.5607021", "0.5578486", "0.5573321", "0.5551357", "0.55381143", "0.5522144", "0.548508", "0.5479524", "0.5472068", "0.54592586", "0.5435068", "0.54139817", "0.54126686", ...
0.6115415
1
Clear all form fields that are open
function clearForm(peopleForm){ if (peopleForm){ var formFields = document.querySelectorAll('.formFields'); } else { var formFields = document.querySelectorAll('.orgformFields'); } for(var i in formFields){ formFields[i].value = ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearFields() {\n $('#input_form')[0].reset()\n }", "clearFields() {\n this._form.find('.form-group input').each((k, v) => {\n let $input = $(v);\n if ($input.attr('type') !== \"hidden\") {\n $input.val('');\n }\n });\n }", "function...
[ "0.76498425", "0.7642853", "0.7534449", "0.75235033", "0.74635226", "0.74509513", "0.7414829", "0.7414829", "0.7369611", "0.73619646", "0.73589325", "0.73485774", "0.734346", "0.73272234", "0.7318973", "0.7317004", "0.7310663", "0.7300763", "0.7287987", "0.72781646", "0.72678...
0.0
-1
Show the people address book by looping through addressBook array
function showAddressBook(){ addressBook = JSON.parse(localStorage['addressBook']); // Loop over the array addressBook and insert into the page addressBookDiv.innerHTML = ''; for(var n in addressBook){ var peoplestr = '<div class="entry">'; peoplestr += '<div class="name"><p>' + addressBook[n].fullname + '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iterateAndDisplayAddress(addressArray) {\n // Nothing\n}", "displayRecord(addressData)\n {\n for(let i=0;i<addressData.length;i++)\n {\n console.log(addressData[i])\n }\n }", "function printAddresses(addresses) {\n console.log('Addresses:');\n for (const addres...
[ "0.72733366", "0.6787231", "0.640632", "0.63722146", "0.6342445", "0.6311959", "0.6186001", "0.6164622", "0.61389035", "0.61107594", "0.6093951", "0.60761446", "0.60619473", "0.5991583", "0.59353167", "0.5926178", "0.5919635", "0.5906616", "0.5899284", "0.5882371", "0.5882371...
0.65771407
2
Show the organisation book by looping through the orgBook array
function showOrgBook(){ orgBook = JSON.parse(localStorage['orgBook']); // Loop over the array orgBook and insert into the page orgBookDiv.innerHTML = ''; for(var n in orgBook){ var orgstr = '<div class="entry">'; orgstr += '<div class="orgname"><p>' + orgBook[n].orgName + '</p></div>'; orgstr += '<div ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showOrgPeople(orgName){\n\t\torgBookDiv.style.display = \"none\";\n\t\taddressBook = JSON.parse(localStorage['addressBook']);\n\t\t// Loop over the array addressBook and insert into the page\n\t\tviewEmployeesDiv.innerHTML = '';\n\t\tviewEmployeesDiv.innerHTML += '<div class=\"back\"><a href=\"#\" class=\...
[ "0.65533024", "0.6205938", "0.6153188", "0.6103933", "0.60899425", "0.6080025", "0.5979909", "0.5914597", "0.58921", "0.5884928", "0.5857767", "0.58523667", "0.5841653", "0.5837392", "0.5824297", "0.5803428", "0.5775638", "0.576845", "0.5754013", "0.5741935", "0.57400197", ...
0.7383799
0
Show only employees from a selected organisation
function showOrgPeople(orgName){ orgBookDiv.style.display = "none"; addressBook = JSON.parse(localStorage['addressBook']); // Loop over the array addressBook and insert into the page viewEmployeesDiv.innerHTML = ''; viewEmployeesDiv.innerHTML += '<div class="back"><a href="#" class="backbutton" data-id="' + n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "viewEmployeesByDepartment() {\n\t\treturn this.connection.query(\n `\n SELECT\n e1.id AS ID,\n e1.first_name AS First_Name,\n e1.last_name AS Last_Name,\n role.title AS Role,\n department.name AS Department,\n ...
[ "0.6338145", "0.61857647", "0.61358124", "0.60958105", "0.6039077", "0.59936875", "0.599044", "0.5920542", "0.5886548", "0.5863872", "0.58609694", "0.5859138", "0.58348656", "0.58111167", "0.58102846", "0.58083797", "0.5804567", "0.5799854", "0.57908636", "0.5785501", "0.5778...
0.65871024
0
creates basic maze full of walls
function createMazeWallArray(width, height) { let mazeWallArray = []; //let rowArray =[]; and subsequent loop cannot be in here because then a reference to the same rowArray instance is created for each row in the mazeWallArray. This means that if any function changes an item in one row it will change them in all o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constructMaze() {\n let wallMeshes = [];\n let floorMeshes = [];\n\n let width = 1;\n let height = 1;\n\n // rotations to get floor to wall orientation\n let leftRotation = vec3.fromValues(0, Math.PI / 2, 0);\n let rightRotation = vec3.fromValues(0, -Math.PI / 2, 0);\n let topRotat...
[ "0.79100305", "0.7637225", "0.74642015", "0.7388745", "0.7365375", "0.7320169", "0.7226174", "0.7117049", "0.71166706", "0.70837855", "0.69818324", "0.6979415", "0.6960892", "0.6960204", "0.6924742", "0.6918732", "0.69148993", "0.68598247", "0.6830835", "0.67753357", "0.67677...
0.6136283
82
this function is used to check the four squares around the currentPosition in our while loop to see if they are beside a path
function checkPathAround(position, checkingFrom = "all") { const x = position[0]; const y = position[1]; const onBottomRow = y === newPathArray.length - 1; const onTopRow = y === 0; const onLeftColumn = x === 0; const onRightColumn = x === newPathArray[0].length - 1; //each of these values checks if a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPath(currentPosition) {\r\n var i = 0,\r\n x = currentPosition[0], \r\n y = currentPosition[1],\r\n s = currentPosition[2];\r\n if (x < 3) {\r\n var s1 = grid[x+1][y].status;\r\n }\r\n if (y < 3) {\r\n var s2 = grid[x][y+1].status;\r\n...
[ "0.7017097", "0.67999214", "0.67215943", "0.67166585", "0.6691523", "0.66794413", "0.6663359", "0.6641424", "0.6620884", "0.6601705", "0.65977484", "0.657862", "0.65604794", "0.6527226", "0.6507771", "0.6504672", "0.6503812", "0.6503125", "0.65003544", "0.64963365", "0.647721...
0.7681982
0
adds traps to maze by changing random walls to traps, if difficulty is set to hard
function addTraps() { if(mazeDifficulty === "hard") { const possibleTrapPositions =[]; const numberOfTraps = 10; for (let i = 0; i < mazeWidth; i++) { for (let j = 0; j < mazeHeight; j++) { if (newPathArray[bottomRow - j][rightColumn - i] === 1) { possibleTrapPositions.push([rightColumn - i, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addRandomTraps(){\n // Create the random traps\n var randomTrap = [\n { trap : -1, message : 'You are bitten by a snake! <br> Go back ' },\n { trap : -3, message : 'Winter is Here! <br> Go back ' },\n { trap : -8, message : 'Shame! Shame! Shame! <br> You take the walk of shame!...
[ "0.67155284", "0.66834986", "0.6565567", "0.64795595", "0.64187706", "0.633941", "0.6158617", "0.61458796", "0.6140491", "0.6134751", "0.6118493", "0.6102803", "0.60830164", "0.60805017", "0.6070739", "0.606541", "0.60650396", "0.6046702", "0.60168755", "0.601038", "0.5959105...
0.8396555
0
This function is asking for start.php, receiving to start the motors
function start(num) { //send the number to start.php for changes //this is the http request var request = new XMLHttpRequest(); request.open( "GET" , "start.php?num=" + num, true); request.send(); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start(){\n switch(lCmd){\n case 'my-tweets':\n Tweets();\n break;\n case 'spotify-this-song':\n SpotifyCall(inputs);\n break;\n case 'movie-this':\n Movie(inputs);\n break;\n case 'do-what-it-says':\n ...
[ "0.67879236", "0.65504074", "0.64382434", "0.63853663", "0.6338906", "0.6328077", "0.6326529", "0.6324121", "0.6313511", "0.6310079", "0.6299181", "0.62888515", "0.6253745", "0.622977", "0.622423", "0.6215792", "0.62127537", "0.6203628", "0.6203079", "0.61812484", "0.6164033"...
0.599985
49
This function is asking for start.php, receiving to start the motors
function stop(num) { //this is the http request var request = new XMLHttpRequest(); request.open( "GET" , "stop.php", true); request.send(); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start(){\n switch(lCmd){\n case 'my-tweets':\n Tweets();\n break;\n case 'spotify-this-song':\n SpotifyCall(inputs);\n break;\n case 'movie-this':\n Movie(inputs);\n break;\n case 'do-what-it-says':\n ...
[ "0.6788206", "0.6550291", "0.6438984", "0.63852614", "0.63382024", "0.6327845", "0.63265747", "0.6323998", "0.63140017", "0.63104683", "0.6299105", "0.6289813", "0.625327", "0.6230652", "0.62245286", "0.6215264", "0.62135726", "0.6203931", "0.6202837", "0.618053", "0.616317",...
0.0
-1
Round count Function section
function rollAttempts(input, input2){ if(i%2==0 || (points[input][18]==10 && i==19)){ points[input][i]=Math.floor(Math.random()*11); }else if(points[input][i-1]==10){ points[input][i]=''; }else{ points[input][i]=Math.floor(Math.random()*(11-points[input][i-1])); } if(points[input][18]+poi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function incrementRound() {\n roundCounter += 1;\n if (roundCounter >= 2) {\n round += 1;\n roundCounter = 0;\n }\n}", "function roundScore(round){\n\treturn round[0]+round[1]\n}", "function round(){\n\t\trandomNumGen();\n\t\taddRound();\n\t\tincrement();\n\t}", "updateRound() {}", "function round...
[ "0.7019378", "0.6958869", "0.6712165", "0.6417578", "0.6390077", "0.63611645", "0.6356103", "0.6344345", "0.6293405", "0.62902516", "0.6225617", "0.6174123", "0.6146328", "0.61205655", "0.61115557", "0.6083906", "0.60708094", "0.60548705", "0.60516757", "0.6049134", "0.604055...
0.0
-1
Creating a span with winners names
function winnerSpan(){ var winnerSpan=''; $(winner).each(function(){ winnerSpan+=this+', '; }) winnerSpan=winnerSpan.substring(0,winnerSpan.length-2); return winnerSpan; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function whoWins(winner) {\r\n var winString = document.createElement(\"DIV\");\r\n winString.classList.add(\"winnerText\");\r\n\r\n if (winner == 1) {\r\n winString.innerHTML = \"Player Wins\";\r\n playerwins.innerHTML = ++playerHand.wins;\r\n\r\n } else {\r\n ...
[ "0.67211", "0.6674044", "0.6637113", "0.66323626", "0.6603802", "0.6575722", "0.65587914", "0.6543584", "0.6499522", "0.64342827", "0.64058894", "0.63369066", "0.6291143", "0.62907374", "0.6231697", "0.6219029", "0.6188764", "0.61726224", "0.6131419", "0.6120835", "0.6119389"...
0.7742811
0
transform ebnf to bnf if necessary
function extend (json, grammar) { json.bnf = ebnf ? transform(grammar) : grammar; return json; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOriginalBnf() {\n return this._orignalBnf;\n }", "function removeAppleInterchangeBrs() {\n\t\t\tparser.addNodeFilter('br', function(nodes) {\n\t\t\t\tvar i = nodes.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tif (nodes[i].attr('class') == 'Apple-interchange-newline') {\n\t\t\t\t\t\tnodes[i].remove();\n\t\t...
[ "0.49739286", "0.48477492", "0.48477492", "0.48477492", "0.46934906", "0.46483934", "0.46483934", "0.46483934", "0.46483934", "0.46483934", "0.46483934", "0.46483934", "0.46483934", "0.4507495", "0.44494984", "0.4374263", "0.4374263", "0.43650126", "0.43204758", "0.431681", "...
0.42629036
24
Web service to send all the product exist in the cart
function getProduct(pid, callback){ Product.findOne({_id:pid},function(error,productRes){ if(error){ callback(error,new Array()); }else{ callback(error,productRes); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addProductToCart(e) {\n e = e || window.event;\n\n \n let productID = parseInt(e.target.dataset.id);\n let productName = e.target.dataset.name;\n let productPrice = e.target.dataset.price;\n let productImage = e.target.dataset.image;\n let productQuantity = 1;\n\n\n $.ajax({\n ...
[ "0.71219534", "0.6938574", "0.6816929", "0.67622966", "0.6739188", "0.67053604", "0.6499395", "0.64706534", "0.6470228", "0.64698225", "0.6410945", "0.63951707", "0.6392892", "0.63502467", "0.6350061", "0.6343779", "0.6342992", "0.6330928", "0.63226485", "0.63214695", "0.6295...
0.0
-1
determines the type af a recording status
function getRecordingStatusIcon(status) { switch (status) { case 'scheduled': return 'static/img/watch.png'; case 'recording': return'static/img/recording.png'; case 'completed': return 'static/img/recCompleted.png'; case 'completedError': return 'static/img/recCompleted.png'; case 'completedWarn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateRecorderStatus(curStatus) {\n if (curStatus == \"stop\") {\n statusObj.setStatus(\"start\");\n } else if (curStatus == \"start\") {\n statusObj.setStatus(\"stop\");\n }\n }", "get recordType() {\n return this._recordType;\n }", "get isRecording() {...
[ "0.594133", "0.589702", "0.5892491", "0.58628416", "0.57924616", "0.566321", "0.5656969", "0.56036186", "0.5574906", "0.55718446", "0.54804885", "0.5467303", "0.5465426", "0.5448628", "0.5442078", "0.53985", "0.5392067", "0.53899705", "0.53478384", "0.5309099", "0.53003573", ...
0.5981506
0
formats EPG time to match universal time
function getUniversalTime(seconds) { secondsString = seconds.toString(); return parseInt(secondsString + '000'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _formatTime(time) {\n var timeFormatted = time.toISOString();\n if (timeFormatted.indexOf(\"T\") > 0)\n timeFormatted = timeFormatted.split('T')[1];\n if (timeFormatted.length > 8)\n timeFormatted = timeFormatted.substr(0, 8);\n return timeFormatted;\n}", "function reFormatTime...
[ "0.7200835", "0.71321344", "0.7083446", "0.7081965", "0.7021047", "0.700504", "0.69958425", "0.68913716", "0.6859273", "0.6855374", "0.68469167", "0.68431896", "0.68295664", "0.68167186", "0.6808233", "0.6786498", "0.67762715", "0.677537", "0.67633957", "0.67472756", "0.67181...
0.0
-1
returns the position (row, coulmm) of the currently selected epgUnit, if any, else false
function getGridPosition() { var selectedUnit = document.getElementsByClassName("selected"); if (angular.isDefined(selectedUnit[0])) { var rowIndex = selectedUnit[0]['className'].split(" ")[2].substring(8); var gridPos = rowIndex.split('-'); return gridPos; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isValidPosition (column, row) {\n // add logic that checks if the column and row exist in the grid\n // return true if they are valid and false if they are not\n var validColumn = column >= 0 && column < this.numberOfColumns;\n var validRow = row >= 0 && row < this.numberOfRows;\n\n return validColumn ...
[ "0.60695", "0.59611475", "0.59138674", "0.5835616", "0.5835616", "0.5835616", "0.5835616", "0.5835616", "0.5788117", "0.5757849", "0.5746926", "0.57344335", "0.57187533", "0.5689231", "0.5644222", "0.5636917", "0.55872613", "0.5584709", "0.55708927", "0.5570233", "0.5556197",...
0.67151654
0
Save the data which is marked as dirty
function saveDirtyData(){ return tempFileService.saveDirtyData(AUTO_SAVE_FILE, true, dirtyDataCol) .catch(function(){ scheduleDirtyDataSaving(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDirtyData(dirty) { \n\tdirtyData = dirty;\n}", "setDirty() {\n this.#isDirty = true;\n }", "async save() {\n // Check if anything has changed or stop here.\n const originData = await loadDataObject(this.dataKey)\n\n if (this.data === originData) {\n console.log('No...
[ "0.73234904", "0.68038994", "0.6665019", "0.6575717", "0.6526574", "0.6497824", "0.6467165", "0.6446272", "0.64287454", "0.6427423", "0.64130527", "0.6403128", "0.63952833", "0.63551027", "0.6341036", "0.6303537", "0.62445104", "0.6221261", "0.61705613", "0.61623657", "0.6161...
0.7403582
0
Checks if there is auto saved work
function checkAutoSavedWork(){ if(retrieving || loaded){ return $q.reject(); } retrieving = true; return tempFileService.checkSavedWork(AUTO_SAVE_FILE, foundAutoSavedCallbacks, true) .then(function(savedWork){ dirtyDataCol = savedWork; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function file_save_check() {\n\tif (!fs || !schedule_path || !schedule.autosave) {\n\t\t// Show the holy button of justice.\n\t\timg.save.style.opacity = 1;\n\t\timg.save.style.pointerEvents = \"auto\";\n\t} else\n\t\t// The user is no fun. Just auto-save it.\n\t\tfile_save();\n}", "function _check_if_exist_chan...
[ "0.71285075", "0.67159516", "0.66648406", "0.6530766", "0.6494373", "0.6489736", "0.64779896", "0.6344592", "0.6343106", "0.6322367", "0.6241266", "0.6191123", "0.61532384", "0.60912436", "0.60175645", "0.59932107", "0.5989354", "0.5956673", "0.5951885", "0.59276944", "0.5906...
0.794566
0
functions Inspect some sample members
function sourceMembers() { inspect(members, 'Test members', 6); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printMemberProps(member){\n console.log(`${member.name} plays ${member.instrument} in the Dum Dum Girls Band`);\n}", "printMemberProps(){\n console.log(`${this.name} plays ${this.instrument} in the Dum Dum Girls Band`);\n }", "function sample(){\r\nreturn this.hobby;\r\n}", "function in...
[ "0.64710647", "0.637279", "0.62269634", "0.58959526", "0.5858205", "0.5767346", "0.56732494", "0.56416774", "0.5623544", "0.56097454", "0.56029326", "0.55703795", "0.55463713", "0.55419403", "0.55218446", "0.5509702", "0.5508284", "0.54799134", "0.5479299", "0.5446788", "0.54...
0.7395559
0
Inspect a manuallycreated function
function sourceFunction() { inspect(func, 'Test function') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function functionName() { console.log('I am a function') }", "function fun() {\r\n console.log('this is a funtion');\r\n}", "function TrackByFunction() { }", "function TrackByFunction() { }", "\"function name\"(){\n //do thing\n }", "function TrackByFunction() {}", "function TrackByFunctio...
[ "0.67745996", "0.6435366", "0.64323515", "0.64323515", "0.64206403", "0.63973135", "0.63973135", "0.63973135", "0.6392978", "0.63381743", "0.63087034", "0.62782615", "0.62350273", "0.62246907", "0.6213347", "0.6209434", "0.6205994", "0.61943644", "0.61943644", "0.6174606", "0...
0.6905254
0
Render date range filter
function DateRangeFilter() { const dispatch = useDispatch() const filtersDates = useSelector(getFiltersDates) const { minDate, maxDate } = useSelector(getReleasesMinMaxDates) const { firstDayOfWeek } = useSelector(getSettings) const isPhone = useMediaQuery({ maxWidth: 425 }) const [focus, setFocus] = useSt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "applyCustomFilter() {\n const sDT = this.state.startDateTime;\n const eDT = this.state.endDateTime;\n if (!this.isDateRangeValid(sDT, eDT)) {\n return;\n }\n const startDT = new Date(sDT);\n const endDT = new Date(eDT);\n const startDTUNIX = Math.round(st...
[ "0.7214625", "0.683437", "0.6545299", "0.6533339", "0.6505097", "0.6454461", "0.6454461", "0.62915504", "0.6262237", "0.6229799", "0.6227089", "0.62241834", "0.6198041", "0.6193532", "0.6159892", "0.6131513", "0.6121524", "0.61091506", "0.6106028", "0.6086846", "0.5998591", ...
0.6035968
20
In development the requested server is the webserver from the electron app and not the development server of the react app. For production the requested server is the one and only.
function getServerURL() { const url = isDev ? "http://localhost:4000" : document.location.host; log("Requested server: ", url); return url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startDevServer() {\n const WDS = require('webpack-dev-server');\n\n const wpConf = getWebpackConfig();\n\n // Need to update the app entry for webpack-dev-server. This is necessary for\n // the auto page refresh to happen. See: https://github.com/webpack/webpack-dev-server/blob/master/examples...
[ "0.7029783", "0.69262433", "0.6923796", "0.6919958", "0.6776714", "0.65955746", "0.651783", "0.64803755", "0.6475003", "0.64089954", "0.63902694", "0.6386785", "0.6368143", "0.6363444", "0.6333139", "0.6332603", "0.6270476", "0.62263167", "0.61366975", "0.61359465", "0.612306...
0.71745425
0
Called when the session starts.
function onSessionStarted(sessionStartedRequest, session) { console.log("onSessionStarted requestId=" + sessionStartedRequest.requestId + ", sessionId=" + session.sessionId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSessionStarted(sessionStartedRequest, session) {\r\n // add any session init logic here\r\n}", "function onSessionStarted(sessionStartedRequest, session) {\n // add any session init logic here\n}", "function onSessionStarted(sessionStartedRequest, session) {\n // add any session init logic ...
[ "0.75810945", "0.75179505", "0.75179505", "0.75179505", "0.75179505", "0.74600154", "0.7365955", "0.7198625", "0.71575624", "0.7128697", "0.7036408", "0.67927635", "0.67824125", "0.67824125", "0.67824125", "0.67824125", "0.67824125", "0.67824125", "0.67824125", "0.67824125", ...
0.61790746
62
Called when the user launches the skill without specifying what they want.
function onLaunch(launchRequest, session, callback) { console.log("onLaunch requestId=" + launchRequest.requestId + ", sessionId=" + session.sessionId); // Dispatch to your skill's launch. getWelcomeResponse(callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onLaunch(launchRequest, session, callback){\n // Dispatch to your skill's launch.\n getWelcomeResponse(callback);\n}", "function onLaunch(launchRequest, session, callback) {\n // console.log(\"onLaunch requestId=\" + launchRequest.requestId);\n\n // skill launch\n getWelcomeResponse(callb...
[ "0.65584767", "0.6355056", "0.62594354", "0.6249609", "0.6249609", "0.6249609", "0.6213943", "0.62088114", "0.6173027", "0.6173027", "0.61665463", "0.6132036", "0.60647094", "0.60554457", "0.6054791", "0.6049323", "0.6030431", "0.6030431", "0.60210544", "0.60206544", "0.60206...
0.6256092
9
Called when the user specifies an intent for this skill.
function onIntent(intentRequest, session, callback) { console.log("onIntent requestId=" + intentRequest.requestId + ", sessionId=" + session.sessionId); console.log("session details:"+JSON.stringify(session)); var intent = intentRequest.intent, intentName = intentRequest.intent.name; var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onIntent(intentRequest, session, callback) {\n console.log(\"onIntent requestId=\" + intentRequest.requestId\n + \", sessionId=\" + session.sessionId);\n var intent = intentRequest.intent,\n intentName = intentRequest.intent.name; \n if (\"AMAZON.StartOverIntent\" === i...
[ "0.70363134", "0.6727909", "0.6708105", "0.6660388", "0.6628633", "0.66270834", "0.65778434", "0.6565171", "0.6563047", "0.65532583", "0.6542952", "0.65259904", "0.6475409", "0.6470738", "0.64675385", "0.64523065", "0.64523065", "0.64523065", "0.6449078", "0.6449078", "0.6449...
0.618377
39
Called when the user ends the session. Is not called when the skill returns shouldEndSession=true.
function onSessionEnded(sessionEndedRequest, session) { console.log("onSessionEnded requestId=" + sessionEndedRequest.requestId + ", sessionId=" + session.sessionId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "endSession() {\r\n this.endScript();\r\n this.cycler.endSession();\r\n }", "function endSession(inSessionID) {\n \n console.log(\"ending session\");\n \n}", "function sessionEnded(event, response, model) {\n model.exitQuestionMode();\n response.sendNil({saveState: true});\n}", "func...
[ "0.7796702", "0.7572096", "0.74966586", "0.74151033", "0.73257804", "0.71994585", "0.71994585", "0.71623003", "0.71526843", "0.71526843", "0.71526843", "0.7080483", "0.7077471", "0.7077471", "0.7077471", "0.7071268", "0.7059737", "0.7055808", "0.7055808", "0.7055808", "0.7055...
0.6877081
69
Functions that control the skill's behavior
function getWelcomeResponse(callback) { // If we wanted to initialize the session to have some attributes we could add those here. var sessionAttributes = {"istakeoff":false,"cusscount":0}; var cardTitle = "Welcome"; var speechOutput = "Howdy! This is your captain hawk. I can navigate the drone for you....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleSkill(name, skillParams) {\n const obj = this.objects[name];\n let { skillNum, position } = skillParams;\n let skill = Object.values(obj.skills)[skillNum];\n let skillSucceeed = false;\n\n if (!('maxCharge' in skill) && skill.curCoolDown > 0) { // not cooled down\n ...
[ "0.7241576", "0.63314104", "0.6308769", "0.6300569", "0.6296148", "0.6255247", "0.60103106", "0.5999269", "0.59753716", "0.59658927", "0.5945929", "0.5884784", "0.5859998", "0.58585143", "0.58560634", "0.5833714", "0.5830625", "0.5823028", "0.582289", "0.5811378", "0.5803702"...
0.0
-1
Helpers that build all of the responses
function buildSpeechletResponse(title, output, repromptText, shouldEndSession) { return { outputSpeech: { type: "PlainText", text: output }, card: { type: "Simple", title: "Project Topgun - " + title, content: output }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeQueryResponses()\n {\n let self = this;\n this.express.get(\"/orders\", function(_request, _response){\n self.queryResponse(_request, _response, \"orders\");\n });\n\n this.express.get(\"/customers\", function(_request, _response){\n self.queryResponse...
[ "0.6703836", "0.6645751", "0.63061225", "0.6139846", "0.6110028", "0.6055682", "0.5960746", "0.5947273", "0.59134555", "0.58985746", "0.58517355", "0.58055645", "0.577443", "0.5772746", "0.5766022", "0.575232", "0.57401025", "0.57109296", "0.5682852", "0.5672369", "0.56609565...
0.0
-1
checks if a least one of the radio buttons is selected
function optionValidate(optionQuestion, proceed){ if($(optionQuestion).find('.option:checked').length == 0){ proceed = false; $(optionQuestion).find('.feedback').show(); $(optionQuestion).find('.feedback').text('Please pick an option below.'); } return proceed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function radioCheck() {\r\n\tvar query=document.getElementsByName(\"gsize\");\r\n\tvar isChecked = false;\r\n\tfor(var i = 0; i < query.length; i++) {\r\n\t\tif (query[i].checked)\r\n\t\t{\r\n\t\t\tisChecked = true;\r\n\t\t\tconsole.log(\"Found one radio that is checked!\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\t\r\n\t...
[ "0.6859526", "0.6825848", "0.6763561", "0.6761079", "0.66288996", "0.65949017", "0.6574428", "0.65407616", "0.65186137", "0.6503403", "0.6442223", "0.6429773", "0.6381849", "0.63648605", "0.63518083", "0.635062", "0.6340447", "0.63358676", "0.6315039", "0.6313921", "0.6272986...
0.0
-1
Add a new query to do
addQueryToDo(queryToDo) { this.queriesToDo.push(queryToDo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addQuery(query){\n databaseAccess(dbAdd, {'query': query, 'when': new Date()}, function(results){});\n}", "function addQuery(query) {\n try {\n if(!g_query) {\n g_query = query;\n }\n else {\n g_query = `${g_query}, ${query}`;\n }\n }\n catch(err) {\n logExcept...
[ "0.8078192", "0.7504421", "0.71146786", "0.7033193", "0.7021727", "0.70115316", "0.68122625", "0.67114174", "0.65553534", "0.6550212", "0.6388518", "0.63629955", "0.62827706", "0.6251859", "0.6249867", "0.6241021", "0.6221633", "0.6212394", "0.6212394", "0.6212394", "0.621052...
0.6731021
7
Add remaining queries to the queries to do so they can be done first
addRemainingQueriesToTheTop(remainingQueries) { remainingQueries.reverse(); for(let query of remainingQueries) { this.queriesToDo.unshift(query); } this.remainingQueries = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateRemainingQueries(queries) {\n for (let query of queries) {\n this.remainingQueries.push(query);\n }\n }", "function insertQueries() {\n\n }", "function startDatabaseQueries() {\n \n}", "function testQueries() {\n const queries = [\n // findAndSearch(),\n // createNote()\n //...
[ "0.6978041", "0.6356015", "0.6101265", "0.6098554", "0.6036792", "0.6007019", "0.59703577", "0.5865551", "0.58429986", "0.5837744", "0.5837744", "0.5837744", "0.5821056", "0.5802751", "0.57992077", "0.57992077", "0.5772533", "0.57187855", "0.57187855", "0.57187855", "0.568379...
0.69949687
0
Update the remaining queries with new queries to do
updateRemainingQueries(queries) { for (let query of queries) { this.remainingQueries.push(query); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reQuery() {\n\n // Update our different OData strings\n updateFilterString();\n updateSortString();\n\n // Refresh the visual collection, resulting in the table refreshing\n properties.visualCollection.refresh();\n\n }", "function updateQuery...
[ "0.6963434", "0.6317619", "0.63112175", "0.6239954", "0.62293196", "0.6211889", "0.6206844", "0.61619973", "0.6103792", "0.608119", "0.60747486", "0.601937", "0.6004162", "0.6004162", "0.6004162", "0.6004162", "0.6004162", "0.6004162", "0.59440506", "0.5886115", "0.5876508", ...
0.7798623
0
Add a new query to other user
addQueryToOtherUser(queryToOtherUser) { this.queriesToOtherUsers.push(queryToOtherUser); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addQuery(query){\n databaseAccess(dbAdd, {'query': query, 'when': new Date()}, function(results){});\n}", "function addQuery(query) {\n try {\n if(!g_query) {\n g_query = query;\n }\n else {\n g_query = `${g_query}, ${query}`;\n }\n }\n catch(err) {\n logExcept...
[ "0.6747676", "0.6365045", "0.6188246", "0.61613417", "0.6036659", "0.6034444", "0.5896445", "0.5863294", "0.57983094", "0.5785247", "0.57459164", "0.5703706", "0.5685355", "0.5635616", "0.56030786", "0.5514473", "0.55118334", "0.55045646", "0.54699355", "0.5453281", "0.544994...
0.80886024
0
debounce function to slow down firing
function debounce(func, wait, immediate) { var timeout; return function() { var context = this, args = arguments; var later = function() { timeout = null; if (!immediate) func.apply(context, args); }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "debounce(fn, quietMillis, bindedThis) {\n let isWaiting = false;\n return function func() {\n if (isWaiting) return;\n\n if (bindedThis === undefined) {\n bindedThis = this;\n }\n\n fn.apply(bindedThis, arguments);\n isWaiting = true;\n\n setTimeout(func...
[ "0.7757284", "0.7636204", "0.7306697", "0.72864854", "0.72821295", "0.72562903", "0.7239678", "0.7218378", "0.7199021", "0.71860874", "0.71860874", "0.71860874", "0.70622087", "0.7058993", "0.7050804", "0.7044579", "0.7044579", "0.7041319", "0.7024989", "0.7020402", "0.701738...
0.0
-1
Gets username and pw from storage if in dev mode
async getCredentials() { var username = await AsyncStorage.getItem('username'); var password = await AsyncStorage.getItem('password'); if (username) { this.setState({ save: true, username: username, password: password }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadStoredCredentials() {\n\n let stored = localStorage.getItem(\"__stitch.creds\");\n\n if (stored != null) {\n let obj = JSON.parse(stored);\n this.email = obj.email;\n this.password = obj.password;\n return obj;\n }\n\n // be sure to have c...
[ "0.6871867", "0.6564633", "0.6456876", "0.644325", "0.64428586", "0.64104474", "0.6364089", "0.6293729", "0.6290315", "0.6290315", "0.6232529", "0.62008774", "0.61765146", "0.61734444", "0.6134124", "0.6097774", "0.6096473", "0.60844874", "0.60829073", "0.60701805", "0.606779...
0.6962822
0
Sets User login and organization for later use in voting etc.
async setUserData() { var userinfo; await AppX.fetch('User', 'self').then(async result => { var info = result.data; global.userLogin = info.login; await AppX.fetch('OrganizationDetail', info.organizationUid).then(result => { global.userOrgName = result.data.name; }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUserData() {\n //TODO: for non-social logins - userService is handling this - not a current issue b/c there is no data for these right after reg, but needs to be consistent!\n authService.setUserCUGDetails();\n authService.setUserLocation();\n authService.setUser...
[ "0.6515532", "0.62394327", "0.62358785", "0.6221239", "0.6206446", "0.61385024", "0.61346394", "0.6095031", "0.6057544", "0.60515153", "0.6011855", "0.59792405", "0.59617704", "0.59588367", "0.592719", "0.5901319", "0.587359", "0.5859544", "0.5843182", "0.5843182", "0.5839932...
0.71496123
0
Saves username and pw if in dev mode
async setCredentials() { if (this.state.save) { await AsyncStorage.setItem('username', this.state.username); await AsyncStorage.setItem('password', this.state.password); } else { await AsyncStorage.setItem('username', ''); await AsyncStorage.setItem('password', ''); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveCredentials() {\n\tvar username = document.getElementById(\"username\").value;\n\tvar password = document.getElementById(\"password\").value;\n\tvar creds = {\n\t\t\tuser: username,\n\t\t\tpass: password\n\t};\n\tvar store = JSON.stringify(creds);\n\tlocalStorage.setItem(\"AtmosphereLogin\", store);\n...
[ "0.6834445", "0.67606765", "0.67532474", "0.6441462", "0.64029527", "0.63887376", "0.6383766", "0.6214089", "0.6199387", "0.6182161", "0.615927", "0.61107546", "0.6110425", "0.6101033", "0.60804075", "0.60540926", "0.6045985", "0.6040566", "0.60380685", "0.5977322", "0.597335...
0.6683628
3
Signs in the user with the current username, password, and eid
async login(event) { this.setState({ loading: true }); var appx = await AppX.login(this.state.username, this.state.password, this.state.eid, this.environment); this.setUserData(); this.setState({ loading: false }); if (appx.data) { if (__DEV__) { this.setCredentials() } this.props.navigator.re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function u_login(ctx, email, password, uh, permanent) {\n ctx.result = u_login2;\n ctx.permanent = permanent;\n api_getsid(ctx, email, prepare_key_pw(password), uh);\n}", "signIn(email, password) {\n /* Sign in the user */\n\n }", "signIn() {}", "function loginUser(ev) {\n ev.preventDefau...
[ "0.6723671", "0.64699817", "0.6375609", "0.6332185", "0.62755233", "0.6244768", "0.621661", "0.6193802", "0.61311185", "0.6091665", "0.60642815", "0.6042294", "0.60391325", "0.60357493", "0.6007332", "0.59800684", "0.59648895", "0.5960052", "0.5956023", "0.59260094", "0.59243...
0.0
-1
Renders a page with a login fields and a button to submit
render() { return ( <Page> <Card> <TextInput label='Username' value={this.state.username} onChangeText={(text) => this.setState({ username: text })} autoCapitalize='none' autoFocus={true} /> <TextInput label='Password' value={this.state.password} o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loginDiv(){\n var emailAddress = gui.textInput(\"Email Address:\",\"emailAddressLogin\");\n var password = gui.textInput(\"Password:\",\"passwordLogin\",true);\n var submit = gui.buttonInput(\"Log in\",\"loginSubmit\");\n var resetPassword = gui.buttonInput(\"Reset passwor...
[ "0.74339706", "0.7149145", "0.71191293", "0.7063787", "0.70618135", "0.70609695", "0.70609695", "0.7036519", "0.69881505", "0.69345826", "0.6932441", "0.69319415", "0.691179", "0.6898554", "0.683951", "0.68184286", "0.6810531", "0.67949176", "0.6788267", "0.6788267", "0.67801...
0.0
-1
Your task is to return either: true if all developers in the list code in the same language; or false otherwise.
function isSameLanguage(list) { return list.every(l => l.language === list[0].language) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRubyComing(list) {\n return list.some(e => e.language === 'Ruby');\n}", "hasLang(_lang) {\n return BROWSER_TYPE.lang.includes(_lang);\n }", "hasLang(_lang) {\n return BROWSER_TYPE.lang.includes(_lang);\n }", "function langFilter(gist) {\n var match = false;\n gist.languages.forEach(...
[ "0.68803406", "0.65699804", "0.65699804", "0.6443016", "0.62245", "0.6181552", "0.6147806", "0.6039944", "0.58006096", "0.57835513", "0.5632223", "0.5622177", "0.56147623", "0.56147623", "0.56090045", "0.55964977", "0.5567871", "0.5564447", "0.551099", "0.5451063", "0.5417229...
0.6751295
1
console.log(abc); console.log(abc()); console.log(abc + 6); console.log(abc() + 6); higher order functions
function num(upto) { // 8 for (var i = 0; i <= upto; i++){ console.log(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cal(){\n console.log(2+3)\n}", "function suma() {\n console.log(5 + 5);\n}", "function abc (a, b, bla ){\n return bla(a,b)\n }", "function suma(){ \n console.log(2+2);\n}", "function add(a, b){\r\nvar c= a+b;\r\nconsole.log(c);\r\n\r\n}", "function a(b){\n    console.log(b);\n re...
[ "0.6769056", "0.6668642", "0.662632", "0.6568513", "0.6564357", "0.6522595", "0.6500261", "0.6478031", "0.64748394", "0.6440089", "0.6433853", "0.6422317", "0.6412409", "0.6412409", "0.6402973", "0.63959855", "0.63925064", "0.6388502", "0.6377209", "0.6375805", "0.6369577", ...
0.0
-1
h(x) = f(g(x)) nested function
function hypo(a, b) { function square(x) { return x * x; } return Math.sqrt(square(a)+ square(b)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function g(x) {}", "function g(x) {}", "function g() { return function h () { return 1+1; };}", "function f(){\n g();\n}", "function g()\n{\n return f.call(this);\n}", "function B(f) {\n return function(g) {\n return function(x) {\n return f (g (x));\n };\n };\n }", "fun...
[ "0.6678697", "0.6678697", "0.6666779", "0.66216487", "0.6503068", "0.64764214", "0.64764214", "0.639269", "0.63799477", "0.6323007", "0.63060105", "0.62658453", "0.6264515", "0.62596077", "0.6197491", "0.6144047", "0.61346495", "0.6069887", "0.5990373", "0.59543186", "0.59365...
0.0
-1
console.log(hypo(3, 4)); square(3); // this is not defined
function hypo(a, b) { var y = 45; function square(x) { console.log(y); return x * x; } return Math.sqrt(square(a)+ square(b)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hypo(a, b) {\n function square(x) {\n return x * x;\n }\n return Math.sqrt(square(a)+ square(b))\n}", "function square(x){\n\tconsole.log(x*x);\n}", "function square(x) {\n console.log(Math.sqrt(x));\n}", "function square() {\n\n}", "function square(x){\n return x*x;\n}", "...
[ "0.72088504", "0.71787566", "0.7141854", "0.705539", "0.70445", "0.7012314", "0.7007333", "0.69892645", "0.6974697", "0.69704944", "0.6944786", "0.69336486", "0.6867592", "0.6867592", "0.68537796", "0.6844905", "0.683604", "0.683604", "0.683604", "0.68116486", "0.67715245", ...
0.8138016
0
example for closure var stepoftwo= step_iterator(0, 2)
function step_iterator(start, step) { return function () { var res = start; start = start + step; return res; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "nextstep(step) {}", "[Symbol.iterator](){\n let index = 0;\n return {//iterable object\n next(){\n index++;\n return {\n value: index * 5,\n done: index > 5 \n ...
[ "0.69472915", "0.6530526", "0.6402073", "0.6373181", "0.63006663", "0.628014", "0.62707806", "0.62457865", "0.621434", "0.6193291", "0.6094646", "0.5989459", "0.59520495", "0.59163046", "0.59163046", "0.58951217", "0.58863413", "0.58777773", "0.58777773", "0.58777773", "0.587...
0.8036208
0
area of the circle
function area(r) { return r*r }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "area() {\n return 4 * (3.14) * (this.radius**2)\n }", "function circleArea(radius) {\n return Math.PI * radius * radius\n}", "findArea() {\n console.log(\"The area of this circle is: \" + this.pi * (this.rayon * this.rayon));\n }", "function circleArea(r){\n //calc area Pi *...
[ "0.8380617", "0.8303242", "0.8232237", "0.8150089", "0.81477606", "0.8131432", "0.81033194", "0.8100507", "0.80652374", "0.799965", "0.7986356", "0.79493237", "0.79388356", "0.79101557", "0.79098207", "0.79030526", "0.7901287", "0.7884465", "0.78784287", "0.78608197", "0.7832...
0.75681746
32
! vuerouter v3.0.2 (c) 2018 Evan You
function a(e,t){0}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}", "func...
[ "0.60415715", "0.5918748", "0.5844924", "0.5757533", "0.5714492", "0.5661645", "0.56571835", "0.557702", "0.5551288", "0.5537155", "0.5529827", "0.5528053", "0.5526852", "0.5525806", "0.5488529", "0.54618627", "0.5449665", "0.54413414", "0.54372483", "0.5416988", "0.5402368",...
0.0
-1