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
> if point table row are pressed
function getDataPoints(){ var selected = $(this).hasClass('highlight'); $("#tablepoints tr").removeClass('highlight'); if(!selected){ $(this).addClass('highlight'); } if(rowPointsMarked){ $('#tablepoints td').eq(rownumberPoints).html($('#point_name').val()); // save inf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function give_up(){\n // if button on line \n}", "function cell_click(evt) {\n let cell_id = evt.srcElement.id;\n let id = cell_id.split(\"_\");\n let x = parseInt(id[0]);\n let y = parseInt(id[1]);\n\n switch (evt.which) {\n case LEFT:\n cell_on(x, y);\n break;\n case MIDDLE:\n cell_t...
[ "0.6720323", "0.63827926", "0.637683", "0.62907845", "0.62727225", "0.62522036", "0.62505746", "0.62149954", "0.62113863", "0.6194761", "0.6140219", "0.613502", "0.6083838", "0.6018158", "0.60101324", "0.600325", "0.5989719", "0.59628475", "0.59620047", "0.5948412", "0.591198...
0.0
-1
pay more popup close
function pay_more_close() { $(".pay-more-popup-close").click(function() { $(".dialog_box").empty(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OnClickTakeMoneyOut() {\n this.setPopupTransaction(SessionConstant.POPUP_TAKE_MONEY_OUT);\n }", "function moreClose() {\n\t$.Wrapper.height = \"60dp\";\n\t$.moreOpen = false;\n}", "function closeCVVPopup() {\n\tactivateCheckoutPayButton(); \n\t$('#cvvValue').val('');\n\tcloseAnimatedPopup('cvvFill',...
[ "0.67391336", "0.6731888", "0.66001254", "0.65769947", "0.64552087", "0.64396435", "0.6439376", "0.6376705", "0.63750666", "0.6366744", "0.6350102", "0.63265437", "0.631805", "0.6304108", "0.622253", "0.62210995", "0.61447716", "0.61199206", "0.6104346", "0.60975194", "0.6096...
0.8220102
0
generic logging for errors
function handleError(err){ //TODO: we need to handle the error correctly here... if (err && err.data) { //need to set it to .data because this handles the error //bubbling up from $http and from the taskman event err = err.data; } if (err) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "error(...theArgs) { return this._log('ERROR', {}, theArgs); }", "function error() {\n var args = [];\n for (var _i = 0; _i < (arguments.length - 0); _i++) {\n args[_i] = arguments[_i + 0];\n }\n // Short circuit if logging is disabled. This is as close to noop as we ca...
[ "0.723521", "0.7113875", "0.7056619", "0.69236165", "0.686832", "0.6798942", "0.67944896", "0.67227507", "0.671867", "0.66877496", "0.6686115", "0.6683685", "0.6677362", "0.6673206", "0.66668016", "0.6636847", "0.6633509", "0.66020924", "0.65172845", "0.6483203", "0.64815843"...
0.0
-1
Set up the sign in form
function signInSetup() { // Set the sign in button on-click function $('#login').submit(function(event) { event.preventDefault(); // Get the data from form let formData = $('#login').serialize(); // Send post AJAX $.post('/signIn', formData, function(data) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initSignin() {\n const signinForm = document.querySelector('.signup-signin-form form');\n signinForm.addEventListener('submit', signin);\n}", "signIn() {}", "function interactiveSignIn() {\r\n }", "signIn() {\n\n if (this.$.form.validate()) {\n let phone = this.phone;\n ...
[ "0.69994247", "0.6847248", "0.65233", "0.65011895", "0.64935505", "0.63654983", "0.6350049", "0.62421525", "0.6219474", "0.62156767", "0.62057537", "0.6176686", "0.6173696", "0.61545396", "0.6129197", "0.6126437", "0.6111836", "0.61010796", "0.60965973", "0.6092444", "0.60924...
0.0
-1
Start Show Unread Message Data
function ShowUnreadMsgDetl() { $("#tblUnreadmsgList tr").remove(); var count = 0; var countunread = 0; totalmessagecount = 0; $.ajax({ type: "post", url: "Dashboard.aspx/ShowMsg", contentType: "application/json", dataType: "json", success: function (response)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receiver(data) {\n var msg = JSON.parse(data);\n var text = display.textContent;\n if (msg.key !== undefined) {\n switch (msg.key) {\n case 0x08:\n display.textContent = text.substr(0, text.length - 1);\n break;\n case 0x0d:\n display.textContent = text + '\\n'...
[ "0.59411365", "0.5892271", "0.58526725", "0.5795128", "0.57587457", "0.5710215", "0.570738", "0.5686354", "0.560214", "0.5592617", "0.5522074", "0.54694337", "0.5467774", "0.54085886", "0.5405037", "0.53955376", "0.53901786", "0.5359271", "0.5341976", "0.5338524", "0.533757",...
0.0
-1
Simple json file containing all ressources routes
buildRouter(routes) { for (let resource in routes) { this.buildRoute(routes[resource], resource, (route, controller)=> { let appRoute = new Route(controller); appRoute.createRoute(route); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function routes() {\n\n return getCsvAsObjects(baseUrl + routesFile);\n}", "function routesFromFilejs(downloadJson, userRoutes) {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = 'assets/data/routes-content.js';\n script.onload = function () {\n function ...
[ "0.66354704", "0.6547485", "0.62773985", "0.61526835", "0.5779335", "0.576918", "0.57610923", "0.5738952", "0.5721867", "0.5712642", "0.56526667", "0.5638227", "0.5625757", "0.56114006", "0.55944806", "0.5582013", "0.55512625", "0.5512032", "0.5502998", "0.5502998", "0.550229...
0.5250276
44
split array de donos
onElementoPressed(elemento){ this.props.navigator.push({ name: 'Detalles', passProps: {elemento: elemento} }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function divideInArray(elenco){\n return parola=elenco.split(\" \");\n}", "function split(array) {\n let middle = Math.floor(array.length / 2);\n let l = array.slice(0, middle);\n let r = array.slice(middle);\n return [l, r];\n}", "function split(arr){\n let newArr = [];\n for(let i = 0; i < arr.len...
[ "0.7278099", "0.67245305", "0.6688615", "0.6676389", "0.652713", "0.64705247", "0.64180386", "0.6275677", "0.61976254", "0.6176483", "0.61453354", "0.6134529", "0.61319935", "0.61313826", "0.60141975", "0.59711415", "0.5952787", "0.59398174", "0.58840424", "0.5866546", "0.585...
0.0
-1
Fethc and filter data
componentDidMount() { d3.csv(file).then((res) => { // Did filter by rating but changed to data to comparte with stock chart // data = data.filter((data) => data.IMDB_Rating >= 80); this.setState({ data: res, filteredData: res }); this.setState({ singleData: this.state.filteredData[0]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterfunction() {\n let filterdata = tableData;\n Object.entries(filters).forEach(([key, value]) => {\n filterdata = filterdata.filter(uSighting => uSighting[key] === value);\n });\n buildtable(filterdata);\n\n}", "function filter() {\n \n}", "filter() {\n\n\n /** This is...
[ "0.6812464", "0.6731128", "0.66714823", "0.6614222", "0.6608895", "0.6604481", "0.6593803", "0.6572927", "0.6556946", "0.6555278", "0.65286773", "0.6504581", "0.64956623", "0.6418039", "0.6411937", "0.6411937", "0.6407565", "0.64028364", "0.63949007", "0.6377346", "0.6374984"...
0.0
-1
Animated Dropdown Menu Hamburger =========================
function dropdownEffectData(target) { // @todo - page level global? var effectInDefault = null, effectOutDefault = null; var dropdown = $(target), dropdownMenu = $('.dropdown-menu', target); var parentUl = dropdown.parents('ul.nav'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hamburgerMenu() {\n mainNav.classList.toggle('slide-toggle');\n hamNavCon.classList.toggle('slide-toggle');\n hamburger.classList.toggle('expanded');\n }", "function toggleNav () {\n var hamIcon = document.getElementById('ham-icon');\n\n // animate from 3 bars t...
[ "0.77390796", "0.7220627", "0.7170271", "0.71482956", "0.71321726", "0.7107393", "0.7067385", "0.70538765", "0.7039448", "0.70221984", "0.6940803", "0.6933625", "0.6926967", "0.6894595", "0.6891046", "0.6886355", "0.68602204", "0.6845424", "0.68221396", "0.6805425", "0.679755...
0.0
-1
Custom function to start effect (in or out) =========================
function dropdownEffectStart(data, effectToStart) { if (effectToStart) { data.dropdown.addClass('dropdown-animating'); data.dropdownMenu.addClass('animated'); data.dropdownMenu.addClass(effectToStart); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Start () {}", "function start() {\n action(1, 0, 0);\n}", "function startDamage(){\n\ttoggletoDamage();\n}", "function runEffect() {\r\n\t\t// get effect type from\r\n\t\tvar selectedEffect = $(\"#panel\");\r\n\r\n\t\t// most effect types need no options passed by default\r\n\r\n\t\t// run the ef...
[ "0.6821658", "0.6649457", "0.65748936", "0.64825493", "0.64176184", "0.6399654", "0.6378085", "0.6369646", "0.6357295", "0.63456804", "0.6329892", "0.6309093", "0.62890035", "0.62878966", "0.62684345", "0.6267236", "0.6249893", "0.6241623", "0.62210536", "0.6217361", "0.62059...
0.0
-1
Custom function to read when animation is over =========================
function dropdownEffectEnd(data, callbackFunc) { var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; data.dropdown.one(animationEnd, function() { data.dropdown.removeClass('dropdown-animating'); data.dropdownMenu.remo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isAnimating() {\n return animationFrame > 1;\n }", "get current_animation() { return (this.is_playing() ? this.playback.assigned : '') }", "onAnimationEnd() {\n\n }", "function animcompleted() {\n\t\t\t\t\t\t}", "function OnMouseEnter() {\n if (!animation.IsPlaying(\"mouseOverEffect\"))\n ...
[ "0.69256914", "0.68573284", "0.6449349", "0.644168", "0.6422115", "0.6410738", "0.63986963", "0.63316274", "0.63116276", "0.6272712", "0.62714255", "0.6263975", "0.6249067", "0.6249067", "0.62490225", "0.62490225", "0.6239695", "0.62125343", "0.62102276", "0.6183308", "0.6180...
0.0
-1
========================================================================= Contact Form =========================================================================
function isJSON(val){ var str = val.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doModalContact() {\n\tcustomModalBox.htmlBox('yt-ContactContent', '', 'Contact'); \n\t$('mb_close_link').addEvent('click', function() {\n\t\t$('yt-ContactContent').injectInside(document.forms[0]);\n\t});\n}", "function contact(){\n\t\t$('.contact-us').click(function(){\n\t\t\t$('.contact-form').toggleCl...
[ "0.7059581", "0.70316094", "0.70052934", "0.70041585", "0.6946186", "0.6877382", "0.6850923", "0.6840947", "0.68408144", "0.68055934", "0.6787763", "0.676649", "0.6761338", "0.6757281", "0.6733083", "0.6706319", "0.6703581", "0.6689369", "0.66181207", "0.6587534", "0.65507627...
0.0
-1
Constructor de class basique
constructor (props) { super(props); this.state = { legume : this.props.legume, peoples: [] } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor (){}", "constructor( ) {}", "consructor() {\n }", "constructor() {\r\n // ohne Inhalt\r\n }", "function Con...
[ "0.8994812", "0.8431206", "0.8431206", "0.8431206", "0.8431206", "0.8431206", "0.8431206", "0.8431206", "0.8404367", "0.8218966", "0.81670445", "0.8142705", "0.8060655", "0.8060655", "0.8060655", "0.7967549", "0.7879561", "0.78773284", "0.78773284", "0.78773284", "0.78773284"...
0.0
-1
6e apres le render
componentDidUpdate () { console.log('methode componentDidUpdate a ete appele') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {}", "render() {}", "render() {}", "static rendered () {}", "static rendered () {}", "function render() {\n\n\t\t\t}", "function render() {\n\t\t\t}", "function render() {\n\t\t\n\t}", "_render() {}", "render(){}", "render(){}", "render() { }", "function render() {\n\t}", "render...
[ "0.7435758", "0.7435758", "0.7435758", "0.72563165", "0.72563165", "0.7211812", "0.7207187", "0.719574", "0.71671414", "0.7064594", "0.7064594", "0.6978441", "0.69762546", "0.69744295", "0.69744295", "0.6852162", "0.6852162", "0.6803807", "0.67971545", "0.6669776", "0.6542765...
0.0
-1
O(n) > Linear Time
function compressItems(items) { console.log(items[0]); // O(1) --> Constant time }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function boooo(n) {\n for (let i = 0; i < n; i++) { // O(1)\n console.log('booooo');\n }\n}", "function findUniqueValues(arr){ //O(n) // You wrote this\r\n let uniqueVal = []; \r\n let left = 0; \r\n let right = arr.length - 1;\r\n while(left < right){ ...
[ "0.6558376", "0.61706096", "0.6096766", "0.6047309", "0.6019558", "0.59732544", "0.59732544", "0.5959482", "0.5946261", "0.5927719", "0.5919625", "0.588723", "0.5872994", "0.58348197", "0.58276737", "0.5813362", "0.5803067", "0.580234", "0.5770206", "0.5758757", "0.5755525", ...
0.0
-1
O(2) > Constant time What is the Big O of the below function?
function funChallenge(input) { let a = 10; // O(1) a = 50 + 3; // O(1) for (let i = 0; i < input.length; i++) { // O(n) --> number of inputs anotherFunction(); // O(n) let stranger = true; // O(n) a++; // O(n) } return a; // O(1) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function funChallenge(input) {\n let a = 10; // O(1)\n a = 50 + 3; // O(1)\n\n for (let i = 0; i < input.length; i++) {\n // O(n)\n anotherFunction(); // O(n)\n let stranger = true; // O(n)\n a++; // O(n)\n }\n return a; // O(1)\n}", "function boooo(n) {\n for (let i = 0; i < n; i++) { // O(1)\...
[ "0.6590308", "0.62183", "0.61375564", "0.6049368", "0.5971923", "0.59705913", "0.59432656", "0.58931583", "0.58428794", "0.5780436", "0.57571787", "0.57274956", "0.5685041", "0.5625243", "0.561946", "0.5571036", "0.55465764", "0.546824", "0.54282624", "0.54279816", "0.5417442...
0.6487245
1
BIG O(3 + 4n) > O(n) What is the Big O of the below function?
function anotherFunChallenge(input) { let a = 5; // O(1) let b = 10; // O(1) let c = 50; // O(1) for (let i = 0; i < input; i++) { // O(n) --> numbers of inputs let x = i + 1; // O(n) let y = i + 2; // O(n) let z = i + 3; // O(n) } for (let j = 0; j < input; j++) { // O(n) --> numbers of...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function boooo(n) {\n for (let i = 0; i < n; i++) { // O(1)\n console.log('booooo');\n }\n}", "function funChallenge(input) {\n let a = 10; // O(1)\n a = 50 + 3; // O(1)\n\n for (let i = 0; i < input.length; i++) {\n // O(n)\n anotherFunction(); // O(n)\n let stranger = true; // O(n)\n a++;...
[ "0.6335979", "0.6299305", "0.6280853", "0.6254018", "0.6237133", "0.6196505", "0.61011755", "0.6083642", "0.6057822", "0.6030911", "0.60203975", "0.5976925", "0.5960952", "0.5950295", "0.5943785", "0.5918819", "0.5893739", "0.58699584", "0.5843195", "0.58236116", "0.5806352",...
0.61973196
5
BIG O(4 + 7n) > O(n) Big O Rules 1) Worst Case (finding the worst case of Big O in for example an array if we had an array and we're searching for an item in it and it was the first item then we won't loop thru all of the array to find it but what if it was the last item ? then we would loop thru all of the array to ge...
function printTheFirstItemThenFirstHalfThenSayHi100Times(items) { console.log(items[0]); var middleIndex = Math.floor(items.length / 2); var index = 0; while (index < middleIndex) { console.log(items[index]); index++; } for (var i = 0; i < 100; i++) { console.log('hi'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchNaive(arr, n){ // O(n) Linear Search\r\n for(let i = 0; i < arr.length; i++){\r\n if(arr[i] === n){\r\n return i;\r\n } \r\n }\r\n return -1;\r\n}", "function naiveSearch(array, item) {\n for (let i = 0; i < array.length; i++) { // --> O(n) line...
[ "0.66595584", "0.65289456", "0.6489527", "0.6484412", "0.6480744", "0.62982655", "0.6291618", "0.62821794", "0.6281002", "0.62490183", "0.62490183", "0.6246312", "0.6234075", "0.61960655", "0.6151972", "0.61324096", "0.61161137", "0.6103818", "0.61025816", "0.6076863", "0.602...
0.0
-1
O(1 + n/2 + 100) O(n/2 + 101) O(n/2 + 1) O(n + 1) O(n)
function compressBoxesTwice(boxes) { boxes.forEach(function (boxes) { console.log(boxes); }); boxes.forEach(function (boxes) { console.log(boxes); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function boooo(n) {\n for (let i = 0; i < n; i++) { // O(1)\n console.log('booooo');\n }\n}", "function mystery(n) {\n let r = 0;\n for (let i = 0; i < n; i++) {\n for (let j = i + 1; j <= n; j++) {\n for (let k = 1; k < j; k++) {\n r++;\n }\n }\n }\n return r;\n}", "function ...
[ "0.7081032", "0.6799936", "0.66849333", "0.64570755", "0.6449456", "0.6440532", "0.639932", "0.6392395", "0.6371951", "0.63424444", "0.6256989", "0.62467027", "0.62430775", "0.620127", "0.6158798", "0.6128944", "0.6116884", "0.611303", "0.61098015", "0.6091131", "0.6089262", ...
0.0
-1
O(2n) O(2) no matter how much constants we have got in the BIG O for example O (1 + n/2 + 100) it will turn into > O(n) so any number in compare of N would be nothing so it is better to remove it. 3) Different Terms For Inputs
function compressBoxesTwice(boxes, boxes2) { boxes.forEach(function (boxes) { console.log(boxes); }); boxes2.forEach(function (boxes) { console.log(boxes); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function anotherFunChallenge(input) {\n let a = 5; // O(1)\n let b = 10; // O(1)\n let c = 50; // O(1)\n for (let i = 0; i < input; i++) {\n // O(n) --> numbers of inputs\n let x = i + 1; // O(n)\n let y = i + 2; // O(n)\n let z = i + 3; // O(n)\n }\n for (let j = 0; j < input; j++) {\n // O(n...
[ "0.7208656", "0.71837926", "0.71793413", "0.7002531", "0.63753176", "0.6323865", "0.6299064", "0.6207818", "0.619525", "0.614926", "0.6110348", "0.60933715", "0.606575", "0.60106474", "0.5976976", "0.5934822", "0.59201926", "0.59048134", "0.5861544", "0.5826129", "0.5796503",...
0.0
-1
what is the BIG O of these ? O(n n) > O(n^2) because we are having a nested loops the number of operations will be doubled every time the length of the array is bigger and because of that the BIG O of this array will be O(n n) that means O(n^2). 3) Drop Non Dominants
function printAllNumbersThenAllPairSums(numbers) { console.log('these are the numbers:'); numbers.forEach(function (number) { console.log(number); }); console.log('and these are their sums:'); numbers.forEach(function (firstNumber) { numbers.forEach(function (secondNumber) { console.log(firstNu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function snt (n) {\n for (let i=2 ; i <=n; i++)\n arr[i]=1;\n console.log(arr)\n arr[0]=arr[1]=0;\n // console.log(arr)\n for (let i =2; i<=Math.sqrt(n); i++)\n if (arr[i])\n for (let j=2*i; j <=n; j += i)\n arr[j]=0\n}", "function maxSubArraySum(arr, n){ ...
[ "0.6606573", "0.6453707", "0.64027464", "0.63245904", "0.62859935", "0.61935073", "0.61884505", "0.61318433", "0.61084574", "0.6093823", "0.60578614", "0.6057008", "0.6050803", "0.60180175", "0.6004985", "0.59890044", "0.5970101", "0.5961262", "0.59456354", "0.5882277", "0.58...
0.0
-1
O(n + n n) > O(n + n^2) always keep the Dominant term :) like this example n^2 is more important soe the result will be O(n^3) because we have got 3 loops in the function. O(n!) OH NO the worst >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Which code is best ?? 1Readable 2Memory > Space Complexity 3Speed > Time Complexit...
function hiii(n) { for (let i = 0; i < n.length; i++) { console.log('hiiiiii!'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function anotherFunChallenge(input) {\n let a = 5; // O(1)\n let b = 10; // O(1)\n let c = 50; // O(1)\n for (let i = 0; i < input; i++) {\n // O(n)\n let x = i + 1; // O(n)\n let y = i + 2; // O(n)\n let z = i + 3; // O(n)\n }\n for (let j = 0; j < input; j++) {\n // O(n)\n let p = j * 2; ...
[ "0.6776212", "0.67207223", "0.6616535", "0.6595983", "0.6426279", "0.6410767", "0.640601", "0.6191359", "0.58875835", "0.58848864", "0.585242", "0.5839939", "0.582741", "0.5817447", "0.5816638", "0.58013135", "0.5787403", "0.57638603", "0.56860006", "0.5672119", "0.56612027",...
0.0
-1
Space Complexity of this is O(1)
function arrayOfHello(n) { let helloArray = []; for (let i = 0; i < n.length; i++) { helloArray[i] = 'Hello'; } return helloArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compressBoxes(input){\n for(var i = 0; i<=100; i++){\n console.log('hi'); // O(100)\n }\n\n input.forEach(function(box){\n console.log(box); // O(n)\n })\n\n input.forEach(function(box){\n console.log(box); //O(n)\n })\n }", "function funChallenge(...
[ "0.61355424", "0.61233574", "0.6075092", "0.60345536", "0.5921369", "0.5871329", "0.5837767", "0.5832975", "0.5826429", "0.5793579", "0.5792045", "0.5771408", "0.56810874", "0.5674704", "0.5577217", "0.55248845", "0.5503118", "0.54676545", "0.5459991", "0.54580814", "0.543196...
0.0
-1
needs to be moved to a store for each event, calculate 'top' is based on startDate, 'height' is based on duration also, for overlapping events, we need to adjust the 'left' based on the number of overlapping events (use percentage)
styleEvents(events){ const { day } = this.props; const columnEndTimes = []; return events.map((event) => { const { startDate, endDate } = event; const startOfDayUnix = day.startMoment.valueOf(); const endOfDayUnix = day.endMoment.valueOf(); let styles = { top:`$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateEvents() {\n let me = this,\n timeAxis = me.timeAxis,\n endTime = timeAxis.getTime(timeAxis.endTime),\n startTime = timeAxis.getTime(timeAxis.startTime),\n totalTime = endTime - startTime,\n date = DateUtil.clone(me.firstColum...
[ "0.6427772", "0.6009356", "0.5989248", "0.5859332", "0.57428014", "0.57122767", "0.5625855", "0.56023395", "0.5569227", "0.55474705", "0.55230176", "0.5495477", "0.5485741", "0.5439873", "0.5437112", "0.5437112", "0.53586507", "0.535233", "0.53227186", "0.5322635", "0.5316897...
0.643553
0
Prompted when a user clicks on a 'save recipe' button in the UI, this method sends the spoonacular api identifier (spoonacular_id) to the server to save and reformats the clicked button to be 'inactive' if request successful.
function saveRecipe(e) { // Get the identifier of the recipe to save in the db const spoonacular_id = e.target.id.split("-")[1]; const request = new XMLHttpRequest(); request.open('POST', '/save_recipe'); // Callback function for when request completes request.onload = () => { debugg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleClickButtonSave()\n {\n Radio.channel('rodan').request(RODAN_EVENTS.REQUEST__RESOURCELIST_SAVE, {resourcelist: this.model,\n fields: {resource_type: this.ui.selectResourceType.val(),\n ...
[ "0.67044276", "0.6561522", "0.64648736", "0.62271374", "0.594653", "0.59296423", "0.5870055", "0.58538526", "0.5767264", "0.57225245", "0.57187164", "0.5717318", "0.5704133", "0.56981915", "0.5695643", "0.56795955", "0.5613291", "0.5588877", "0.5580395", "0.55790156", "0.5548...
0.7089824
0
create a function to getNotes
getNotes() { console.log("get notes") return this.read() .then((notes) => { let parsedNotes = JSON.parse(notes); // console.log(parsedNotes); return parsedNotes; }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listNotes(){\n var notes = getNotes();\n\n notes.forEach((note) => formatNote(note));\n}", "function readNotes() {\n return data;\n}", "getNotes() {\n // Pull all notes from db file, parse out, overwrite into empty array placeholder\n return this.read().then(notes => {\n ...
[ "0.77088505", "0.7632997", "0.7580279", "0.7495901", "0.74681675", "0.73290014", "0.73271614", "0.7250998", "0.72108006", "0.70195866", "0.70070374", "0.7000038", "0.6994486", "0.69617236", "0.69572204", "0.6913011", "0.6890402", "0.6887251", "0.6886669", "0.68593115", "0.684...
0.70932186
9
e stands for event
function popup(e) { var layer = e.target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function e(){}", "function e() {}", "function $getEventType(e) {\r\n\t\treturn e.type;\r\n\t}", "function hello(e){\n\t\t\tconsole.log(e);\n\t\t\t}", "function e() {\n}", "function mouseevent(e){\n\t// console.log(`Event Type = ${e.type}`);\n}", "function incomingEvent(e) {\n trace(\"incomingEvent: ...
[ "0.7675614", "0.7473233", "0.7410271", "0.7267449", "0.72438765", "0.72167534", "0.7184217", "0.71822995", "0.7181684", "0.7089547", "0.7089547", "0.6998305", "0.6935102", "0.691681", "0.691681", "0.691681", "0.691681", "0.691681", "0.6906806", "0.69055605", "0.6816017", "0...
0.0
-1
Use of this source code is governed by a BSDstyle license that can be found in the LICENSE file.
function f0() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "static final private internal function m106() {}", "transient private protected internal function m182() {}", "static private internal function m121() {}", "transient protected internal ...
[ "0.7139105", "0.6837278", "0.652429", "0.6500001", "0.6238156", "0.61894596", "0.6166574", "0.6166235", "0.61613566", "0.61004055", "0.60432744", "0.60405666", "0.59533966", "0.5913193", "0.5883976", "0.58638024", "0.58599186", "0.5783871", "0.56918156", "0.56616724", "0.5646...
0.0
-1
Finir cette fonction : Faire la validation aussi ici
function onSubmitHandler(e) { e.preventDefault(); if (editMode) { formData.id = article.id; updateArticle(formData); } else { createArticle(formData); } setEditMode(false); selectRef.current.value = 'Open this select menu'; setArticle({}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validation() {\r\n\t\t\r\n\t}", "function validate(){\n\n\t\t//TODO: make this work\n\n\n\t}", "validate() {\n // Als NIET (!) valide, dan error weergeven\n if (!this.isValid()) {\n this.showError();\n console.log(\"niet valide\");\n }\n else\n ...
[ "0.7937151", "0.78637713", "0.7724916", "0.75159293", "0.7442086", "0.717288", "0.71706855", "0.71449405", "0.7135316", "0.70602393", "0.7025328", "0.6904612", "0.68978256", "0.688516", "0.6834615", "0.68321073", "0.68321073", "0.67726076", "0.67597055", "0.6753106", "0.67529...
0.0
-1
valida la fecha seleccionada
function mayor(fecha, fecha2){ var xMes=fecha.substring(5, 7); var xDia=fecha.substring(8, 10); var xAnio=fecha.substring(0,4); var yMes=fecha2.substring(5, 7); var yDia=fecha2.substring(8, 10); var yAnio=fecha2.substring(0,4); if (xAnio > yAnio){ return(true); }else{ if (xAnio == yAnio){ if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validarFecha() {\n // usaremos una expresion regular para que la fecha tenga un patron:\n // podemos teclear el día desde 01 a 31 (0[1-9]|1[0-9]|2[0-9]|3[0-1]|[1-9])\n\t// esta parte de la expresion nos permite teclear dias como 02, 14, 30, etc\n\t// [/|-] seguido de / o -\n\t// para terminar $, 4 d...
[ "0.7339078", "0.72940534", "0.7286126", "0.7254069", "0.70978856", "0.70778143", "0.7071498", "0.7022447", "0.70130163", "0.69836926", "0.6921884", "0.6913779", "0.68889385", "0.6886297", "0.68804336", "0.68589705", "0.68545973", "0.68492347", "0.6840644", "0.67618567", "0.67...
0.0
-1
Select on Click Directive
function selectOnClick() { return { restrict: 'A', link: function (scope, element) { var focusedElement; element.on('click', function () { if (focusedElement != this) { this.select(); focusedElement = this; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "activeClick() {\n var $_this = this;\n var action = this.options.dblClick ? 'dblclick' : 'click';\n\n this.$selectableUl.on(action, '.SELECT-elem-selectable', function () {\n $_this.select($(this).data('SELECT-value'));\n ...
[ "0.7138411", "0.68675774", "0.6864718", "0.68336296", "0.65692925", "0.6564717", "0.6536984", "0.6536984", "0.6526926", "0.6519217", "0.648294", "0.6476199", "0.6443432", "0.6443432", "0.6443432", "0.6443432", "0.64338744", "0.6406787", "0.63927144", "0.6386663", "0.63684165"...
0.66663486
4
Checks that two files are equivalent without requiring all lines to be in the same order
function assertExpectedReport(actualFilename, expectedFilename) { var actual = makePathsRelative(grunt.file.read(actualFilename)).toString().split('\n'); var expected = makePathsRelative(grunt.file.read(expectedFilename)).toString().split('\n'); assert.equal(actual.length, expected.length); var differen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function areDifferentFiles(file1, file2) {\n return fs.statSync(file1)[\"size\"] !== fs.statSync(file2)[\"size\"];\n}", "static isEqual (fileA, fileB) {\n return fileA.file === fileB.file \n && fileA.date === fileB.date\n && fileA.size === fileB.size;\n }", "function assertEqual( checksum1, chec...
[ "0.6535917", "0.6393794", "0.6313428", "0.6260333", "0.6107105", "0.6084206", "0.6051192", "0.6051192", "0.6051192", "0.6051192", "0.6051192", "0.6051192", "0.6051192", "0.6051192", "0.6051192", "0.60489374", "0.60489374", "0.6039155", "0.6036077", "0.6036077", "0.6036077", ...
0.0
-1
ex and ey must be >= sx and sy respectively
function textureAndAdd(shape, extrudeSettings, sx, ex, sy, ey, side) { var coords = board2canvas(sx,sy, ex,ey, side); if (sx != ex) { if (side < 0) for (var i=0; i<ex-sx+1; i++) { pShipLoc[sx+i][sy] = true; pShipCount++; } else for (var i=0; i<ex-sx+1; i++) { aShipLoc[sx+i][sy] = true; a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Ay(t,e,n){var r=t.getResolution(n),i=my(t,e[0],e[1],r,!1),o=py(i,2),a=o[0],s=o[1],l=my(t,e[2],e[3],r,!0),u=py(l,2),c=u[0],d=u[1];return{minX:a,minY:s,maxX:c,maxY:d}}", "function squareScale()\n{\n // Comparamos si \n if( posY.disabled == true && posX.value.length > 0 )\n {\n // En el termino de la...
[ "0.6119685", "0.60298425", "0.5751312", "0.5647381", "0.56340563", "0.55001646", "0.5483516", "0.54599595", "0.5454037", "0.54238623", "0.5417288", "0.5402997", "0.5342316", "0.53314495", "0.5320391", "0.5313177", "0.5308994", "0.52804583", "0.52804583", "0.525551", "0.523665...
0.0
-1
Shorten the vertex function
function v(x,y,z){ return new THREE.Vector3(x,y,z); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_vertex(v){\n console.log(\"processed vertex \",v);\n}", "vertex(x, y) {\n this.currentShape.vertex({ x, y });\n }", "vertex_glsl_code () {}", "function vertex(point) {\n var lambda = (point[0] * Math.PI) / 180,\n phi = (point[1] * Math.PI) / 180,\n cosPhi = Math.cos(phi);...
[ "0.6515964", "0.6206047", "0.60399497", "0.6022112", "0.5984819", "0.598275", "0.5960202", "0.5956663", "0.5919616", "0.5893365", "0.58901864", "0.5889642", "0.5882657", "0.5873005", "0.5869198", "0.58680105", "0.5867716", "0.5845243", "0.5842869", "0.5829491", "0.58268607", ...
0.0
-1
Get the symetric of a relation
function getSymetricRelation(relation) { switch (relation) { case (Relation.hasSkill): return Relation.isSkillOf; case (Relation.isSkillOf): return Relation.hasSkill; case (Relation.hasKnowledge): return Relation.isKnowledgeOf; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get relationship() {\n\t\treturn this.__relationship;\n\t}", "function assumedRelation(x)\n{\n return x;\n}", "static getRelations(){ \n\t\treturn {\n\t\t\tequip_conditions : Condition,\n\t\t\twrappers : Wrapper,\n\t\t\tuse_action : Action,\n\t\t\tgame_actions : GameAction,\n\t\t\tactives : Wrapper,\n\t\t};\n...
[ "0.54320043", "0.49157158", "0.48860967", "0.47683707", "0.4730914", "0.4666057", "0.4619671", "0.4613423", "0.45689917", "0.45327294", "0.45285285", "0.44890296", "0.44890296", "0.4459366", "0.44478467", "0.44263363", "0.44242084", "0.44209522", "0.44147334", "0.4413223", "0...
0.77601355
0
Return true if the relation is hirarchical
function isHierarchicalRelation(relation) { switch (relation) { case (Relation.hasSkill): case (Relation.isSkillOf): case (Relation.hasKnowledge): case (Relation.isKnowledgeOf): case (Relation.composes): case (Relation.isComposedOf): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static isHoppable(root) {\n const { outEdges } = root; \n if (root.val === null) return true;\n if (outEdges.length === 0) return false;\n for(let i = 0; i < outEdges.length; i++) {\n const edge = outEdges[i];\n const { toVertex } = edge;\n if (Graph.isHoppable(toVertex) === true) {\n ...
[ "0.6106278", "0.5819636", "0.5819099", "0.57939917", "0.5508121", "0.53218234", "0.53059953", "0.5300846", "0.52990913", "0.5290849", "0.5261965", "0.5198213", "0.5190004", "0.51805747", "0.51528186", "0.51501364", "0.51501364", "0.51501364", "0.51501364", "0.51501364", "0.51...
0.7304125
0
Create a dispatcher out of 'createEvent' action item and then save it to this.props.createEvent
function mapDispatchToProps(dispatch) { return bindActionCreators({editEvent, updateEventLocation, fetchOneEvent, auth}, dispatch); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startCreation() {\n ActionsForCreator.create(this.state); //**! Place Action Method Here and pass the state of the component */\n }", "function mapDispatchToProps(dispatch) {\n return {\n onSubmitEvent: function (idEvent) {\n console.log(\"on SUBMIT EVENT\", idEvent);\n dispatch({ type: \"saveE...
[ "0.59841967", "0.57708186", "0.5727103", "0.56887", "0.56607443", "0.56607443", "0.5636138", "0.5626716", "0.55991733", "0.55991733", "0.5587907", "0.5587907", "0.5536946", "0.55307317", "0.5522485", "0.55050784", "0.55022216", "0.5494614", "0.54753", "0.5459277", "0.5456083"...
0.54657626
19
If user is not typing wildcard then ask server for typeahead suggestions.
loadSuggestions(query, endpoint) { let deferred = this.$q.defer(); if (query != "*" && query.length > 1) { let config = { key: query, graph_name: this.dataset }; let parseResults = function (results) { let suggestions = []; for (let i = 0; i < results.data.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function suggest(typingWord) {\n getData(app.api.suggest,typingWord).done(displaySuggestions);\n }", "changeHandler(ev) {\n const { requestTypeaheadSuggestions, clearTypeahead } = this.props.actions;\n const searchTerm = ev.target.value;\n\n searchTerm ? requestTypeaheadSuggestions(searchTerm) : clear...
[ "0.65473855", "0.64889544", "0.61797386", "0.6102765", "0.5969695", "0.5922321", "0.5914599", "0.5867111", "0.5865005", "0.5843302", "0.5839137", "0.5808816", "0.5808429", "0.58039474", "0.5801634", "0.5794763", "0.5763811", "0.5761809", "0.57533497", "0.572761", "0.57225496"...
0.6179414
3
Give the query to whatever owns this component.
onSubmitClicked() { this.onSubmit({ query: this.ui }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resolveQuery() {\n\t\tthis.resultData = this.query.run(this.collection, this.dataProvider.data());\n\t\tthis.resultValid = true;\n\t}", "function UsesQuery(_props: {}) {\n useLazyLoadQuery(query, variables);\n return null;\n }", "query() {\n const { value } = this;\n ipc.send('se...
[ "0.5993997", "0.5876449", "0.5726261", "0.5709687", "0.56191987", "0.54972273", "0.54972273", "0.5495413", "0.5486505", "0.5474618", "0.5453667", "0.5445029", "0.5440383", "0.5380958", "0.53796256", "0.53521127", "0.5339446", "0.532949", "0.5324541", "0.53134656", "0.5306317"...
0.50290304
54
THAY THE exp1 BANG exp2, DONG THOI CAP NHAT PARENT exp1
recordTransfomation(r) { let helper = Helper_1.ExpressionHelper.Helper; let result = new Transformation(r); result.oldEXP = helper.copy(this.tradingList[this.getSizeTradingList() - 1].exp); for (let i = 0; i < this.tradingList.length; i++) { result.detail.push(this.tradingLis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseExp1(state) {\n return lift(state)\n .then(parseExp2)\n .then(opt(parseExp1$));\n}", "function fromWylieOneStack(tokens, i) {\n var orig_i = i;\n var t = '';\n var t2 = '';\n var o = '';\n var out = '';\n var warns = [];\n var consonants = 0; // how many consonants found\...
[ "0.52155423", "0.52134186", "0.5204046", "0.50931114", "0.50608087", "0.5045819", "0.5039271", "0.50116307", "0.49813786", "0.48117015", "0.48058638", "0.47842455", "0.47733328", "0.47703254", "0.47563955", "0.47562447", "0.47444683", "0.47400188", "0.46937746", "0.46876466", ...
0.0
-1
CHECK TRANSFOMATION IS VALID
transfomationIsValid(trans, currentStep, r, begin) { if (trans.length === 0) return true; if (r.id <= 7) return true; /// LIST RESULT // console.log("\n=====LIST RESULT:"); // console.log("CURRENT:"+ExpressionToString(currentStep)); if (r.id <= 6) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valid(){return validated}", "static validTransaction(transaction) {\n const { input, outputMap } = transaction\n const { address, amount, signature } = input\n\n // reduce the outputMap to get a grand total\n const outputTotal = Object.values(outputMap).reduce(\n (total, outputAmount) =...
[ "0.6709823", "0.662759", "0.6281771", "0.62575495", "0.62544703", "0.62335396", "0.6191406", "0.61761034", "0.615661", "0.61411244", "0.61315805", "0.6104239", "0.6093782", "0.6066762", "0.6037602", "0.60174376", "0.60065943", "0.6005563", "0.6000887", "0.5951618", "0.5942855...
0.6604485
2
function for sending to all connected clients
function dataSend(data) { Object.keys(connections).forEach(function (id) { if (connections[id].connected) { connections[id].send(data); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendAll(content){\n //show what is happening\n console.log(\"Send All!\");\n\n //loop through every client in the array\n for(var i=0; i<CLIENTS.length; i++){\n CLIENTS[i].emit('server',content);\n }\n}", "function sendAll(obj) {\n clients.forEach((client) => {\n send(client, obj);\n ...
[ "0.7993311", "0.79524386", "0.79481286", "0.7551206", "0.74584746", "0.7454234", "0.73286015", "0.7267133", "0.71643955", "0.70934963", "0.70851964", "0.70732456", "0.7059517", "0.7042647", "0.7007352", "0.69670385", "0.69670075", "0.69310945", "0.6903648", "0.6903648", "0.68...
0.63428175
53
The main Newtab page object. Instantiates places to populate history and top sites.
function Newtab() { var privateWindow = document.getElementById('private-window'); privateWindow.addEventListener('click', this.requestPrivateWindow.bind(this)); // Initialize the parent port connection var self = this; navigator.mozApps.getSelf().onsuccess = function() { var app = this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "newPage() {\n return this._browser._createPageInContext(this._id);\n }", "newPage() {\n return this._browser._createPageInContext(this._id);\n }", "newPage() {\n return this._browser._createPageInContext(this._id);\n }", "function createPage() {\n // Clear the preview div.\n ...
[ "0.6722236", "0.6722236", "0.6722236", "0.62383044", "0.6126082", "0.6110365", "0.6006237", "0.5998778", "0.5976008", "0.5964387", "0.59417796", "0.5937541", "0.58382106", "0.5831712", "0.5826191", "0.5804387", "0.5777875", "0.5777627", "0.5775086", "0.5771556", "0.5744341", ...
0.5730693
22
Has ESLint fixed the file contents?
function isFixed(file) { return file.eslint !== undefined && file.eslint !== null && file.eslint.fixed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isFixed(file) {\n // Has ESLint fixed the file contents?\n return autoFix && file.eslint != null && file.eslint.fixed;\n}", "function originalFileCheck(path) {\n const file = fs.readFileSync(path, 'utf8');\n return !file.includes('[TEST]SCALED FROM ITL');\n}", "function isFixed(file) {\n return...
[ "0.6729927", "0.65169024", "0.6493195", "0.63017446", "0.6210458", "0.59210306", "0.5880326", "0.5803337", "0.57261306", "0.5700388", "0.5691394", "0.5688637", "0.5643109", "0.56298333", "0.5623652", "0.557986", "0.55585146", "0.5557877", "0.5549449", "0.55198294", "0.5519829...
0.5978296
5
this holds the input to push into database
constructor(props) { super(props); this.state = { newProject:{ name: '', description: '', // date_completed: '', website: '', tag_id: '', } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Insert(input){\n var sql = \"INSERT INTO players (id,chance1,chance2,chance3,chance4,chance5,date,TimeStamp) VALUES ('\" + input + \"','\" +this.Input.chance1+ \"','\" +this.Input.chance2+ \"','\" +this.Input.chance3+ \"','\" +this.Input.chance4+ \"','\" +this.Input.chance5+ \"','\" +this.Input.date+...
[ "0.6168369", "0.61416197", "0.6137631", "0.6029053", "0.58702165", "0.5794016", "0.573305", "0.573305", "0.5672437", "0.5664323", "0.56273264", "0.56159246", "0.5612711", "0.5603056", "0.5571752", "0.55707395", "0.5537372", "0.5536306", "0.5526762", "0.5525272", "0.55233943",...
0.0
-1
view localStorage current entries SETUP
function setup() { setupPreventSubmissionOfForm(); setupCityTemperatureOnKeyUp(waitTimeBeforeApiCall); setupClearEntries(); if (hasPreviousEntries) { getPreviousEntries(entrySet); } else { getCityTemperature(initialCity); // So that the form is run once on page load } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listEntries() {\n console.log('entries in localStorage: ', localStorage);\n console.log('entries in getEntries(): ', getEntries());\n }", "function storeEntry() {\n localStorage.setItem(\"event1\", entry1.text());\n localStorage.setItem(\"event2\", entry2.text());\n localStorag...
[ "0.7315054", "0.68275243", "0.6655248", "0.65843517", "0.65760773", "0.655718", "0.65269834", "0.6495525", "0.6466304", "0.6462002", "0.6458832", "0.64574116", "0.6422768", "0.6396246", "0.6395587", "0.63807344", "0.63724697", "0.6350103", "0.6344347", "0.63125026", "0.630946...
0.0
-1
Since the constructor checked, this will only be called for UTF7.
decode(input, options = {}) { let more = "stream" in options ? options.stream : false; // There are cases where this is called without input. if (!input) { return ""; } this.collectInput += bytesToString(input); if (more) { return ""; } return this.manager.utf7ToUnicode(this....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "decodeUTF8() {\n return new Utf8Iterator(this);\n }", "function Utf8Encoding()\r\n{\r\n this.stringFromBytes = function(dynamicDataView, beginIdx, size)\r\n {\r\n var aResult = \"\";\r\n var aCode;\r\n var i;\r\n var aValue;\r\n for (i = 0; i < size; i++)\r\n ...
[ "0.5690492", "0.5660449", "0.56093544", "0.5592648", "0.551358", "0.5494823", "0.54935366", "0.5489808", "0.5489808", "0.5489808", "0.5489808", "0.5489808", "0.5489808", "0.5489808", "0.5489808", "0.5489808", "0.5489808", "0.54627186", "0.54325765", "0.54325765", "0.54325765"...
0.0
-1
A function which prints str after n seconds.
function printTimeout(str, n) { setTimeout(function () { console.log(str) }, n * 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delay(delay , stringToLog){\n setTimeout(() => {console.log(stringToLog)}, delay); \n}", "function printMsg(){\n console.log(\"This msg is fired after 2s delay\");\n}", "function printToConsole(string,duration){\n\tdocument.getElementById(\"console\").innerHTML = string;\n\t//set message back a...
[ "0.70968115", "0.70070237", "0.69071054", "0.6898629", "0.68974", "0.66441536", "0.66144425", "0.6532961", "0.64832854", "0.6452822", "0.6302164", "0.6271801", "0.62546116", "0.624964", "0.6227416", "0.62182915", "0.62177104", "0.6214286", "0.62099826", "0.61968476", "0.61855...
0.82890576
0
task 2 A function which returns sum of all numbers from 1 to n using recursion.
function sumAll(n) { if (n == 1) { return 1; } else { return n + sumAll(n - 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumAll(n) { \n let result;\n\n if(n !== 1){\n result = n + sumAll(n-1);\n } else {\n result = n;\n }\n return result;\n }", "function sum(n) {\n\tif (n == 1) {\n\t\treturn n;\n\t}\n\treturn n + sum(n-1);\n}", "function sumAll(n){\n if(n!==0){\n retur...
[ "0.87491083", "0.869703", "0.8578352", "0.8577804", "0.8424343", "0.8376853", "0.83503914", "0.8177248", "0.8169493", "0.8164253", "0.81064117", "0.8032662", "0.8006619", "0.7953036", "0.79525083", "0.7943448", "0.79417", "0.79027927", "0.7892517", "0.7869778", "0.78476965", ...
0.86236876
2
task 3 A function which takes str and time in seconds as arguments, then every second it should count down from time to 0 and print current time to console when time equals to 0 it prints str
function bombTimer(str, time) { if (time == 0) { console.log(str); } else { let intervalId = setInterval(function () { if (time >= 1) { console.log(time--); }; }, 1000); setTimeout(function () { clearInterval(intervalId); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countDown(time){\n var timer = setInterval(function(){\n time--;\n if(time <= 0){\n clearInterval(timer);\n console.log('DONE!');\n }\n else {\n console.log(time);\n }\n \n },1000)\n }", "function bombTimer(str, time) { \n let interval;\n ...
[ "0.70585734", "0.70448506", "0.6945591", "0.6840028", "0.6838897", "0.68247104", "0.6815186", "0.68128294", "0.6786214", "0.6718046", "0.6656239", "0.6646963", "0.6624673", "0.66191566", "0.6613082", "0.66089696", "0.66042763", "0.65944666", "0.658431", "0.6564936", "0.655251...
0.69084555
3
task 4 A function which returns factorial of number using recursion.
function factorial(n) { if (n == 0) { return 1; } else { return n * factorial(n - 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function factorial(num){\n if(num <= 1){\n return num \n } else {\n return num * factorial(num - 1);\n }\n \n}", "function factorial(num){ //5\n if(num === 1) return 1; //basecase \n\n return num * factorial(num-1); //5 * 4 * 3 * 2 = 120 \n\n}", "function factorial(num){\n //...
[ "0.8468601", "0.8453154", "0.8453136", "0.84009004", "0.83850926", "0.8380161", "0.8379365", "0.83778334", "0.837747", "0.83755964", "0.8366305", "0.8352782", "0.83392745", "0.8330983", "0.8315413", "0.83069193", "0.8306905", "0.8291084", "0.82909274", "0.8290141", "0.8281241...
0.8040149
76
task 6 A function which takes an array of numbers and maxNumber, the function returns new array with numbers not higher than maxNumber.
function filterNumbers(arr, maxNumber) { return arr.filter(function (element) { return element <= maxNumber; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterNumbers(arr1, maxNumber) {\n let newArr = arr1.filter(function(number) { // using Callback\n return number < maxNumber;\n });\n return newArr; \n}", "function findGreatest(arr, number) {\n return arr.filter(item => item > number);\n}", "function nMax(){\n var arr=[-3...
[ "0.7458926", "0.70537883", "0.6883571", "0.6752915", "0.67378515", "0.67106855", "0.6637066", "0.6617463", "0.6528359", "0.6495824", "0.647651", "0.642487", "0.6348269", "0.63202643", "0.63100684", "0.63060385", "0.630065", "0.62990576", "0.62886876", "0.62880677", "0.6259841...
0.77568597
0
task 8 A function that returns average of numbers in array.
function average(arr) { let total = 0; arr.forEach(function(number) { total += number; }); const average = total / arr.length; return average.toFixed(2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function average(arr){\n return sum(arr) / arr.length;\n }", "function avg( arr ){\n\treturn sum( arr ) / arr.length\n}", "function avg_array(arr) {\n var sum = 0\n for( var i = 0; i < arr.length; i++) {\n sum += arr[i];\n }\n return sum / arr.length;\n}", "function average(array){\n ...
[ "0.82675546", "0.824958", "0.81980383", "0.816433", "0.8162788", "0.8143451", "0.8136539", "0.81157815", "0.81146324", "0.8114128", "0.8092324", "0.8092324", "0.8092324", "0.8092324", "0.8092324", "0.8092324", "0.80897915", "0.8088468", "0.8086651", "0.8068026", "0.8056656", ...
0.0
-1
task 9 A function which concats all firstnested arrays in one array (use reduce):
function concatFirstNestedArrays(arr) { const array = arr.reduce(function (acc, value) { return acc.concat(value); }, []); return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concatMany(arr){\r\n let result = [];\r\n arr.forEach((el)=> {\r\n if(Array.isArray(el)){\r\n result = result.concat(concatMany(el));\r\n return;\r\n }result.push(el);\r\n });\r\n return result;\r\n }", "function flatten(arr) {\n // return arr.reduce((a, b) => a.c...
[ "0.72083926", "0.70683867", "0.7055131", "0.70297366", "0.6954231", "0.6939604", "0.6926962", "0.68972015", "0.686204", "0.6861884", "0.68418723", "0.6822129", "0.68184584", "0.6818129", "0.6814225", "0.6809944", "0.6773851", "0.6770488", "0.67598075", "0.67337364", "0.671738...
0.7591416
0
It just uses a specific component given a prop value. Less declaritive perhaps but really easy to reason about. You can use this concept anywhere!
function Router(_ref) { var RouteIndex = _ref.RouteIndex, defaultRouteId = _ref.defaultRouteId, props = _objectWithoutProperties(_ref, ['RouteIndex', 'defaultRouteId']); // Find the default component to use if there is not route match. var ComponentDefault = (0, _get3.default)(RouteIndex, defaultRout...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){\n const testValue = `All the names ${this.state.input}`\n return(\n <test value ={testValue} name={this.state.name} /> //How to render components from other files. value gives testValue as a PROP \n );\n }", "function RenderCmpnt() {\n // The <Route> that rendered th...
[ "0.65797174", "0.6230059", "0.62070817", "0.6041208", "0.5901141", "0.5864173", "0.5838441", "0.5792396", "0.5780367", "0.5764124", "0.57519543", "0.57506615", "0.5721681", "0.5718416", "0.57141954", "0.57137454", "0.5711365", "0.5669645", "0.56426716", "0.5587338", "0.557352...
0.0
-1
Returns a new DatabaseModify for employees
function _employeeDynamo() { return new DatabaseModify('employees'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async save() {\n let sql = `\n INSERT INTO employees(\n lname, \n fname, \n email, \n phone, \n years_employed, \n annual_leave, \n sick_leave, \n personal_day, \n ...
[ "0.58646125", "0.57409304", "0.57108635", "0.56573087", "0.54519635", "0.5410638", "0.53418076", "0.53408724", "0.53385323", "0.5290115", "0.52742285", "0.52662426", "0.5250103", "0.5249665", "0.51713765", "0.5168592", "0.5140428", "0.51299226", "0.51152426", "0.5110807", "0....
0.73536533
0
_employeeDynamo Async function to loop an array.
async function _asyncForEach(array, callback) { for (let index = 0; index < array.length; index++) { await callback(array[index], index, array); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function fetchEmployees(){\n\t\t\t\t// async function body\n\t\t\t\tconst e1 = await API.getEmployee(8569129)\n\t\t\t\tconst e2 = await API.getEmployee(254808831)\n\t\t\t\tconst e3 = await API.getEmployee(58197)\n\t\t\t\tconst e4 = await API.getEmployee(651065)\n\t\t\t\treturn [e1, e2, e3, e4]\n\t\t\t}", "...
[ "0.6390531", "0.6239285", "0.6088949", "0.6088949", "0.607746", "0.60352135", "0.6019663", "0.5988272", "0.5954704", "0.59397316", "0.59380287", "0.5936927", "0.5920359", "0.5909404", "0.5897921", "0.5886816", "0.58767337", "0.5860593", "0.58474004", "0.5828357", "0.58228815"...
0.5813959
23
_asyncForEach Used to update technology an employee has listed as current
async function _updateCurrentTechnologies(techs) { await _asyncForEach(techs, async (tech) => { if (tech.current && tech.years >= 0) { // 1 / 12 represents 1 month tech.years = Number(tech.years) + 1 / 12; tech.years = tech.years.toFixed(2); } }); return techs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function start() {\n logger.log(2, 'start', 'Finished thanos');\n let employees = await lib._employeeDynamo().getAllEntriesInDB();\n await _asyncForEach(employees, async (employee) => {\n let employeeEdited = _.cloneDeep(employee);\n\n // Update the technology experience\n if (employee.technologi...
[ "0.58776784", "0.5801964", "0.5598651", "0.55946064", "0.55398786", "0.55205095", "0.5502498", "0.5492346", "0.54593307", "0.54592687", "0.5420657", "0.54158026", "0.5407839", "0.540165", "0.537749", "0.5371473", "0.5312235", "0.53118455", "0.5293007", "0.52776515", "0.526835...
0.55442584
4
_updateCurrentTechnologies Used to update customer org experience an employee has listed as current
async function _updateCurrentCustomerOrgExp(customerOrgExps) { await _asyncForEach(customerOrgExps, async (customerOrgExp) => { if (customerOrgExp.current && customerOrgExp.years >= 0) { // 1 / 12 represents 1 month customerOrgExp.years = Number(customerOrgExp.years) + 1 / 12; customerOrgExp.yea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function _updateCurrentTechnologies(techs) {\n await _asyncForEach(techs, async (tech) => {\n if (tech.current && tech.years >= 0) {\n // 1 / 12 represents 1 month\n tech.years = Number(tech.years) + 1 / 12;\n tech.years = tech.years.toFixed(2);\n }\n });\n return techs;\n}", "funct...
[ "0.5774473", "0.5519597", "0.51199687", "0.5098765", "0.5085931", "0.5075734", "0.50639266", "0.5052184", "0.5026516", "0.5018596", "0.49803576", "0.49752808", "0.4973385", "0.4958817", "0.49484852", "0.49475142", "0.4940885", "0.49134862", "0.49062306", "0.489994", "0.487963...
0.57638884
1
_updateCurrentCustomerOrgExp Used to update a variety of fields that involve time fields w/ currentlisted dates
async function start() { logger.log(2, 'start', 'Finished thanos'); let employees = await lib._employeeDynamo().getAllEntriesInDB(); await _asyncForEach(employees, async (employee) => { let employeeEdited = _.cloneDeep(employee); // Update the technology experience if (employee.technologies) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function _updateCurrentCustomerOrgExp(customerOrgExps) {\n await _asyncForEach(customerOrgExps, async (customerOrgExp) => {\n if (customerOrgExp.current && customerOrgExp.years >= 0) {\n // 1 / 12 represents 1 month\n customerOrgExp.years = Number(customerOrgExp.years) + 1 / 12;\n customer...
[ "0.709261", "0.5827957", "0.58059436", "0.57886183", "0.56460255", "0.55275106", "0.54368854", "0.54295874", "0.5425668", "0.54180646", "0.53673506", "0.5241768", "0.5238772", "0.52368593", "0.52200943", "0.51663166", "0.5162588", "0.5109585", "0.5074593", "0.50518364", "0.50...
0.0
-1
start Handler to execute Lambda function.
async function handler(event) { console.info(JSON.stringify(event)); // eslint-disable-line no-console return lib.start(); } // handler
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleStart(inputData) {\n return this.startHandler(inputData);\n }", "_executeLambdaHandler(func, event) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// Load local development environment variables\n\t\t\tconst localEnvironment = Object.assign(\n\t\t\t\t{},\n\t\t\t\tdotenv.config({ path: '.env.lo...
[ "0.6280002", "0.62283236", "0.61776483", "0.6111304", "0.5999871", "0.58813196", "0.58813196", "0.58813196", "0.58813196", "0.58813196", "0.58813196", "0.58813196", "0.58813196", "0.58813196", "0.58813196", "0.58813196", "0.57902133", "0.5725782", "0.5626165", "0.56094736", "...
0.61313176
3
3.0 API backward compatibility
function main() { init(); enable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "transient private protected internal function m182() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient final protected i...
[ "0.7235605", "0.7140883", "0.71283567", "0.6945075", "0.69450223", "0.69378936", "0.69155437", "0.6801657", "0.6667701", "0.656954", "0.648727", "0.64121884", "0.63926184", "0.6349791", "0.63332313", "0.6234127", "0.62240225", "0.6212556", "0.6206558", "0.6192721", "0.6191608...
0.0
-1
Will be the permanent init page once it is completed.
function initPage() { if($(".navbar-header").length > 0){ $(".navbar-header").animate({ "width": "100%" }, { duration: 500, specialEasing: { "width": "easeInOutCirc" }, complete: initContent() }); } else { $("#content").css({"margin-top": "100px"}); initContent(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\n }", "function initialisePage(){\n\t\t\tcurrent_tab = \"about\";\n\t\t\tgenerateNav(register_navevents);\n\t\t\tgenerateFramework(current_tab, generatePage);\n\t\t\t// Enable button again\n\t\t\tbuttonOff();\n\t\t}", "fun...
[ "0.75749236", "0.7483442", "0.7200351", "0.716386", "0.71089244", "0.70420915", "0.6985441", "0.69693595", "0.69637203", "0.6959227", "0.6955131", "0.695367", "0.6903729", "0.69035375", "0.6900576", "0.690036", "0.6881887", "0.687362", "0.68723655", "0.687165", "0.6870138", ...
0.0
-1
Used as a temporary page initialization to save time for now
function noAnimationInit(){ $(".navbar-header").css({ "width": "100%" }); $("#content").fadeIn(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialisePage(){\n\t\t\tcurrent_tab = \"about\";\n\t\t\tgenerateNav(register_navevents);\n\t\t\tgenerateFramework(current_tab, generatePage);\n\t\t\t// Enable button again\n\t\t\tbuttonOff();\n\t\t}", "function init() {\n\n\t\t// > = greatar than\n\t\t// < = less than\n\t\t\n\n\t\t/* ------------------...
[ "0.7566883", "0.7353104", "0.7327146", "0.7303092", "0.7241662", "0.72053295", "0.7190828", "0.71881557", "0.716532", "0.7147228", "0.7146839", "0.7139329", "0.69844115", "0.6913743", "0.6866458", "0.68356025", "0.6834951", "0.6834854", "0.6830491", "0.68293613", "0.6807258",...
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 PresenceList.belongsTo(models.Appointment); }
{ "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.7641147", "0.75082886", "0.7313424", "0.73078364", "0.73078364", "0.73078364", "0.7294629", "0.7284924", "0.727855", "0.72604764", "0.72604764", "0.72604764", "0.72604764", "0.72604764", "0.72604764", "0.72604764", "0.72604764", "0.72604764", "0.72604764", "0.72604764", "0...
0.0
-1
negate makes s sentence mean s opposite thing.
function negate(s) { //these are cheap ways to negate s meaning // ('none' is ambiguous because it could mean (all or some) ) var logic_negate = { //some logical ones work "everyone": "no one", "everybody": "nobody", "someone": "no one", "somebody": "nobody", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function negated() {\n return (options.negate) ? '' : 'not ';\n }", "negate() {\n this._truth = !this._truth;\n }", "negate() {\n this._truth = !this._truth;\n }", "function negate() {\n if (is_operator(equation_array[0])) {\n return;\n }\n var negated_element = parseF...
[ "0.7368378", "0.6933161", "0.6933161", "0.6872923", "0.67460155", "0.66323656", "0.65328604", "0.6487714", "0.6416327", "0.6317713", "0.6237063", "0.6221243", "0.6209043", "0.61486155", "0.61087847", "0.6041197", "0.60375756", "0.60188854", "0.5977798", "0.5955876", "0.595215...
0.8246981
0
WINE LIFE PROFILE WINDOW ProfileWindow.js MEN+1 Programmer: David Wells
function ProfileWindow(title) { var global = require('ui/common/globals'); var dropdown = require('ui/common/elements/dropdown'); // Creates the default window with global color scheme var self = global.createWindow(title); if(!global.android) self.barImage='images/iPhone_Nav_Bar_Bkgrd_With_Black.png'; var load...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Profile() {\n\t}", "function LodLiveProfile() {\n\n }", "function displayWindowProps() {\n\n document.getElementById('info-text').innerHTML = 'window.frames returns : ' + window.frames;\n document.getElementById('output-text').innerHTML = 'window.length returns : ' + window.length;\n documen...
[ "0.6544166", "0.63877183", "0.6257098", "0.6105455", "0.6050889", "0.5978825", "0.59095293", "0.59066933", "0.59023535", "0.5902081", "0.5889445", "0.5885616", "0.58748066", "0.58522165", "0.58467597", "0.58296", "0.58226097", "0.58186495", "0.5778004", "0.57763135", "0.57529...
0.5341343
89
Write a program that finds the summation of every number from 1 to num. The number will always be a positive integer greater than 0.
function summation(numbers) { let total = 0; for (let i = 1; i <= numbers; i++) { total += i; } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumOfNumbers(num) {\n let sum = 0;\n for (let i = 0; i <= num; i++) {\n sum += i;\n }\n return sum;\n}", "function calculateSum(num){\n let sum = 0;\n\n for(let i = 0; i <= num; i++){\n sum += i;\n };\n\n return sum;\n}", "function calculateSum (num) {\n let total = 0;\n ...
[ "0.8196909", "0.81020963", "0.80426633", "0.8037863", "0.79924786", "0.7831295", "0.7783622", "0.77656466", "0.77297693", "0.76051193", "0.76051193", "0.7578624", "0.7561857", "0.7549985", "0.75382674", "0.73758775", "0.7375361", "0.73507524", "0.73507524", "0.734348", "0.733...
0.76538724
9
Creates an empty graph.
constructor() { this.nodes = new Map(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDefaultGraph(){\n currentGraph = new Graph(['a','c','d','e']);\n addEdge('a','c');\n addEdge('c','d');\n addEdge('d','e');\n addEdge('e','a');\n showGraph();\n}", "function createGraph() {\n return new dagreD3.graphlib.Graph()\n .setGraph({})\n .setDefaultEdgeLabel((...
[ "0.75668913", "0.72399855", "0.6672592", "0.66596055", "0.66024774", "0.65924734", "0.6508555", "0.6442293", "0.6367231", "0.63049185", "0.62031454", "0.61907303", "0.6189707", "0.6062217", "0.60187477", "0.60090715", "0.5992128", "0.5978867", "0.59684145", "0.59684145", "0.5...
0.0
-1
insert val into db
function insertData() { set(ref(db, "Students/" + usn.value), { Name: name.value, Age: age.value, USN: usn.value }) .then(() => { alert("Data stored successfully "); }) .catch((err) => { alert("Unsuccessfull "); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeDataInDatabase(surveyId, controlId, value, db) {\n\tvar query = \"INSERT INTO surveyData('surveyId','controId','value') \"\n\t\t\t\t+\"VALUES ('\"+surveyId+\"','\"+controlId+\"','\"+value+\"')\";\n\tdb.transaction(\n\t\tfunction (tx) {\n\t\t\ttx.executeSql(query, [],successMsg ,onError);\n\t\t});\n}"...
[ "0.69737", "0.6638521", "0.65070325", "0.64170444", "0.6356235", "0.63375705", "0.6335123", "0.6326484", "0.63218313", "0.63218313", "0.6290996", "0.62747157", "0.62713957", "0.62442607", "0.6208999", "0.61407894", "0.6118811", "0.6097078", "0.60695785", "0.60623777", "0.6061...
0.6138002
16
getting val from db
function getData() { const dbref = ref(db); get(child(dbref, "Students/" + usn.value)) .then((snapshot) => { if (snapshot.exists()) { name.value = snapshot.val().Name; age.value = snapshot.val().Age; } else alert("couldnt fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DN_DbResult_getValue() { return this._Value;}", "get value() {}", "get value() {}", "function getDbFieldValue(fieldName, dataSourceConfig, restriction, parameters){\n\tvar result = null;\n\ttry{\n\t\tvar dataSource = new Ab.data.createDataSourceForFields(dataSourceConfig);\n\t\tif (dataSource){\n\t\...
[ "0.6975758", "0.61692226", "0.61692226", "0.5993965", "0.59922725", "0.5935804", "0.5926446", "0.592407", "0.5921844", "0.5876042", "0.58669835", "0.58565605", "0.58346516", "0.5817394", "0.5817394", "0.5800362", "0.5784272", "0.5778231", "0.577301", "0.5769947", "0.57571656"...
0.0
-1
remove the data from db
function removeData() { remove(ref(db, "Students/" + usn.value)) .then(() => { alert("Data updated successfully "); }) .catch((err) => { alert("Unsuccessfull " + err); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n var db = new DB();\n db.delete(this.table, `id = '${this.getAttribute('id')}'`);\n }", "function clearData(){\n\tdatabase.ref('gameData').remove();\n\tdatabase.ref('players').remove();\n\tdatabase.ref('words').remove();\n}", "delete() {\n\t\tthis.data.delete();\n\t}", "function ...
[ "0.74840593", "0.7139383", "0.70098835", "0.6769682", "0.67352647", "0.66009337", "0.6600679", "0.6594433", "0.65689456", "0.65644336", "0.65640527", "0.64919907", "0.6482966", "0.6481088", "0.6479169", "0.64767975", "0.64669293", "0.64556384", "0.6435552", "0.6433199", "0.64...
0.6613924
5
Function executed once the waterfall has finished
function outputConsole(err, data) { if (err) console.log('Unexpected problem : ', err); else console.log('Everything was fine '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runAll() {\n async.waterfall([\n updateDatafiles,\n ], function (err, result) {\n console.log(err, result);\n }); \n}", "function runAll() {\n\n async.waterfall([\n deleteAllDatadbfs,\n updateDatalayersRasterval,\n dbfsForDatalayers,\n rasterPrope...
[ "0.6676422", "0.6577046", "0.61178213", "0.6109408", "0.6068547", "0.6029963", "0.5968635", "0.58112866", "0.5771383", "0.5762104", "0.5751271", "0.5716052", "0.57101923", "0.57051677", "0.56999785", "0.5673557", "0.56444746", "0.5635485", "0.562641", "0.5626089", "0.5594283"...
0.0
-1
fetches json data from json files
async function fetchData(data) { let fetchedData = await fetch(data); let json = await fetchedData.json(); let features = json.features; return features }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getJSONfiles() {\n let urlStudents = \"https://petlatkea.dk/2021/hogwarts/students.json\";\n let urlFamilies = \"https://petlatkea.dk/2021/hogwarts/families.json\";\n\n function loadJSON() {\n fetch(urlStudents)\n .then((response) => response.json())\n .then((jsonData) => {\n prepar...
[ "0.72867554", "0.708003", "0.70180315", "0.69818777", "0.69250697", "0.6861837", "0.68558615", "0.67608935", "0.67549235", "0.6746138", "0.6720063", "0.6703424", "0.6675175", "0.6635996", "0.6630257", "0.66272765", "0.66095626", "0.66072816", "0.6600876", "0.6570566", "0.6564...
0.0
-1
Code copied from index.js, TODO : include it in new management Other saved fields (not displayed in options, mostly index fields save)
function save_restore(field, onsave, onrestore) { if ( typeof field === 'string' ) { var myfield = document.getElementById(field) ; } else { var myfield = field ; field = field.name ; } if ( myfield != null ) { // Prepare save trigger switch ( myfield.type ) { // Depending on type case 'hidden': // Hid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fieldsInfo () {\n return [\n {\n text: this.$t('fields.id'),\n name: 'id',\n details: false,\n table: false,\n },\n\n {\n type: 'input',\n column: 'order_nr',\n text: 'order No.',\n name: 'order_nr',\n multie...
[ "0.66574216", "0.6264567", "0.6205126", "0.6096252", "0.6091105", "0.6048589", "0.60161155", "0.5941437", "0.5905278", "0.59044707", "0.58918816", "0.5882115", "0.5873882", "0.58345854", "0.5833417", "0.5821259", "0.581982", "0.5809671", "0.5798364", "0.5790359", "0.57822734"...
0.0
-1
Open an information website for a card
function card_info(name) { //window.open('http://magiccards.info/query?q=!' + name + '&v=card&s=cname') ; window.open('https://scryfall.com/search?q='+name) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_card_code() {\n window.open('/card_code.html', '_card_code', 'width=600,height=400'); \n}", "openCardDetails() {\n EnigmailWindows.openWin(\n \"enigmail:cardDetails\",\n \"chrome://openpgp/content/ui/enigmailCardDetails.xhtml\",\n \"centerscreen\"\n );\n }", "function open_...
[ "0.7108052", "0.7014869", "0.64693", "0.63778067", "0.63565564", "0.62693214", "0.6168504", "0.6116256", "0.60801685", "0.60518306", "0.6039036", "0.5991993", "0.59761655", "0.59754306", "0.5942126", "0.59019953", "0.5856188", "0.58395654", "0.58343655", "0.5763139", "0.57539...
0.7896258
0
Messaggio mostrato a schermo dopo l'invio del messaggio
function controllo(dati){ if(dati.riscontro == "positivo"){ alert("Messaggio inviato con successo"); } else{ alert("Si è verificato un errore nell'invio del messaggio, si prega di riprovare\n" + "Errore:" + dati.riscontro); } $("#sub-form").submit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inviaMessaggio() {\r\n var templateMex = $(\".template .messaggi\").clone();\r\n var txtMex = $(\".txt-mex\").val();\r\n if (txtMex != \"\") {\r\n // Trovo gli elementi a cui stampare messaggio e ora\r\n templateMex.find(\".text\").text(txtMex);\r\n // L'elemento 'ora-c...
[ "0.71774054", "0.6986555", "0.6758097", "0.65828645", "0.65650123", "0.6390505", "0.6374661", "0.6301069", "0.6273052", "0.62659794", "0.6222636", "0.6158949", "0.6147335", "0.61457497", "0.61315495", "0.61314", "0.6095178", "0.6090126", "0.60791844", "0.6077462", "0.6068517"...
0.0
-1
function to get user profile information
function getProfile(userHandle, response) { var userRef = db.collection("User").doc(userHandle); var getDoc = userRef.get() .then(doc => { if (!doc.exists) { throw new Error("User does not exist"); } else { console.log('Document data:', doc.data()); response.send(doc.data()); } }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProfileData() {\n // obtener los datos del usuario al iniciar sesión\n IN.API.Raw(\"people/~:(first-name,last-name,id,num-connections,picture-url,location,positions,summary,public-profile-url)\").result(onSuccess).error(onError); \n }", "function getProfileInfo() {\n\treturn TD.cach...
[ "0.8284851", "0.8071612", "0.79836434", "0.79836434", "0.7964572", "0.79422754", "0.7894583", "0.78745985", "0.78410494", "0.7783699", "0.7644482", "0.7633585", "0.756919", "0.7558212", "0.75549716", "0.7497401", "0.7479668", "0.7474838", "0.74373174", "0.74171644", "0.736001...
0.0
-1
Dodecahedron Vertices: 20 Edges: 30 Faces: 12 Edges per face: 5 Edges per vertex: 3 Sin of angle at edge: 2 / sqrt(5) Surface area: 3 sqrt(25 + 10 sqrt(5)) edgelength^2 Volume: (15 + 7 sqrt(5)) / 4 edgelength^3 Circumscribed radius: (sqrt(15) + sqrt(3)) / 4 edgelength Inscribed radius: sqrt(250 + 110 sqrt(5)) / 20 edge...
function Dodecahedron(descr) { for (var property in descr) this[property] = descr[property]; this.numVertices = 108; // Faces * Edges per face(9 here-> 3 triangles per face) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDodecahedron(gl, translation, rotationAxis)\n{ \n // Vertex Data\n let vertexBuffer;\n vertexBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n\n // Names of vertices assigned for better figure construction, after drawing it on Geogebra\n let verts = [...
[ "0.69004023", "0.6713127", "0.6367282", "0.6327084", "0.6281594", "0.6225521", "0.6221681", "0.61672163", "0.6155194", "0.61262345", "0.6118307", "0.60706514", "0.60496455", "0.60475165", "0.6043056", "0.6005028", "0.5985287", "0.5923827", "0.5912851", "0.58895195", "0.586502...
0.72618496
0
distribute data based on user properties, extract total order and amount
function processData(linesOfData) { // console.log(linesOfData[0]); // console.log(linesOfData.length); let x; let totalOrders = 0; for (x = 1; x <= linesOfData.length - 1; x++) { const line = linesOfData[x]; const items = line.split(','); const date = items[0].trim()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ordersValue(user){\n\n let orders = user.orders;\n let value = 0;\n\n for (order in orders){\n\n let orderOBJ = user.orders[order];\n\n value += orderOBJ.value;\n }\n\n return value;\n\n}", "function getTotalCost(order) {\n var totalCost = 0;\n for (let key in order) {\n ...
[ "0.64065206", "0.63249725", "0.6232063", "0.60913265", "0.6083807", "0.60259736", "0.6004488", "0.5970773", "0.59486157", "0.58227307", "0.58227307", "0.58000946", "0.5740275", "0.57318723", "0.57001024", "0.5686823", "0.56667036", "0.5629409", "0.5588559", "0.55796087", "0.5...
0.5947254
9
extract user groups based on their frequency of ordering
function extractCustomerFreq() { for (let key of userMap.keys()) { if (userMap.get(key).length > 4) { fiveAndAboveTimeUserMap.set(key, userMap.get(key)); } else if (userMap.get(key).length == 4) { fourTimeUserMap.set(key, userMap.get(key)); } e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groupBy(group_by, words, limit, multiple) {\n\n // Find out what groupings are involved using these parts of speech\n var groupings = {};\n words.forEach(function(currVal, currIndex, listObj) {\n // Get the word itself\n var word = currVal.innerHTML.trim();\n\n // Get the gro...
[ "0.591646", "0.56359476", "0.5457455", "0.5423279", "0.5337186", "0.53289586", "0.5285109", "0.5236381", "0.52232695", "0.5187434", "0.518498", "0.5165559", "0.5157147", "0.5107871", "0.50721616", "0.50721616", "0.50554055", "0.5046101", "0.50443286", "0.5033999", "0.50271", ...
0.51509315
13
this event fires when props is updated outside of the component. implementing this in order to set the state before the render
componentWillReceiveProps(nextProps){ console.log('Main componentWillReceiveProps()'); if (this.props.selectedGroup !== nextProps.selectedGroup){ this.setState({ selectedGroup : nextProps.selectedGroup, }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidUpdate(prepProps, prevState) {\n if (!this.props.onChange) return;\n if (_.isEqual(prevState, this.state)) return;\n\n const stateNow = {...this.state};\n this.debouncedOnChange(stateNow);\n }", "componentDidUpdate(props_) {}", "componentDidUpdate(preProps, preState) {\n console...
[ "0.7129008", "0.6999832", "0.69473076", "0.6852387", "0.6798766", "0.6779114", "0.6758939", "0.6747968", "0.6747452", "0.6742166", "0.6707109", "0.6693986", "0.6639851", "0.6635425", "0.6629473", "0.66252756", "0.66121453", "0.6596408", "0.65928257", "0.65865165", "0.65850204...
0.0
-1
this event fires just after the component was added to DOM. this is the recommended place to fetch data.
componentDidMount() { console.log('Main componentDidMount()'); this.FetchProductGroupData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onCreatedHandler() {\n this.fetchData();\n }", "componentDidUpdate() {\n this.loadData();\n }", "async connectedCallback() {\n this.append(this.cssTemplate());\n await this.fetchData()\n let links = this.querySelectorAll(\"a\");\n links.forEach(li...
[ "0.68517977", "0.6481179", "0.6469921", "0.6422434", "0.6313988", "0.63076586", "0.62700456", "0.6260348", "0.6195377", "0.61817664", "0.6164012", "0.6138462", "0.6124213", "0.611748", "0.604232", "0.5998743", "0.5908758", "0.5871057", "0.5849846", "0.5849715", "0.5847788", ...
0.0
-1
The GamePacket represents a full synchronization of the current game, which is periodically passed by host game instances to all other players to ensure everyone is playing the same game.
function GamePacket(events, gameState, playersState) { this.initialize(events, gameState, playersState); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendEndPacket(p) {\n var index = this.activeGames.indexOf(p.gameId);\n if (index > -1) {\n this.activeGames.splice(index, 1);\n }\n console.log(\"Game Ended: \", this.activeGames);\n var packet = {\n authKey: \"\",\n nickname: p.nickname,\n locationX: p.locationX,\n location...
[ "0.65947586", "0.6252832", "0.57479584", "0.572886", "0.5632537", "0.5600464", "0.5587808", "0.5573938", "0.55718726", "0.5550702", "0.55219984", "0.54954576", "0.54883087", "0.54548836", "0.5446099", "0.54197484", "0.54176605", "0.540596", "0.53954464", "0.5391107", "0.53853...
0.68954766
0
Create an object type UserException
function UserException(message) { this.message = message; this.name = 'UserException'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UserException (message){\n this.message=message;\n this.name=\"UserException\";\n}", "function UserException(message) {\n this.message = message;\n this.name = 'UserException';\n }", "function UserException(message) {\n\t\t\tthis.message = message;\n\t\t\tthis.name = 'UserException';\n\t\...
[ "0.7879334", "0.74453217", "0.70470536", "0.65478593", "0.59041667", "0.58853006", "0.5864597", "0.5766621", "0.57486343", "0.57209474", "0.56868285", "0.56868106", "0.5666547", "0.56553125", "0.5624954", "0.56164414", "0.556668", "0.5489438", "0.5446785", "0.5442106", "0.542...
0.76889247
1
Returns the computed check character(s) only If input type is invalid, return null; If input string contains character outside charset, return undefined;
compute(input) { if (typeof input !== "string" || input === "") return null; if (!this.patt_a.test(input)) return undefined; if (!this.cs) input = input.toUpperCase(); let appLen = input.length; let chkLen = 1 + this.dblchk; let wLen = this.w.length; let S = 0; let i = appL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateInput(char) {\n let asciiCheck = this.checkText(char);\n if (asciiCheck) {\n return undefined;\n }\n else {\n return 'Supports 128 characters of ASCII.';\n }\n }", "validateInput(char) {\n if ((new RegExp(`^${'[\\x00-\\x5F\\xC8-\\xCF]'}+$...
[ "0.68220145", "0.6742265", "0.67346084", "0.66384417", "0.65437657", "0.6346123", "0.62974447", "0.62233776", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6181847", "0.6157121...
0.0
-1
Returns the full string with check character(s)
complete(input) { let checkbit = this.compute(input); if (typeof checkbit === "string") return input + checkbit; else return checkbit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isStringTwentyChar(checkString){\n \n for (var i = 0; i < checkString.length; i++){\n if (checkString.length <= 20){\n return checkString.slice(0, checkString.length / 2); \n }else {\n return checkString + checkString;\n }\n }\n}", "function special...
[ "0.628882", "0.61030775", "0.6022555", "0.6009111", "0.5972696", "0.59514284", "0.5921959", "0.5902387", "0.58991414", "0.58369243", "0.58369243", "0.58369243", "0.58369243", "0.58369243", "0.58369243", "0.58369243", "0.58369243", "0.58369243", "0.58369243", "0.58369243", "0....
0.0
-1
Verify the full string
verify(input) { let checkLen = 1 + this.dblchk; if (typeof input !== "string" || input.length <= checkLen) return null; let dataOnly = input.substr(0, input.length - checkLen); let checkbit = this.compute(dataOnly); if (typeof checkbit === "string") return checkbit === (this.cs ? input.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringValidate(str){\n\tif (str.length < 150 && \n\t\t(str.slice(0, 19) === \"https://fabelio.com\" || \n\t\t str.slice(0, 23) === \"https://www.fabelio.com\")){\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function checkString(element)\n{\n\tvar pattern= /[^a-z(.)\\s]/gi;\n\tvar result=e...
[ "0.65661407", "0.6526903", "0.65203536", "0.65203047", "0.6459283", "0.6412656", "0.63745624", "0.6261661", "0.6238344", "0.6196206", "0.61555064", "0.6116864", "0.6108852", "0.6082382", "0.6070908", "0.60623896", "0.6046985", "0.60083836", "0.59935474", "0.5991949", "0.59859...
0.61281055
11
Graph solicitamos accessToken a facebook
function requestAT(callback) { var access_token; globales.options_graph.method = 'GET'; globales.options_graph.path = globales.fbapiversion+globales.path_app_at; var solicitud = https.request(globales.options_graph, function(respi) { respi.setEncoding('utf8'); respi.on('data', function(dati) { access_t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "callMSGraph(theUrl, accessToken, callback) {\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 200)\n callback(JSON.parse(this.responseText));\n }\n xmlHttp.open(\"GET\", theUrl, true); // true for asynchronous\n xmlHttp...
[ "0.7125122", "0.71035683", "0.70738417", "0.6928531", "0.67971855", "0.6737466", "0.66599977", "0.66089827", "0.6574804", "0.65701926", "0.65565467", "0.6551529", "0.6527753", "0.6504394", "0.6502715", "0.6461329", "0.6371691", "0.63711214", "0.63711214", "0.63348365", "0.632...
0.6141943
36
Funcion que obtiene las cuentas
function getCuentas(callback) { var criterio = {$or: [ {$and: [ {'datosMonitoreo' : {$exists : true}}, {'datosMonitoreo' : {$ne : ''}}, {'datosMonitoreo.id' : {$ne : ''}} ]}, {$and: [ {'datosPage' : {$exists : true}}, {'datosPage': {$ne : ''}}, {'datosPage.id' : {$ne : '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHitSecc(){\n\t\tNotas.find({fecha_inicio:{$gte:inicial, $lte:final}}).select({ \"idNotas\": 1, \"fecha_inicio\": 1, \"_id\": 0}).exec(function(err, notas){\n\t\t\tvar arrIds=[];\n\n\t\t\tif(notas.length==0){\n\t\t\t\trespuestaFinal[\"0\"]={total:0, nombre: \"0\"};\n\t\t\t\tsumaRecursos(respuestaFinal);...
[ "0.63963544", "0.6235388", "0.6205635", "0.6129161", "0.61043775", "0.6031359", "0.599977", "0.597166", "0.5950538", "0.5939632", "0.59050894", "0.5900401", "0.586075", "0.584753", "0.5826134", "0.58236104", "0.5817452", "0.5805355", "0.58026713", "0.5802467", "0.58022183", ...
0.6736739
0
Object to wrap a language
function Language(name, plugins, compiler) { this.name = name; this.plugins = plugins; // Find the language module this.langdir = path.resolve(LANGUAGES, name); util.mustExist(this.langdir); // Assert the mandatory module presence and load this.grammar = path.resolve(this.langdir, 'grammar.js'); this....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GenLanguageDef(){}", "static fromObject(o) {\n return new Language(o.name, o.code, o.data, o.fileName);\n }", "static initialize(obj, language) { \n obj['language'] = language;\n }", "function Language(key, value) {\n this.langKey = key;\n this.langName = value;\n}", "sta...
[ "0.7086012", "0.6789814", "0.6736839", "0.6653598", "0.6537622", "0.64825916", "0.64089584", "0.6339913", "0.63382727", "0.6329202", "0.6280839", "0.6157173", "0.6156177", "0.6156177", "0.6142646", "0.6112274", "0.6092929", "0.6047066", "0.5984527", "0.59613043", "0.5947379",...
0.5881223
24
List the available languages
function ls() { return _(fs.readdirSync(LANGUAGES)).filter(function(name) { var candidate = path.join(LANGUAGES, name); return fs.statSync(candidate).isDirectory(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listLanguages() {\n return high.listLanguages()\n}", "function $380d7edc2604b455$var$listLanguages() {\n return $03b62e45aee69014$exports.listLanguages();\n}", "function listLanguages() {\n return languageNames.concat()\n}", "function listLanguages() {\n return hljs.listLanguages();\n}", "...
[ "0.8473055", "0.8204564", "0.8034595", "0.7796023", "0.77503514", "0.7424266", "0.7178014", "0.7157945", "0.70875454", "0.70875454", "0.7054548", "0.69783497", "0.6947383", "0.69382286", "0.69243807", "0.69206744", "0.67723805", "0.67714393", "0.66022146", "0.6457933", "0.644...
0.66875815
18
Does the specified language exist
function exists(name) { return _(fs.readdirSync(LANGUAGES)).contains(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moduleLanguageExists(lang) {\r\n var moduleLangInfo = {};\r\n moduleLangInfo.isPresent = false;\r\n moduleLangInfo.font = \"\";\r\n var langs = typeof module == \"undefined\" ? ((userModule && userModule.module) ? userModule.module.languages : []) : module.languages;\r\n for (var k = 0; k <...
[ "0.7113376", "0.6962868", "0.6962868", "0.6884458", "0.63820654", "0.6370296", "0.6344994", "0.6225694", "0.6204534", "0.618694", "0.6116768", "0.60938406", "0.60804564", "0.6079231", "0.60700196", "0.60544086", "0.6045888", "0.5949707", "0.58595145", "0.5828442", "0.5808546"...
0.7478122
0
Render a single message
renderMessage(message) { const sender = message.sentBy || dummyUser; return <div className="message flex flex-row"> <img src={sender.avatar || PLACEHOLDER} alt={sender.email} className="avatar" /> <div className="message-wrapper"> <p className="message-header"> <span c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderMessage(sender, message){\r\n\r\n}", "renderMessage_() {\n const messsageEl = create(\"div\", {\n classname: cssClass.MESSAGE_WRAPPER,\n copy: copy.NO_SUBSCRIPTIONS,\n });\n\n this.appendChild(messsageEl);\n }", "function renderTicketMessage() {\n res.render('index', {titl...
[ "0.76197803", "0.71033514", "0.6956839", "0.69351155", "0.69245654", "0.6918829", "0.68915284", "0.6774736", "0.67166483", "0.6673777", "0.6584308", "0.6566715", "0.6546411", "0.6514441", "0.64904404", "0.64170384", "0.6400947", "0.6390099", "0.63498914", "0.63467836", "0.631...
0.63410336
20
Print one series item
function displayItem(item) { let { id, image, title, status, relaseDate, rating, desc } = item; image = (image) ? image : "https://picsum.photos/350/550/"; let output = `<div class="item" data-series="${id}">`; output += `<div class="item__image"><img src="${image}" role="presentation" /></div>`; o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostrarSeries(){\n for(let posicion=0; posicion<series.length; posicion++){\n document.write('<br> Serie: '+series[posicion],'<br>');\n }\n}", "function printItem(res) {\n console.log(`ID: #${res.item_id}`);\n console.log(`Description: ${res.product_name}`);\n console.log(`Price: $...
[ "0.7196049", "0.6347396", "0.6156491", "0.612491", "0.60385257", "0.603834", "0.59918445", "0.5953988", "0.5942273", "0.59415746", "0.593053", "0.5921344", "0.58982337", "0.5881418", "0.58296275", "0.5814607", "0.58095527", "0.57921803", "0.57701474", "0.57688326", "0.5765540...
0.5964071
7
APPEND TO DOM AS PART OF JSON CALLBACK
function appendData(weather, itemToAppend){ for(i=0; i<5; i++){ var $li = document.createElement("li"); itemToAppend.appendChild($li); var $h3 = document.createElement("h3"); var dayNames = weather.forecast.simpleforecast.forecastday[i].date.weekday; $h3.innerHTML = dayNames; $li.appendChild($...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendJSON(id,data) {\n\tdata = JSON.parse(data);\n\tdata = JSON.parse(data);\n\t\n\tcurrentResults = data;\n\tloadJSON(id,appendResults);\n}", "function addJSONToPage(jsonData){\n\t//Console log my data\n\tconsole.log(jsonData);\n\t//Create a div with jquery\n\tvar myDataDiv = $(\"<div>\");\n\t//Add da...
[ "0.6224643", "0.6018901", "0.6001714", "0.583711", "0.5681681", "0.5646098", "0.56399655", "0.55666125", "0.55278647", "0.55249286", "0.5504837", "0.5504837", "0.5482743", "0.5480926", "0.5465855", "0.5464252", "0.545008", "0.54400474", "0.54400474", "0.54400474", "0.54370457...
0.0
-1
componentDidMount function Checks if initial state is empty if true it queries the movie database
componentDidMount() { if (!Object.keys(this.state).length) { fetchData(`https://api.themoviedb.org/3/person/${this.props.match.params.id}?api_key=${apiKey}`) .then(data => this.setState(data)) .then(() => setItemInLocalStorage('person-' + this.state.id , this.state)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n if (!Object.keys(this.state).length) {\n this.queryMovieDB(movieURL, false, \"movie\");\n }\n }", "async componentDidMount() {\n\t\t// Populating the favorite movie lists with data from DB\n\t\tawait this.props.getMovies();\n\t}", "componentDidMount() {\n\t\tomdb.get({id: th...
[ "0.87296075", "0.730836", "0.72421485", "0.7169684", "0.70812535", "0.7000593", "0.7000593", "0.6998516", "0.6989915", "0.69836426", "0.6947041", "0.692223", "0.689505", "0.6885171", "0.6883197", "0.685377", "0.68082565", "0.67883587", "0.6766455", "0.6689609", "0.6688242", ...
0.67971134
17
Change social media shape to edit content of url
function changecontent(element) { window.selected_soc_med_id = $('#' + element.id).attr('selected_soc_id'); // console.log(window.selected_soc_med_id); var social_media_name = element.id.replace('_long', ''); $("#" + element.id).hide(); $("#" + social_media_name + "_input").fadeIn(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChangeContentURL(content) {\n setAttributes({ link_url: content });\n }", "placeholderArtwork(url) {\n if(!url) return \"http://placehold.it/100x100\";\n\n // const regx = /(-large)/;\n // const str = url.replace(regx, \"-crop\");\n\n return url;\n }", "function addURL...
[ "0.60021704", "0.5690135", "0.56412685", "0.559229", "0.5536782", "0.5509707", "0.5477807", "0.54488593", "0.541727", "0.5392554", "0.5377024", "0.5372134", "0.53527564", "0.5346595", "0.53271943", "0.53196764", "0.52975607", "0.52945083", "0.522712", "0.5225699", "0.5207669"...
0.4844508
87
After editing url checks for changes and edit or insert new social media link
function checkContent(element) { var social_media_name = element.id.replace('_input_button', ''); var social_media_name_ph = element.id.replace('_button', ''); if ($("#" + social_media_name_ph + "_field").val() !== "https://www." + social_media_name + ".com/" && $("#" + social_media_name_ph + "_field").va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateLink() {\n const url = urlInput.value;\n const name = nameInput.value;\n editBookmark({url, name, key}, () => {\n renderBookmarks(pagination.currentPage);\n cancelEdit();\n });\n }", "function finishEditing( event )\n {\n if (prefs.debug)\n console.log(\...
[ "0.6544651", "0.6397925", "0.63144577", "0.6295023", "0.62816447", "0.6274564", "0.6232412", "0.6147263", "0.61228484", "0.6112593", "0.6079757", "0.606051", "0.60480845", "0.59665954", "0.58907586", "0.5883014", "0.5881263", "0.58742875", "0.5825031", "0.5814045", "0.5804472...
0.58297753
18
function to redirect to the entered social media adderss
function goto_social(element) { // var selected = element.id.replace('_goto_btn_', ''); // var selected = element.id.substring(0, element.id.indexOf("_goto_btn_")); // console.log(selected); var parent_grp_btn_id = element.id.replace('_goto_btn_', '_btn_group_'); var sel_med_url = $('#' + parent_grp_bt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function redirectPage() {\n window.location = s.linkLocation;\n }", "function redirectByUrl() {\n location.href = u;\n }", "function redirectToCustomUrlGiven(customUrl,data){\n if(customUrl.length > 0){\n \n window.location.href = customUrl;\n }\n }", "function auth(...
[ "0.63673156", "0.6261925", "0.5985085", "0.5959315", "0.5880481", "0.58499354", "0.5847501", "0.58467555", "0.5823016", "0.5817233", "0.5806846", "0.57803273", "0.57668674", "0.5766214", "0.57648605", "0.5757179", "0.5731607", "0.5714348", "0.5709253", "0.5698982", "0.5673476...
0.5251268
87