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
fetch requested timeseries as JSON encoded payload
function fetchTimeseries(key, entity, tsid, aggr, time, env, rfunc) { var options = { host: env + '.live.dynatrace.com', path: '/api/v1/timeseries/?Api-Token=' + key + '&relativeTime=' + time + '&entity=' + entity + '&aggregationType=' + aggr + '&timeseriesId=' + tsid }; callback = function(response) { var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTimeseriesDataJSON(id){\n\tframe.disableTimeseriesCheckboxes();\n\treq = getXMLHttpRequest();\n\tif (req) {\n\t\treq.onreadystatechange = function() {\n\t\t\tif(req.readyState == 4){\n\t\t\t\ttry{\n\t\t\t\t\tframe.ajaxMemory.timeseries = req.responseText;\n\t\t\t\t\tframe.ajaxMemory.processData();\t\n\...
[ "0.6915201", "0.6518962", "0.6274963", "0.61490977", "0.6102832", "0.60858876", "0.6056553", "0.6007944", "0.5998129", "0.5897975", "0.5871648", "0.5852901", "0.58251786", "0.5820421", "0.5781204", "0.57643324", "0.57335985", "0.5729981", "0.56873685", "0.5678755", "0.5647063...
0.69867736
0
get cart data from localStorage
function getCartData() { const pizzaFromCartLS = JSON.parse(localStorage.getItem('cart')); if (pizzaFromCartLS) { pizzaFromCartLS.forEach((pizza, i) => cart[i] = pizza); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCartData() {\n return JSON.parse(localStorage.getItem('cart'));\n}", "function getCart() {\n \n return JSON.parse(localStorage.getItem(\"cart\"))\n\n}", "function getCart(){\n return localStorage.getItem(\"cart\");\n }", "function loadCartFromLocalStorage() {\n var data;\n\n ...
[ "0.8962332", "0.8637633", "0.84018403", "0.80618376", "0.80154586", "0.7980945", "0.7887735", "0.7887622", "0.78421587", "0.78235805", "0.7692769", "0.7688915", "0.76205873", "0.7530292", "0.7487642", "0.7471914", "0.74610454", "0.742873", "0.74160004", "0.7392407", "0.737858...
0.8549292
2
set cart data to localStorage
function setCartData(data) { localStorage.setItem('cart', JSON.stringify(data)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLocalStorageData(data) {\n localStorage.setItem(\"cartItems\", JSON.stringify(data));\n }", "function setCart() {\n localStorage.setItem(\"cart\", JSON.stringify(cart)); //updates the cart\n}", "function setCart(cart) {\n window.localStorage.setItem('cart', JSON.stringify(cart));\n}", "...
[ "0.8735038", "0.8637618", "0.85294765", "0.80365014", "0.8035847", "0.79643506", "0.7943058", "0.79232866", "0.7909457", "0.7861422", "0.78550774", "0.7847695", "0.78315395", "0.78205866", "0.7773609", "0.7669457", "0.76134974", "0.75736034", "0.7548627", "0.75275767", "0.752...
0.887987
0
Create directional sun light
function createDirectionalLight(){ const dirLight = new THREE.DirectionalLight( 0xffffff, 1, 100 ); // color, intensity, proximity dirLight.position.set( 40, 120, 25 ); // makes the shadows with less blurry edges - детализируем тени dirLight.shadow.mapSize.width = 1048; // default dirLight.sh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSun() {\n\n var theta = Math.PI * (parameters.inclination - 0.5);\n var phi = 2 * Math.PI * (parameters.azimuth - 0.5);\n\n light.position.x = parameters.distance * Math.cos(phi);\n light.position.y = parameters.distance * Math.sin(phi) * Math.sin(theta);\n light.p...
[ "0.71570927", "0.6922613", "0.6854282", "0.6667854", "0.65856", "0.65198636", "0.65063363", "0.6335877", "0.63021976", "0.6284908", "0.62710327", "0.61648154", "0.61331725", "0.60552466", "0.6026552", "0.6017172", "0.6002903", "0.59717715", "0.5967272", "0.59495777", "0.59426...
0.58194715
30
Meshes and other visible objects
function createMeshes(){ createCtrlBox(); // делаем брусчатку createPlane(170, 148, 0, 0, 0, -0.5, 0, 'img/road2.jpg', 10, true); // основная башня createRectangle(30, 66, 30, 0, 33, 0, 'img/Black_brics.jpg', false); // боковые пристройки createRectangle(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateMeshes () {\r\n const availableMeshes = this.world.getAvailableMeshes(this.player.position)\r\n const objectsToAdd = availableMeshes.filter(mesh => !this.currentMeshes.includes(mesh))\r\n const objectsToRemove = this.currentMeshes.filter(mesh => !availableMeshes.includes(mesh))\r\n this.currentMe...
[ "0.72520745", "0.7180413", "0.68090934", "0.6683732", "0.66452366", "0.6599889", "0.6599099", "0.6530818", "0.6526464", "0.6526408", "0.65088075", "0.65079606", "0.6501564", "0.648716", "0.64839375", "0.64783", "0.6453674", "0.64368397", "0.64351434", "0.64297223", "0.6425403...
0.69935083
2
Renderer object and features
function createRenderer(){ // set antialiasing on to remove jagged edges renderer = new THREE.WebGLRenderer( { antialias: true } ); renderer.setSize(mainContainer.clientWidth, mainContainer.clientHeight); renderer.setPixelRatio( window.devicePixelRatio ); renderer.shadowMap....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ObjectOrientedRenderer3(){}", "function ObjectOrientedRenderer3() {}", "function ObjectOrientedRenderer3() {}", "function ObjectOrientedRenderer3() {}", "getRenderer () {}", "render() {\n // background box.\n this.renderBackground();\n this.renderName();\n this.render...
[ "0.68606275", "0.67362857", "0.67362857", "0.67362857", "0.6647698", "0.6579229", "0.65741444", "0.6511918", "0.6450701", "0.64347774", "0.64347774", "0.64170474", "0.64010435", "0.63512534", "0.6300679", "0.62895286", "0.6269009", "0.6260476", "0.6260476", "0.6260476", "0.62...
0.0
-1
vuex v3.1.2 (c) 2019 Evan You
function n(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreate:a});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[a].concat(e.init):a,n.call(this,e)}}function a(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.pare...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFieldVuex() {\n return store.getters.dataField;\n }", "function vuexInit(){var options=this.$options;// store injection\n\tif(options.store){this.$store=options.store;}else if(options.parent&&options.parent.$store){this.$store=options.parent.$store;}}", "function U(He){Le&&(He._devtoolHook=Le,Le.emit('v...
[ "0.7119166", "0.70120806", "0.67575943", "0.67386955", "0.66181475", "0.66181475", "0.66181475", "0.6615112", "0.65892994", "0.6483383", "0.6350742", "0.63465446", "0.63465446", "0.63465446", "0.63465446", "0.63465446", "0.63462883", "0.63352454", "0.6333331", "0.6294574", "0...
0.0
-1
! BootstrapVue Icons, generated from Bootstrap Icons 1.0.0alpha2
function al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getIcon() {\n return \"document-cook\";\n }", "bIcon(properties) {\n properties.tag = \"i\";\n properties.class = this.removeLeadingWhitespace(\n `${this.processContent(properties.class)} fab fa-${properties.icon}`\n );\n\n return this.getElement(properties);\n }", "newIcon() {\n ...
[ "0.66732514", "0.6518053", "0.6469107", "0.6321898", "0.6314304", "0.62183654", "0.6214295", "0.61664885", "0.6101369", "0.6048518", "0.60044473", "0.59966284", "0.5967557", "0.595663", "0.59517825", "0.59517825", "0.5951017", "0.5951017", "0.5950263", "0.5950263", "0.5949771...
0.0
-1
Easy API for creating new setFilters
function setFilters() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}" ]
[ "0.84238356", "0.84238356", "0.84238356", "0.84238356", "0.84238356", "0.84238356", "0.84238356", "0.84238356", "0.84238356" ]
0.0
-1
Convert Stringformatted options into Objectformatted ones and store in cache
function createOptions( options ) { var object = optionsCache[ options ] = {}; jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { object[ flag ] = true; }); return object; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createOptions( options ) {\n var object = optionsCache[ options ] = {};\n jQuery.each( options.split( core_rspace ), function( _, flag ) {\n object[ flag ] = true;\n });\n return object;\n }", "function createOptions( options ) {\n\t var object = optionsCache...
[ "0.65974873", "0.65876323", "0.65079844", "0.6497995", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.6475411", "0.64724416", "0.64501476", "0.6443703", "0.64026225", "0.6280567...
0.61853564
53
checks a cache object for emptiness
function isEmptyDataObject( obj ) { var name; for ( name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "emptyCache() {\n this.cache = {};\n }", "emptyCache() {\n this.cache = {};\n }", "function clearcache() {\n dbgmsg( 'retrieveData: Internal cache contain attribute values for: ' + Object.keys( cache ).sort().join( '; ' ) );\n cache = {};\n logmsg( 'retrieveData: cache cleared.' );\n }", "fu...
[ "0.70499563", "0.70499563", "0.6627241", "0.6553837", "0.65304244", "0.64937866", "0.6489568", "0.6489568", "0.6489568", "0.63653684", "0.6345492", "0.62606317", "0.6230828", "0.61669874", "0.6159381", "0.61374724", "0.6131046", "0.6131046", "0.6130704", "0.6130704", "0.60989...
0.0
-1
Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { /* jshint -W018 */ return !!qualifier.call( elem, i, elem ) !== not; }); } if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter() {\n\t}", "filter() {\n\t}", "function filter() {\n \n}", "function filterFunction() {\n \n}", "function Nothing$prototype$filter(pred) {\n return this;\n }", "removeAllFilters() {}", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n ...
[ "0.7415891", "0.7415891", "0.71924883", "0.68619496", "0.67648804", "0.6652573", "0.64584637", "0.64584637", "0.64584637", "0.64584637", "0.6294628", "0.62928224", "0.6256001", "0.62469697", "0.6207571", "0.61991894", "0.61926854", "0.6190803", "0.6184332", "0.61646616", "0.6...
0.0
-1
Support: IE<8 Manipulating tables requires a tbody
function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? elem.getElementsByTagName("tbody")[0] || elem.appendChild( elem.ownerDocument.createElement("tbody") ) : elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function r(a,b){return fa.nodeName(a,\"table\")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}", "function m(a,b){return _.nodeName(a,\"table\")&&_.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsBy...
[ "0.75009346", "0.7422976", "0.7101093", "0.7089519", "0.68824637", "0.6818993", "0.6817532", "0.6817532", "0.6808059", "0.6778491", "0.67657506", "0.674611", "0.674611", "0.66841614", "0.66841614", "0.6676287", "0.66593707", "0.66578686", "0.6650637", "0.6650637", "0.66456926...
0.0
-1
Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) { elem.type = (jQuery.find.attr( elem, "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.70152074", "0.6984052", "0.6984052", "0.6984052", "0.6984052", "0.6984052", "0.6984052", "0.6984052", "0.6984052", "0.6984052", "0.6984052", "0.6941185", "0.69367236", "0.6898932", "0.6887604", "0.6887604", "0.6887604", "0.68859065", "0.68845785", "0.6881475", "0.6873829",...
0.0
-1
Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) { var elem, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "globalEval() {\n // phase one, if we have head inserts, we build up those before going into the script eval phase\n let insertHeadElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.DEFERRED_HEAD_INSERTS).value);\n insertHeadElems.runHeadInserts(true);\n // phas...
[ "0.598603", "0.5798789", "0.57727164", "0.571547", "0.5673433", "0.5667317", "0.5592784", "0.54941976", "0.54660755", "0.537354", "0.5335374", "0.5308348", "0.53040314", "0.5279219", "0.52730364", "0.5270827", "0.52683926", "0.5268382", "0.52661616", "0.52661616", "0.5251832"...
0.0
-1
Used in buildFragment, fixes the defaultChecked property
function fixDefaultChecked( elem ) { if ( manipulation_rcheckableType.test( elem.type ) ) { elem.defaultChecked = elem.checked; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fixDefaultChecked( elem ) {\n if ( manipulation_rcheckableType.test( elem.type ) ) {\n elem.defaultChecked = elem.checked;\n }\n }", "function fixDefaultChecked( elem ) {\n if ( rcheckableType.test( elem.type ) ) {\n elem.defaultChecked = elem.checked;\n }\n }", ...
[ "0.824838", "0.81953275", "0.81953275", "0.81482494", "0.8129133", "0.8113696", "0.8113696", "0.8113696", "0.8110808", "0.8091867", "0.8091867", "0.80597264", "0.80597264", "0.8051547", "0.8051547", "0.8051547", "0.8013852", "0.8013852", "0.79986525", "0.7996019", "0.7996019"...
0.80656034
29
return a css property mapped to a potentially vendor prefixed property
function vendorPropName( style, name ) { // shortcut for names that are not vendor prefixed if ( name in style ) { return name; } // check for vendor prefixed names var capName = name.charAt(0).toUpperCase() + name.slice(1), origName = name, i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i...
{ "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.8120289", "0.8120289", "0.78182495", "0.78182495", "0.78182495", "0.78182495", "0.78182495", "0.78182495", "0.78182495", "0.78182495", "0.7741901", "0.7728627", "0.7665447", "0.7634886", "0.762957", "0.7543988", "0.74907273", "0.74826825", "0.7477185", "0.74625987", "0.741...
0.0
-1
Try to determine the default display value of an element
function css_defaultDisplay( nodeName ) { var doc = document, display = elemdisplay[ nodeName ]; if ( !display ) { display = actualDisplay( nodeName, doc ); // If the simple way fails, read from inside an iframe if ( display === "none" || !display ) { // Use the already-created iframe if possible ifra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getElementDefaultDisplay(elem) {\n\t\t// Get the 'visible' display style for the element\n\t\tvar testElem, nodeName,\n\t\t\tgetComputedStyle = global.getComputedStyle,\n\t\t\tcStyle = (elem.currentStyle || getComputedStyle.call(global, elem, \"\")).display;\n\n\t\tif (cStyle === \"none\" && !(cStyle = di...
[ "0.7473202", "0.727428", "0.7255241", "0.7255241", "0.71112025", "0.70981795", "0.7093333", "0.7071696", "0.7071696", "0.7060509", "0.70515627", "0.70515627", "0.70515627", "0.70515627", "0.70515627", "0.70515627", "0.70515627", "0.70515627", "0.70515627", "0.70515627", "0.70...
0.701864
49
Called ONLY from within css_defaultDisplay
function actualDisplay( name, doc ) { var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), display = jQuery.css( elem[0], "display" ); elem.remove(); return display; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_initDisplay(value) {}", "_replaceDisplay(value) {}", "_onUpdateDisplay() {}", "function actualDisplay( name, doc ) {\r\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\r\n\t\tdisplay = jQuery.css( elem[0], \"display\" );\r\n\telem.remove();\r\n\treturn display;\r\n}", "_setInitialCo...
[ "0.7112849", "0.6791719", "0.64752877", "0.6362325", "0.6327388", "0.6325144", "0.6285512", "0.62836426", "0.61919546", "0.61919546", "0.612648", "0.6109991", "0.60846204", "0.6058016", "0.6058016", "0.6058016", "0.6058016", "0.6058016", "0.6058016", "0.6058016", "0.6058016",...
0.63334244
30
Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.config = Config.ajax;\n this.xhr;\n this.Serialize;\n }", "function AjaxPipelineConstructor() {\r\n BaseObject.call(this,arguments);\r\n }", "function Ajax(__constructor) {\r\n if (Params.env.isFirefox) return GM_xmlhttpRequest(__constructor);\r\n ...
[ "0.6993283", "0.6822893", "0.6371214", "0.6163058", "0.59267855", "0.58393145", "0.5837328", "0.5837328", "0.5829274", "0.5829274", "0.5829274", "0.5829274", "0.5829274", "0.5829274", "0.5797885", "0.5787472", "0.5787472", "0.5744089", "0.573186", "0.5730097", "0.5662906", ...
0.0
-1
Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {\n\n var inspected = {},\n seekin...
[ "0.62699753", "0.6226566", "0.6088684", "0.6088684", "0.6088684", "0.6088684", "0.6088684", "0.6088684", "0.6088684", "0.6088684", "0.6088684", "0.6088684", "0.6072646", "0.6057572", "0.6057572", "0.6035457", "0.6011348", "0.6011348", "0.6011348", "0.6011348", "0.6011348", ...
0.5950482
85
A special extend for ajax options that takes "flat" options (not to be deep extended) Fixes 9887
function ajaxExtend( target, src ) { var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettin...
[ "0.7666092", "0.7609438", "0.7565046", "0.7565046", "0.7565046", "0.7565046", "0.7565046", "0.7565046", "0.7545889", "0.7545889", "0.7526218", "0.7456436", "0.73175985", "0.73123914", "0.7291198", "0.7290268", "0.72553474", "0.72410536", "0.7239929", "0.7239929", "0.7225052",...
0.0
-1
Callback for when everything is done
function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Called once if ( state === 2 ) { return; } // State is "done" now state = 2; // Clear timeout if it exists if ( timeoutTimer ) { cle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function done() {}", "function finished(err){\n }", "onFinish() {}", "function AllDone(){\n \n}", "async onFinished() {}", "done() {}", "_onEnd() {}", "done () {}", "complete() {}", "function onFinish() {\n console.log('finished!');\n}", "function complete(){\r\n ...
[ "0.7607936", "0.7347002", "0.7329431", "0.73191965", "0.7305067", "0.72419345", "0.7235344", "0.6985994", "0.6856723", "0.68557984", "0.6844208", "0.681847", "0.6773316", "0.6773316", "0.6773316", "0.6773316", "0.6772784", "0.6766352", "0.6766352", "0.67633384", "0.6711178", ...
0.0
-1
Handles responses to an ajax request: finds the right dataType (mediates between contenttype and expected dataType) returns the corresponding response
function ajaxHandleResponses( s, jqXHR, responses ) { var firstDataType, ct, finalDataType, type, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}...
[ "0.78495306", "0.7837287", "0.7837287", "0.7776159", "0.77616936", "0.7757058", "0.7718631", "0.77153635", "0.7672706", "0.7629886", "0.7614238", "0.7604389", "0.7600136", "0.75993776", "0.75971514", "0.75971514", "0.75971514", "0.75971514", "0.75971514", "0.75971514", "0.759...
0.75230694
64
Chain conversions given the request and the original response Also sets the responseXXX fields on the jqXHR instance
function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={}, // Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice(); // Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLo...
[ "0.6271321", "0.62646276", "0.62049013", "0.6195344", "0.61946756", "0.617919", "0.617919", "0.61764264", "0.61531335", "0.6096145", "0.6090841", "0.60874856", "0.60874856", "0.60874856", "0.60874856", "0.60874856", "0.60752946", "0.60752946", "0.60752946", "0.605084", "0.601...
0.0
-1
Functions to create xhrs
function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeTime(h, i, s, ms) {\n\treturn parseInt(h, 10) * 60 * 60 \n\t\t+ parseInt(i, 10) * 60\n\t\t+ parseInt(s, 10) \n\t\t+ parseInt(ms, 10) / 1000 ;\n}", "function xToHour(x) {\n var hour = (Math.floor(times[0] + parseInt(x) / hourSpace)) % 24;\n return (hour >= 10) ? hour : \"0\" + hour;\n}", "fun...
[ "0.6773095", "0.67282486", "0.65836316", "0.6557948", "0.6520314", "0.65039384", "0.65039384", "0.65039384", "0.65039384", "0.65039384", "0.65039384", "0.65039384", "0.64763576", "0.64381844", "0.64357316", "0.64100814", "0.6404843", "0.6399019", "0.63961005", "0.6384597", "0...
0.0
-1
Animations created synchronously will run synchronously
function createFxNow() { setTimeout(function() { fxNow = undefined; }); return ( fxNow = jQuery.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.7230492", "0.7173944", "0.675242", "0.6704379", "0.6651068", "0.66462487", "0.664366", "0.65768677", "0.6517678", "0.64969903", "0.64916694", "0.6408934", "0.63947195", "0.6384194", "0.6378759", "0.63746226", "0.6371508", "0.63542676", "0.6350761", "0.6333288", "0.63231224...
0.0
-1
Generate parameters to create a standard animation
function genFx( type, includeWidth ) { var which, attrs = { height: type }, i = 0; // if we include width, step value is 1 to do all cssExpand values, // if we don't include width, step value is 2 to skip over Left and Right includeWidth = includeWidth? 1 : 0; for( ; i < 4 ; i += 2 - includeWidth ) { which ...
{ "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
The actual plugin constructor
function AXMenu(element, options) { this.element = element; // jQuery has an extend method which merges the contents of two or // more objects, storing the result in the first object. The first object // is generally empty as we don't want to alter the default options for // fut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super();\n this._init();\n }", "constructor() {\n\t\t// ...\n\t}", "consructor() {\n }", "constructor() {\r\n super()\r\n this.init()\r\n }", "init() {\n }", "constructor()\n {\n this.init();\n }", "function contruct() {\n\n ...
[ "0.7422684", "0.7349132", "0.7314277", "0.73003334", "0.7299704", "0.7292701", "0.72775894", "0.72354233", "0.7233936", "0.7181569", "0.71798736", "0.71798736", "0.71798736", "0.71798736", "0.71798736", "0.71761876", "0.7157667", "0.71499527", "0.71496284", "0.71496284", "0.7...
0.0
-1
Animator Animation Engine ActiveAxon 2013(c)
function animator() { var delay, speed; $('.animated').each(function() { var el = $(this); //console.log( elements[i] , i ); if (el.visible(true)) { if (el.data('animtype') == 'animate-progress') { el.css('opacity', 1); el.addClass('animatedVi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "animation() {}", "addAnimations() {\n\n // eyes animations (moving eyes of the inspector)\n let frameRate = 50; // frame rate of the animation\n\n // from mid to right\n this.anims.create({\n key: 'midToRight',\n frames: this.anims.generateFrameNames('eyes', ...
[ "0.7159739", "0.7005086", "0.69267434", "0.68806094", "0.6861978", "0.6823882", "0.6819363", "0.6809479", "0.6782415", "0.6773869", "0.67491394", "0.67428344", "0.671105", "0.66759056", "0.665463", "0.6582673", "0.65733814", "0.6563598", "0.6525422", "0.6506049", "0.6489099",...
0.0
-1
Set the proper sizes on the containers and animate the content in.
function _showContent() { $('.pp_loaderIcon').hide(); // Calculate the opened top position of the pic holder projectedTop = scroll_pos['scrollTop'] + ((windowHeight / 2) - (pp_dimensions['containerHeight'] / 2)); if (projectedTop < 0) projectedTop = 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateContainers() {\n\n\t\tvar width = editor.duration * scale;\n\n\t\telements.setWidth( width + 'px' );\n\t\t// curves.setWidth( width + 'px' );\n\n\t}", "function update_containersize() {\n $container.css(\"width\", $('.showcase-container').width() + \"px\");\n $contain...
[ "0.706851", "0.6766804", "0.63938123", "0.63371605", "0.63313794", "0.6145708", "0.6112306", "0.6100265", "0.60951483", "0.6047186", "0.60206217", "0.5981358", "0.5964771", "0.5948804", "0.5909701", "0.5908713", "0.58986497", "0.5884838", "0.58719385", "0.58681816", "0.586091...
0.0
-1
Helper function to get the proper vendor property name. (`transition` => `WebkitTransition`)
function getVendorPropertyName(prop) { // Handle unprefixed versions (FF16+, for example) if (prop in div.style) return prop; var prefixes = ['Moz', 'Webkit', 'O', 'ms']; var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1); if (prop in div.style) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getVendorPropertyName(prop) {\n // Handle unprefixed versions (FF16+, for example)\n if (prop in div.style) return prop;\n\n var prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1);\n\n for (var i=0; i<prefixes.length; ++i) {\n var vendo...
[ "0.7241441", "0.7229462", "0.72199064", "0.71899897", "0.7078931", "0.7074428", "0.7057932", "0.7057932", "0.7052443", "0.7047115", "0.70353884", "0.6955896", "0.6924194", "0.6916917", "0.6914833", "0.69095284", "0.69024557", "0.6900185", "0.6882982", "0.68741167", "0.6870615...
0.71956897
3
Helper function to check if transform3D is supported. Should return true for Webkits and Firefox 10+.
function checkTransform3dSupport() { div.style[support.transform] = ''; div.style[support.transform] = 'rotateY(90deg)'; return div.style[support.transform] !== ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detect3dSupport() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform': '-webkit-transform',\n 'msTransform': '-ms-transform',\n 'transform': 'transf...
[ "0.8493908", "0.84511083", "0.82034826", "0.82034826", "0.8143714", "0.8107525", "0.80897325", "0.7930139", "0.7930139", "0.7930139", "0.7930139", "0.7930139", "0.7921673", "0.7917522", "0.79126537", "0.79126537", "0.79126537", "0.76989007", "0.7695306", "0.7695306", "0.76740...
0.81826293
5
getProperties(dict) Returns properties (for `transitionproperty`) for dictionary `props`. The value of `props` is what you would expect in `jQuery.css(...)`.
function getProperties(props) { var re = []; jQuery.each(props, function(key) { key = jQuery.camelCase(key); // Convert "text-align" => "textAlign" key = jQuery.transit.propertyMap[key] || jQuery.cssProps[key] || key; key = uncamel(key); // Convert back to dasherized...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProperties(props) {\n var re = [];\n\n $.each(props, function(key) {\n key = $.camelCase(key); // Convert \"text-align\" => \"textAlign\"\n key = $.transit.propertyMap[key] || $.cssProps[key] || key;\n key = uncamel(key); // Convert back to dasherized\n\n ...
[ "0.70904666", "0.7082499", "0.7079406", "0.7073401", "0.65225", "0.63393044", "0.6031158", "0.5867106", "0.58246523", "0.5799274", "0.5796991", "0.5780823", "0.5752219", "0.5739027", "0.5729269", "0.57233244", "0.56769973", "0.5657318", "0.5657318", "0.5644522", "0.5631214", ...
0.7311653
0
uncamel(str) Converts a camelcase string to a dasherized string. (`marginLeft` => `marginleft`)
function uncamel(str) { return str.replace(/([A-Z])/g, function(letter) { return '-' + letter.toLowerCase(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dasherizeToCamel(string) {\n return string.replace(/-([a-z])/g, function (g) {\n return g[1].toUpperCase();\n });\n}", "function dashToCamel( str ) {\n\treturn str.replace( /-(.)?/g , ( match , letter ) => letter ? letter.toUpperCase() : '' ) ;\n}", "function dashedToCamel(str) {\n return str....
[ "0.7341738", "0.7148996", "0.7043623", "0.6805568", "0.6711601", "0.6565679", "0.652568", "0.6495875", "0.6480432", "0.6480432", "0.6480432", "0.6480432", "0.6480432", "0.6480432", "0.6480432", "0.6480432", "0.64596194", "0.64567214", "0.645617", "0.64315206", "0.642584", "...
0.6086107
60
unit(number, unit) Ensures that number `number` has a unit. If no unit is found, assume the default is `unit`. unit(2, 'px') //=> "2px" unit("30deg", 'rad') //=> "30deg"
function unit(i, units) { if ((typeof i === "string") && (!i.match(/^[\-0-9\.]+$/))) { return i; } else { return "" + i + units; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unit(i, units) {\n\t if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n\t return i;\n\t } else {\n\t return \"\" + i + units;\n\t }\n\t }", "function unit(i, units) {\r\n\t\tif ((typeof i === 'string') && (!i.match(/^[\\-0-9\\.]+$/))) {\r\n\t\t\treturn i;\r\n\t\t} els...
[ "0.70037067", "0.69829375", "0.6928443", "0.6928443", "0.6730565", "0.6710531", "0.6710531", "0.6710531", "0.6710531", "0.6710531", "0.6710531", "0.6710531", "0.6710531", "0.6710531", "0.6710531", "0.6682985", "0.6682985", "0.6682985", "0.662603", "0.6597371", "0.65886784", ...
0.687725
5
toMS(duration) Converts given `duration` to a millisecond string. toMS('fast') => jQuery.fx.speeds[i] => "200ms" toMS('normal') //=> jQuery.fx.speeds._default => "400ms" toMS(10) //=> '10ms' toMS('100ms') //=> '100ms'
function toMS(duration) { var i = duration; // Allow string durations like 'fast' and 'slow', without overriding numeric values. if (typeof i === 'string' && (!i.match(/^[\-0-9\.]+/))) { i = jQuery.fx.speeds[i] || jQuery.fx.speeds._default; } return unit(i, 'ms'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toMS(duration) {\n var i = duration;\n\n // Allow string durations like 'fast' and 'slow', without overriding numeric values.\n if (typeof i === 'string' && (!i.match(/^[\\-0-9\\.]+/))) {\n i = $.fx.speeds[i] || $.fx.speeds._default;\n }\n\n return unit(i, 'ms...
[ "0.86545414", "0.86387366", "0.86387366", "0.86257714", "0.85946614", "0.69258714", "0.68934804", "0.6876272", "0.6727037", "0.65276015", "0.6524038", "0.64907223", "0.63996565", "0.6323692", "0.63074046", "0.6294727", "0.626034", "0.626034", "0.6248617", "0.6248617", "0.6248...
0.8674777
0
SOME ERROR MESSAGES IN CASE THE PLUGIN CAN NOT BE LOADED
function revslider_showDoubleJqueryError(sliderID) { var errorMessage = "Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include."; errorMessage += "<br> This includes make eliminates the revolution slider libraries, and make it not work."; errorMess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function failureCB(errorCode) \n{\n // report error unless plugin simply isn't installed\n if (errorCode != ERR_CREATE_PLUGIN)\n {\n alert(errorCode);\n }\n}", "function failureCB(errorCode) \n{\n // report error unless plugin simply isn't installed\n if (errorCode != ERR_CREATE_PLUGIN)\...
[ "0.70272946", "0.70272946", "0.6517636", "0.6487581", "0.63204247", "0.6183923", "0.61797327", "0.6138639", "0.61145794", "0.60405314", "0.6035847", "0.6021942", "0.5996451", "0.58724535", "0.5848978", "0.5818295", "0.5806439", "0.57853526", "0.57783", "0.57746786", "0.576861...
0.53385824
83
GET THE URL PARAMETER //
function getUrlVars(hashdivider) { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf(hashdivider) + 1).split('_'); for (var i = 0; i < hashes.length; i++) { hashes[i] = hashes[i].replace('%3D', "="); hash = hashes[i].spl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null\n }", "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|...
[ "0.79982007", "0.7985513", "0.79765975", "0.79680085", "0.79664475", "0.7959419", "0.7951646", "0.7933222", "0.7926436", "0.7926169", "0.7926169", "0.79224515", "0.79195994", "0.79064685", "0.7881414", "0.78556645", "0.78530455", "0.78530455", "0.78367794", "0.7823798", "0.78...
0.0
-1
RESTART THE BANNER TIMER //
function restartBannerTimer(opt, container) { opt.cd = 0; if (opt.videoplaying != true) { var bt = container.find('.tp-bannertimer'); if (bt.length > 0) { bt.stop(); bt.css({'width': '0%'}); bt.animate({'width': "100%"}, {duration: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restartBannerTimer(opt,container) {\n\t\t\t\t\t\topt.cd=0;\n\n\t\t\t\t\t\tif (opt.videoplaying !=true) {\n\t\t\t\t\t\t\tvar bt=\tcontainer.find('.tp-bannertimer');\n\t\t\t\t\t\t\t\tif (bt.length>0) {\n\t\t\t\t\t\t\t\t\tbt.stop();\n\t\t\t\t\t\t\t\t\tbt.css({'width':'0%'});\n\t\t\t\t\t\t\t\t\tbt.animate({'w...
[ "0.74608105", "0.7440722", "0.7368252", "0.7273378", "0.724443", "0.7180029", "0.7149706", "0.71218896", "0.7030926", "0.70249677", "0.6983951", "0.69682705", "0.6964367", "0.69631404", "0.69482535", "0.6948125", "0.69419783", "0.6932549", "0.6932418", "0.69180536", "0.689718...
0.7345896
3
RESTART THE BANNER TIMER //
function killBannerTimer(opt, container) { opt.cd = 0; var bt = container.find('.tp-bannertimer'); if (bt.length > 0) { bt.stop(true, true); bt.css({'width': '0%'}); //bt.animate({'width':"100%"},{duration:(opt.delay-100),queue:false, easing:"linear"}); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restartBannerTimer(opt,container) {\n\t\t\t\t\t\topt.cd=0;\n\n\t\t\t\t\t\tif (opt.videoplaying !=true) {\n\t\t\t\t\t\t\tvar bt=\tcontainer.find('.tp-bannertimer');\n\t\t\t\t\t\t\t\tif (bt.length>0) {\n\t\t\t\t\t\t\t\t\tbt.stop();\n\t\t\t\t\t\t\t\t\tbt.css({'width':'0%'});\n\t\t\t\t\t\t\t\t\tbt.animate({'w...
[ "0.7459865", "0.7439773", "0.7367339", "0.73449683", "0.7274471", "0.7245051", "0.7181232", "0.715074", "0.71223885", "0.70304346", "0.70263326", "0.69850624", "0.6968704", "0.6964174", "0.6963851", "0.6949271", "0.6947755", "0.69425255", "0.69335705", "0.6933219", "0.6918792...
0.0
-1
CREATE THE BULLETS //
function createThumbs(container, opt) { var cap = container.parent(); if (opt.navigationType == "thumb" || opt.navsecond == "both") { cap.append('<div class="tp-bullets tp-thumbs ' + opt.navigationStyle + '"><div class="tp-mask"><div class="tp-thumbcontainer"></div></div></div>'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearBolas() {\n bolas = [];\n for (let i = 1; i <= 7; i++) {\n bolas.push(new Bola(35, \"url(#pattern\" + i + \")\", 50 * (i + 1) * 2, 40 * i + 40, 2, 2, i, \"black\"));\n }\n}", "function createBricksL2() {\n brick.rows = 6;\n for (r = 0; r <brick.rows; r++) {\n bricks[r]=[];\n ...
[ "0.6509528", "0.6410696", "0.63731974", "0.622114", "0.62206274", "0.62063825", "0.61988246", "0.60866004", "0.6077301", "0.6073433", "0.60731643", "0.59928614", "0.5967683", "0.59133214", "0.5881577", "0.5872097", "0.587153", "0.58624303", "0.58294106", "0.5828215", "0.58152...
0.0
-1
MOVE THUMB SLIDER TO POSITION //
function moveThumbSliderToPosition($this, pos, speed) { $this.stop(); $this.find('.tp-thumbcontainer').animate({'left': pos + 'px'}, {duration: speed, queue: false}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveThumbSliderToPosition($this,pos,speed) {\n\t\t\t//$this.stop();\n\t\t\t//$this.find('.tp-thumbcontainer').animate({'left':pos+'px'},{duration:speed,queue:false});\n\t\t\tTweenLite.to($this.find('.tp-thumbcontainer'),0.2,{left:pos,ease:Power3.easeOut,overwrite:\"auto\"});\n\t\t}", "function moveThumb...
[ "0.75953496", "0.75953496", "0.75953496", "0.75953496", "0.74254775", "0.7350222", "0.69144887", "0.6688015", "0.66502625", "0.6508744", "0.649879", "0.64950067", "0.6483437", "0.6473335", "0.64699507", "0.64426565", "0.64320123", "0.64320123", "0.64320123", "0.6429995", "0.6...
0.73683894
5
CREATE THE BULLETS //
function createBullets(container, opt) { if (opt.navigationType == "bullet" || opt.navigationType == "both") { container.parent().append('<div class="tp-bullets simplebullets ' + opt.navigationStyle + '"></div>'); } var bullets = container.parent().find('.tp-bullets'); co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearBolas() {\n bolas = [];\n for (let i = 1; i <= 7; i++) {\n bolas.push(new Bola(35, \"url(#pattern\" + i + \")\", 50 * (i + 1) * 2, 40 * i + 40, 2, 2, i, \"black\"));\n }\n}", "function createBricksL2() {\n brick.rows = 6;\n for (r = 0; r <brick.rows; r++) {\n bricks[r]=[];\n ...
[ "0.6509528", "0.6410696", "0.63731974", "0.622114", "0.62206274", "0.62063825", "0.61988246", "0.60866004", "0.6077301", "0.6073433", "0.60731643", "0.59928614", "0.5967683", "0.59133214", "0.5881577", "0.5872097", "0.587153", "0.58624303", "0.58294106", "0.5828215", "0.58152...
0.0
-1
SET THE SWIPE FUNCTION //
function swipeAction(container, opt) { // TOUCH ENABLED SCROLL if (opt.touchenabled == "on") container.swipe({data: container, swipeRight: function() { if (opt.transition == 0) { opt.next = opt.next - 1; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wa(){}", "function settingFunc() {\n\n}", "function onloevha() {\n}", "function fuctionPanier(){\n\n}", "function Pe(){}", "function Efw() {\n}", "function sf(){}", "onModifySpA() {}", "function fechaserver() {\n}", "function hotPotato() {\n\t\n}", "function setZ(){\r\n\r\n}", "funct...
[ "0.628597", "0.62770104", "0.61445934", "0.60031396", "0.5941144", "0.5822507", "0.58165425", "0.57977355", "0.5736085", "0.56734663", "0.56599903", "0.5642662", "0.56420124", "0.56354344", "0.5617641", "0.5617641", "0.5617641", "0.56111884", "0.5608255", "0.5582775", "0.5578...
0.0
-1
SHOW AND HIDE THE THUMBS IF MOUE GOES OUT OF THE BANNER ///
function hideThumbs(container, opt) { var bullets = container.parent().find('.tp-bullets'); var ca = container.parent().find('.tparrows'); if (bullets == null) { container.append('<div class=".tp-bullets"></div>'); var bullets = container.parent().find('.tp-bullets'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function seven_thumb_hide()\n\t\t{\n\t\t\t//thumbnail flag switch to newly hover\n\t\t\tt_flag=0;\n\t\t\thandle.find(\".seven_bt_preview\").hide();\n\t\t}", "function displayThumbs() {\n\t$('.nota-thumb:not(:first)').each(function() {\n\n\t\tvar $this = $(this);\n\t\tvar prev_el = $this.prev();\n\n\t\tvar distan...
[ "0.7200616", "0.6819574", "0.6747803", "0.66614354", "0.663177", "0.663177", "0.6539552", "0.6539552", "0.6371942", "0.6327265", "0.6233582", "0.6226876", "0.61346394", "0.60979575", "0.60779214", "0.6042479", "0.5935457", "0.5915747", "0.5899556", "0.5892153", "0.58769685", ...
0.6486566
8
SET POSITION OF BULLETS//
function setBulPos(container, opt) { var topcont = container.parent(); var bullets = topcont.find('.tp-bullets'); var tl = topcont.find('.tp-leftarrow'); var tr = topcont.find('.tp-rightarrow'); if (opt.navigationType == "thumb" && opt.navigationArrows == "nexttobullets") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setInitialBowlerPosition() {\n\t\tthis.startBowlPosX = config.width * 0.55;\n\t\tthis.startBowlPosY = config.height * 0.35;\n\t}", "setBulletPosition() {\n\t\tthis.x = Math.round(this.originalPosition.x);\n\t\tthis.y = Math.round(this.originalPosition.y);\n\t}", "function letgo(){\n\tif(position>278){\n\t\tpos...
[ "0.65415084", "0.6142985", "0.5988875", "0.5926794", "0.5844777", "0.58093274", "0.57831824", "0.5704977", "0.56836987", "0.56259096", "0.56149435", "0.56034195", "0.5568097", "0.55664456", "0.55637884", "0.55545956", "0.54734814", "0.54696685", "0.54152095", "0.5413879", "0....
0.0
-1
SET THE IMAGE SIZE TO FIT INTO THE CONTIANER //
function setSize(img, opt) { opt.width = parseInt(opt.container.width(), 0); opt.height = parseInt(opt.container.height(), 0); opt.bw = (opt.width / opt.startwidth); if (opt.fullScreen == "on") { opt.height = opt.bw * opt.startheight; } opt.bh = (opt.he...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSize(img, opt) {\n\n\n opt.width = parseInt(opt.container.width(), 0);\n opt.height = parseInt(opt.container.height(), 0);\n\n opt.bw = opt.width / opt.startwidth;\n opt.bh = opt.height / opt.startheight;\n\n if (opt.bh > 1) {\n opt.bw = 1;\n opt...
[ "0.71331036", "0.7081324", "0.69981694", "0.68407226", "0.67666405", "0.6760877", "0.67543006", "0.665468", "0.66355544", "0.66337895", "0.66176283", "0.6576826", "0.6570947", "0.65029985", "0.65020114", "0.6484816", "0.6478709", "0.6472497", "0.6445865", "0.6439353", "0.6396...
0.69736516
3
PREPARE THE SLIDES / SLOTS //
function prepareSlides(container, opt) { container.find('.tp-caption').each(function() { jQuery(this).addClass(jQuery(this).data('transition')); jQuery(this).addClass('start') }); // PREPARE THE UL CONTAINER TO HAVEING MAX HEIGHT AND HEIGHT FOR ANY SITUATION cont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareOneSlide(slotholder, opt, visible) {\n\n var sh = slotholder;\n var img = sh.find('img')\n setSize(img, opt)\n var src = img.attr('src');\n var w = img.data('neww');\n var h = img.data('newh');\n var fulloff = img.data(\"fxof\");\n if (fulloff...
[ "0.6711465", "0.6690067", "0.66765344", "0.65226376", "0.6389834", "0.6357397", "0.6309086", "0.6246875", "0.6246875", "0.6245633", "0.61851764", "0.6146807", "0.6146807", "0.61358523", "0.6115803", "0.6077692", "0.6063111", "0.5893547", "0.5888485", "0.5839226", "0.5833491",...
0.6124468
14
PREPARE THE SLIDE //
function prepareOneSlide(slotholder, opt, visible) { var sh = slotholder; var img = sh.find('img') setSize(img, opt) var src = img.attr('src'); var bgcolor = img.css('background-color'); var w = img.data('neww'); var h = img.data('newh'); var fulloff = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareOneSlide(slotholder, opt, visible) {\n\n var sh = slotholder;\n var img = sh.find('img')\n setSize(img, opt)\n var src = img.attr('src');\n var w = img.data('neww');\n var h = img.data('newh');\n var fulloff = img.data(\"fxof\");\n if (fulloff...
[ "0.63543177", "0.62895566", "0.6244328", "0.6194811", "0.61595255", "0.61595255", "0.6130481", "0.61234534", "0.6118414", "0.61041653", "0.61027074", "0.6075087", "0.6075087", "0.6049922", "0.6048213", "0.5979246", "0.59531593", "0.5930158", "0.59249216", "0.59132874", "0.589...
0.63301563
1
PREPARE THE SLIDE //
function prepareOneSlideV(slotholder, opt, visible) { var sh = slotholder; var img = sh.find('img') setSize(img, opt) var src = img.attr('src'); var bgcolor = img.css('background-color'); var w = img.data('neww'); var h = img.data('newh'); var fulloff = i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareOneSlide(slotholder, opt, visible) {\n\n var sh = slotholder;\n var img = sh.find('img')\n setSize(img, opt)\n var src = img.attr('src');\n var w = img.data('neww');\n var h = img.data('newh');\n var fulloff = img.data(\"fxof\");\n if (fulloff...
[ "0.63544184", "0.63307124", "0.6291039", "0.6244924", "0.6159845", "0.6159845", "0.61323583", "0.6123736", "0.61190385", "0.61045414", "0.6102974", "0.60757846", "0.60757846", "0.60518", "0.6048756", "0.59797215", "0.5955644", "0.5930232", "0.5925062", "0.5916117", "0.5900519...
0.61953396
4
PREPARE THE SLIDE //
function prepareOneSlideBox(slotholder, opt, visible) { var sh = slotholder; var img = sh.find('img') setSize(img, opt) var src = img.attr('src'); var bgcolor = img.css('background-color'); var w = img.data('neww'); var h = img.data('newh'); var fulloff ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareOneSlide(slotholder, opt, visible) {\n\n var sh = slotholder;\n var img = sh.find('img')\n setSize(img, opt)\n var src = img.attr('src');\n var w = img.data('neww');\n var h = img.data('newh');\n var fulloff = img.data(\"fxof\");\n if (fulloff...
[ "0.63543177", "0.63301563", "0.62895566", "0.6244328", "0.6194811", "0.61595255", "0.61595255", "0.6130481", "0.61234534", "0.6118414", "0.61041653", "0.61027074", "0.6075087", "0.6075087", "0.6049922", "0.6048213", "0.5979246", "0.59531593", "0.5930158", "0.59249216", "0.591...
0.5652777
47
// SWAP THE SLIDES // //
function swapSlide(container, opt) { try { var actli = container.find('>ul:first-child >li:eq(' + opt.act + ')'); } catch (e) { var actli = container.find('>ul:first-child >li:eq(1)'); } opt.lastslide = opt.act; var nextli = container.find('>ul:first-child...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function swapSlides() {\n var swappingSlide = $('.swapping');\n if (swappingSlide.length === 2) {\n var slideTextA = swappingSlide.eq(0).html();\n var slideTextB = swappingSlide.eq(1).html();\n var slideStyleA = swappingSlide.eq(0).css(\"font-size\");\n var slideStyleB = swappingSlide.eq(...
[ "0.712927", "0.6969605", "0.6469243", "0.64679575", "0.6381879", "0.6359018", "0.6356548", "0.63502216", "0.6327846", "0.62247044", "0.6223842", "0.62091327", "0.62008846", "0.62008846", "0.61620116", "0.61193204", "0.6091364", "0.60863924", "0.60768235", "0.60668266", "0.605...
0.6086835
17
CHANG THE YOUTUBE PLAYER STATE HERE //
function onPlayerStateChange(event) { if (event.data == YT.PlayerState.PLAYING) { var bt = jQuery('body').find('.tp-bannertimer'); var opt = bt.data('opt'); bt.stop(); opt.videoplaying = true; //console.log("VideoPlay set to True due onPlayerStateCh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPlayerStateChange(event) {\n\n }", "function onPlayerStateChange(event) {\n\n // event.data is a number that represents the state of the player\n // so we grab that number and give it an easy to remember name\n let playerState = event.data;\n\n // an efficient way to structure \"if/else\"...
[ "0.7358067", "0.73551095", "0.73156303", "0.7184913", "0.71668625", "0.71557504", "0.7141432", "0.71394163", "0.7128285", "0.7120732", "0.710362", "0.70549524", "0.7011566", "0.69693184", "0.6953933", "0.6941367", "0.6929886", "0.6928877", "0.6928309", "0.69167113", "0.689481...
0.68696165
22
YOUTUBE VIDEO AUTOPLAY //
function onPlayerReady(event) { event.target.playVideo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_idle_video() {\n\t\t\tthis.video_panel.attr('loop', true);\n\t\t\tthis.video_src.attr('src', this.resource_path + 'idle.mp4');\n\t\t}", "function playVidWaterVideo (event) {\n vidWaterVideo.play();\n $(window).scrollTop($('#videoWaterVidCenterer').offset().top + 15);\n $(\"#vidWaterVideo\")...
[ "0.68496513", "0.6785042", "0.66475356", "0.6634923", "0.65764886", "0.65760046", "0.65688556", "0.65625256", "0.6544833", "0.6511438", "0.64610326", "0.64438546", "0.64352095", "0.64352095", "0.63722724", "0.63659495", "0.6357053", "0.63493264", "0.6345121", "0.63300794", "0...
0.0
-1
VIMEO ADD EVENT /////
function addEvent(element, eventName, callback) { if (element.addEventListener) { element.addEventListener(eventName, callback, false); } else { element.attachEvent(eventName, callback, false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "added(vrobject){}", "function addEvent() {\n sendLog(\"Add Event\")\n selectEvent(0);\n handleShow();\n }", "function addEventListeners() {\n\n}", "add() {\n this.target.addEventListener(this.eventType, this.fn, false);\n }", "function constroiEventos(){}", "function addEvent(...
[ "0.6972409", "0.6850579", "0.62591213", "0.62452704", "0.61770254", "0.61575186", "0.60968703", "0.60408396", "0.60383826", "0.6032067", "0.6007957", "0.59993774", "0.5892919", "0.58793986", "0.58708227", "0.5841763", "0.5828093", "0.5803279", "0.5801331", "0.57982844", "0.57...
0.0
-1
CHANGE THE YOUTUBE PLAYER STATE HERE //
function vimeoready(player_id) { var froogaloop = $f(player_id); //jQuery('#debug').html(jQuery('#debug').html()+" <br>Frooga Func"+Math.round(Math.random()*100)); froogaloop.addEvent('ready', function(data) { //jQuery('#debug').html(jQuery('#debug').html()+" <br>Ready"+Math.round...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPlayerStateChange(event) {\n if (player.getPlayerState() == 5) {\n changeStatus(\"Pause\");\n }\n if (player.getPlayerState() == 1) {\n changeStatus(\"Playing\");\n }\n if (player.getPlayerState() == 2) {\n changeSta...
[ "0.7593975", "0.7420657", "0.74151033", "0.7222958", "0.72030896", "0.72016114", "0.7173871", "0.7128084", "0.7040389", "0.70102", "0.6999204", "0.697743", "0.6971122", "0.69064313", "0.69039416", "0.6897267", "0.68816847", "0.6845799", "0.68446106", "0.68395096", "0.6837617"...
0.0
-1
EVENT HANDLING FOR VIMEO VIDEOS //
function vimeoready_auto(player_id) { var froogaloop = $f(player_id); froogaloop.addEvent('ready', function(data) { froogaloop.api('play'); }); froogaloop.addEvent('play', function(data) { var bt = jQuery('body').find('.tp-bannertimer'); var opt = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function videoButtonPress(event)\n{\n changeVideo();\n}", "function onVideoEvent(e) {\n // NOTES: typical html5 video playback event sequence is as follows...\n\n //if (e.type != \"timeupdate\") console.log(\"onVideoEvent: \" + e.type);\n\n /*\n == iOS - iPad ==\n\n play\n ...
[ "0.7176002", "0.71696097", "0.712202", "0.71093744", "0.71042615", "0.7096061", "0.70202965", "0.70202965", "0.70194954", "0.70101744", "0.7007101", "0.7001862", "0.69971395", "0.69659334", "0.6958471", "0.69438076", "0.69279456", "0.6913236", "0.689575", "0.6873637", "0.6872...
0.0
-1
EVENT HANDLING FOR VIDEO JS VIDEOS //
function html5vidready(myPlayer) { myPlayer.on("play", function() { var bt = jQuery('body').find('.tp-bannertimer'); var opt = bt.data('opt'); bt.stop(); try { opt.videoplaying = true; } catch (e) { } //console....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPlayerReady(event) { \n //event.target.playVideo();\n detenerVideo();\n}", "function videoButtonPress(event)\n{\n changeVideo();\n}", "function onPlayerReady(event) {\r\n //event.target.playVideo();\r\n}", "function onPlayerReady(event) {\n //writeUserData(video)\n //event.tar...
[ "0.7504907", "0.74743396", "0.74175245", "0.7414114", "0.74036366", "0.73455966", "0.73455966", "0.73248136", "0.72896665", "0.7287573", "0.72774106", "0.7267611", "0.7244428", "0.7226691", "0.7221009", "0.72178495", "0.7181408", "0.7170915", "0.71613413", "0.7149508", "0.712...
0.0
-1
SHOW THE CAPTION //
function animateTheCaptions(nextli, opt, actli) { //if (jQuery("body").find('#debug').length==0) // jQuery("body").append('<div id="debug" style="background:#000;z-index:1000;position:fixed;top:5px;left:5px;width:100px;height:500px;color:#fff;font-size:10px;font-family:Arial;"</div>'); var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showLetter() {\n if(this.isGuessed) {\n return this.character;\n } else {\n return \"_\"\n }\n }", "function infoCursor(){\n\n\treturn \"\\033[2m\";\n}", "addPhraseToDisplay(){\r\n this.setupLetterToBeDisplayed()\r\n }", "getFullDisplay(capitalize = fal...
[ "0.6272933", "0.6104413", "0.6023514", "0.59464616", "0.591952", "0.57655835", "0.5724813", "0.57026935", "0.56740135", "0.56730133", "0.56466466", "0.5636152", "0.5627067", "0.56216687", "0.5619301", "0.5616338", "0.56111", "0.5602937", "0.55785775", "0.5575205", "0.55662984...
0.0
-1
CALCULATE THE RESPONSIVE SIZES OF THE CAPTIONS //
function calcCaptionResponsive(nc, opt) { if (nc.data('fsize') == undefined) nc.data('fsize', parseInt(nc.css('font-size'), 0) || 0); if (nc.data('pt') == undefined) nc.data('pt', parseInt(nc.css('paddingTop'), 0) || 0); if (nc.data('pb') == undefined) nc.data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function figureNextCaps(curVal) {\n var out = '';\n var cur = curVal;\n var origCost = 0;\n var caps = 4;\n var needed = 0;\n while (caps > 0) {\n cost = parseInt(Math.exp(0.0003 * Math.pow(cur, 2)));\n if (cost > origCost) {\n if (origCost > 0) {\n if (out...
[ "0.56105804", "0.54846364", "0.53762454", "0.536041", "0.5342884", "0.53082544", "0.5296301", "0.52641857", "0.5260463", "0.524811", "0.52449816", "0.5237924", "0.5211576", "0.5211576", "0.5208452", "0.51626676", "0.5143155", "0.5143155", "0.513032", "0.511996", "0.511781", ...
0.5012237
28
REMOVE THE CAPTIONS //
function removeTheCaptions(actli, opt) { actli.find('.tp-caption').each(function(i) { var nextcaption = actli.find('.tp-caption:eq(' + i + ')'); nextcaption.stop(true, true); clearTimeout(nextcaption.data('timer')); clearTimeout(nextcaption.data('timer-end')); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeTags() {\r\n $('#uV').text('');\r\n $('#uD').text('');\r\n $('#uH').text('');\r\n $('#uR').text('');\r\n}", "function CleanWordAutocomplete() {\n const removeWordAutocomplete = document.querySelectorAll(\".blockAutocomplete\");\n removeWordAutocomplete.forEach(element => element....
[ "0.5859019", "0.5858519", "0.5791774", "0.5791774", "0.57510227", "0.5723039", "0.57160604", "0.56376827", "0.56331044", "0.5594256", "0.55701333", "0.55619603", "0.5558391", "0.55543905", "0.55539304", "0.5544829", "0.5541554", "0.5502974", "0.5497717", "0.548793", "0.548539...
0.5310233
42
MOVE OUT THE CAPTIONS //
function endMoveCaption(nextcaption, opt) { if (nextcaption.hasClass("randomrotate") && (opt.ie || opt.ie9)) nextcaption.removeClass("randomrotate").addClass("sfb"); if (nextcaption.hasClass("randomrotateout") && (opt.ie || opt.ie9)) nextcaption.removeClass("randomrotateout").a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toUpperPerm() {\n document.getElementById('keyboardMinus').style.display = \"none\";\n document.getElementById('keyboardMayus').style.display = \"block\";\n document.getElementById('keyboardNum').style.display = \"none\";\n document.getElementById('keyboardSymb').style.display = \"none\";\n ...
[ "0.5606639", "0.5549687", "0.5484605", "0.5398611", "0.53886163", "0.5386476", "0.5371534", "0.5348511", "0.53457737", "0.53019553", "0.52970016", "0.5295588", "0.52921957", "0.5283492", "0.52523226", "0.52455986", "0.524473", "0.5240828", "0.5239155", "0.52228314", "0.521986...
0.0
-1
REMOVE THE LISTENERS //
function removeAllListeners(container, opt) { container.children().each(function() { try { jQuery(this).die('click'); } catch (e) { } try { jQuery(this).die('mouseenter'); } catch (e) { } try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function removeFromSendersList(conn) {\n var receiver = conn.thisArg || conn.callback;\n var prev = conn.prevSender;\n var next = conn.nextSender;\n if (prev === null && next === null) {\n receiverMap.delete(receiver);...
[ "0.7061014", "0.7061014", "0.7061014", "0.6836499", "0.67780197", "0.67607623", "0.66709447", "0.66709447", "0.65704584", "0.6558094", "0.65576506", "0.65488046", "0.6526305", "0.6503179", "0.6437143", "0.6413031", "0.6360195", "0.6327452", "0.63211334", "0.63163227", "0.6311...
0.0
-1
This function used to add some features to easytabs out of the box.
function easyTabsZeina(selector, options) { var $ref = $(selector); $('.tab-container').css('visibility', 'visible'); options = options || {}; options['animationSpeed'] = options['animationSpeed'] || 'fast'; $ref.easytabs(options).bind('easytabs:midTransition', function() { var $this = $(th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTab() {\n\t\tvar tab_title = $tab_title_input.val() || 'Tab '+tab_counter;\n\t\t$tabs.tabs('add', '#tabs-'+tab_title, tab_title);\n\t\ttab_counter++;\n\t\t// call the markitup editor on the new tab\n\t\t$('.added').markItUp(mySettings);\n\t}", "setTabProperties() { }", "_makeTabsFromPfTab() {\n ...
[ "0.6576376", "0.65413195", "0.6467997", "0.64554954", "0.6452753", "0.641589", "0.63424903", "0.6328615", "0.6319993", "0.6287307", "0.62740874", "0.62640953", "0.6261683", "0.62272966", "0.62169516", "0.6213346", "0.61715275", "0.61626506", "0.61581385", "0.6157835", "0.6146...
0.5895742
56
Zeina Accordion Written specially for Zeina Theme
function zeinaAccordion(selector) { $(document).on('click', selector + ' .accordion-row .title,' + selector + ' .accordion-row .open-icon', function() { var me = this, accordion = $(this).parents('.accordion'), $prev, $accRow = $(this), $accT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAccordian(objectName) {\n\t\t$( \"#\"+ objectName + \"-components\" ).accordion({\n\t\t\tcollapsible: true,\n\t\t\theightStyle: \"content\"\n\t\t});\n\t}", "expandAccordion(){\n\n this.cssClass = (this.cssClass.indexOf('slds-is-open') !== -1 ?'slds-section':'slds-section slds-is-open') +' '...
[ "0.69829625", "0.68959165", "0.6804533", "0.6748534", "0.6696393", "0.6681814", "0.6660098", "0.663031", "0.6590458", "0.6561881", "0.6524745", "0.65123665", "0.6495986", "0.64498305", "0.6412863", "0.63902384", "0.6370864", "0.6362597", "0.63479424", "0.6339195", "0.62972236...
0.72492856
0
Natural selection based on a weighted random based on fitness
pickOne(list) { let index = 0; let r = random(0, this.fitness_sum); while (r > 0) { r -= list[index].dna.fitness; index++; } return list[index-1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "naturalSelection() {\n\n this.matingPool = [];\n \n // get the maximum fitess\n let maxFit = 0;\n for (let i = 0; i < this.population.length; i++) {\n if(this.population[i].fitness > maxFit) {\n maxFit = this.population[i].fitness;\n }\n }\n\n // fill the mating pool\n for ...
[ "0.6972569", "0.6942533", "0.67966926", "0.6713031", "0.67102647", "0.6555617", "0.6468407", "0.6267379", "0.62349164", "0.62056655", "0.61914724", "0.6142311", "0.60902405", "0.60780734", "0.6066918", "0.60616076", "0.60612375", "0.60465604", "0.59598523", "0.59579355", "0.5...
0.6042471
18
easy CPSstyle animation combinators
function mySeq(l) { function cpsSeqAux(l,i,next) { if (l.length > i) { l[i](function () { cpsSeqAux(l,i+1,next); }); } else { next(); } } var f = (function (next) { cpsSeqAux(l,0,next); }); return f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fromFrames(frames) {\nvar anim;\n//----------\nanim = new CASAnimation();\nanim.setFromFrames(frames);\nreturn anim;\n}", "animation() {}", "get clipAnimations() {}", "function AnimationParser() {}", "set clipAnimations(value) {}", "function playCompAnimation() {\n\tcompGo = true;\n\tfor (let i = ...
[ "0.71246064", "0.7092969", "0.6831181", "0.65111727", "0.63701904", "0.6358959", "0.6196231", "0.61859417", "0.6180103", "0.6157188", "0.6154329", "0.6142332", "0.6121918", "0.61214876", "0.6093297", "0.6090584", "0.60216343", "0.6016457", "0.6005989", "0.60012376", "0.599416...
0.0
-1
Merge sutract / intersect in one function through a producer:
function combine(subtract) { return function(items) { var res = new this.constructor(); for (var i = this.length - 1; i >= 0; i--) if (subtract == !Array.find(items, this[i])) res.push(this[i]); return res; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "intersect(other) { }", "function intersection(a, b){\n return(\n // replace this line with your code\n );\n}", "calculateIntersections() {\n return this.calculateIntersection(Array.from(this.watchedObjects), true);\n }", "function intersection(head1, head2) {}", "function ifIsectAddToOutput(ring0,...
[ "0.61997753", "0.61255705", "0.5950687", "0.5752827", "0.56173986", "0.5516194", "0.54857576", "0.54450566", "0.54151607", "0.5353542", "0.5326377", "0.531526", "0.5308337", "0.52728206", "0.52728206", "0.52728206", "0.52728206", "0.52728206", "0.52728206", "0.52728206", "0.5...
0.0
-1
Method for handling click of the start/stop button in the Sets Component
handleStartStop() { if (this.state.set < this.props.exercise.sets) { // start/stop the animation of the hand sequence this.setState({running: !this.state.running}) if (this.state.running) { // run the timer for the rest between sets this.timerI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "StartButPress(){\n this.refHolder.getComponent('AudioController').PlayTap();\n this.refHolder.getComponent('UIAnimManager').MainMenuOut();\n this.refHolder.getComponent(\"GamePlay\").CreatePuzzle();\n\n this.refHolder.getComponent('UIAnimManager').GameMenuIn();\n }", "function butt...
[ "0.6765751", "0.6727127", "0.6603181", "0.65038186", "0.64809346", "0.6345919", "0.6339247", "0.6312967", "0.6301327", "0.62822616", "0.62630224", "0.6252886", "0.62525374", "0.62433934", "0.6223603", "0.6182149", "0.6154462", "0.6154462", "0.614702", "0.61354136", "0.6135141...
0.5610677
82
The conversion can be done before, or after the addition. // The binary number returned should be a string.
function addBinary(a,b) { console.log(a,b); let sum = a + b let answer = []; let array = [128, 64, 32, 16, 8, 4, 2, 1] for (let binarySum = 0 ; binarySum <= sum; ){ if (binarySum == 0 ){ binarySum++ }else { if(sum % binarySum == 0){ answer.unshift(1); sum -= binarySum; binarySum *=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addBinary(a,b){\nvar totalDecimal = a+b;\nreturn totalDecimal.toString(2);\n}", "function addBinary(a,b) {\n var sum = 0;\n sum = a + b;\n var sum2;\n sum2 = sum.toString(2);\n return sum2;\n}", "function addBinary(a,b){\n return (a +b).toString(2)\n}", "function addBinary(a,b) {\n let sum = ...
[ "0.7789963", "0.77287436", "0.76595235", "0.7599266", "0.7382086", "0.7197322", "0.71857685", "0.7163732", "0.7085092", "0.7026219", "0.697664", "0.6961868", "0.694497", "0.69313544", "0.6868787", "0.6840007", "0.6812734", "0.68031573", "0.6790444", "0.6737356", "0.6737004", ...
0.0
-1
Clears display of character
function clearDisplay() { $("#characterStart").html(""); $("#yourCharacter").html(""); $("#yourEnemy").html(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear () {\n process.stdout.write('\\u001B[2J\\u001B[0;0f')\n}", "function clearDisplay() {\n\tTi.API.info('called clearDisplay');\n // set the display to empty string\n $.lbl_display.text = '';\n $.lbl_mstore.text = '';\n $.lbl_arabic.text = '';//(0).toString(); //(current_num.arabic).toSt...
[ "0.74698496", "0.7172898", "0.7087945", "0.7072109", "0.7064366", "0.6997129", "0.6940363", "0.6909332", "0.68781686", "0.68651825", "0.6859762", "0.68191725", "0.6779212", "0.67697823", "0.6766179", "0.6712232", "0.6698965", "0.6698395", "0.6698395", "0.66969764", "0.6694293...
0.6733113
15
Builds characters on page
function buildcharacterDiv(characters, character) { var characterDiv = $("<div>"); // Setup div to display characterDiv.attr( { "data-hp": characters[character].healthPoints, "data-ap": characters[character].attackPower, "data-name": character, "class"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textBuilding() {\n if (i < textFull.length) {\n i = i + 1;\n //Building the text on each itteration\n textBuild += (textFull.charAt(i));\n //Posting the current build into the page\n postMessage(textBuild);\n } else {\n w.terminate();\n w = undefined;...
[ "0.63905615", "0.6213886", "0.6166655", "0.6140202", "0.61319274", "0.590862", "0.58204705", "0.5817107", "0.5798813", "0.57986635", "0.5781048", "0.5715667", "0.5702826", "0.56833935", "0.56764334", "0.56472826", "0.5596661", "0.55748206", "0.5558976", "0.55106175", "0.54992...
0.5450417
24
Puts character on page
function characterPrint() { for (character in characters) { if (Warrior !== character && Enemy !== character && !graveyard.includes(character)) { var characterDiv = buildcharacterDiv(characters, character); $("#characterStart").append(characterDiv); }; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeAt(char, x, y)\n{\n\tmultipleGuide.style.left = x;\n\tmultipleGuide.style.top = y;\n\tmultipleGuide.innerHTML = char;\n}", "function put_character(workspace, char, x, y, fg, bg) {\n // Draw the character\n workspace.ctx.globalCompositeOperation = 'source-over';\n workspace.ctx....
[ "0.6920078", "0.65076333", "0.63628167", "0.63577145", "0.6352964", "0.6199025", "0.61673766", "0.6160733", "0.61285806", "0.6119903", "0.6086919", "0.6044712", "0.60155237", "0.59858364", "0.5973784", "0.5963698", "0.5963221", "0.5952741", "0.59316266", "0.5883095", "0.58802...
0.0
-1
Drfines status as warrior
function queueWarrior(character) { Warrior = character; updateDisplay(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayWarriorTurn(warrior){\n warrior1Div.className = '';\n warrior2Div.className = '';\n if(warrior === 'warrior1'){\n warrior1Div.className = 'off';\n warrior2Div.className = 'on';\n } else {\n warrior2Div.className = 'off';\n warr...
[ "0.6142819", "0.6134413", "0.61124116", "0.60551566", "0.58364993", "0.57279813", "0.56683177", "0.554558", "0.55037653", "0.5486631", "0.54515874", "0.5434265", "0.54166156", "0.54109097", "0.5401738", "0.539448", "0.5392575", "0.5343692", "0.533148", "0.53270346", "0.530651...
0.49925542
63
Defines status as enemy
function queueEnemy(character) { Enemy = character; updateDisplay(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enemyStatus() {\n var el = enemies.length;\n eNums.data = destroyedCount+\" of \"+el+\" of \"+(Basics.levelShips+(level-1)*2);\n if (el && (Basics.levelShips+(level-1)*2) == destroyedCount) {\n level++; score += 10;\n message(\"Next level reached, bonus added!\");\n eLevel.data = \"Level: \"+l...
[ "0.7152979", "0.6482856", "0.6237499", "0.6217124", "0.6201339", "0.61673284", "0.61073256", "0.61015", "0.6071675", "0.60518664", "0.60502636", "0.6038154", "0.6030262", "0.6029139", "0.6007005", "0.59917617", "0.59795696", "0.59788966", "0.5975944", "0.59236807", "0.5923292...
0.0
-1
generates a random number except zero to avoid issues with the canvas borders
function generateRandom(min, max) { var num = Math.floor(Math.random() * (max - min + 1)) + min; return (num === 0) ? generateRandom(min, max) : num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function r(r){return (\"0\"+Math.floor(Math.random()*r).toString(16)).substr(-2)}", "function generateNumber() {\n return Math.floor(Math.random() * 256);\n }", "function generateRandomNumber() {\n return Math.floor(Math.random() * 255)\n}", "function randomNumberGenerator(){\n return Mat...
[ "0.75915545", "0.75505525", "0.74816614", "0.74328357", "0.73918605", "0.73777604", "0.7349712", "0.7316893", "0.73099375", "0.7302581", "0.7298957", "0.7293955", "0.7281874", "0.7272984", "0.7272222", "0.7264186", "0.7257847", "0.7246149", "0.72435445", "0.7237507", "0.72375...
0.0
-1
draw function creates the animation by clearing the canvas and redrawing everything while also keeping active the event listeners
function draw() { ctx.clearRect( 0, 0, canvas.width, canvas.height); scoreDraw(); scoreLine(); apple.draw(); snakeDraw(); appleCollision(); snakeCollision(); document.onkeydown = function(e) { arrowKeys(e); slowMotion(e); togglePlay(e); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animate() {\n\treqAnimFrame(animate);\n\tcanvasDraw();\n}", "function draw() {\n Gravity();\n Animation();\n FrameBorder(); \n FrameBorderCleaner();\n Controls();\n Interaction();\n}", "function animate() {\n ctx.clearRect(0,0,canvas.width, canvas.height);\n ctx.globalCompositeOperation = ...
[ "0.7481053", "0.7419219", "0.7316478", "0.72081745", "0.7180007", "0.71039826", "0.7079988", "0.7070383", "0.70534897", "0.7044864", "0.7028224", "0.70117176", "0.70055926", "0.70055926", "0.70055926", "0.6994549", "0.6985999", "0.6978573", "0.6961243", "0.69583344", "0.69474...
0.0
-1
function to get the pressed arrow key and change the direction of the snake (see else)
function arrowKeys(e) { // before the score hits 3 and after it goes over 9, the keyboard has the normal functions if (score < 3 || score >= 9 && score < 12) { switch(e.keyCode) { // the if conditions avoid to go the opposite of the current direction case 37: if (directi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keyPressed (){\n //KeyCode is built in variavle\n if(keyCode === UP_ARROW){\n snake.dir(0,-1);\n }else if (keyCode === DOWN_ARROW){\n snake.dir(0,1);\n }else if (keyCode === RIGHT_ARROW){\n snake.dir(1,0);\n }else if (keyCode === LEFT_ARROW){\n snake.dir(-1,0);\n }\n}", "...
[ "0.8510396", "0.84153056", "0.8266089", "0.8257353", "0.81521696", "0.8146894", "0.8135949", "0.8119737", "0.8096741", "0.8062796", "0.8041226", "0.7984518", "0.7964645", "0.7905337", "0.7816278", "0.781576", "0.7776153", "0.77707404", "0.7747465", "0.76901853", "0.76616263",...
0.0
-1
function to draw the snake with a for loop going through the snake array of objects and getting the x and y coordinates
function snakeDraw() { // this is necessary to avoid the width of the green score line to affect the width of the black borders of the snake ctx.lineWidth = 1; // this function is being called here to set the new coordinates of the snake before drawing it on canvas snakeDirection(direction); // this for lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSnake(){ \n for(let segment of snakeBody){\n drawRect(segment.x, segment.y, rectSide, rectSide, \"red\");\n }\n}", "function drawSnake() {\r\n for (let i = 0; i < snake.length; i++) {\r\n ctx.fillStyle = \"mediumvioletred\";\r\n ctx.strokeStyle = \"white\";\r\n ctx.lin...
[ "0.8194275", "0.8042155", "0.796196", "0.7916692", "0.79019266", "0.78111523", "0.77828604", "0.77795166", "0.7714597", "0.7709409", "0.7685599", "0.7629676", "0.7629676", "0.76221365", "0.7599972", "0.75612605", "0.7557221", "0.74414957", "0.7428473", "0.7364589", "0.7340669...
0.7787152
6
this constructor function creates a new apple taking the x and y coordinates and the radius
function Apple(x, y, radius) { this.x = x; this.y = y; this.radius = radius; // method function used to draw the apple this.draw = function() { // conditions used to show when the keys change functionality // blue changes the keys, gold gets them back to normal and red doesn't change anything if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createApple() {\n return { x: Math.floor(Math.random() * (CANVAS_SIZE[1] / SCALE)), y: Math.floor(Math.random() * (CANVAS_SIZE[1] / SCALE)) }\n }", "function Xa(a){this.radius=a}", "constructor(x, y, speed, fillColor, radius) {\n super(x, y, speed, fillColor, radius);\n }", "constructo...
[ "0.6657023", "0.65342224", "0.6516145", "0.6504496", "0.64364654", "0.6431753", "0.6331433", "0.6304741", "0.62644994", "0.62640125", "0.62034345", "0.617256", "0.6142666", "0.6111253", "0.6103221", "0.6100895", "0.60430384", "0.6042677", "0.6035771", "0.6022253", "0.60127866...
0.65780735
1
function used to draw the Score text
function scoreDraw() { ctx.fillStyle = "white"; ctx.font = canvas.width <= 560 ? "bold 1.5rem monospace" : "bold 2rem monospace"; ctx.fillText("SCORE " + score,unit, 2*unit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawScore() {\n\t\tthis.ctx.font = '500 16px Noto Sans JP';\n\t\tthis.ctx.fillStyle = 'white';\n\t\tthis.ctx.fillText(`Score : ${this.score}`, 10, 30);\n\t\tthis.ctx.fillText(`Highest Score : ${this.highestScore}`, 150, 30);\n\t}", "function displayScore() {\n\tctx.font = \"60px sans-serif\";\n\tctx.textAlign = ...
[ "0.85271573", "0.85124", "0.84701115", "0.84107107", "0.8393285", "0.8355195", "0.8339627", "0.82921004", "0.82841563", "0.8282286", "0.8267491", "0.82665545", "0.82653666", "0.8262335", "0.824929", "0.8244328", "0.8241509", "0.8236684", "0.82240206", "0.8216305", "0.8202447"...
0.7964609
38
function used to draw the green line below the score
function scoreLine() { const moveTo = canvas.width <= 560 ? 77 : 87; const lineTo = canvas.width <= 560 ? 80 : 90; ctx.strokeStyle = "#" + 458107; ctx.lineWidth = 3; ctx.beginPath(); ctx.moveTo(0, moveTo); ctx.lineTo(canvas.width, lineTo); ctx.stroke(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawScore() {\n if (cnvsWidth <= 600) {\n ctx.font = \"4vw Orbitron, sans-serif\";\n } else {\n ctx.font = \"2vw Orbitron, sans-serif\";\n }\n ctx.strokeText(\"SCORE:\" + score, 10, cnvsHeight - 10);\n ctx.strokeStyle = \"rgba(252, 252, 252, 0.486)\";\n}", "function drawScore() {\r\n if (cnv...
[ "0.7338668", "0.731992", "0.7134654", "0.697524", "0.6971431", "0.6920696", "0.6861397", "0.6858781", "0.6855669", "0.6804351", "0.6773549", "0.67212164", "0.6714645", "0.6707669", "0.6703906", "0.66866916", "0.66841877", "0.6678028", "0.6655044", "0.66353476", "0.6591225", ...
0.7499827
0
this function takes the set direction of the snake a checks it to add or reduce the value of the x or y coordinates to make the movement of the snake. It does this by adding a new object in the first position ("0") of the snake array, so it controls the head of the snake. It also takes the direction to check, depending...
function snakeDirection(direction) { switch(direction) { case "right": // collision detection with right border if (snake[0].x >= canvas.width - unit) { gameOver(); } else { // predefined function that adds a new object with new co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSnake() {\n context.fillStyle = 'white';\n context.fillRect(0, 0, width, height);\n context.strokeStyle = 'black';\n context.strokeRect(0, 0, width, height);\n\n var headX = snake[0].x;\n var headY = snake[0].y;\n\n if(direction == 'right') {\n headX++;\n } else if(direction == 'left') {\n ...
[ "0.76422817", "0.7281387", "0.72089165", "0.71873415", "0.718379", "0.71735615", "0.7163253", "0.7148246", "0.71336895", "0.71221775", "0.71186256", "0.71137255", "0.71095735", "0.71023625", "0.70802826", "0.7063204", "0.7014811", "0.7010383", "0.69921994", "0.6987502", "0.69...
0.7445985
1
this function checks if the coordinates of the head of the snake (first object in the snake array) are equal to those of the current apple on the canvas, if so, detects the collision and adds 1 point to the score, generates a new apple and prevents the elimination of the last object in the snake array making the tail l...
function appleCollision() { if (snake[0].x === apple.x - radius && snake[0].y === apple.y - radius) { score += 1; // apple eaten sound eatSound.play(); // generates a new apple object with random x and y values and a set radius apple = new Apple(generateRandom(1, appleMaxWidthPoint - 1) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function snakeCollision() {\n\n for (i = 2; i < snake.length; i++) {\n\n if (snake[0].x === snake[i].x && snake[0].y === snake[i].y) {\n \n snake = snake.slice(0,1);\n gameOver();\n }\n }\n}", "function snake_eat(foodObject) {\n if (foodObject.x == bodyShape[bodyShape.length - 1].x * sna...
[ "0.74415267", "0.72944975", "0.7255172", "0.7197857", "0.7194357", "0.71272653", "0.7092726", "0.7089613", "0.702139", "0.69957507", "0.6976449", "0.6975621", "0.697023", "0.6967884", "0.69458854", "0.69346756", "0.6928975", "0.69284695", "0.68917274", "0.6866027", "0.6845762...
0.79359365
0
this function uses a for loop to check the coordinates of the head of the snake (first object in the array) and compare it with the following objects (the tail) starting from the second because if it starts at zero it will collision from the start with itself and it's impossible to crash with the second object(square) ...
function snakeCollision() { for (i = 2; i < snake.length; i++) { if (snake[0].x === snake[i].x && snake[0].y === snake[i].y) { snake = snake.slice(0,1); gameOver(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collision(head, snakeArray) {\n for (let i = 0; i < snakeArray.length; i++) { //Loop through snake cell positons\n if (head.x == snakeArray[i].x && head.y == snakeArray[i].y) {\n return true;\n }\n }\n return false;\n}", "function collision(head, tabSnake){\n fo...
[ "0.7734246", "0.7343425", "0.7100957", "0.7046246", "0.68971014", "0.68843424", "0.68607205", "0.68428355", "0.68191516", "0.6796794", "0.67963916", "0.67664284", "0.67402655", "0.6732345", "0.666711", "0.6644732", "0.65914595", "0.6526489", "0.64365584", "0.63967776", "0.639...
0.7338198
2
function used to make a slow motion power. It takes the variable used to set the frames per second of the animation and changes it to an upper value that makes the game go slower for 10 seconds. Works with the "R" key and only when score is a 5 multiple.
function slowMotion(e) { // condition to check if score is a multiple of 5 if (score % 5 === 0) { // checks if player hits the "R" key if (e.keyCode === 82) { // set frames per second to 500 which makes the game almost 5 times slower fps = 500; // after 10 seconds sets the sp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleSpeed () {\n if (keyIsDown(DOWN_ARROW) && !game.gamePaused) {\n frameRate(20)\n } else {\n frameRate(3)\n }\n}", "function set_speed() {\r\n frameRate(speed_box.value * 1);\r\n}", "powerUpScoreTimes2() {\r\n if (this.powerUps.isActive(ScoreTimes2) && this.powerUps.hi...
[ "0.67670244", "0.67375094", "0.6685265", "0.6624996", "0.6523561", "0.64715546", "0.646961", "0.63254464", "0.6265955", "0.62419355", "0.6238976", "0.6193529", "0.6183936", "0.6180325", "0.6174544", "0.6151955", "0.6132095", "0.61072314", "0.6107086", "0.60882723", "0.6083907...
0.77665746
0
Init the game before the HTML is rendered.
beforeMount() { this.initGame() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n\t// Page elements that we need to change\n\tG.currTitleEl = document.getElementById('current-title');\n\tG.currImageEl = document.getElementById('current-image');\n\tG.currTextEl = document.getElementById('current-text');\n\tG.currChoicesEl = document.getElementById('current-choices-ul');\n\tG....
[ "0.7879403", "0.76920843", "0.73898846", "0.7352456", "0.73408383", "0.72428983", "0.72368723", "0.71910673", "0.71842575", "0.71309435", "0.7130333", "0.710719", "0.70913893", "0.70890015", "0.7042359", "0.70335764", "0.7031253", "0.7030522", "0.7024372", "0.7010612", "0.699...
0.0
-1
return date string in yyyymmdd format adhering to locale
function date_yyyymmdd (date_obj) { let now = date_obj || new Date(); let month = now.getMonth() + 1; let day = now.getDate(); month = (month < 10) ? ('-' + 0 + month) : ('-' + month); day = (day < 10) ? ('-' + 0 + day) : ('-' + day); return now.getFullYear() + month + day; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFormattedDate(date) {\n return dayjs(date).format(\"MMM MM, YYYY\");\n }", "static getDateString(date)\r\n\t{\r\n\t\tlet month = date.getMonth() + 1; //months are counted from zero, we need to format it correctly.\r\n\t\tlet addZero = '';\r\n\t\tlet addZeroToDay = '';\r\n\t\tif(month < 10) //add a leadin...
[ "0.7154133", "0.69969326", "0.6993282", "0.6980398", "0.69663334", "0.6935849", "0.68429625", "0.68414354", "0.6838576", "0.6830715", "0.680835", "0.68026394", "0.6785615", "0.678475", "0.67752266", "0.6744209", "0.6740815", "0.67306817", "0.67266774", "0.672091", "0.6718671"...
0.0
-1
section2 Factory Functions Factory Functions > to create simply object in Factory Functions we use Camel Notation Like oneTwoThreeFour In modern JS, if our key and value are the same , we can make our code shorter by removing value and simply adding the key
function createCircle(radius){ return { // radius <-----> radius = radius radius, draw(){ console.log('draw'); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function objectMaker(value1, value2) {\n return {\n key1: value1,\n key2: value2\n }\n}", "objectify(key,value){\n \t return {\n [key]: value\n }\n }", "function createObject(key, value){\n var obj = {};\n obj[key] = value;\n //key in brackets because passing in a string, .key passe...
[ "0.722568", "0.6631633", "0.65515924", "0.65119094", "0.6424157", "0.625824", "0.6256099", "0.62000585", "0.62000585", "0.62000585", "0.6145086", "0.6059104", "0.60007733", "0.5950471", "0.5919971", "0.59131354", "0.5909665", "0.58949685", "0.587422", "0.587422", "0.58640504"...
0.0
-1
section3 Constructor Functions Note: Learning another Pattern to Create Function in Constructor Functions we use Pascal Notation Like OneTwoThreeFour this > Reference to the object
function Circle(radius){ this.radius = radius; this.draw = function (){ console.log('draw'); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function Ctor() {}", "function _construct()\n\t\t{;\n\t\t}", "function funConstructor(arg1, arg2) {\n this.fname = arg1;\n this.lname = arg2;\n}", "constructur() {}", "constructor(x, y) { // Constructor functi...
[ "0.72233", "0.72233", "0.72233", "0.70487756", "0.70294446", "0.69464207", "0.6894296", "0.6847302", "0.67615795", "0.67532337", "0.67399436", "0.67086756", "0.66964877", "0.6655579", "0.66267824", "0.6621679", "0.66208965", "0.6616584", "0.6587969", "0.6565413", "0.6558622",...
0.0
-1
section6 Functions Are Objects In JS , Functions Are Objects
function CircleV2(radius){ this.radius = radius this.draw = function (){ console.log('DrawV2') } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function question4() {\n question2('functions in functions');\n}", "function myFunction() {\r\n function display() {\r\n console.log('dddd');\r\n }\r\n // public functions\r\n return {\r\n add: function(a, b) {\r\n return a + b;\r\n },\r\n mult: function(a, b) ...
[ "0.64560115", "0.6339164", "0.63323206", "0.63173807", "0.62421834", "0.624", "0.620142", "0.6144342", "0.61384803", "0.6133559", "0.61196244", "0.61196244", "0.61196244", "0.6103344", "0.61023974", "0.6093496", "0.60896796", "0.60732234", "0.60500705", "0.6024015", "0.599858...
0.0
-1
check if over tooltip link
function doTooltip(evt,img,xs,ys) { var startStr ='<table width="' +(xs+1)+ '" height="' +(ys+1)+ '"><tr><td align="center" valign="center" width="100%"><img src="'; var midStr = '" width="' +(xs)+ '" height="' +(ys)+ '" border="0"></td></tr>'; var endStr = '</table>'; if (!tooltip) return; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rolloverToolTip(){\n jQuery('.livia_notestask').hover(\n function() {\n jQuery(this).children(\"span\").css({\n 'display':'block'\n });\n },\n function() {\n jQuery(this).children(\"span\").css({\n 'display':'none'\n });\n return false;\n });\n}", "fun...
[ "0.6832877", "0.6759884", "0.6757813", "0.6596096", "0.6562244", "0.65555817", "0.65095085", "0.64778125", "0.63673484", "0.63469887", "0.6270298", "0.62622947", "0.62513554", "0.62176394", "0.62061036", "0.6186677", "0.618265", "0.61789006", "0.6158742", "0.61577535", "0.615...
0.0
-1
AJAX reload of main frame func
function ajaxAction(e, pathname) { if (e !== undefined) { var eventType = e.type; } var $this = $(this); if (!pathname) { var pathname = window.location.pathname, url = eventType == 'popstate' ? pathname : $this.attr('href'); //check browser button...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reloadMain() {\r\n\tif (busy_ajaxing) {\r\n\t\talert(\"Ein kleiner Moment bitte! Die Seite wird gerade neu konfiguriert...\");\r\n\t} else {\r\n\t\tbusy_ajaxing = true;\r\n\t\tscrollPosBeforeLoad = getScrollPos();\r\n\t\tsendRequest(\"maintable.php?directInclude=do\", \"\", 2, \"processResponseMain\");\r\...
[ "0.71954936", "0.69198793", "0.67773014", "0.6742578", "0.6675506", "0.6651808", "0.66451496", "0.6628741", "0.6626407", "0.662012", "0.6612739", "0.6599791", "0.6570095", "0.6522307", "0.64671683", "0.64668274", "0.6454041", "0.64503896", "0.64374685", "0.6421491", "0.641942...
0.0
-1
Sumar los elementos de un arreglo
function suma(array) { let suma = 0; for(i=0; i<array.length; i++) { suma = suma + array[i]; }; return suma; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function suma_total(arreglo){\n let suma = 0;\n arreglo.forEach( valor => {\n suma += valor;\n });\n return suma;\n}", "function suma(...params) {\n // los array cuentan con el metodo reduce, que permite iterar sobre cada elemento de un array\n return params.reduce((acumulativo, actual) => a...
[ "0.72095567", "0.68723786", "0.6430961", "0.6405564", "0.6395831", "0.6386765", "0.6386416", "0.6371353", "0.6365413", "0.63627666", "0.6345263", "0.6339707", "0.6338746", "0.63252944", "0.63229287", "0.6316552", "0.6315402", "0.63143086", "0.6296654", "0.6284448", "0.6282296...
0.61447287
42
Multiplicar los elementos de un arreglo
function multiplicar(array) { let multiplicar = 1; for(i=0; i<array.length; i++) { multiplicar = multiplicar * parseInt(array[i]) }; return multiplicar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multiply(elements) {\n return elements.reduce((product, element) => {\n product *= element;\n return product;\n }, 1);\n}", "function multiplyElements(arr1, arr2) {\n for (let i = 0; i < arr1.length; i++) {\n for (let j = 0; j < arr1[0].length; j++) {\n arr1[i][j] *= arr2[i]...
[ "0.7155808", "0.6801874", "0.6760052", "0.67471087", "0.672408", "0.672408", "0.6655198", "0.6637942", "0.66151583", "0.6612607", "0.66072977", "0.65998495", "0.65960515", "0.6585249", "0.6580526", "0.65590227", "0.6546471", "0.6537851", "0.65359104", "0.6535733", "0.6534216"...
0.69536436
1
Promediar los elementos de un arreglo
function promedio(array) { // Acortamos codigo con las funciones ya creadas let promedio = suma(array)/array.length; return promedio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obtenerArregloPedidoMovil(arrRetorno) {\n if (arrRetorno.length > 0) {\n if (dataProductos.length > 0) {\n for (var i = 0; i < arrRetorno.length; i++) {\n var objArrRetorno = arrRetorno[i];\n dataProductos.push(objArrRetorno);\n if (objArrR...
[ "0.5996025", "0.5937653", "0.5932237", "0.58665097", "0.5851885", "0.5850789", "0.5792732", "0.5792732", "0.57889163", "0.57095903", "0.56461734", "0.56001586", "0.55882305", "0.55880415", "0.5571328", "0.55250335", "0.5520603", "0.54410404", "0.5435047", "0.54317284", "0.542...
0.0
-1
Encontrar la mediana de un arreglo
function mediana(array) { array = ordenar(array); // Separamos los casos if (array.length % 2 == 0) { // Para pares let number1 = array[array.length/2]; let number2 = array[array.length/2 - 1]; let mediana = (number1 + number2)/2; return mediana; } else { // Para impares let mediana =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculandoMediana(lista) {\n console.log(`La lista ingresada es: ${lista}`);\n\n const orderedList = lista.sort();\n console.log(`La lista ordenada es: ${orderedList}`);\n \n const mitad = orderedList.length / 2;\n console.log(`La mitad de la lista es de: ${mitad}`);\n \n let media...
[ "0.6077186", "0.6012999", "0.5851208", "0.5719917", "0.54758614", "0.5444853", "0.5391151", "0.5327742", "0.5301504", "0.52264553", "0.520174", "0.51730007", "0.5105064", "0.5090974", "0.50816965", "0.5079273", "0.5079273", "0.5079273", "0.5054972", "0.503186", "0.5022543", ...
0.6117115
0
Encontrar la varianza para una poblacion
function varianza(array) { let suma = 0; // Hallamos la suma de cuadrados for(i=0; i<array.length; i++) { suma = suma + (array[i] ** 2); } // Terminamos el procedimiento let varianza = (suma/array.length) - (promedio(array) ** 2); return varianza; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sukeistiMasayvoElementus(nr1, nr2) {\nlet y = prekiautojai[nr1];\nprekiautojai[nr1] = prekiautojai[nr2];\nprekiautojai[nr2] = y;\n\n}", "function _ConvertePericias() {\n for (var i = 0; i < gEntradas.pericias.length; ++i) {\n var pericia_personagem = gPersonagem.pericias.lista[gEntradas.pericias[i]....
[ "0.56713045", "0.5660894", "0.5628868", "0.5594326", "0.5591847", "0.5580399", "0.55414504", "0.5489566", "0.54793704", "0.5470615", "0.5469447", "0.54497254", "0.5413861", "0.5408434", "0.53779703", "0.53452224", "0.5341567", "0.5338762", "0.5332834", "0.5328283", "0.5297774...
0.0
-1
Encontrar la varianza para una muestra
function varianzaMuestra(array) { let suma = 0; // Hallamos la suma de cuadrados for(i=0; i<array.length; i++) { suma = suma + (array[i] ** 2); } // Terminamos el procedimiento let varianza = (suma/(array.length-1)) - (promedio(array) ** 2); return varianza; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostraNotas(){}", "function resetJsAttributeVars(){\n\t//Determinamos los valores para realizar la búsqueda\n\tjsSegPaisViewCodPais = '';\n\tjsSegPaisViewMoneOidMone = '';\n\t\n}", "function municoesAndam(){\n\tif(jogoEmAndamento==true){\n\t\tmunicoes.forEach(andarMunicao);\n\t}\n}", "moverAbajo(){\...
[ "0.6340651", "0.5672821", "0.5659771", "0.56114215", "0.56093603", "0.5604681", "0.5595041", "0.5564054", "0.5557625", "0.5556318", "0.5555391", "0.5496689", "0.54706955", "0.54692835", "0.5465803", "0.54620117", "0.5460538", "0.5459767", "0.54594696", "0.545529", "0.5428927"...
0.5167384
54