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
Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableScript( elem ) {\r\n\tvar attr = elem.getAttributeNode(\"type\");\r\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.typ...
[ "0.7015881", "0.6984669", "0.6984669", "0.6984669", "0.6984669", "0.6984669", "0.6984669", "0.6984669", "0.6984669", "0.6984669", "0.6984669", "0.6942055", "0.6937486", "0.68989927", "0.6888514", "0.6888514", "0.6888514", "0.6886676", "0.688531", "0.68820333", "0.68746465", ...
0.0
-1
Fix IE bugs, see support tests
function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IEcompatibility() {\n\t// Only do anything if this is IE\n\tif(Browser.ie){\n\t\tvar __fix = $$(\"#kbbcode-size-options\", \"#kbbcode-size-options span\", \n\t\t\t\t\t\t\"#kbbcode-colortable\", \"#kbbcode-colortable td\");\n\t\tif (__fix) {\n\t\t\t__fix.setProperty('unselectable', 'on');\n\t\t}\n\t}\n}", ...
[ "0.7220337", "0.70940924", "0.699044", "0.68625945", "0.66801953", "0.6574329", "0.6557123", "0.65142417", "0.65142417", "0.64660573", "0.64034224", "0.6379892", "0.6297539", "0.6296395", "0.62622595", "0.6166529", "0.6163856", "0.61358476", "0.61114734", "0.6054131", "0.6026...
0.0
-1
Executing both pixelPosition & boxSizingReliable tests require only one layout so they're executed at the same time to save the second computation.
function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0"; div.style.cssText = "position:relative;display:block;box-sizing:border-box;ov...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computePixelPositionAndBoxSizingReliable() {\n\t\t\t// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).\n\t\t\tdiv.style.cssText = \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;\" +...
[ "0.7214164", "0.7208926", "0.7208926", "0.7207941", "0.7207941", "0.7151972", "0.7151972", "0.71499634", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0.71333474", "0....
0.0
-1
Return a vendorprefixed property or undefined
function vendorPropName( name ) { // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a pro...
[ "0.77089226", "0.77089226", "0.75586355", "0.7514841", "0.7421766", "0.74073756", "0.74073756", "0.74073756", "0.74073756", "0.74073756", "0.74073756", "0.74073756", "0.74073756", "0.7378966", "0.7378644", "0.7368398", "0.7298892", "0.71859246", "0.71523774", "0.7102407", "0....
0.0
-1
Return a potentiallymapped jQuery.cssProps or vendor prefixed property
function finalPropName( name ) { var final = jQuery.cssProps[ name ] || vendorProps[ name ]; if ( final ) { return final; } if ( name in emptyStyle ) { return name; } return vendorProps[ name ] = vendorPropName( name ) || name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a pro...
[ "0.7841011", "0.7841011", "0.74694854", "0.74694854", "0.74694854", "0.74694854", "0.74694854", "0.74694854", "0.74694854", "0.74694854", "0.72612625", "0.72612625", "0.71609175", "0.6958286", "0.68770766", "0.6747781", "0.6747781", "0.6747781", "0.6747781", "0.6747781", "0.6...
0.0
-1
Animations created synchronously will run synchronously
function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = Date.now() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_playAnimation() {\n if (this._animationLast === undefined && this._animationQueue.length > 0) {\n this._animationLast = this._animationCurrent;\n this._animationCurrent = this._animationQueue.shift();\n console.log(\"New: \" + this._animationCurrent.name);\n this...
[ "0.72297084", "0.7172655", "0.6751781", "0.6701827", "0.66490537", "0.6644208", "0.66413045", "0.65767395", "0.6515558", "0.64943016", "0.64906734", "0.6407048", "0.6392758", "0.6383256", "0.63779354", "0.6373179", "0.63684577", "0.6353303", "0.63494754", "0.6331653", "0.6321...
0.0
-1
Generate parameters to create a standard animation
function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setParameters() {\n params.viscosity = 0.02;\n params.u0 = -amplitude;\n params.one36th = 1 / 36;\n params.one9th = 1 / 9;\n params.four9ths = 4 / 9;\n params.gridSize = 5;\n params.m = int(height / params.gridSize);\n params.n = int(width / params.gridSize);\n}", "function generateAnimationPara...
[ "0.6477499", "0.6449747", "0.6239411", "0.62102515", "0.62051743", "0.6019592", "0.599829", "0.594838", "0.5940393", "0.5940393", "0.5912163", "0.5873654", "0.5832134", "0.5828958", "0.58236474", "0.5820797", "0.5813001", "0.579854", "0.57910967", "0.57835335", "0.5780475", ...
0.0
-1
point coords must be normalized to 0 > 1 range t must be in the range of 0 > 1 returns HSL
function getCoordFromLine (points, t) { let length = 0 for (let i = 1; i < points.length; i++) { length += dist(points[i - 1], points[i]) } let colorAtLength = length * t let currentSegment = 0 while (colorAtLength >= 0) { const lengthOfCurrentSegment = dist(points[currentSegment], points[currentSeg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calcHSL() {\r\n let r = this.r/255;\r\n let g = this.g/255;\r\n let b = this.b/255;\r\n let max = Math.max(r, g, b)\r\n let min = Math.min(r, g, b);\r\n let h, s, l = (max + min) / 2;\r\n if(max == min){\r\n h = s = 0; // achromatic\r\n } else {\r\...
[ "0.6904809", "0.6111803", "0.60024345", "0.5998366", "0.5985015", "0.5978615", "0.5924926", "0.5872265", "0.5835098", "0.5718588", "0.5715181", "0.569133", "0.56756127", "0.5655237", "0.5621369", "0.5590247", "0.55720097", "0.5566086", "0.5563616", "0.554707", "0.5546354", ...
0.51726824
76
BROAD FUNCTIONS FOR EACH SECTION
function _center_image(image){ $this = image; if(opts.horizontalAlign == 'center'){ var pageWidth = $(window).width() - opts.horizontalOffset; var newWidth = -1*($this.width() - pageWidth)/2; $(image).css({'left':newWidth}); } if(opts.verticalAlign == 'center'){ var pag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickSection () {\n addSpecialService()\n addExtraWeight()\n otherWeight()\n pet()\n }", "function forEachSectionAndSlide(callback){\n $(SECTION_SEL).each(function(){\n var slides = $(this).find(SLIDE_SEL);\n\n if(slides.length){\n ...
[ "0.5389401", "0.5368865", "0.5319996", "0.5278722", "0.5254411", "0.5167271", "0.5143596", "0.5093525", "0.5090796", "0.5088656", "0.5086076", "0.50814897", "0.50722003", "0.50614566", "0.5041024", "0.5015802", "0.498643", "0.49810326", "0.497302", "0.49607122", "0.49589312",...
0.0
-1
private function for debugging
function debug($obj) { if (window.console && window.console.log) { window.console.log($obj); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "debug() {}", "private internal function m248() {}", "function dBug(s) {\n\t// uncomment out for debug\n\t//console.log(s);\n}", "private public function m246() {}", "function debug(v){return false;}", "function showDebugInfo() {\n\t\t\tconsole.log();\n\t\t}", "function devDebug(){\n\n}", "function xx...
[ "0.6628576", "0.6588666", "0.651542", "0.6490679", "0.648686", "0.63930017", "0.62832797", "0.62805074", "0.62419283", "0.616553", "0.6140012", "0.60730964", "0.6071808", "0.60679954", "0.6063963", "0.6008732", "0.5988064", "0.59875095", "0.59771067", "0.59178495", "0.5885562...
0.57567865
36
Creates a jwc.models.jmxbrowser.InfoViewModel suitable for the given object.
function createInfoViewModelFor(model){ const clazzFullName = (model.Class)? model.Class.fullName : model; const viewModel = { data : model, template : null, chartType : null }; switch(clazzFullName){ case 'jwc.models.api.v1.MBeanAttributeModel' : viewModel.template = BASE_PATH+'/views/mBeanAttribut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AboutViewModel() {\n \n\t \n\t \n return AboutViewModel();\n }", "function createInfoWindow(item, index) {\n let content = `<a href=\"${item.website()}\" target=\"_blank\"><h3>` +\n `${item.name()}</h3></a><p>${item.info()}<br> `+\n `<div><span>Current Weather:</span><canvas id=\"weather-info...
[ "0.56155485", "0.5526989", "0.5495957", "0.54512995", "0.5389375", "0.5298142", "0.5129885", "0.51033425", "0.50602305", "0.5058854", "0.5037881", "0.50268424", "0.49980783", "0.49930686", "0.49916556", "0.4990612", "0.49813482", "0.495417", "0.49520954", "0.49291906", "0.490...
0.72248554
0
.fill preenche todos os campos com o que estabelecer entre os parenteses
function escolha(p) { novoJogo();//chamando a função para limpar a tela document.getElementById("resultado").innerHTML = '';//limpando o mostra ganhador // document.getElementById("aviso").innerHTML = ''; //limpando o aviso escB = p;// x é o parametro de x e O é o parametro de O }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function limpiaCampos(){\n $(\"#name2\").val('');\n $(\"#email2\").val('');\n $(\"#password2\").val('');\n $(\"#repassword2\").val('');\n $(\"#telefono2\").val('');\n $(\"#empresa2\").val('');\n $(\"#persona2\").val('');\n }", "function populateDataFields() {}", "function limpiarCampos(){...
[ "0.68114316", "0.65675145", "0.65575063", "0.6427193", "0.6425917", "0.64206904", "0.64190876", "0.63936186", "0.63657403", "0.63271564", "0.6267318", "0.626117", "0.6260355", "0.6246934", "0.6213125", "0.6134528", "0.6118588", "0.6118072", "0.609696", "0.60552555", "0.603856...
0.0
-1
The header will actually be a column that goes across the left side of the screen. It is assumed that the containing component will wrap the Header component in a Bootstrap row container. On mobile and small browser widths, the header will instead be a thin bar at the top of the page
function Header() { const [links] = useState(() => { const tempLinks = [ { name: 'About', link: '/' }, { name: 'Portfolio', link: '/Portfolio' }, { name: 'Contact', link: '/Contact' }, { name: 'Resumé', link:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function HeaderComponent(){\n\treturn(\n\t\t<div className=\"row\">\n\t\t <div className=\"column column-offset-25\">\n\t\t <p><strong>Memory Game- Flip the cards</strong></p>\n\t\t </div>\n\t\t</div>\n\t);\n}", "static header() {\n return (\n <Grid>\n <br/>\n <Row bsClass='title'>...
[ "0.65050954", "0.62406653", "0.6027409", "0.6007697", "0.59999675", "0.5916806", "0.5865478", "0.58525157", "0.58474416", "0.5834456", "0.58130366", "0.58114904", "0.5768806", "0.57152945", "0.57112795", "0.5692367", "0.5691553", "0.5654323", "0.56486964", "0.56446487", "0.56...
0.0
-1
logic and structure from: I did go through entire code and rewrite it. added and subtracted code. Beggining of lab 3. Jennifer Nordell Math.random() generates a number between 0 and 1 but not including 1. So if we multiply it by 10 and then take the floor of it, we will only ever get a possible range of 0 to 9.Adding t...
function questionSix(){ var randoNum = Math.floor(Math.random() * 10) + 1; var opportunities = 4; var robotVoice = 'Guess a integer from 1 to 10!'; /*beggining of while loop checks the condition to see if there are any turns left. */ while (opportunities > 0) { /*Lets the user know to guess an integer and ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function random() {\n\t\tr = (r + 0.1) % 1\n\t\treturn r\n\t}", "function randomNumGenerator1orNeg1() {\r\n let generatedNumber = Math.random();\r\n console.log(generatedNumber);\r\n\r\n if (generatedNumber <= 0.4) {\r\n return 1;\r\n }\r\n else {\r\n return -1;\r\n }\r\n\r\n\r\n}", "function rando...
[ "0.7482148", "0.7336316", "0.72298294", "0.71655816", "0.71574533", "0.7145405", "0.71386707", "0.7065865", "0.69882333", "0.6983818", "0.68358374", "0.6834044", "0.6806854", "0.68045384", "0.6794336", "0.6794203", "0.67625225", "0.6760761", "0.675063", "0.67410696", "0.67409...
0.0
-1
scales amount to arguments
function scaleArguments(value){ var string = ''; for(var k = 0; k < value; k++){ string += 'value !== terminator[' + k + ']'; if(k < value - 1){ string += ' && '; } } return string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scale(n) { return (1 + n)/2; }", "function scaleValue(value){\n //Assuming army size is between \n}", "function Scale () {}", "scaleTo() {}", "function paper_scale(amount, x, y) {\n var scale = V(paper.viewport).scale().sx;\n var newScale = scale*amount;\n paper.scale(newScale, newScale...
[ "0.6734928", "0.6611962", "0.65871465", "0.6396813", "0.63315004", "0.6159218", "0.6132735", "0.6089518", "0.60551375", "0.6046236", "0.6046236", "0.6046236", "0.60402167", "0.59983814", "0.5986868", "0.5978602", "0.5962923", "0.59540313", "0.5945297", "0.5944917", "0.5921551...
0.0
-1
end of Handle suffix
getPropertyAndValue(classname){ let result=this.make(classname,null,true); if(!result[0] && !result[1]) return result[2]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setEndHandle(handle) {\n this.end.handle = handle\n }", "set end(value) {}", "get end() {}", "function endsin (str, suffix) {\n if (str.length < suffix.length) return false\n return (str.slice(-suffix.length) === suffix)\n}", "end() { }", "get end() { return this._end; }", "static get END()...
[ "0.67333937", "0.6208937", "0.5901054", "0.5889549", "0.58880574", "0.5871002", "0.5855051", "0.5774196", "0.5774196", "0.56562454", "0.5641622", "0.5617048", "0.56103027", "0.5601615", "0.5580466", "0.5580466", "0.5557637", "0.55442107", "0.5537186", "0.55350745", "0.5492759...
0.0
-1
replaces user_ids with usen_names
function ReplaceNames(text){ //if there's no mentioned users in a message if (text.indexOf("<@U") == -1){ return Promise.resolve(text); } return Promise.resolve(text).then( text => { return getSlackName(text); }).then( text => {return ReplaceNames(text);}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUserNames(){ \n io.emit('get users', users); // users is the array with all user names\n\n }", "function convertToUserName(userId, callback){\n // Send either a U123456 UserID or bob UserName and it will return the bob value all the time\n SLACK.api(\"users.list\", function(err, respon...
[ "0.6092097", "0.60712475", "0.6060832", "0.6046426", "0.59747696", "0.59652334", "0.59545887", "0.5951322", "0.59241307", "0.59199226", "0.5894983", "0.5894086", "0.5885708", "0.5835255", "0.58299124", "0.5812546", "0.57674694", "0.57545763", "0.5742343", "0.5711801", "0.5701...
0.5558116
31
Draw arrows on the ends of axes
function drawArrows(width, height) { width = width || 3; height = height || 5; // top ctx.beginPath(); ctx.moveTo(half, 0); ctx.lineTo(half + width, height); ctx.lineTo(half - width, height); ctx.closePath(); ctx.fill(); // bottom ctx.beginPath(); ctx.moveTo(half, size); ctx.lineTo(half + widt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paintArrows() {\n //helper function returns a handler function that calls getOffset with the correct offset\n var getClickHandler = function(offset) {\n return function(evt){ return getOffset(offset,evt); }\n } \n //create prev link and bind click event\n ...
[ "0.67097396", "0.6604514", "0.6424752", "0.6244886", "0.6244235", "0.61746466", "0.61280257", "0.6099673", "0.6052313", "0.60399806", "0.5980927", "0.5931272", "0.59172595", "0.5912576", "0.59039634", "0.5899693", "0.5890766", "0.589046", "0.58766884", "0.58566403", "0.582793...
0.6052758
8
Add marks to axes
function markAxes(increment, markSize) { markSize = markSize || 2; for (let i = increment; i < half; i+=increment) { ctx.fillRect(half - markSize, half - i, markSize*2, 1); ctx.fillRect(half + i, half - markSize, 1, markSize*2); ctx.fillRect(half - markSize, half + i, markSize*2, 1); ctx.fillRect(half...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTickMarks(stage,stage2, ticksLayer, ticksLayer2,messageLayer, scalefactor, scaleUnits, wWidth,currPan) {\r\n\t var xMark = 8;\r\n\t var feetIndicator = 0;\r\n\t totalInchMarks = Math.round(wWidth / 72);\r\n\t if (currPan > 1) {\r\n\r\n\t }\r\n\t for (var j = 0; j < totalIn...
[ "0.6500226", "0.6432602", "0.6370367", "0.61378014", "0.60873955", "0.6085121", "0.6021742", "0.5994023", "0.58998847", "0.58730143", "0.58527744", "0.5769936", "0.57493067", "0.5738708", "0.5738708", "0.57087785", "0.57058734", "0.5702629", "0.5652936", "0.5652936", "0.56452...
0.6697874
0
Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. They usually appear for dates that denote time before the timezones were introduced (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891 and GMT+01:00:00 after that date) DategetTimezoneOffset returns...
function getTimezoneOffsetInMilliseconds(date) { var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds())); utcDate.setUTCFullYear(date.getFullYear()); return date.getTime() - utcDate.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_time_zone_offset( ) {\n\tvar current_date = new Date( );\n\tvar gmt_offset = current_date.getTimezoneOffset( ) / 60;\n\treturn (gmt_offset);\n}", "function getTimeZoneOffsetMinutes()\n{\n var offset = new Date().getTimezoneOffset();\n return offset;\n}", "function getTimezoneOffset(d, tz) {\...
[ "0.7558656", "0.7448213", "0.7217465", "0.7193639", "0.6652722", "0.6603618", "0.65774196", "0.65660584", "0.65258455", "0.65236914", "0.65172", "0.65172", "0.65172", "0.65172", "0.65172", "0.6495192", "0.64725715", "0.64611816", "0.64611816", "0.64611816", "0.64611816", "0...
0.64315784
34
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCDayOfYear(dirtyDate) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); var timestamp = date.getTime(); date.setUTCMonth(0, 1); date.setUTCHours(0, 0, 0, 0); var startOfYearTim...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.68178153", "0.66685593", "0.64028925", "0.63345134", "0.6310961", "0.6282303", "0.6282303", "0.6246488", "0.62180126", "0.62180126", "0.62180126", "0.62180126", "0.62180126", "0.614629", "0.6116981", "0.6087149", "0.60832953", "0.6069827", "0.6053182", "0.6053182", "0.6053...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCISOWeek(dirtyDate) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); var diff = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(date).getTime() - (0,_startOf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818415", "0.6670608", "0.64034706", "0.6335078", "0.63110936", "0.628136", "0.628136", "0.62452924", "0.62169504", "0.62169504", "0.62169504", "0.62169504", "0.62169504", "0.61476094", "0.6116945", "0.60867435", "0.60849077", "0.6071006", "0.6052934", "0.6052934", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCISOWeekYear(dirtyDate) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); var year = date.getUTCFullYear(); var fourthOfJanuaryOfNextYear = new Date(0); fourthOfJanuaryOfNextYear...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.68172866", "0.66672593", "0.64010334", "0.6335545", "0.63098127", "0.62818515", "0.62818515", "0.6246092", "0.6217343", "0.6217343", "0.6217343", "0.6217343", "0.6217343", "0.61460054", "0.61168295", "0.6086125", "0.6081963", "0.6068881", "0.605309", "0.605309", "0.605309"...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCWeek(dirtyDate, options) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); var diff = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(date, options).getTime() -...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818613", "0.66693044", "0.6404697", "0.63360345", "0.63109535", "0.6282428", "0.6282428", "0.62464124", "0.6217667", "0.6217667", "0.6217667", "0.6217667", "0.6217667", "0.614838", "0.6117181", "0.6086573", "0.60845053", "0.60708517", "0.6053242", "0.6053242", "0.6053242"...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function getUTCWeekYear(dirtyDate, dirtyOptions) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate, dirtyOptions); var year = date.getUTCFullYear(); var options = dirtyOptions || {}; var locale ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.68178153", "0.66685593", "0.64028925", "0.63345134", "0.6310961", "0.6282303", "0.6282303", "0.6246488", "0.62180126", "0.62180126", "0.62180126", "0.62180126", "0.62180126", "0.614629", "0.6116981", "0.6087149", "0.60832953", "0.6069827", "0.6053182", "0.6053182", "0.6053...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function startOfUTCISOWeek(dirtyDate) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var weekStartsOn = 1; var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); var day = date.getUTCDay(); var diff = (day < weekStartsOn ? 7 : 0) + day - weekSt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818415", "0.6670608", "0.64034706", "0.6335078", "0.63110936", "0.628136", "0.628136", "0.62452924", "0.62169504", "0.62169504", "0.62169504", "0.62169504", "0.62169504", "0.61476094", "0.6116945", "0.60867435", "0.60849077", "0.6071006", "0.6052934", "0.6052934", "0.6052...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function startOfUTCISOWeekYear(dirtyDate) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var year = (0,_getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); var fourthOfJanuary = new Date(0); fourthOfJanuary.setUTCFullYear(year, 0, 4); fourthOfJa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.68172866", "0.66672593", "0.64010334", "0.6335545", "0.63098127", "0.62818515", "0.62818515", "0.6246092", "0.6217343", "0.6217343", "0.6217343", "0.6217343", "0.6217343", "0.61460054", "0.61168295", "0.6086125", "0.6081963", "0.6068881", "0.605309", "0.605309", "0.605309"...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function startOfUTCWeek(dirtyDate, dirtyOptions) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var options = dirtyOptions || {}; var locale = options.locale; var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn; var defaultWeekStartsOn = locale...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.6818613", "0.66693044", "0.6404697", "0.63360345", "0.63109535", "0.6282428", "0.6282428", "0.62464124", "0.6217667", "0.6217667", "0.6217667", "0.6217667", "0.6217667", "0.614838", "0.6117181", "0.6086573", "0.60845053", "0.60708517", "0.6053242", "0.6053242", "0.6053242"...
0.0
-1
This function will be a part of public API when UTC function will be implemented. See issue:
function startOfUTCWeekYear(dirtyDate, dirtyOptions) { (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); var options = dirtyOptions || {}; var locale = options.locale; var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate; var defaul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getUTCDateTime() {\n return new Date().toISOString().replace(/T/, ' ').replace(/\\..+/, '')\n }", "localTimeToUTC(localTime) {\r\n let dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIso...
[ "0.68178153", "0.66685593", "0.64028925", "0.63345134", "0.6310961", "0.6282303", "0.6282303", "0.6246488", "0.62180126", "0.62180126", "0.62180126", "0.62180126", "0.62180126", "0.614629", "0.6116981", "0.6087149", "0.60832953", "0.6069827", "0.6053182", "0.6053182", "0.6053...
0.0
-1
you will need a place to store your state in this component.
constructor() { super(); this.state = defaultState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() { \r\n super();\r\n this.state = {};\r\n }", "constructor() {\n super();\n this.state = {};\n }", "constructor() {\n super();\n this.state = {\n };\n }", "function State() {\n\n }", "constructor() {\n super();\n this.state = {\n visible: fal...
[ "0.7518974", "0.73437", "0.7338878", "0.72657704", "0.7251716", "0.72093964", "0.7134431", "0.7133309", "0.71144634", "0.70989776", "0.70896333", "0.7074128", "0.70255715", "0.7020946", "0.6996884", "0.69798994", "0.6974671", "0.6955524", "0.6952718", "0.6952379", "0.6951544"...
0.0
-1
handle radio button toggle
handleSelection(event) { this.setState({ selection: event.target.value, searchTerm: "", results: [] }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "radiosetter(event){\n console.log(event.target.value)\n switch (event.target.value) {\n case \"TRUE\":\n window.$attend = event.target.value\n break;\n case \"FALSE\":\n window.$attend = event.target.value\n break;\n case \"Public\":\n window.$classi = event....
[ "0.71673805", "0.7068692", "0.7067587", "0.6990205", "0.673893", "0.67246866", "0.66100335", "0.6538012", "0.6450667", "0.64459234", "0.64446884", "0.6442299", "0.6420519", "0.64099896", "0.64093995", "0.6383896", "0.6379497", "0.63782036", "0.6373619", "0.63560265", "0.63430...
0.0
-1
handle search term change
handleChange(event) { this.setState({ searchTerm: event.target.value }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchUpdated(term) {\n setsearch(term);\n }", "onSearchTermChange() {\n this.search();\n Metrics.getInstance().updateMetric(Filters.SEARCH, 1);\n }", "function handleSearchTerm(event) {\n setSearchTerm(event.target.value)\n}", "function editSearchTerm(e){\r\n setSearch(e.targe...
[ "0.81170076", "0.796823", "0.7704384", "0.76710325", "0.7586415", "0.7586097", "0.7519616", "0.74288386", "0.7391982", "0.7352732", "0.7326969", "0.7293488", "0.72516567", "0.71975684", "0.71849245", "0.71817124", "0.71639454", "0.7127254", "0.7120715", "0.710433", "0.7086714...
0.0
-1
handle search term submit
handleSubmit(event) { let searchTerm = this.state.searchTerm; let targetUrl = 'https://swapi.co/api'; console.log('SEARCH TERM', searchTerm) if (this.state.selection === "People") { $.get(`${targetUrl}/people/?search=${searchTerm}`) .then((res) => { this.setState({ re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleSubmit() {\n //Take the search term string entered by the user in the input field, add it to the baseUrl, make a fetch request to that new url, and append the results of what we searched for to the DOM in the correct element, wrapped in li tags\n}", "function handleSubmit(event) {\n event.prev...
[ "0.7653464", "0.7407639", "0.7332748", "0.7319719", "0.73169625", "0.731006", "0.7294322", "0.7267479", "0.7266611", "0.72529197", "0.7193012", "0.7192944", "0.718985", "0.7178606", "0.7173004", "0.7172312", "0.71609765", "0.7136474", "0.7130006", "0.7121936", "0.7075125", ...
0.0
-1
load collection with params
index( { commit }, p ){ commit('setDataStatS', 'loading'); LaporanCuDiskusiAPI.index( p ) .then( function( response ){ commit('setDataS', response.data.model ); commit('setDataStatS', 'success'); }) .catch( error => { commit('setDataS', error.resp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadCollections(collections, tag) {\n this.dispatch(new LoadCollections(collections, tag));\n }", "function getCollection(collection){\n var data = bd.collection(collection);\n return data;\n }", "constructor(collection) {\n this.collection = collection;\n }", "function loadColle...
[ "0.6311033", "0.61677796", "0.5982814", "0.57680327", "0.5762709", "0.5734512", "0.5716924", "0.57133067", "0.57028484", "0.5689057", "0.56722105", "0.5642118", "0.5611103", "0.5577539", "0.5564283", "0.5521954", "0.5496266", "0.5494486", "0.54917717", "0.54888606", "0.544391...
0.0
-1
load collection without paramsx
get( { commit }, id ){ commit('setDataStatS', 'loading'); LaporanCuDiskusiAPI.get( id ) .then( function( response ){ commit('setDataS', response.data.model ); commit('setDataStatS', 'success'); }) .catch( error => { commit('setDataS', error.respon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCollection(collection){\n var data = bd.collection(collection);\n return data;\n }", "constructor(collection) {\n this.collection = collection;\n }", "loadCollections(collections, tag) {\n this.dispatch(new LoadCollections(collections, tag));\n }", "function loadFixtu...
[ "0.61747414", "0.6117538", "0.5992804", "0.59641594", "0.58894867", "0.57940257", "0.57910025", "0.57910025", "0.57910025", "0.57739115", "0.575417", "0.5696819", "0.5696819", "0.5696819", "0.5676348", "0.56285655", "0.5595253", "0.5550208", "0.5546299", "0.55290693", "0.5506...
0.0
-1
Initializes the currencies with values from the api
componentDidMount() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialize(){\n request('https://coinbase.com/api/v1/currencies/exchange_rates/', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n exchange_rates = JSON.parse(body);\n }\n });\n}", "constructor() { \n \n Currency.initialize(this);\n }", "...
[ "0.76607454", "0.7299682", "0.71658146", "0.6969387", "0.69358265", "0.69310176", "0.68216896", "0.66896075", "0.6681444", "0.66575146", "0.64829785", "0.6467231", "0.6420181", "0.6412246", "0.6392742", "0.6381712", "0.628717", "0.6284497", "0.6283516", "0.6270882", "0.623371...
0.0
-1
The function whose prototype chain sequence wrappers inherit from.
function baseLodash() { // No operation performed. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get prototype() {}", "function FunctionWithPrototypeTest() {}", "function n(e,t){e.prototype.__proto__=t&&t.prototype,e.__proto__=t}", "function inheritFrom(subfn,superfn) {\n\tvar r = function () {}\n\tr.prototype = superfn.prototype;\n\tsubfn.prototype = new r();\n}", "function m(a){var b=function(){};re...
[ "0.6340839", "0.6205902", "0.5885001", "0.58365256", "0.575269", "0.5729212", "0.5729212", "0.5719258", "0.5719258", "0.5719258", "0.5719258", "0.5719258", "0.5714788", "0.5714788", "0.5680683", "0.5680683", "0.5680683", "0.5680683", "0.5680683", "0.5680683", "0.5680683", "...
0.0
-1
Removes all keyvalue entries from the hash.
function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", ...
[ "0.67331547", "0.66229314", "0.65130246", "0.6456053", "0.62131137", "0.6201214", "0.6139392", "0.61100906", "0.6029288", "0.5966744", "0.59360605", "0.59072584", "0.59072584", "0.59072584", "0.59040016", "0.5900616", "0.5900616", "0.5900616", "0.58648694", "0.58648694", "0.5...
0.0
-1
Removes all keyvalue entries from the list cache.
function listCacheClear() { this.__data__ = []; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}", "function listCacheClear() ...
[ "0.7357779", "0.7357779", "0.7357779", "0.7357779", "0.7317932", "0.72645503", "0.72645503", "0.7262977", "0.72569066", "0.72569066", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7236393", "0.7234546",...
0.0
-1
Removes all keyvalue entries from the map.
function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function multiMapRemo...
[ "0.75895983", "0.70693445", "0.6734542", "0.6652626", "0.6528575", "0.62661517", "0.62583584", "0.62583584", "0.62583584", "0.6170991", "0.6170991", "0.6170991", "0.61660236", "0.6150553", "0.6147538", "0.6147538", "0.6147538", "0.6147538", "0.6147538", "0.6147538", "0.614753...
0.0
-1
Removes all keyvalue entries from the stack.
function stackClear() { this.__data__ = new ListCache; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear () {\n this._dict = {}\n this._stack = [this._dict]\n }", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear() {\n\t this.__...
[ "0.63583076", "0.6330356", "0.6330356", "0.6330356", "0.62746143", "0.62286156", "0.62286156", "0.62286156", "0.62286156", "0.62286156", "0.62286156", "0.62286156", "0.62182903", "0.62182903", "0.62182903", "0.62182903", "0.62182903", "0.62182903", "0.62182903", "0.62182903", ...
0.0
-1
This method returns `undefined`.
function noop() { // No operation performed. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnUndefined() {}", "value() { return undefined; }", "function _undefined() {\n return exports.PREFIX.undefined;\n}", "function f () {\n return undefined;\n }", "_get(key) { return undefined; }", "get None() {}", "get None() {}", "get None() {}", "get None() {}", "_get_value() ...
[ "0.7349204", "0.67813563", "0.6498075", "0.6468386", "0.6265139", "0.6195519", "0.6195519", "0.6195519", "0.6195519", "0.5957684", "0.5942946", "0.5942946", "0.59360754", "0.5919196", "0.5828133", "0.5788914", "0.57824624", "0.5770755", "0.5736466", "0.5725097", "0.57073194",...
0.0
-1
Just doing manhatten for now.
calculateHeuristic(start, end) { let d1 = Math.abs(end.x - start.x); let d2 = Math.abs(end.y - start.y); return d1 + d2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "static private protected inter...
[ "0.68942195", "0.684759", "0.67712766", "0.6249055", "0.62242", "0.60774463", "0.5952737", "0.59389985", "0.5879077", "0.5858487", "0.57968473", "0.5735584", "0.57232535", "0.56571716", "0.5634563", "0.5629577", "0.55872977", "0.5518138", "0.5516223", "0.55109", "0.54807705",...
0.0
-1
import data from './data/layer3.json'
function App() { const [skill, searchSkill] = useState(""); const skills = []; JsonData.map((v) => { const key = Math.floor(Math.random() * 10000000 + 1); return skills.push({ key, ...v }); }); return ( <div className="container"> <ui5-shellbar primary-title="Top Skills" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function importData() {\n d3.json(\"./Data/bubbleData.json\").then(function(data) {\n wordCloud(data);\n })\n}", "function loadData() {\n return d3.json(dataFileName)\n}", "loadJsonData() {\n }", "function load() {\r\n\r\n\r\n fetch('zooland.json')\r\n .then(function(result){\r...
[ "0.68757886", "0.6438387", "0.61402375", "0.6083523", "0.60813445", "0.6068835", "0.601762", "0.60129076", "0.59666234", "0.59574825", "0.59201455", "0.5900643", "0.58322924", "0.58060026", "0.5802011", "0.5791523", "0.57877886", "0.5778502", "0.5777209", "0.5770072", "0.5765...
0.0
-1
Fills list of possible months in data
function fill_Month_List(data) { for (var key in data) { monthList.push(key) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FormMonthlyData(data) {\n var janArray = [];\n var febArray = [];\n var marArray = [];\n var aprArray = [];\n var mayArray = [];\n var junArray = [];\n var julArray = [];\n var augArray = [];\n var sepArray = [];\n var octArray = [];\n var novArray = [];\n var decArray = [];\n\n for (var i =...
[ "0.7016399", "0.67866665", "0.6713005", "0.6627018", "0.6616417", "0.6515142", "0.6502321", "0.64974964", "0.63856924", "0.6367071", "0.6331355", "0.63304764", "0.6322008", "0.6309347", "0.6259356", "0.62425214", "0.6237745", "0.62124413", "0.6195355", "0.6166658", "0.6160788...
0.77107936
0
Loads new month when changing
function insert_month_T1(start, increase, month) { indent = (increase) ? ["130px", "-130px"] : ["-130px", "130px"] var jsonMonthData = jsonData[month] var all = document.querySelectorAll('input[placeholder=" "]') var labels = document.querySelectorAll('.inputLabel') var removeLabelArr = [] for (i=0;i<labels.lengt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forwardMonth(){\n toMonth=globalMonth.nextMonth();\n $( document ).ready(load);\n}", "function backMonth(){\n toMonth=globalMonth.prevMonth();\n $( document ).ready(load);\n}", "function firstload(){\n var curDate = new Date();\n var curMonth = curDate.getMonth();\n var curYear = curDate.getFul...
[ "0.73680985", "0.7346089", "0.73067874", "0.6918589", "0.6862398", "0.6845749", "0.65393436", "0.64829713", "0.6479354", "0.6478964", "0.64772785", "0.6442694", "0.64202434", "0.63807094", "0.6332086", "0.62886226", "0.6251004", "0.6244413", "0.62297356", "0.6225202", "0.6203...
0.0
-1
GET Return all Rentals in the DB
async findAllOrders(){ return Order.find(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAll (){\n return Mentor.find({});\n}", "function getAllUserRents(userId){\n return queryDB(`SELECT * FROM rent WHERE user_id = ?;`, userId)\n .then((results) => {\n return results;\n });\n}", "findAllRostas() {\n try {\n return Rosta.find({});\n }\n ...
[ "0.68962735", "0.6629151", "0.63477814", "0.6330442", "0.6329403", "0.63103855", "0.6240947", "0.61934406", "0.61554796", "0.61464965", "0.6134149", "0.6129288", "0.6121085", "0.61021566", "0.607757", "0.60707194", "0.6061671", "0.6060854", "0.605875", "0.60577893", "0.603607...
0.0
-1
GET Return all Rentals in the DB
async findAllOrdersByUserId(userId){ return Order.find({user_id : userId}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAll (){\n return Mentor.find({});\n}", "function getAllUserRents(userId){\n return queryDB(`SELECT * FROM rent WHERE user_id = ?;`, userId)\n .then((results) => {\n return results;\n });\n}", "findAllRostas() {\n try {\n return Rosta.find({});\n }\n ...
[ "0.68976736", "0.66279006", "0.63454497", "0.63326156", "0.63284916", "0.6310847", "0.6238908", "0.6191136", "0.61554784", "0.61461145", "0.61341465", "0.6130294", "0.61192626", "0.61002153", "0.60775745", "0.6071514", "0.6062656", "0.60612345", "0.6059607", "0.6059458", "0.6...
0.0
-1
GET Return a Film with specified ID
async findById(id) { return Order.findById(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async findById(id) {\n return Film.findById(id);\n }", "function getOneMovie(id) {\n AJAXRequest(`${serverURL}/${id}`).then(responseData => console.log(responseData))\n }", "function get(id) {\n return $.getJSON(\"/api/movies/\" + id);\n }", "async fetchFilmById() {\n try {\n...
[ "0.7970695", "0.76263094", "0.73986053", "0.73842764", "0.73492986", "0.72957927", "0.7149136", "0.71205413", "0.70418537", "0.6993508", "0.6981721", "0.69763535", "0.69433385", "0.680215", "0.6773192", "0.67548054", "0.671131", "0.6688444", "0.66872287", "0.66658056", "0.665...
0.0
-1
POST Create a new Order
async rentMovie(body, id) { const userEntity = await User.findById(id); if(!userEntity){ throw new Error('User not found') } return await Order.create({ user_id: id, user_email : userEntity.email, rental: body.rental }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createOrder({username, amount, body={},\n order_sn=`D${dayjs().format('YYYYMMDDHHmmss')}`,\n status='created'}) {\n const pathname = '/api/orders/';\n body = JSON.stringify(body);\n return this.requestJSON({pathname, method: 'POST',\n form: {username, amount, body, order_sn, status}});\n }", ...
[ "0.78124654", "0.7771194", "0.77224064", "0.73704046", "0.72458756", "0.7128376", "0.70690507", "0.7033606", "0.69225717", "0.68225896", "0.6757485", "0.6664377", "0.6659482", "0.66321075", "0.64989644", "0.64814794", "0.6420142", "0.6416948", "0.63902265", "0.63853145", "0.6...
0.0
-1
PUT Update an existing Order
async updateOrder(id,order){ return Order.findByIdAndUpdate(id,order,{new: true}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateOrder(Order) {\n $.ajax({\n method: \"PUT\",\n url: \"/api/orders\",\n data: Order\n })\n .then(function () {\n console.log(\"order updated\")\n });\n }", "async put(req, res) {\n try {\n await...
[ "0.82355034", "0.78774005", "0.7673529", "0.6910428", "0.68598336", "0.6620515", "0.65245384", "0.652011", "0.6497165", "0.6424986", "0.63927144", "0.63750225", "0.6333665", "0.6202114", "0.6170582", "0.6054092", "0.6037796", "0.6037796", "0.6037796", "0.60079837", "0.5942434...
0.75913304
3
DELETE Delete a Film with specified ID
async deleteOrder(id) { return Order.findByIdAndRemove(id) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async deleteFilm({ id: id }) {\n const idFound = Film.findOneAndDelete({ id: id })\n return idFound.remove()\n }", "async deleteFilm({id: id}) {\n const idFound = movie.findOne({id: id})\n return idFound.remove()\n }", "async deleteFilm(id) {\n return Movie.findByIdAndR...
[ "0.88756794", "0.8680187", "0.8616888", "0.788255", "0.7509324", "0.74756557", "0.74218464", "0.7007694", "0.69332445", "0.6903231", "0.6860861", "0.68285406", "0.66652846", "0.6657276", "0.66202885", "0.65803874", "0.65711707", "0.65574324", "0.6535002", "0.6513456", "0.6492...
0.0
-1
Sets up details for registration
function registerSubmit() { let regTime = $('#reg-time').val(); let regDate = $('#reg-date').val(); let rin = $('#rin').val(); let password = $('#password').val(); // check for unusual registration dates let reg = parse(regDate + 'T' + regTime); // if registration is before 8 AM or after 8 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register()\n {\n validateRegisterInput();\n registerInfoToSite();\n\n\n \n \n }", "constructor(){\n super();\n\n this.setTitle(\"Register\");\n \n // Initialize the properties\n this.data = {\n first_name: \"\",\n ...
[ "0.748639", "0.6724713", "0.6649204", "0.66441536", "0.66114026", "0.6540037", "0.64726365", "0.6399382", "0.6388984", "0.6353738", "0.6343278", "0.6300329", "0.62553257", "0.62478954", "0.62226695", "0.62020236", "0.6192071", "0.61732465", "0.61457336", "0.6145426", "0.61173...
0.0
-1
Unsubscribes from the liveQuery
unsubscribe() { this.unsubscribeFunc() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unsubAll () {\n this._subscribers.clear()\n }", "disconnectedCallback() {\n unsubscribe(this.subscription);\n this.subscription = null;\n }", "unsubscribe() {\n mainLog.info('Unsubscribing from Lightning gRPC streams')\n this.mainWindow = null\n Object.keys(this.subscriptions).for...
[ "0.6789255", "0.6636388", "0.6503625", "0.64903665", "0.641158", "0.6355725", "0.6345745", "0.63356686", "0.62958485", "0.62958485", "0.6264313", "0.6264313", "0.6176758", "0.6150932", "0.61494124", "0.61474913", "0.61470747", "0.606684", "0.6065391", "0.6021986", "0.6006381"...
0.61092854
17
middleware to check if we are registered or not
function loggerFunc(req,res,next){ if (!req.session.isLoggedIn) res.render('login', {result: "All users have to log in first"}) next() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isregistered () // boolean\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n return webphone_api.plhandler.IsRegistered();\n else\n return false;\n}", "function hasSesion(req, res, next)\n {\n if (req.user) return res.redirect('/...
[ "0.64080364", "0.6362612", "0.6235357", "0.60965943", "0.6051907", "0.59280634", "0.58667886", "0.5852666", "0.58444625", "0.58254397", "0.58245635", "0.58112234", "0.579933", "0.5788105", "0.5772702", "0.5753393", "0.5752694", "0.5741984", "0.56841326", "0.56763095", "0.5653...
0.0
-1
PART 1: Function Syntax EXAMPLE: Write a function below that, when called will log "Severus Snape" to the console
function printName() { console.log("Severus Snape"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logFunnyJoke() {\r\n console.log(\"This is a good Joke\");\r\n}", "function logShout(string) {\n console.log(shout(string))\n}", "function logShout(string) {\n console.log(shout(string));\n}", "function log(s) {\n console.log(s);\n}", "function logFunnyJoke() {\n console.log(\"Funny Joke :)...
[ "0.7525315", "0.73588693", "0.73509216", "0.73424745", "0.7299163", "0.72766525", "0.7198696", "0.7186104", "0.7178889", "0.7162798", "0.7139126", "0.71336514", "0.71250015", "0.71250015", "0.70844465", "0.7080755", "0.70614314", "0.7049648", "0.70395404", "0.70395404", "0.70...
0.7565034
3
Since the function was called 4 times, "Severus Snape" will log 4 times. YOU DO: Write a function named sayHello that logs to the console "Oh, Hello!" Then, call the function 2 times.
function sayHello() { console.log("Oh, Hello!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printHello() {\n helloCounter++;\n console.log('hello');\n}", "function nameOfFunction() {\n console.log(\"Hello\");\n console.log(\"Hello\");\n console.log(\"Hello\");\n}", "function printHelloAgain() {\n console.log(\"Hello\");\n}", "function sing() {\n console.log(\"twinkle twinkle.....
[ "0.73284644", "0.72782874", "0.724614", "0.7040917", "0.7032661", "0.6977609", "0.6929857", "0.6917202", "0.6915762", "0.68952376", "0.68410146", "0.6812563", "0.6782224", "0.676858", "0.6748942", "0.6732909", "0.6727451", "0.66797745", "0.66644096", "0.6603332", "0.65890455"...
0.6401197
37
PART 2: Arguments and Parameters YOU DO: Write a function named greetMe that takes an argument, a String, of a name. The function should print out the value of the String that was passed in. Then, call the function 3 times, each time, passing it a different name.
function greetMe(name) { console.log("Oh, hi " + name +"!" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function greetings(personName){\n console.log(\"Welcome \" + personName);\n}", "function greetings(personName){\n console.log(\"Welcome\" + personName);\n}", "function greet1(name) {\n console.log('Iam From Greet 1 ' + name);\n}", "function hello(name, greetings) {\n console.log(`${greetings} ${n...
[ "0.7808405", "0.7797216", "0.77793455", "0.7777897", "0.7771639", "0.77113473", "0.7702587", "0.76830626", "0.7648916", "0.76027286", "0.7599081", "0.7597561", "0.75836205", "0.7581714", "0.75678474", "0.7555007", "0.755478", "0.75514936", "0.75288725", "0.75181943", "0.75173...
0.77977186
1
YOU DO: Write a function that takes in 2 numbers as arguments, Numbers, and logs their sum Then, call that function 3 times, each time, passing in 2 different Numbers.
function sum(num1,num2) { console.log(num1 + num2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multiThreeNum(num1,num2,num3){\n console.log(num1*num2*num3)\n}", "function mySum(num1, num2, num3) {\n console.log(num1 + num2 + num3);\n}", "function sumOfTwoNumbers() {}", "function addNums(num1, num2) {\n // function body\n let sum = num1 + num2;\n lg('addNums', `sudejus ${num1} ir ${...
[ "0.67764306", "0.6679019", "0.66713125", "0.66249275", "0.6602232", "0.65488946", "0.6518202", "0.65155566", "0.65067846", "0.6492343", "0.64795554", "0.6465108", "0.6459061", "0.64163584", "0.64004546", "0.63800997", "0.6367386", "0.63662064", "0.6361275", "0.63520676", "0.6...
0.62242895
45
Contraintes pour les Drops
function constrainDrop(start,end,indexOE = null){ let allEvents = calendar.getEvents(); let eventsToReplace = []; if(indexOE != null) allEvents.splice(indexOE,1) if(moment(start).isSame(moment(end),'day')){ index = allEvents.findIndex(event => moment(event.start).isSame(moment(start),'day')) if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropConstraintAlterTable() {\n\tvar v_currTabTag = v_connTabControl.selectedTab.tag.tabControl.selectedTab.tag;\n\n\tvar v_data = v_currTabTag.alterTableObject.htConstraints.getData();\n\tvar v_row = v_currTabTag.alterTableObject.htConstraints.getSelected()[0][0];\n\n\tif(v_currTabTag.alterTableObject.inf...
[ "0.5707215", "0.5530739", "0.5417986", "0.53394914", "0.53394914", "0.52171516", "0.5174361", "0.51730025", "0.5098272", "0.5086907", "0.50532025", "0.5047717", "0.50430673", "0.5012672", "0.5010012", "0.4990962", "0.49159098", "0.49159098", "0.49121082", "0.4837144", "0.4808...
0.0
-1
Contraintes pour les resizes
function constrainResize(days,start){ let allEvents = calendar.getEvents(); let eventsToRemove = []; allEvents.sort((a,b) => moment(a.start).dayOfYear() - moment(b.start).dayOfYear()) if(days > 0){ index = allEvents.findIndex(event => moment(event.start).isSame(moment(start),'day')) for(i = 1; i <= ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function view_resources_resize() {\n\t\t\n\t}", "refreshConstraints () {\n const { constraints } = this.models;\n const { layout } = this.targetMorph.owner;\n if (!layout) {\n // display fixed height and left\n constraints.verticalConstraint = 'fixed';\n constraints.horizontalConstraint =...
[ "0.64553225", "0.6346129", "0.6310645", "0.6308139", "0.62971145", "0.62719387", "0.614808", "0.61327386", "0.6085334", "0.6021922", "0.594457", "0.59424776", "0.59312445", "0.5923566", "0.5880088", "0.5872323", "0.58466804", "0.58232003", "0.5823176", "0.58119565", "0.574606...
0.0
-1
Tableau contenant toutes les dates entre une start date et une end date
function createDateArray(start,end){ let dateArray = [], dt = new Date(start); while (moment(dt).dayOfYear() <= moment(end).dayOfYear()) { dateArray.push(new Date(dt)); dt.setDate(dt.getDate() + 1); } return dateArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineStartAndEndDate(list) {\n var minDate;\n var maxDate;\n\n $.each(list, function(key, value) {\n if (moment(value[4], 'MM-DD-YY', true).isValid()) {\n if (!minDate && !maxDate) {\n minDate = value[4];\n maxDate = val...
[ "0.6887341", "0.6871309", "0.68013", "0.6760533", "0.67025477", "0.65345407", "0.65272295", "0.6399326", "0.63559306", "0.63559306", "0.6312217", "0.6285163", "0.6230612", "0.62068653", "0.62061477", "0.62059844", "0.6163934", "0.6147655", "0.6142767", "0.6142767", "0.6118759...
0.66834
5
z = Foo A redclared variable throws an error. let z; Can't be hoisted. xyz = 'xyz'; console.log(xyz); let xyz; Scope of local variable
function printVar() { let localVar = 18; console.log('localVar inside the function ' + localVar); // localVar inside the function 18 console.log('A variable in the global scope can be accessed inside a function ' + z); // A variable in the global scope can be accessed inside a function Foo if(true){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function foo() {\n kaz = 1; // 'var' missing, ReferenceError.\n}", "function hoistingTest(){\n console.log(c); // display ReferenceError: c is not defined \n console.log(b); // display undefined \n console.log(a); // display ReferenceError: Cannot access 'a' before initialization \n let a = 10; \n ...
[ "0.70459485", "0.7004245", "0.698783", "0.680783", "0.67124426", "0.66829526", "0.66675067", "0.66593415", "0.662891", "0.6573406", "0.6550355", "0.64494556", "0.6409034", "0.636709", "0.6340724", "0.63246214", "0.62597716", "0.6256743", "0.62501085", "0.6234284", "0.62234324...
0.0
-1
Can't be reassigned. costanza = 'Jerry Seinfeld BFF.' //Throw an error. Scope of constant.
function printVar2() { const costanza = 'Belongs to the local scope of a function.' console.log(costanza); //Belongs to the local scope of a function. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testconstant(){\n\t//d=\"test1\" error assignment to constant variable\n\tconst d=\"test1\";\n\tconsole.log(d);\n}", "function CONST(){\n const a=100; //cannot be changed\n x=\"abcd\"\n //const x; not allowed**\n document.getElementById('i').innerHTML=x; //dont output anyth...
[ "0.6686915", "0.6653696", "0.62220323", "0.61365414", "0.61344445", "0.6125138", "0.60097414", "0.59981287", "0.5963682", "0.59010255", "0.5861775", "0.5844538", "0.5826025", "0.57979846", "0.5783599", "0.5783599", "0.5779546", "0.5778944", "0.5727406", "0.571767", "0.5690689...
0.52327096
51
const labels = useState(this.state.createdAt)
render() { let labels = []; for (let i = 0; i < 7; i++) { const date = new Date(this.props.createdAt).getDate() + i; const formatNewDate = new Date(this.props.createdAt); formatNewDate.setDate(date); labels.push(formatNewDate.getDate()); } return ( <> <div className...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addDateLabels() {\n let labels = []\n for(let i= 14; i > -1; i--){\n let d = new Date();\n d.setDate(d.getDate()-i)\n labels.push(d.toLocaleDateString())\n\n }\n this.setState({\n labels: labels\n })\n}", "render() {\n return (\n <h2> It is {this.state.date.toLocaleTimeString()}.</h2>\n ...
[ "0.6757386", "0.64211816", "0.63975114", "0.63975114", "0.6394623", "0.63913345", "0.6368082", "0.6349827", "0.63422513", "0.6292891", "0.6292891", "0.6292891", "0.6251061", "0.62390083", "0.622486", "0.6181781", "0.61720985", "0.6135832", "0.6116939", "0.60913163", "0.606026...
0.66063976
1
D R A G ///////////////////////////// / DRAG
function initDrag(){ var dragAmm = 0; var dex = 0; var dey = 0; var cx = 0; var cy = 0; var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0; // dragElement( o.container ); dragElement( o.dragEl ); function dragElement(elmnt) { elmnt.onmousedown = dMouseDown; // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _G() {}", "function _G() {}", "private internal function m248() {}", "private public function m246() {}", "function Stack_D_A_A_d() {\r\n}", "function Stack_D_A_A_A_A_d() {\r\n}", "function G(){}", "protected internal function m252() {}", "function _____SHARED_functions_____(){}", "funct...
[ "0.5672751", "0.5672751", "0.56585294", "0.55154", "0.5389739", "0.5371514", "0.5341545", "0.5327684", "0.5305025", "0.51993674", "0.5192893", "0.518876", "0.5163657", "0.5163657", "0.5145077", "0.51144725", "0.5103339", "0.5057096", "0.50543094", "0.505253", "0.505253", "0...
0.0
-1
gets data from cartitems and displaying it
function selectAll (res) { pool .query("select * from ShoppingCart order by id") .then(result => res.json(result.id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showItems() {\n\tconst qty = getQty()\n\tcartQty.innerHTML = `You have ${qty} items in your cart.`\n\t//console.log(`You have ${qty} items in your cart.`)\n\n\tlet itemStr = ''\n\tfor (let i = 0; i < cart.length; i++) {\n\t\tlet itemTotal = cart[i].price * cart[i].qty\n\t\t//console.log(`- ${cart[i].name}...
[ "0.7394046", "0.73178846", "0.72719854", "0.72409034", "0.72394896", "0.7233091", "0.72259426", "0.7214662", "0.720715", "0.71701354", "0.7166845", "0.71590364", "0.7130614", "0.7127221", "0.7127221", "0.7127221", "0.7127221", "0.7127221", "0.7127221", "0.7127221", "0.7127221...
0.0
-1
FUNCTION TO PLOT CHART
function plotChart(labelArray,x,yArray,chartID) { var ctx = document.getElementById(chartID).getContext('2d'); var dataset = []; for (let i=0; i<labelArray.length; i++){ var dataObject = { label: labelArray[i], borderColor: dynamicColor(), data: yArray[i], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function plot() {\n \n }", "function drawVisualization() {\r\n var style = \"bar-color\";//document.getElementById(\"style\").value;\r\n var showPerspective = true;//document.getElementById(\"perspective\").checked;\r\n // var withValue = [\"bar-color\", \"bar-size\", \"dot-size\", \"dot-color\"].ind...
[ "0.6511897", "0.6485951", "0.6400913", "0.635531", "0.6277905", "0.62627", "0.62447697", "0.6234178", "0.6232364", "0.6223724", "0.6207993", "0.6190275", "0.6185352", "0.6147408", "0.6145821", "0.6137699", "0.61324173", "0.61290103", "0.6126744", "0.6120258", "0.6097578", "...
0.0
-1
FUNCTION TO TABULATE ALERTS
function plotAlert(quoteCurrency,datesArray,ratesArray) { console.log(ratesArray[0][ratesArray[0].length-1]); var change =0; for (let i=0; i< quoteCurrency.length; i++){ change= ((ratesArray[i][datesArray.length-2]/ratesArray[i][datesArray.length-1])-1)*100; if(change<0){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AllTableToReportMultiple(table, nameTable){\n\tvar field4rows = $.parseJSON($('textarea#'+nameTable+'DataExport').val());\n\tvar table=table;\n\tvar tab_text=\"<table border='2px'><thead><tr bgcolor='#87AFC6'>\";\n\tvar line = \"\";\n\tvar tab = $(table);\n\tvar theader=$('#'+table+' tr:eq(0) th');\n\tfor...
[ "0.59863484", "0.59353024", "0.59095263", "0.5896316", "0.58844125", "0.5818084", "0.56864107", "0.5644854", "0.56191725", "0.55999404", "0.55753714", "0.55687803", "0.55634165", "0.5547977", "0.55409366", "0.5537199", "0.55361", "0.5532211", "0.55222714", "0.55131316", "0.54...
0.0
-1
simulate 5 second long operation
function cookAndDeliverFood(wordRepresentingCallback) { setTimeout(wordRepresentingCallback, 5000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doStuff() {\n\t// do stuff that takes longer than 100ms to execute\n}", "function I(){return a.setTimeout(function(){eb=void 0}),eb=fa.now()}", "function longRunningOperation(callback) {\n\t// simulate a 3 second operation\n\tsetTimeout(callback, 3000);\n}", "function work(ms) {\n let now = Date.no...
[ "0.639724", "0.63622886", "0.63299704", "0.6043561", "0.6029953", "0.5982412", "0.59820795", "0.5975352", "0.596778", "0.5967548", "0.59540856", "0.5933932", "0.59137464", "0.5911347", "0.58677155", "0.58490634", "0.5824638", "0.5808519", "0.58021927", "0.57934684", "0.578086...
0.0
-1
retrieves total balance from users account
function balanceTotal(){ var request = new XMLHttpRequest(); request.open('POST', 'https://blockchain.info/merchant/(key)/balance'); request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); request.onreadystatechange = function () { if (this.readyState === 4) { console.log('St...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getBalance(userName) {\n // We use this variable to store the userID, since that is the link between the two data bases.\n var userID;\n\n // First we find the userID in the user data base.\n //\n for (let i = 0; i < this.DB.users.length; i++) {\n if (this.DB.users[i]....
[ "0.74411726", "0.7159998", "0.71237636", "0.70709974", "0.704978", "0.6913147", "0.6892831", "0.68196374", "0.6815194", "0.68144804", "0.6808386", "0.67402864", "0.67162186", "0.6666685", "0.6657053", "0.66520005", "0.65976924", "0.65920186", "0.6571328", "0.65693927", "0.654...
0.61736745
50
Set the textContent property of all div.firstChild nodes to '0'
function resetNumberElements() { const elements = document.querySelectorAll('.digits div'); elements.forEach(div => { if (!isNaN(div.textContent)) { div.textContent = '0'; } div.style.color = '#221E1D'; }); numMs = 0; // Reset the bg and border of the parent div...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearContent(node) {\n\twhile (node.firstChild) {\n\t\tnode.removeChild(node.firstChild);\n\t}\n}", "function emptyContent() {\n while (contentEl.firstChild) {\n contentEl.removeChild(contentEl.firstChild);\n }\n}", "function clearContent(node) {\n while (node.hasChildNodes()) {\n ...
[ "0.6661298", "0.6631287", "0.65801394", "0.6448768", "0.6375541", "0.6375541", "0.6375541", "0.6375541", "0.6375541", "0.6375541", "0.63135976", "0.6246869", "0.62324643", "0.62304956", "0.6161413", "0.6137039", "0.6137039", "0.6137039", "0.61021745", "0.6097677", "0.60649824...
0.5367427
82
Reset the digits div's background color and border
function resetDivColor(divEl, bgColor, border) { divEl.style.backgroundColor = bgColor; divEl.style.border = border; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetNumberElements() {\n const elements = document.querySelectorAll('.digits div');\n elements.forEach(div => {\n if (!isNaN(div.textContent)) {\n div.textContent = '0';\n }\n div.style.color = '#221E1D';\n }); \n numMs = 0;\n\n // Reset the bg and border of...
[ "0.7415699", "0.67549664", "0.6065264", "0.6019907", "0.6008721", "0.60043454", "0.59954023", "0.59842163", "0.5979108", "0.59666395", "0.59478474", "0.5938861", "0.5909634", "0.5889825", "0.58612376", "0.5845966", "0.5825342", "0.5818857", "0.57981527", "0.5793776", "0.57619...
0.67147666
2
This method is used to print a category for debugging
function printCategory(cat){ var i; //check that |cat| is not null if(areReqdArgsNull(cat)){ return; } document.write("Category: name = " + cat.name + "; Options: [" +cat.options[0]); for(i=1; i<cat.options.length; i++){ document.write(", " + cat.options[i]); } document.write("]; Type...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "introduceCat() {\n console.log(`This is ${this._name}. It's a ${this._breed}.`);\n }", "get category() {\n\t\treturn this.__category;\n\t}", "addCategoryToDisplay () {\n this.createSection([\"div\", \"p\"], ['id'], ['category'], 'qwerty');\n document.querySelector('#category p')...
[ "0.637829", "0.6368349", "0.63495314", "0.63307536", "0.63112974", "0.63112974", "0.63112974", "0.63112974", "0.6285821", "0.61820567", "0.6067717", "0.60664064", "0.5994819", "0.5916972", "0.5896866", "0.5866126", "0.58423734", "0.5829046", "0.5826999", "0.5788236", "0.57854...
0.72691244
0
select if component has delay and return true, otherwise return false. this delay is the time it takes for the component to load in visually.
selectAfterDelay(target) { let delay = parseInt(target.style.transitionDelay); if (delay) { // extra 500ms necessary to avoid losing the focus we set setTimeout(() => { this.ready = true; this.select(0); }, delay + 500); ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async elementIsDisplayed(selector) {\n await selector.waitForExist();\n await selector.waitForDisplayed();\n const isDisplayed = await selector.isDisplayed();\n return await browser.waitUntil(async function () {\n return isDisplayed;\n }, this.timeout);\n }", "function wait(element, a, class...
[ "0.5977547", "0.5863421", "0.5830646", "0.5700516", "0.56343263", "0.5628433", "0.5626651", "0.5610804", "0.5607581", "0.5593682", "0.5588413", "0.5568699", "0.5566428", "0.5523111", "0.55214775", "0.5435822", "0.5424957", "0.5424957", "0.54052335", "0.54043615", "0.54029006"...
0.6402083
0
show graphic load SVG
function loadSVG() { fetch("prototypesave1_game 1.svg") .then(res => res.text()) .then(svgdata => { document .querySelector("#gameBox") .insertAdjacentHTML("afterbegin", svgdata); document .querySelector("#playButton") .addEventListener("mouseover", () => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawSvg() {\n \n\t}", "function loadSVG() {\n\tvar xmlhttp = new XMLHttpRequest();\n\txmlhttp.onreadystatechange = function() {\n\t if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n\t\t// loading the document with drawsvg\n\t\tchan.call({\n\t\t\tmethod: \"loadStringSVG\",\n\t\t\tparams: {\n\t\t...
[ "0.724875", "0.7002147", "0.68645597", "0.67205894", "0.6683589", "0.66715384", "0.6664098", "0.6468404", "0.6464662", "0.64433134", "0.6426723", "0.64229375", "0.64018136", "0.63963085", "0.6383972", "0.6377622", "0.6375629", "0.63627005", "0.6331696", "0.6317388", "0.629445...
0.6030426
38
animate list of horses
function animationFallingBoxes() { document.querySelector("#playButton").addEventListener("click", () => { document.querySelector("#youWonPlaceholder").innerHTML = "YOU WON <span id='pointsPlaceholder'>30</span> POINTS"; document.querySelector("#FIRST").classList.add("hide"); TweenLite.to("#playBu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animateHeader($section){\r\n var $anim = $section.find(\".anim\");\r\n $anim.each(function(index){\r\n var del = index * 0.1;\r\n TweenMax.set($(this),{opacity:1,delay:del});\r\n TweenMax.from($(this),0.4,{y:100,ease:Back.easeOut,delay:del});\r\n });\r...
[ "0.61363906", "0.61267084", "0.6082333", "0.60023886", "0.5960429", "0.5938971", "0.59229565", "0.58376694", "0.58284944", "0.5824135", "0.5779995", "0.5774666", "0.57643664", "0.571427", "0.57060707", "0.5703453", "0.569805", "0.56730556", "0.5666347", "0.5664077", "0.565947...
0.5511333
38
bet on a horse
function clickToBet(event) { // Create a condition to add event listener only to the elements that contains an attribute “data – horse” if (event.target.parentElement.parentElement.dataset.horse) { // Set the value a variable “chosenHorse” with the value of the “data – horse” attribute chosenHorse = event....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "gambler(stake, goal, bet) {\n var win = 0\n var loss = 0\n var cash = stake;\n for (var i = 1; i <= bet; i++) {\n while (cash > 0 && cash < goal) {\n if (Math.random() < 0.5) {\n cash++\n\n }\n else {\n ...
[ "0.6754752", "0.63819104", "0.6365286", "0.63514674", "0.6305037", "0.6256943", "0.62547076", "0.6233562", "0.62327343", "0.62290895", "0.6210009", "0.6197237", "0.6158894", "0.6145968", "0.60802674", "0.60713357", "0.6057631", "0.6019055", "0.6008946", "0.5960373", "0.595677...
0.55270976
84
Variable used to create a random easing for the moving horses
function horseRace() { let raceSound = document.querySelector("#raceSound"); let animateArrayOfHorses = document.querySelectorAll( "#white-horse, #brown-white-horse, #black-horse, #brown-horse" ); // the array contains all the horses from the scene with race, that will be animate with for loop function do...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "randomSpeed() {\n this.sp = movementMultip * Math.floor(Math.random() * 10+1);\n }", "function setSpeed() {\n return (Math.random()*(400 - 60)) + 60;\n}", "generateSpeed(){\n return Math.floor(Math.random()*(250-225)+225);\n }", "function placeHor() {\r\n let ranX = Math.floor(Math....
[ "0.66714156", "0.64087886", "0.63929605", "0.6360592", "0.633198", "0.62855315", "0.6276058", "0.62697715", "0.626376", "0.6243458", "0.62102497", "0.61997104", "0.61559075", "0.6154433", "0.61512285", "0.6106777", "0.6104315", "0.60752463", "0.6064194", "0.60620356", "0.6060...
0.0
-1
Publish a given file to the page the user wants to
function publishFile(form){ $.ajax({ async:false, url: 'fileStorage/getFileName.php', type: 'get', data: {'id': form.fileID.value}, success: function (tmp) { data = eval ('('+tmp+')'); link = '<a href="fileStorage/downloadFile.php?id='+form.fileID.value+'">Download '+data.name+'</a>'; } }); $.ajax(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async publishFile({publicAccess = false}) {\n this.logger.info(`Publishing \"${this.fileToPublish}\"`);\n\n await npmExecute(noMultiSpaceAfterLineFeed`\n publish ${this.fileToPublish}${publicAccess ? \" --access public\" : \"\"}\n `);\n\n this.logger.info(\"Publication complete!\");\n }", "stat...
[ "0.7082436", "0.6291492", "0.6019116", "0.60090107", "0.5939596", "0.58873767", "0.58511394", "0.57977855", "0.57969916", "0.579659", "0.57810193", "0.5756931", "0.57523054", "0.5728426", "0.5671771", "0.5670845", "0.56598055", "0.5652606", "0.56494933", "0.564313", "0.563968...
0.66304684
1
Make a new folder
function AddFolder(form){ $.ajax({ async:true, url: 'fileStorage/addFolder.php', type: 'get', data: {'folderName': form.folderName.value}, success: function (tmp) { data = eval ('('+tmp+')'); if (data.ok == 'OK') { alert ("Folder added"); } else { alert (data.message); } } }); OpenFil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MakeDirectory() {\r\n}", "function MakeDirectories() {\r\n}", "function createDirectory() {\n\t\t// Check if create dir is posible\n\t\tif (dir_content.inf.is_writable != 1) return alert(msg.writeProtectTitle);\n\n\t\tvar newDir = prompt(msg.enterNewDirNameStr, msg.defaultNewDirNameStr);\n\t\tif (newD...
[ "0.7329317", "0.7147812", "0.70519006", "0.7024218", "0.6923675", "0.68260634", "0.68092597", "0.67556196", "0.66362864", "0.6612608", "0.65637887", "0.6539712", "0.6533448", "0.65318596", "0.65203947", "0.6514867", "0.6492335", "0.64918184", "0.6488178", "0.64881665", "0.648...
0.0
-1
Inject once for automatic pagetracking
function configure($urlRouterProvider, $stateProvider, routehelperConfigProvider, $breadcrumbProvider, RestangularProvider, AnalyticsProvider) { configureRouting(); configureBreadcrumb(); configureRestangular(); configureGoogleAnalytics(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function customTracker_Page ( page ) {\n return customTracker( {\n _upage: page \n });\n}", "function init() {\n pageID = 1;\n page01 = document.getElementById(\"page01\");\n page02 = document.getElementById(\"page02\");\n page03 = document.getElementById(\"page03\");\n pageTracker();...
[ "0.6653505", "0.65407515", "0.6422236", "0.62906194", "0.624121", "0.62323034", "0.6180672", "0.61580896", "0.61524045", "0.6149055", "0.6089314", "0.5984994", "0.5955167", "0.5943489", "0.5940873", "0.5929219", "0.59144646", "0.5852214", "0.58469474", "0.58389235", "0.582913...
0.0
-1
var csv is the CSV file with headers
function csvJSON(csv){ var lines=csv.split("\n"); var result = []; var headers=lines[0].split(","); for(var i=1;i<lines.length;i++){ var obj = {}; var currentline=lines[i].split(","); for(var j=0;j<headers.length;j++){ obj[headers[j]] = currentline[j]; } result.push(ob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getVerticleHeaders(csv) {\n if (!itemDel) {\n itemDel = \",\";\n }\n var lines = csv.split(\"\\n\"); //Split the data into an array of lines\n var headers = lines[0].split(itemDel); //Get the header names\n var metaColumn = 0;\n for (var j = 0; j < headers.length; j++) { //Go thro...
[ "0.70488995", "0.69747114", "0.694354", "0.68671507", "0.68624246", "0.68478197", "0.6846445", "0.6835818", "0.68250096", "0.67977", "0.67942005", "0.6744721", "0.67057854", "0.66969824", "0.6655591", "0.6630233", "0.66050017", "0.660371", "0.6603627", "0.6594772", "0.6594497...
0.6668197
14
used when adding/editing elements
function coverOn() { CoverRect.style("display","block") domElemG.setAttribute("pointer-events","none") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AddforiegnElement()\n{\n\n}", "function _onElementAdded() {\n \n\t\t\t countElements++;\n \n\t\t\t //add all elements of a view\n\t\t\t if(countElements < elements.length) {\n\t\t\t\t var element = elements[countElements];\n\t\t\t\t if(!_removeNotValidElementObj(element)) {\n\t\t\t\t\t instance....
[ "0.64196205", "0.63613576", "0.6288999", "0.6103397", "0.6077616", "0.6068532", "0.6024992", "0.59841007", "0.5963474", "0.59327775", "0.5925427", "0.5922932", "0.59115356", "0.58998233", "0.5877366", "0.58689755", "0.58661395", "0.5851437", "0.58500826", "0.58288395", "0.581...
0.0
-1
return transformed x,y from computed x,y
function XY(x,y) { var pnt = domSVG.createSVGPoint(); pnt.x = x pnt.y = y var sCTM = domSVG.getScreenCTM(); var PNT = pnt.matrixTransform(sCTM.inverse()); return {x:PNT.x,y:PNT.y} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function transformedPoint(x, y) {\n\t\t\t\treturn {\n\t\t\t\t\t\"x\" : mapTranslate[0] + (x * mapScale),\n\t\t\t\t\t\"y\" : mapTranslate[1] + (y * mapScale)\n\t\t\t\t};\n\t\t\t}", "_transformedPoint(x, y) {\n let pt = this._svg.createSVGPoint()\n pt.x = x * this._pixelRatio()\n pt.y = y * this._pixelRat...
[ "0.72923607", "0.7070358", "0.69992656", "0.6965922", "0.6874073", "0.6858817", "0.66296583", "0.64896625", "0.6466861", "0.6461678", "0.6439988", "0.63826466", "0.63784516", "0.6345513", "0.62883824", "0.6265928", "0.62042016", "0.6173499", "0.61668926", "0.6138549", "0.6137...
0.6019467
29
check svg element's svg properties
function svg2Stng(svgElem) { console.log(new XMLSerializer().serializeToString(svgElem)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkSVG(element) {\n \"use strict\";\n\n var el = element.find('.active .qode_slide-svg-holder');\n var drawing_enabled = el.data('svg-drawing');\n\n if (drawing_enabled === 'yes') {\n drawSVG(el);\n }\n}", "function hasSVG(){ \n if(typeof bSvgUsed == \"undefined\"){\n\t\tvar ...
[ "0.69615203", "0.66002", "0.655861", "0.64660794", "0.6313619", "0.6313619", "0.6313619", "0.6262406", "0.62482285", "0.6239782", "0.62250996", "0.61440116", "0.6131325", "0.6082676", "0.6082676", "0.60738814", "0.6036522", "0.6015304", "0.6006646", "0.596779", "0.59578925", ...
0.0
-1
Have the function TimeConvert(num) take the num parameter being passed and return the number of hours and minutes the parameter converts to (ie. if num = 63 then the output should be 1:3). Separate the number of hours and minutes with a colon. Examples Input: 126 Output: 2:6 Input: 45 Output: 0:45 Tags string manipulat...
function TimeConvert(num) { return `${parseInt(num/60)}:${num%60}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TimeConvert(num) {\n\nvar minutes;\nvar hours;\n\nhours = (parseInt(num/60) )\n\nif ( num >= 60 ) {\nminutes = num % 60\n}\n\nif ( num < 60 ) {\nminutes = num\n}\n\nnum = hours + \":\" + minutes\n\nreturn num\n\n}", "timeConvert(num) {\n //calculate number of hours\n // divide by 60\n //roundin...
[ "0.8501158", "0.848726", "0.84683484", "0.8431595", "0.83985984", "0.83455205", "0.82531434", "0.8251916", "0.8245843", "0.82299834", "0.8145614", "0.8125917", "0.8094805", "0.8012003", "0.79644656", "0.79500365", "0.7924852", "0.78260577", "0.7700029", "0.7683192", "0.766980...
0.81833076
10
Like _.each(), but if given a single item not in an array, acts as if it were an array containing just that item.
function oneOrEach(itemOrArr, cb) { if (Array.isArray(itemOrArr)) { _.each(itemOrArr, cb); } else { cb(itemOrArr, 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eachOne(item, action) {\n var c = [];\n for (var i = 0; i < item.length; i++)\n action(item[i]);\n c.push(item[i]);\n return c;\n\n}", "function bouncer(arr) {\n let newArray = [];\n for (let item of arr) {\n if (item) {\n newArray.push(item);\n }\n }\n return newArray;...
[ "0.56843257", "0.5642894", "0.55912167", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", "0.5499409", ...
0.67209786
0
Start timer function consist of two parameters duration of the pomodoro time and diplay which is linked to the div id time which has a default time of "25:00"
function startTimer(duration, display){ var timer = duration, minutes, seconds; console.log(duration) t = setInterval(function(){ timer--; minutes = parseInt(timer / 60, 10); seconds = parseInt(timer % 60, 10); if(minutes < 10){ minutes = "0" + minutes; } else { minutes = minutes; } if(sec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startTimer(duration, display) {\n let timer = duration, minutes, seconds;\n timer.id=timer\n count = setInterval(function () {\n minutes = parseInt(timer / 60, 10);\n seconds = parseInt(timer % 60, 10);\n\n // minutes = minutes < 10 ? \"0\" + minutes :...
[ "0.7627583", "0.7524878", "0.727245", "0.723209", "0.7199664", "0.7188188", "0.71879363", "0.7174838", "0.7147789", "0.7072537", "0.70629287", "0.7057493", "0.70513886", "0.7035124", "0.7028403", "0.702169", "0.7013701", "0.70091546", "0.70015943", "0.69764376", "0.6963553", ...
0.71506697
8
function to reset back the time to 25:00
function resetTime(){ $("#time").html("25:00"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetTimer(){\n\n time = 31;\n }", "function resetTimerPomodoro() {\n resetElement = document.getElementById('timer').innerText = \"25:00\";\n minutes = 25;\n seconds = 00;\n}", "evening() {\n this.time.setHours(17);\n }", "function reset() {\n time = 30;\...
[ "0.6944378", "0.6794905", "0.6624353", "0.66223097", "0.6561461", "0.6554713", "0.6511556", "0.6483805", "0.6458986", "0.6430869", "0.6403105", "0.6399447", "0.63633174", "0.6310961", "0.63021076", "0.626873", "0.62408245", "0.623909", "0.62249875", "0.6206281", "0.6180994", ...
0.7689501
0
Function to download data to a file
function download(data, filename, type) { var file = new Blob([data], { type: type }); if (window.navigator.msSaveOrOpenBlob) // IE10+ window.navigator.msSaveOrOpenBlob(file, filename); else { // Others var a = document.createElement("a"), url = URL.createObjectURL(file); a.hre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "downloadDataFile() {\n let submissionId = this.SUBMISSION_ID;\n let fileId = this.state.fileUploadId;\n let fileName = this.state.fileName;\n\n this.API_CLIENT.downloadDataFile(submissionId, fileId, fileName);\n }", "function exportFile(url, data) {\n return $http({\n ...
[ "0.7191297", "0.6875731", "0.6870304", "0.67789525", "0.6748212", "0.6744751", "0.6729517", "0.6689621", "0.6662984", "0.66573733", "0.66571873", "0.6654008", "0.66381013", "0.66169614", "0.66082114", "0.6585901", "0.65816826", "0.65444154", "0.6540731", "0.65373886", "0.6534...
0.64803165
25
Creates a selector that matches given target when queried at the root. Can return undefined if unable to create one.
create(root, target) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findTarget() {\n\t\tthis.targetElement = this.container.querySelector(this.target);\n\t}", "function generateSelector(target) {\n var sel = '';\n target = $(target);\n var targetElement = target.get(0);\n\n var ancestors = target.parents().andSelf();\n ancestors.each(function(i, ancestorElement) {...
[ "0.646887", "0.64476585", "0.63757205", "0.61755913", "0.60146654", "0.60146654", "0.5860491", "0.5853349", "0.5853349", "0.5853349", "0.5844978", "0.5797097", "0.5633541", "0.5556758", "0.5556758", "0.55290824", "0.5512006", "0.54906046", "0.5452853", "0.5432504", "0.5379716...
0.5768132
12
Returns the first element matching given selector in the root's subtree.
query(root, selector) { if (!root) { return null; } return `${root.value}` === selector; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function first(selector, context) {return (context || document).querySelector(selector);}", "firstParent(selector) {\n let parent = this.parent();\n while (parent.isPresent()) {\n if (parent.matchesSelector(selector)) {\n return parent;\n }\n parent =...
[ "0.6753253", "0.64774925", "0.64774925", "0.6351023", "0.62980914", "0.62331724", "0.6231437", "0.6224305", "0.61285007", "0.5929878", "0.58828086", "0.58448905", "0.58448905", "0.58250684", "0.5821466", "0.5821466", "0.58161014", "0.57963806", "0.57918304", "0.5763774", "0.5...
0.59651035
9
Returns all elements matching given selector in the root's subtree.
queryAll(root, selector) { if (!root) { return null; } return `${root.value}` === selector; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetElementsBySelector(root, selector) {\n var nodes = [];\n for (var child = root.firstChild; child; child = child.nextSibling) {\n AddElementBySelector_(child, selector, nodes);\n }\n return nodes;\n}", "async getAllRawElements(selector) {\n await this.forceStabilize();\n return Ar...
[ "0.77782947", "0.69282347", "0.6872148", "0.6829662", "0.67789733", "0.65895456", "0.6530487", "0.649117", "0.64118236", "0.64118236", "0.64023954", "0.64000094", "0.63618827", "0.6354747", "0.6354747", "0.6352737", "0.6352737", "0.63434064", "0.62980914", "0.62980914", "0.62...
0.58389944
61
Scrap a URL for images and return list of images URL
function scrapUrl(url, callback) { $.ajax("api/v1/scrape?url="+url+"") .done(function(data) { if (callback !== undefined) { callback(data); } }) .fail(function(err) { console.log(err); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getUrlList(url) {\n try {\n const res = await fetch(url);\n const page = await res.text();\n\n const re = RegExp('<img.*?src=\"([^\"]*)\".*?\\\\/?>', 'gmis');\n\n const urls = [];\n let match;\n while (match = re.exec(page)) {\n if (match[1]) u...
[ "0.77140707", "0.68146354", "0.677132", "0.6749291", "0.67016685", "0.6675784", "0.66757125", "0.6640485", "0.6608504", "0.65852356", "0.6576124", "0.6565529", "0.65583724", "0.6544762", "0.6543103", "0.6541378", "0.6541289", "0.64991766", "0.6481254", "0.6464115", "0.6459849...
0.0
-1
Create visualization given a dataset
function render(data, callback) { var aggdata = aggregateByLocation(data); myApp.scale = d3.scale.linear().domain([aggdata.min, aggdata.max]) .range([2, 50]); if (myApp.pointFeature === undefined) { myApp.pointFeature = myApp.map .createLayer('feature') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawVisualization() {\n // create the data table.\n data = new vis.DataSet();\n\n // create the animation data\n for (var i = 0; i < field1.length; i++) {\n x = field1[i];\n y = field2[i];\n z = field3[i];\n var style = clusters[i] ==...
[ "0.7118685", "0.6928218", "0.6877865", "0.6826725", "0.67334604", "0.6603328", "0.659996", "0.65967155", "0.6536673", "0.6494047", "0.64045423", "0.63805103", "0.63729244", "0.628193", "0.6260597", "0.621152", "0.61985785", "0.6146681", "0.61414206", "0.6084174", "0.60811234"...
0.0
-1
ajoute au fichier container config le tableau des nouveau containers
function putConfig(config) { let json = JSON.stringify(config); let filepath = path.join(__dirname,'../system/containerConfig.json'); fs.writeFileSync(filepath, json, 'utf8'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "readConfigFile()\n\t{\n\t let file_path = join(this.rootDir, CONFIGS_FILENAME);\n\t\t//Recuperer le contenu du fichier\n\t let file_content = readFileSync(file_path, 'utf8');\n\t //Parser le JSON\n\t\tconfigs = JSON.parse(file_content);\n\t\t//Ajouter les elements n'existant pas avec une valeur par defaut...
[ "0.56958604", "0.5631724", "0.541144", "0.5389147", "0.52516556", "0.51924664", "0.51791364", "0.5172621", "0.50857687", "0.5062148", "0.50559705", "0.5043171", "0.5032249", "0.501813", "0.5015726", "0.50107723", "0.50051755", "0.49916953", "0.49706677", "0.49675244", "0.4950...
0.56041217
2
Destroy the Delta Transformer and its calculator. This should be used to clean up memory and resources once this instance is not used anymore.
end() { this._deltaCalculator.removeListener('change', this._onFileChange); return this._deltaCalculator.end(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "destroy() {\n this.impl.destroy();\n this.impl = null;\n this.format = null;\n this.defaultUniformBuffer = null;\n }", "destroy() {\n this._output = null;\n this._number = null;\n this._octaveOffset = 0;\n this.removeListener();\n }", "destroy() {\n this...
[ "0.6892112", "0.6854979", "0.6795295", "0.6727045", "0.66248095", "0.6572184", "0.655579", "0.64930856", "0.64715785", "0.64592487", "0.6415841", "0.64127344", "0.63934124", "0.63590825", "0.6352797", "0.6330053", "0.6318313", "0.630909", "0.63069564", "0.6299028", "0.6279436...
0.0
-1
Main method to calculate the bundle delta. It returns a DeltaResult, which contain the source code of the modified and added modules and the list of removed modules.
async getDelta(): Promise<DeltaTransformResponse> { // If there is already a build in progress, wait until it finish to start // processing a new one (delta transformer doesn't support concurrent // builds). if (this._currentBuildPromise) { await this._currentBuildPromise; } this._current...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delta(delta, {init, cache}) {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function Diff() {}", "function diff(resultDir) {\n var diffSet = compareSync(path.join(sourceDir, resultDir), tempDir).diffSet;\n return JSON.stringify...
[ "0.51985246", "0.5183735", "0.5183735", "0.5183735", "0.5183735", "0.5183735", "0.5183735", "0.49150282", "0.48028636", "0.4714792", "0.46680784", "0.4651292", "0.46493125", "0.46232277", "0.45999303", "0.45742494", "0.4567123", "0.455809", "0.4546031", "0.45433912", "0.45305...
0.4371903
41
Generic Color class for shared color functionality
function Color() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(...args) {\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 255;\n /* Handle Color([...]) -> Color(...) */\n if (args.length == 1 && args[0] instanceof Array) {\n args = args[0];\n }\n if (args.length == 1) {\n /* Handle Color(Color) and Color(\"string\") */\n ...
[ "0.7337124", "0.72899806", "0.7100879", "0.70432526", "0.70411813", "0.69514865", "0.6948393", "0.6860121", "0.6851269", "0.6805021", "0.6770219", "0.67264783", "0.664213", "0.66253006", "0.6619249", "0.66125816", "0.6571755", "0.6505596", "0.6491077", "0.64903736", "0.648131...
0.74269974
0