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
listed below. Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the compiled fil...
function addToCartBinding() { $(".numbers-row").before('<div class="dec button">-</div>') $(".numbers-row").after('<div class="inc button">+</div>') $(".add-to-cart .button").on("click", function() { var $button = $(this); var oldValue = $button.parent().find("input").val(); if ($button.text...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function javascript() {\n return gulp.src('src/assets/js/*.js')\n //.pipe($.sourcemaps.init())\n //.pipe($.babel())\n //.pipe($.concat('appfou.js'))\n .pipe($.if(PRODUCTION, $.uglify()\n .on('error', e => { console.log(e); })\n ))\n ...
[ "0.601291", "0.5966248", "0.59016025", "0.58723104", "0.58311415", "0.5750127", "0.5680282", "0.5648038", "0.56361747", "0.5631046", "0.5556303", "0.55437505", "0.551064", "0.54997283", "0.54986393", "0.5489509", "0.5480603", "0.5465251", "0.5433013", "0.5421393", "0.541598",...
0.0
-1
Ajax call to approve / reject the trainer request
function submitRequestApproval(fromEmailAddress, toEmailAddress, approvalResponse, url) { var relationshipBean = { "fromEmailAddress" : fromEmailAddress, "toEmailAddress" : toEmailAddress, "status" : approvalResponse } $.ajax({ type : "POST", contentType : 'application/json;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function approve(id,plus) {\n $.ajax({\n type: 'POST',\n url: 'orders/approve',\n data: {\"id\": id,\"plus\":plus},\n beforeSend: function () {\n // this is where we append a loading image\n },\n success: function (data) {\n // successful request; ...
[ "0.7050658", "0.7042847", "0.6841642", "0.6783342", "0.6756225", "0.6695296", "0.66031677", "0.6543366", "0.6499867", "0.64970887", "0.6426876", "0.64184237", "0.63475204", "0.63376963", "0.62823445", "0.6277611", "0.62692016", "0.62494975", "0.62382805", "0.6218705", "0.6203...
0.6170443
23
Ajax call to update the relationship level
function submitRequestLevelUpdate(level, fromEmailAddress, toEmailAddress, buttonClicked, url) { var relationshipBean = { "fromEmailAddress" : fromEmailAddress, "toEmailAddress" : toEmailAddress, "level" : level } $.ajax({ type : "POST", contentType : 'application/json; char...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateRelationships(){\n\t\tconsole.log('gonna updateRelationships')\n\t\t//post per aggiornare relazione tra past e current.\n\t\tdate = new Date(Date.now());\n\t\t$.post(\"/relation\",{\n\t\t\tprevious: pastPlayerVideoId,\n\t\t\tclicked: getCurrentPlayerId(),\n\t\t\trecommender: currentPlayerRecommender...
[ "0.65105003", "0.60463846", "0.60247004", "0.59002745", "0.5888884", "0.58797294", "0.56868076", "0.56493264", "0.56449115", "0.5641969", "0.55876076", "0.5530793", "0.5521864", "0.55210656", "0.5502272", "0.5479376", "0.54789734", "0.54609364", "0.54153466", "0.5382838", "0....
0.64311343
1
metodo para loggear informacion
function info(message, data, title){ toastr.info(message,title); $log.info('Info : ' + message, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getClientLog() {\n\n }", "function showlog(status) { }", "function updateLogs() {\r\n updatePositionLogs();\r\n updateContactLogs();\r\n}", "function logInfo(mesg, cardID, cardType, clientID)\n{\n writeLog(mesg, 'info', true, cardID, cardType, clientID);\n}", "log(message) {\r\n this.message...
[ "0.65456516", "0.6441684", "0.64358276", "0.6396102", "0.63632023", "0.6336786", "0.63082796", "0.6277157", "0.62731576", "0.62390953", "0.6192072", "0.61854994", "0.61839235", "0.61735445", "0.6155933", "0.61321837", "0.6128342", "0.6114962", "0.61112493", "0.61074996", "0.6...
0.6014493
30
Change the quantity of the item in the cart (can never go below 1 with this)
updateQuantityInCart(lineItemId, quantity) { const state = store.getState().home.cart; // state from redux store const checkoutId = state.checkout.id const lineItemsToUpdate = [{ id: lineItemId, quantity: parseInt(quantity, 10) }] state.client.checkout.updateLineItems(checkoutId, lineIte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_changeQuantity(productId) {\n const value = this.shadowRoot.querySelector('#chart_item_' + productId).value;\n\n const cartItem = this._findCartItem(productId);\n\n const index = this.cartItems.indexOf(cartItem);\n this.cartItems[index].quantity = value;\n this.cartItems = [...this.cartItems]; // t...
[ "0.7835182", "0.747047", "0.7393447", "0.73810214", "0.7330821", "0.73105043", "0.72733", "0.72683966", "0.7262058", "0.7251585", "0.72360575", "0.72353876", "0.71892935", "0.7143302", "0.7115695", "0.71147615", "0.70914966", "0.70790577", "0.7060912", "0.7060307", "0.7027842...
0.69149774
29
Functionality for trash icon to remove item in cart
removeLineItemInCart(lineItemId) { const state = store.getState().home.cart; // state from redux store const checkoutId = state.checkout.id state.client.checkout.removeLineItems(checkoutId, [lineItemId]).then(res => { store.dispatch({ type: 'REMOVE_LINE_ITEM_IN_CART', payload: { chec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteFromCart(item){\n item.parentElement.remove();\n showTotals();\n}", "function removeItemFromCart(){\n\n}", "function removeItemFromCart(event) {\n if (event.target.type === 'button') {\n currentInventory.removeItem(event.target.name);\n currentInventory.saveToLocalStorage();\n re...
[ "0.75683117", "0.74649245", "0.7402601", "0.7334791", "0.7313707", "0.73136693", "0.7296672", "0.7261712", "0.7196081", "0.71559465", "0.7126474", "0.7122428", "0.7114108", "0.70695394", "0.7066149", "0.70477813", "0.69970953", "0.69905365", "0.6932946", "0.69188994", "0.6916...
0.0
-1
Displays terrain with appropriate shaders
display(){ this.scene.pushMatrix(); this.heightmap.bind(0); this.texture.bind(1); this.scene.setActiveShader(this.shader); this.terrain.display(); this.scene.setActiveShader(this.scene.defaultShader); this.scene.popMatrix(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawTerrain(){\n gl.polygonOffset(0,0);\n \n // Bind vertex locations\n gl.bindBuffer(gl.ARRAY_BUFFER, tVertexPositionBuffer);\n gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, tVertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\n // Bind color buffer\n gl.bindBuff...
[ "0.73679286", "0.73629063", "0.72459036", "0.7011748", "0.68293726", "0.6653574", "0.6604118", "0.65497625", "0.6494927", "0.64661026", "0.6411741", "0.6366384", "0.63520676", "0.6313026", "0.6307145", "0.6304229", "0.6279552", "0.6257594", "0.62334526", "0.62302923", "0.6199...
0.7511857
0
HEADER HIDE/SHOW and SPLASH SPACING
function scroll_style() { var window_top = $(window).scrollTop(); var div_top = 1; if (window_top > div_top){ console.log('show navigation'); $('#splash').slideUp("slow"); $('#loadSecond').fadeIn("slow"); $('#navbar').slideDown("slow"); } else { $('#loadSecond'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideHeader() {\n if (body.hasClass('checked') === false) {\n $('.welcome>h2, .welcome>.separator').fadeToggle(300);\n $('.welcome').slideToggle(300);\n $('#main-header').addClass('go-paint');\n HintBtn.removeClass('hints-pulse');\n };\n }", "f...
[ "0.7071427", "0.6932088", "0.6685668", "0.6659874", "0.6630032", "0.6540214", "0.6524318", "0.6521463", "0.642699", "0.63801926", "0.6364404", "0.630957", "0.6290196", "0.6287049", "0.6272011", "0.6266785", "0.6265627", "0.6252305", "0.62215525", "0.62062854", "0.62018025", ...
0.0
-1
This is called with the results from from FB.getLoginStatus().
function StatusChangeCallback(response) { // The response object is returned with a status field that lets the // app know the current login status of the person. // Full docs on the response object can be found in the documentation // for FB.getLoginStatus(). if (response.status === oldStatus) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLoginStatus() {\n FB.getLoginStatus(function(response) {\n statusChangeCallback(response);\n });\n}", "checkLoginState() {\n FB.getLoginStatus(function (response) {\n this.statusChangeCallback(response);\n }.bind(this));\n }", "function checkLoginState() {\n FB...
[ "0.77696425", "0.7482494", "0.7449821", "0.73912543", "0.7371426", "0.7343324", "0.7326549", "0.73123306", "0.73093015", "0.7285009", "0.72655463", "0.7260945", "0.7256007", "0.7256007", "0.7256007", "0.7256007", "0.7256007", "0.7256007", "0.7256007", "0.7256007", "0.7256007"...
0.63053244
100
This function is called when someone finishes with the Login Button. See the onlogin handler attached to it in the sample code below.
function CheckLoginState() { FB.getLoginStatus(function (response) { StatusChangeCallback(response); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loginCompleted() {\n }", "function onLogin() {}", "function onLogin(loginResponse){\n // Send headers to your server and validate user by calling Digits’ API\n var oAuthHeaders = loginResponse.oauth_echo_headers;\n var verifyData = {\n authHeader: oAuthHeaders['X-Verify-Credential...
[ "0.82526165", "0.8070413", "0.7308522", "0.72859204", "0.7276573", "0.72484064", "0.7138225", "0.7098893", "0.70773625", "0.6987879", "0.6982038", "0.69781816", "0.6922998", "0.6885517", "0.68643576", "0.6855503", "0.68078786", "0.6779642", "0.6768705", "0.673408", "0.6733077...
0.0
-1
This function requests all fields of a Facebookprofile
function RequestAllUserFields() { var fieldsString = ''; var i = 0; fieldsString += user_fields_type_description[0]; // Increment by 3 because 3 entrys form a unit of one field for (i = 3; i < user_fields_type_description.length; //125; i = i + 3) { fields...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RequestFacebookDetails() {\n var fieldsString = '';\n var i = 0;\n fieldsString += requested_user_field_type_description[0];\n // Increment by 3 because 3 entrys form a unit of one field\n for (i = 3;\n i < requested_user_field_type_description.length;\n i = i + 3) {\n...
[ "0.7724132", "0.7297503", "0.7281413", "0.7094468", "0.6804858", "0.66326267", "0.6622477", "0.65756464", "0.6572471", "0.65128845", "0.65128845", "0.64746535", "0.6361099", "0.63296324", "0.6327342", "0.63271534", "0.6300869", "0.6267991", "0.62466747", "0.62264293", "0.6173...
0.74664235
1
This function requests CSRrelevant fields of a Facebookprofile
function RequestFacebookDetails() { var fieldsString = ''; var i = 0; fieldsString += requested_user_field_type_description[0]; // Increment by 3 because 3 entrys form a unit of one field for (i = 3; i < requested_user_field_type_description.length; i = i + 3) { fiel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProfileData(){\n let headers = loadHeaders();\n callAPI(server + \"api/mdm/profiles/search\",headers,\"profilesData\"); //get main profiles list\n\n}", "searchProfile(payloadSearchProfile) {\n return apiClient.get('users/user/' + payloadSearchProfile)\n }", "function profileReq () {\n co...
[ "0.6097969", "0.60144085", "0.59531564", "0.589212", "0.58831966", "0.5749379", "0.5718069", "0.5707877", "0.5670311", "0.5624877", "0.56223875", "0.5604103", "0.5568567", "0.55539566", "0.5525908", "0.5506505", "0.548648", "0.5470735", "0.5454689", "0.5453546", "0.5447511", ...
0.66129845
0
define an async function that does an axios call
async function doSomeDataFetching() { Timeout.set(2000) // Getting back data from the net, through the wire, air, and the ocean: const res = await axios.get("https://jsonplaceholder.typicode.com/posts?_limit=5"); console.log("Got back:", res.data); setArticles(res.d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function performRequest(url) {\r\n return await axios\r\n .get(url)\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((error) => {\r\n console.log(error);\r\n });\r\n}", "async function getOneThing() {\n var response = await axios.get(\"https://httpbin.org/get\");\n...
[ "0.7551344", "0.74720424", "0.7409847", "0.70332193", "0.69493246", "0.6707914", "0.66724104", "0.6646985", "0.6491917", "0.64849603", "0.64634866", "0.6390565", "0.6379261", "0.6293308", "0.6271358", "0.625747", "0.6254269", "0.62328064", "0.62229127", "0.6203454", "0.620226...
0.5845303
80
construir o modal a partir da resposta
function buildModal(data) { $(".curso_modal").append('<div>',{'class': 'modal_content'}); $("#text_curso").val(data[0].nome); modal_curso.style.display = "block"; $(".modal_content").append( $('<div>', {'class': 'div_content'}).append( $('<h3> ', {'id':'curso_titulo', 'class': 'titulo_modal','text': d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ouvrir() {\n creationModal();\n }", "async function createInvAdminModal() {\n const modal = await modalController.create({\n component: \"inv-admin-modal\",\n cssClass: \"invAdminModal\",\n });\n\n var settings = {\n \"url\": `http://localhost:8080/api/admin/inventory/detail/${stor...
[ "0.71119654", "0.7027567", "0.69565004", "0.69497067", "0.69250053", "0.6924931", "0.6908757", "0.6858745", "0.6830868", "0.6824252", "0.68189913", "0.6815571", "0.67816025", "0.6740439", "0.6738648", "0.67370903", "0.6730911", "0.6684529", "0.66806483", "0.6656909", "0.66421...
0.0
-1
logout() Log the user out of current session Sample usage: apiClient.logout()
logout(callback) { super.del(this.baseUrl + '/v1/logout', {}, callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async logout() {\n const options = this.buildOptions({\n path: `${this.path}/logout`,\n method: \"post\",\n body: {},\n });\n\n return this.apiCall(options);\n }", "logout() {\n this.setMethod('POST');\n this.setAuth();\n return this.getApiResult(Config.LOGOUT_API);\n }", "lo...
[ "0.8200167", "0.8152997", "0.8111802", "0.7869994", "0.7853443", "0.7778432", "0.77562994", "0.7741515", "0.7709936", "0.7707338", "0.7688268", "0.7647196", "0.764238", "0.7619113", "0.761664", "0.7570633", "0.75481945", "0.75422204", "0.74976915", "0.7496208", "0.74854195", ...
0.7372413
32
updateUserStreamObjectRating() Updates rating on individual tips
updateUserStreamObjectRating(uid, id, rating) { if (!uid || !id) { throw new Error("Problem with data check updateUserStream in swell-api-client"); } var url = this.baseUrl + '/v1/user/' + uid + /stream/ + id; super.put( url, {"streamObject":{"rating": rating}}, (err, res)=>{ if (err){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyUserObject() {\n let starRate = document.querySelectorAll(\".full\").length;\n userObject.starRate = starRate;\n userObject.review = document.querySelector(\".reviews_add-input\").value;\n putReviews(userObject);\n}", "async function updateStatistics(isRecommended) {\n let stats = await wixDat...
[ "0.63787484", "0.59731317", "0.5933121", "0.5931734", "0.58381295", "0.5779559", "0.57694906", "0.573053", "0.5667739", "0.5667566", "0.5588299", "0.55810785", "0.55810785", "0.5578304", "0.55386853", "0.5535314", "0.5508418", "0.5499672", "0.54899716", "0.54583627", "0.54367...
0.72365177
0
updateUserStreamObjectRating() Updates rating on individual tips
updateUserStreamObjectComment(uid, id, comment) { if (!uid || !id) { throw new Error("Problem with data check updateUserStreamObjectComment in swell-api-client"); } var url = this.baseUrl + '/v1/user/' + uid + /stream/ + id; super.put( url, {"streamObject":{"comment": comment}}, (err, res)=>{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateUserStreamObjectRating(uid, id, rating) {\n if (!uid || !id) {\n throw new Error(\"Problem with data check updateUserStream in swell-api-client\");\n }\n var url = this.baseUrl + '/v1/user/' + uid + /stream/ + id;\n super.put( url, {\"streamObject\":{\"rating\": rating}}, (err, res)=>{\n ...
[ "0.72365177", "0.63787484", "0.59731317", "0.5933121", "0.5931734", "0.58381295", "0.5779559", "0.57694906", "0.573053", "0.5667739", "0.5667566", "0.5588299", "0.55810785", "0.55810785", "0.5578304", "0.55386853", "0.5535314", "0.5508418", "0.5499672", "0.54899716", "0.54583...
0.0
-1
Fonction pour rendre visible ou cacher des balises
function cacher(baliseEvt,baliseHide,baliseHide2,booleen,bool = false){ if( baliseEvt !== null){ baliseEvt.addEventListener("click",()=>{ baliseHide.hidden = booleen; baliseHide2.hidden = booleen; baliseHide.required = bool; baliseHide2.required = bool; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderizaBalas(){\n\tbalas.forEach(desenhaBala);\n\tbalasAndam();\n}", "onBecameVisible() {\n\n // Start rendering if needed\n if (!this.isRendering) {\n this.isRendering = true\n this.render()\n }\n\n }", "function cacher_tout_entier()\n{\n\t// On cache t...
[ "0.59459126", "0.5941046", "0.5759834", "0.5738043", "0.5615488", "0.5590209", "0.55725884", "0.555342", "0.5518588", "0.55134803", "0.54548407", "0.5423575", "0.54223007", "0.5402713", "0.5377762", "0.5366217", "0.53462994", "0.53199553", "0.531933", "0.5293758", "0.5293693"...
0.4995137
90
The basic Text Input based on PIXI.Input Input by Sebastian Nette, see
function TextInput(text, theme) { // show and load background image as skin (exploiting skin states) this.skinName = this.skinName || TextInput.SKIN_NAME; this._validStates = this._validStates || TextInput.stateNames; this._currentState = 'background'; this.invalidState = true; InputControl.cal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textInput() {\r\n this.x = 0;\r\n this.y = 0;\r\n this.size = 160;\r\n this.text = \"\";\r\n this.selected = false;\r\n this.t = 0;\r\n this.key = \"\";\r\n this.changedFunc = function() { return; };\r\n}", "function InputText(name, text) {\n if (text === void 0) { text = \"\"; }\n ...
[ "0.76783496", "0.7284034", "0.70679814", "0.6937974", "0.6878147", "0.6855882", "0.67372584", "0.6648166", "0.65447044", "0.6531569", "0.6497022", "0.64495534", "0.644645", "0.6404409", "0.6401944", "0.6369795", "0.6363539", "0.6343125", "0.6330858", "0.63170016", "0.6294817"...
0.67921144
6
ajax function to retrieve first json string(Called onLoad)
function ajaxGetCountries() { //calls function to display map; displayMap(); var fileName = "php/getCountries.php"; // name of file to send request to var method = "POST"; // use POST method var urlParameterStringToSend = ""; // Construct a url parameter stri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetch() {\n $.ajax({\n url: window.silvupleOptions.jsonContentLister,\n dataType: 'json',\n data: null,\n success: success,\n error : fail\n });\n }", "function loadJSONs( url, which ){\n var AJAX_req = new XM...
[ "0.67372465", "0.66010356", "0.65139455", "0.6487043", "0.64474887", "0.6421993", "0.63995504", "0.6396584", "0.6395348", "0.63699317", "0.6350481", "0.63341933", "0.6326563", "0.63110495", "0.6258507", "0.6253676", "0.62305444", "0.61982614", "0.6192326", "0.6185297", "0.618...
0.0
-1
It's safe to call this function whether or not replayer had any effect.
function shutdown(next) { if (server) { return server.shutdown(next); } if (next) { next(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateLayer() {\n /* This layer is always reloaded */\n return;\n }", "function replay() {\n reload = location.reload();\n }", "function _innerUpdate() {\n if (playback.state.value == Playback$STATE_NORMAL) {\n checkForSafeBufferLevel();\n _currentDownloaderState.update(...
[ "0.6502118", "0.5531595", "0.5529258", "0.5467929", "0.5425833", "0.53679353", "0.53638065", "0.5337526", "0.5319708", "0.5230491", "0.52292114", "0.5164628", "0.51628965", "0.5158362", "0.514639", "0.51287454", "0.51013416", "0.5099868", "0.5096411", "0.5077915", "0.50759095...
0.0
-1
this will replace constructor function and initializing state object this will called after our component get rendered
componentDidMount(){ window.navigator.geolocation.getCurrentPosition( (position) => this.setState({ lat: position.coords.latitude }), // only modify lat and not doing anything to errorMessage (err) => this.setState({ errorMessage: err.message }) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() { \r\n super();\r\n this.state = {};\r\n }", "constructor() {\n super();\n this.state = {};\n }", "constructor(props) {\n //Call the constrictor of Super class i.e The Component\n super(props);\n //maintain the state required for this component\n ...
[ "0.8286787", "0.7979656", "0.79710186", "0.79586804", "0.79406625", "0.7918674", "0.7898468", "0.7875699", "0.7865932", "0.7854863", "0.7854863", "0.7854863", "0.7854863", "0.7854863", "0.78532827", "0.78461164", "0.78411955", "0.78411955", "0.78309834", "0.7823804", "0.78238...
0.0
-1
this will called any time our component get updated (before this render method will be called)
componentDidUpdate(){ console.log('my component just updated- it rendered'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n this.update();\n }", "update () {\n this.render();\n }", "update() {\n // Subclasses should override\n }", "_didRender(_props, _changedProps, _prevProps) { }", "rendered() {\n\t\t\t\tthis.hasStorePropsChanged_ = false;\n\t\t\t\tthis.hasOwnPropsChanged_ = false;\n\t\t\t}", ...
[ "0.7553557", "0.74104583", "0.7276526", "0.71741194", "0.7057402", "0.7023121", "0.7023121", "0.6993596", "0.6955767", "0.6931101", "0.6919297", "0.68895435", "0.6855553", "0.68503225", "0.6847017", "0.68370366", "0.6833879", "0.6828324", "0.6817567", "0.6817567", "0.6817567"...
0.6970666
8
Presentational component has for a form and button as children
render() { const { onSubmit, edit, patientID, addressID, firstName, lastName, streetAddress, zipCode, city, state, country, apartmentNo, primaryContact, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FormButton({ children, handleSubmit }) {\n return (\n <S.Button\n onClick={handleSubmit}\n variant='contained'\n >\n {children}\n </S.Button>\n );\n}", "render(){\n\t\t\t\treturn <button className=\"ui button primary\">Submit</button>\n\t\t\t}", "buildForm() {\n const form...
[ "0.6388267", "0.6127803", "0.6112726", "0.60968584", "0.6001306", "0.5997506", "0.5965313", "0.59446955", "0.5927997", "0.5871448", "0.5871356", "0.5814535", "0.5790526", "0.5751029", "0.5745991", "0.56905365", "0.56582946", "0.56440634", "0.56147903", "0.55958325", "0.559019...
0.0
-1
Transition is just having CSS clip values modified at ~60fps
function slide(direction) { var directionPositionMapping, stringInitialRectClip; switch (direction) { case "right": directionPositionMapping = 3; stringInitialRectClip = "rect(0px, 958px, 634px, 958px)";//TODO: needs to get height and width auto /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set clipAnimations(value) {}", "set originalClip(value) {}", "get clipAnimations() {}", "get originalClip() {}", "function cliping() {\n\t\t\t\t// calculate length of word;\n\t\t\t\tvar width = $next.getBoundingClientRect().width;\n\t\t\t\telm[0].style.width = '0px';\n\t\t\t\tsetTimeout(function () {\n\t\t...
[ "0.66946334", "0.654038", "0.64317983", "0.61912954", "0.58955973", "0.5770187", "0.57109284", "0.5705067", "0.5618098", "0.5616116", "0.5594742", "0.55438876", "0.5500283", "0.54780424", "0.5456483", "0.54537076", "0.54245514", "0.54193324", "0.53992623", "0.5392621", "0.531...
0.0
-1
CLIPPING FUCTINONS .style.clip returns differently across browsers: ie8: 22px,22px FF: 22px, 22px Chrome: 22px 22px helper fcn: returns an array of all clip positional values (including "px" string)
function getArrayClipInnards(clip) { var substringed = clip.substring(5, clip.indexOf(")") ), toReturn; if (substringed.indexOf(", ") > -1 ) { // FF //means we have firefox toReturn = substringed.split(", "); } else { // chrome/ie8 toReturn = subs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get clip() {}", "function getClipStyles(moveable, clipPath, poses) {\n var clipRelative = moveable.props.clipRelative;\n var _a = moveable.state,\n width = _a.width,\n height = _a.height;\n var _b = clipPath,\n clipType = _b.type,\n clipPoses = _b.poses;\n var isRect = cli...
[ "0.63789946", "0.6340628", "0.61135805", "0.60446936", "0.6001761", "0.6001761", "0.6001761", "0.6001761", "0.5993967", "0.59515315", "0.59515315", "0.59515315", "0.59240776", "0.5916921", "0.5916921", "0.5916921", "0.59102434", "0.5882128", "0.5865744", "0.5862576", "0.58525...
0.6157214
2
get the clip value at specified position
function getClipParam(clip, pos) { var extractedPosClipParam = getArrayClipInnards(clip)[pos]; return extractedPosClipParam.substring(0, extractedPosClipParam.indexOf("px")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get clip() {}", "set clip(value) {}", "get nearClipPlane() {}", "get originalClip() {}", "getPieceValue(piece, x, y) {\n if (piece === null) {\n return 0;\n }\n const absoluteValue = this.getAbsoluteValue(piece, piece.color === 'w', x ,y);\n return piece.color === 'w' ? absoluteValue : -...
[ "0.7258967", "0.6572366", "0.64739877", "0.6453831", "0.62763816", "0.6200296", "0.6037681", "0.59395283", "0.5937565", "0.5867009", "0.585931", "0.58244425", "0.58239317", "0.5822981", "0.580657", "0.57070947", "0.5696967", "0.5683265", "0.56517005", "0.56303215", "0.5610946...
0.7298683
0
returns a css clip value with changed value at specified position
function getNewClip(currentClip, pos, value) { var arrayClipInnards = getArrayClipInnards(currentClip), clipValueToBeReplaced = getClipParam(currentClip, pos); // change the current clip value to new value, while preserving "px" string arrayClipInnards[pos] = arrayClipInnards[pos].r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set clip(value) {}", "get clip() {}", "set originalClip(value) {}", "function getClipParam(clip, pos) {\n var extractedPosClipParam = getArrayClipInnards(clip)[pos];\n \n return extractedPosClipParam.substring(0, extractedPosClipParam.indexOf(\"px\"));\n }", "get originalClip() {}",...
[ "0.69512963", "0.690978", "0.67194027", "0.6668341", "0.6502553", "0.61389405", "0.6071202", "0.5964866", "0.591007", "0.58987355", "0.58691585", "0.5821302", "0.5799849", "0.56368923", "0.559841", "0.55687135", "0.55584735", "0.54856586", "0.5449952", "0.54074836", "0.539054...
0.68825036
2
To access props :
function Card(props) { return ( <> <div className="card"> {/* <img src={props.imgsrc} alt="mypic" className="card-img"></img> */} {/* creating component of image */} <Images imgsrc={props.imgsrc}></Images> <Card_info sname={props.sname} title={props.title} link={props.link}>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get props() { return this._props }", "get props() {\n return this._props;\n }", "get props () { return this.target.props }", "function componentProps(){\n\t\tvar props = {};\n\t\tlog(arguments);\n\t\tfor(var i = 0; i< arguments.length; i++){\n\t\t\tvar arg = arguments[i];\n\t\t\tlog(arg);\n\t\t\tvar prop...
[ "0.7971307", "0.7615222", "0.7486357", "0.7194556", "0.70154876", "0.70090365", "0.6931476", "0.68975824", "0.68239325", "0.6771019", "0.6662794", "0.66414773", "0.6553176", "0.6510341", "0.6433985", "0.64332026", "0.6424327", "0.6416247", "0.63951224", "0.63619", "0.6356166"...
0.0
-1
Calls the action creator for loading sent notifications if an event has been selected (i.e. events have been loaded) and the notifications haven't already been loaded.
fetchNotificationsIfNeeded() { let { selectedEventID, notifications, loadSentNotifications } = this.props; if (selectedEventID !== -1 && !notifications) { loadSentNotifications(selectedEventID); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "notifyLoading(isLoading) { \n if(isLoading){\n const doneloadingEvent = new CustomEvent('doneloading');\n this.dispatchEvent(doneloadingEvent);\n }else{\n const doneloadingEvent = new CustomEvent('loading');\n this.dispatchEvent(doneloadingEvent);\n ...
[ "0.5752012", "0.5633801", "0.5625958", "0.55801415", "0.5573095", "0.55389816", "0.54197586", "0.5411239", "0.54087645", "0.5398504", "0.5328454", "0.5290475", "0.5258577", "0.52012235", "0.51946133", "0.5132249", "0.5120065", "0.51187277", "0.5118343", "0.50800925", "0.50653...
0.66485447
0
Simplifies API notification objects into only what is needed for render.
processNotifications() { const { notifications } = this.props; if (!notifications) { return []; } return notifications.map(notification => ({ title: notification.title, description: notification.description, metadata: this.generateMetadataString(notification), notificationI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNotifications() {\n var message;\n\n var renderedMessages = [ ];\n for (let notification of this.notifications) {\n switch (notification.notification.type)\n {\n case \"added-task\": {\n renderedMessages.push({\n error: false,\n id: notification.id,\n ...
[ "0.5838869", "0.549531", "0.5288787", "0.524116", "0.5226589", "0.51811457", "0.5160872", "0.51421946", "0.5141418", "0.5121024", "0.50988066", "0.5071704", "0.50436693", "0.50239277", "0.5000011", "0.49847037", "0.49792373", "0.49784306", "0.49440247", "0.49416655", "0.49405...
0.6409096
0
Generates a metadata string for the given notification, in the format:
generateMetadataString(notification) { const { regions } = this.props; const regionNames = notification.regionIds.map(regionID => regions[regionID] ? regions[regionID].name : `Region ${regionID}` ); const formattedRegionNames = regionNames.join(", "); const timestamp = notification.occurredAt;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildNotification(notifInfos, body) {\n let notification = {\n \"id\" : \"urn:ngsi-ld:Notification:\"+getRandomIntInclusive(1, 100000),\n \"type\" : \"Notification\",\n \"subscriptionId\" : notifInfos.subscriptionId,\n \"context\" : \"http://uri.etsi.org/ngsi-ld/notification...
[ "0.6142367", "0.5797566", "0.56303126", "0.5612936", "0.5596724", "0.5574494", "0.5569556", "0.5510509", "0.55087316", "0.546676", "0.5462849", "0.5454577", "0.54251033", "0.54141164", "0.5384368", "0.52875024", "0.5276118", "0.5264167", "0.52602535", "0.5240281", "0.5221608"...
0.80315083
0
addition : can dynamically support new tags (add new columns on the fly) Steps are valid as of 2016 November 12th. 0) From Google spreadsheet, Tools > Scriipt Editor... 1) Write your code 2) Save and give a meaningful name 3) Run and make sure "doGet" is selected You can set a method from Run menu 4) When you run for t...
function doGet(e){ Logger.log("--- doGet ---"); var tag = "", value = ""; try { // this helps during debuggin if (e == null){e={}; e.parameters = {code:"cko", tag:"test",value:"-1"};} code = e.parameters.code; if (code != "yourCode") return ContentService.createTextOutput("Wrote:\n incor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doGet(){\n var html=HtmlService.createHtmlOutputFromFile(\"source\");\n html.setTitle(\"Technology Tagger\");\n return html;\n}", "function doGet(e) {\n uploadEfficiencyToElasticsearch()\n return HtmlService.createHtmlOutputFromFile(\"WebApp\") //(this is just the default HTML created by Google scr...
[ "0.6284549", "0.61000484", "0.5869911", "0.5730862", "0.5688737", "0.567105", "0.56352425", "0.5630383", "0.5607035", "0.55909187", "0.55156827", "0.54677397", "0.5412818", "0.5410147", "0.5408281", "0.5356441", "0.5336952", "0.5329762", "0.53243566", "0.530529", "0.52815896"...
0.6147285
1
Method to save given data to a sheet
function save_data(assoc){ Logger.log("--- save_data ---"); try { var dateTime = new Date(); // Paste the URL of the Google Sheets starting from https thru /edit // For e.g.: https://docs.google.com/..../edit var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1Z1zi6RZ5MK...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeDataToSpreadsheet(tab, toWrite) {\n\t//this is where i am going to store my data\n\tvar spreadsheet;\n\tif(SPREADSHEET_NAME) {\n\t\tvar fileIter = DriveApp.getFilesByName(SPREADSHEET_NAME);\n\t\tif(fileIter.hasNext()) {\n\t\t\tvar file = fileIter.next();\n\t\t\tspreadsheet = SpreadsheetApp.openById(f...
[ "0.6833543", "0.66922224", "0.668746", "0.66583127", "0.62276554", "0.61960346", "0.6188287", "0.6141223", "0.6119497", "0.6095679", "0.6090584", "0.60679805", "0.60383546", "0.6018709", "0.60095054", "0.599921", "0.59904736", "0.59875524", "0.59807783", "0.59428734", "0.5933...
0.6531718
4
special onChange for dropdown field and name/id issue
handleDropdownChange(event) { const districtSelectedOnDropdownId = event.target.value; // value == the id const districtSelectedOnDropdown = _.find(this.state.districts, { _id: districtSelectedOnDropdownId }); this.setState(() => { return { districtSelectedOnDropdown }; })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doAfterSelectOptionChangedForHospitalExt(fieldName)\n{\n //Custom handling\n}", "onchange() {}", "function dropDown(event) {\n \tquery(event.target.name, event.target.value);\n }", "handleChangeSelect(val){\n this.formatValue(val, () => {\n this.triggerDropValueChange();\n ...
[ "0.72903466", "0.6880817", "0.68779594", "0.68688875", "0.6854725", "0.68304497", "0.68304497", "0.6803408", "0.6727628", "0.66534406", "0.66534406", "0.65688634", "0.65282553", "0.6508521", "0.64967686", "0.6477644", "0.64734304", "0.6455869", "0.64507115", "0.64337206", "0....
0.0
-1
import HomeScreen from './HomeScreen'
function Home() { // const [idFromButtonClick, setID] = useState('') const [homeData, setHomeData] = useState([]) const getHomeData = async () => { const { data } = await endPoints.home.call(); console.log('[HOME]', data); setHomeData(data) console.log(homeDat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Home() {\n return (\n <Stack.Navigator>\n <Stack.Screen name=\"Home\" component={HomeScreen} />\n <Stack.Screen name=\"Login\" component={LoginOutScreen} />\n <Stack.Screen name=\"Register\" component={RegisterScreen} />\n <Stack.Screen name=\"ChitCamera\" component={ChitCameraScre...
[ "0.695216", "0.66087025", "0.65710306", "0.64399326", "0.6310597", "0.6259059", "0.62291133", "0.6213403", "0.62046874", "0.61942405", "0.6126084", "0.6105479", "0.6046388", "0.6018469", "0.60114986", "0.599329", "0.5991426", "0.5989013", "0.598336", "0.5936778", "0.5925871",...
0.0
-1
Goes through the sections provided to this directive, computes their exam time, and adds them to the grid.
function loadExams () { exams = []; for (var i = 0; i <= scope.lectureSections.length - 1; i++) { thisLecture = scope.lectureSections[i]; columnRowLocation = processSection(thisLecture); console.log(columnRowLocation); newExam = {"name": thisLecture.courseTitle, "column": columnRowLocation[0], "ro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multiTimeFunc(content) {\n var timeToPred = 0;\n times.push(content);\n if (times.length == startStations.length) {\n for (var a = 0; a < times.length; a++) {\n timeToPred += times[a];\n }\n for (let y = 0; y < startEndTimes.length; y++)...
[ "0.5972207", "0.5683726", "0.5547801", "0.5483536", "0.5321679", "0.5318744", "0.5308869", "0.52709204", "0.52707005", "0.5250465", "0.523145", "0.52200216", "0.5214806", "0.5213073", "0.5212388", "0.51694006", "0.51674694", "0.51502824", "0.51441973", "0.5140022", "0.5112294...
0.5431182
4
Checks a meeting against a given list of conditions. Typically either MWFconditions or TTHconditions. Returns an array in the style of [column, row] if a match is found. False otherwise.
function processDaySet (meeting, conditions) { // go through every condition in the given conditions list for (var i = 0; i < conditions.length; i++) { var thisCondition = conditions[i]; var conditionsList = thisCondition['conditions']; if (checkCondition(meeting, conditionsList)) { return [thisC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchRowsEtc() {\n var checking;\n var result = false;\n for (var i = 0; i < toCheck.length; i) {\n console.log(toCheck[0][0] + \",\" + toCheck[0][1])\n checking = toCheck.shift();\n switch (checking[0]) {\n case 0:\n if (checkRow(checking[1])) {\n result = true;\n ...
[ "0.54358923", "0.5409744", "0.5141588", "0.5089903", "0.50118065", "0.4996316", "0.49880975", "0.49298146", "0.47933373", "0.4760881", "0.4756334", "0.47437122", "0.47413915", "0.47253498", "0.4688619", "0.4679031", "0.4650675", "0.4637198", "0.46352154", "0.46297958", "0.462...
0.6672649
0
Checks if any microcondition matches this meeting
function checkCondition (meeting, condition) { // go through each microcondition for (var i = 0; i < condition.length; i++) { thisMicrocondition = condition[i]; if (checkMicrocondition(meeting, thisMicrocondition)) { return true; } }; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkMicrocondition (meeting, microcondition) {\n\t\t\tmatch = true;\n\t\t\tfor (key in microcondition) {\n\t\t\t\tmicrocondition_value = microcondition[key];\n\t\t\t\tif (key in meeting) {\n\t\t\t\t\tmeeting_value = meeting[key];\n\t\t\t\t\tmatch = match && JSON.stringify(meeting_value) === JSON.stringif...
[ "0.7422266", "0.55659837", "0.55012083", "0.5296412", "0.52703655", "0.5240606", "0.5225532", "0.52153575", "0.51957226", "0.51789826", "0.51223993", "0.51164144", "0.51164144", "0.5116115", "0.5114743", "0.5112727", "0.5108575", "0.5097888", "0.5059664", "0.5057192", "0.5046...
0.7394467
1
Checks if a microcondition matches a meeting
function checkMicrocondition (meeting, microcondition) { match = true; for (key in microcondition) { microcondition_value = microcondition[key]; if (key in meeting) { meeting_value = meeting[key]; match = match && JSON.stringify(meeting_value) === JSON.stringify(microcondition_value); } }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkCondition (meeting, condition) {\n\t\t\t// go through each microcondition\n\t\t\tfor (var i = 0; i < condition.length; i++) {\n\t\t\t\tthisMicrocondition = condition[i];\n\t\t\t\tif (checkMicrocondition(meeting, thisMicrocondition)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn false;\...
[ "0.77511746", "0.5482591", "0.538473", "0.53009075", "0.5290987", "0.518072", "0.5175306", "0.5157593", "0.5150011", "0.51334697", "0.508917", "0.5056633", "0.5052595", "0.50407064", "0.50403047", "0.5036995", "0.5020591", "0.4990144", "0.49889418", "0.4969036", "0.496667", ...
0.80383277
0
Checks if a section matches any exception
function checkException (meeting) { for (var i = 0; i < exceptions.length; i++) { var thisException = exceptions[i]; if (thisException.id === meeting.id) { return [thisException.column, thisException.row]; } }; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _validate_sections(start_idx, end_idx, cb) {\n if (start_idx < end_idx) {\n _validate_section(start_idx, function() {\n _validate_sections(start_idx + 1, end_idx, cb);\n });\n } else {\n cb();\n }\n }", "hasSection(sectionName) {\n return !util_1.isUndefined(this.g...
[ "0.59778833", "0.5824625", "0.5570797", "0.5556593", "0.5483371", "0.54437536", "0.536947", "0.5328219", "0.5328086", "0.5327162", "0.52084184", "0.52046573", "0.519651", "0.5195557", "0.51938", "0.5176505", "0.5175715", "0.51534677", "0.5119838", "0.51136327", "0.50924075", ...
0.53441477
7
Returns the index of the first day of a given day array
function firstDay (dayArray) { for (var i = 0; i <= dayArray.length - 1; i++) { day = dayArray[i]; if (day) { return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstDay(data) {\n\tlet curDate = new Date(dateonly(new Date()) - (daysToShow-1) * msPerDay);\n\tlet start;\n\tfor (start = 0; start < data.length && data[start].date < curDate; start++);\n\treturn start;\n}", "function dayIndex(day, days) {\n\tfor (var i = 0; i < 7; i++) {\n\t\tif (days[i] === day)...
[ "0.69313264", "0.69183546", "0.68665695", "0.65669334", "0.6339604", "0.6297767", "0.62278163", "0.62135917", "0.61857843", "0.61433285", "0.61428326", "0.61376226", "0.6085876", "0.60418266", "0.6036452", "0.603356", "0.60291994", "0.6012539", "0.5986442", "0.5966527", "0.59...
0.8735563
0
Returns the first meeting from a given array of meetings
function firstMeeting (meetingArray) { var firstMeeting = meetingArray[0]; var dayToBeat = firstDay(firstMeeting.days); for (var i = 1; i < meetingArray.length; i++) { var thisMeeting = meetingArray[i]; var days = thisMeeting.days; if (firstDay(days) <= dayToBeat) { firstMeeting = thisMeeting;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMeetinga(first,last,time) {\n var myMeeting = meetings.filter(meeting => meeting.firstInitial == first);\n if (myMeeting.length == 1) {\n return myMeeting;\n }\n var myMeeting2 = myMeeting.filter(meeting => meeting.lastInitial == last);\n if (myMeeting2.length == 1) {\n ...
[ "0.66152644", "0.5774747", "0.5596893", "0.55240184", "0.5458262", "0.544205", "0.54336196", "0.54098165", "0.5384166", "0.5371507", "0.5359897", "0.53441525", "0.53381175", "0.5298724", "0.5272582", "0.52718174", "0.5251042", "0.5234508", "0.52316064", "0.519112", "0.5181003...
0.8107664
0
import CommentGroup from "./comment/CommentGroup";
function About() { return ( // "fragment" its a ghost DOM element <div> {/* <CommentGroup /> */} <PostGroup /> </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CommentGroup(props) {\n var className = props.className,\n children = props.children,\n collapsed = props.collapsed,\n minimal = props.minimal,\n size = props.size,\n threaded = props.threaded;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('ui', size, __...
[ "0.6533935", "0.6513438", "0.6421205", "0.63955975", "0.63955975", "0.63173765", "0.6261928", "0.6261928", "0.6238921", "0.6148369", "0.6039713", "0.5980367", "0.59749293", "0.5576564", "0.54655826", "0.52893764", "0.5288945", "0.5279804", "0.52352226", "0.52042025", "0.51245...
0.48643994
43
Parse the command line
function doCommand() { $('#messagelog').load("func/command.php", {cmd : $('#command').val()}, updateDisplays()); $('#command').val(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseArgv() {\n if (process.argv.length <= 2)\n throw help(\"missing command (e.g., 'run')\");\n\n const firstArg = process.argv[2];\n if (firstArg === \"help\" || firstArg === \"--help\" || firstArg === \"-h\") {\n help();\n return null;\n }\n\n if (firstArg.indexOf(\"...
[ "0.67352223", "0.6591724", "0.6548332", "0.6526411", "0.64962584", "0.6386051", "0.63041806", "0.6246892", "0.61829984", "0.6071475", "0.60710394", "0.6070987", "0.6025375", "0.6015835", "0.5984562", "0.5954265", "0.5895176", "0.5889674", "0.57737106", "0.5726309", "0.5718746...
0.0
-1
Cleans: "dist" folder, cache
function cleanDist(done) { del.sync(['dist/*']); cache.clearAll(); done(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanDist() {\n return del(['target/dist']);\n}", "function cleanDist() {\n return del(['target/dist']);\n}", "function clean_dist() {\n $.util.log($.util.colors.grey(\"Cleaning out the production folder...\\n\"));\n return del(['dist/*/**', 'dist/index.html']);\n}", "function clean(){\n ...
[ "0.8508894", "0.8508894", "0.8404799", "0.8199423", "0.8139683", "0.8095563", "0.80572355", "0.8004863", "0.7986928", "0.79461867", "0.79330266", "0.793295", "0.793295", "0.79306525", "0.7865714", "0.77118117", "0.76590294", "0.76407737", "0.76339686", "0.7629882", "0.7620782...
0.7986934
8
each click for selecting a code color (setter)
function selectCodeColor(color) { console.log(color); const div = document.createElement("div"); div.classList.add("code-selection-item"); div.classList.add(color); this.codeInnerBoard.append(div); // make color visible on current selection currentSelectionSelector.appendChild(div); c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorPick(colorCode) {\n currentColor = colorCode;\n}", "onColorClick (event) {\n let pos = getDOMOffset(this.colorPicker);\n pos.x += 30;\n pos.y = editor.heightAtLine(this.line) - 15;\n\n this.picker = new ColorPicker(this.colorPicker.style.backgroundColor);\n\n t...
[ "0.74182314", "0.70562834", "0.70415044", "0.7009897", "0.69724584", "0.6893142", "0.6881647", "0.67783767", "0.6770487", "0.6759455", "0.67393196", "0.6738248", "0.67280513", "0.67165637", "0.66870815", "0.6668206", "0.66023123", "0.6593655", "0.6570751", "0.6564881", "0.656...
0.6831985
7
each click for selecting a hint
function selectHint(hintType) { console.log(hintType); const div = document.createElement("div"); div.classList.add("hint-selection"); div.classList.add(hintType); currentSelectionSelector.appendChild(div); currentHints.push(hintType); if (currentHints.length === 4) { hintColor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onClick() {\n\t\tshowAllSuggestions();\n\t\tsetSelectionToCurrentValue();\n\t}", "function listenForHintClick() {\r\n\t\t$(\"#hint\").click(function(){\r\n\t\t\tdocument.getElementById(\"hint\").setAttribute(\"disabled\", \"disabled\");\r\n\t\t\tif (difficultyLevel == \"easy\") {\r\n\t\t\t\tdisableChars...
[ "0.68997693", "0.68701065", "0.6481286", "0.6338999", "0.6323034", "0.60938406", "0.6089309", "0.6044989", "0.60204184", "0.59951866", "0.5977958", "0.5927926", "0.59246963", "0.5914539", "0.59032327", "0.5890645", "0.5871499", "0.58708227", "0.58520496", "0.5841211", "0.5809...
0.58426064
19
check btn, setter version
function checkHints() { const correctHintsGiven = examineHintsAndCode(); if (!correctHintsGiven) { alert("Wrong hints given, try again."); hintColorSelector.forEach(h => { h.classList.remove("inactive"); }); currentHints.length = 0; currentSelectionSelector.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkButton()\n {\n if(this.imeModel==\"\" || this.emailModel==\"\" || this.telefonModel==\"\")\n {\n this.butShow=false;\n }\n else\n {\n this.butShow=true;\n }\n }...
[ "0.7167014", "0.6561197", "0.6546341", "0.64351004", "0.6416842", "0.6388758", "0.6160263", "0.61228335", "0.6103652", "0.60489655", "0.6044599", "0.6032803", "0.60228205", "0.60153747", "0.596442", "0.5956104", "0.59420776", "0.5925829", "0.592525", "0.59216076", "0.5912401"...
0.0
-1
return true iff given hints (current hints) are correct
function examineHintsAndCode() { const realHints = getHints(); let fullInHints = 0; let halfInHints = 0; let fullInRealHints = 0; let halfInRealHints = 0; for (let i = 0; i < currentHints.length; i++) { if (currentHints[i] === "half") halfInHints++; if (currentHints[i] === "ful...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasHint (hints) {\n\tfor (var i in hints) {\n\t\tif (hints[i]) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function checkGoal()\n{\n\tvar goal1 = (block1Index[0] == block1Goal[0] && block1Index[1] == block1Goal[1]);\n\tvar goal2 = (block2Index[0] == block2Goal[0] && block2Index[1] == block2...
[ "0.7682182", "0.6235405", "0.6083038", "0.6071927", "0.5995759", "0.59510416", "0.5913653", "0.5857542", "0.5852476", "0.5840051", "0.58103967", "0.5805832", "0.5710094", "0.57002985", "0.56973237", "0.56027424", "0.5581326", "0.55750597", "0.5574661", "0.5574661", "0.5561051...
0.7034627
1
Is the string trytes length 81.
static isHash(trytes) { return /^[9A-Z]{81}$/.test(trytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidPuzzleStringLength(str)\n{\n return (str.length === 81);\n}", "isValidLength(puzzleString) {\n return (puzzleString.length === 81);\n }", "function isValidLength()\n{\n var validLength = false;\n if ( numInString.length === 16 )\n {\n validLength = true;\n }\n return validLength;\n...
[ "0.82008106", "0.80902857", "0.72159433", "0.71277565", "0.70621896", "0.6994936", "0.697616", "0.68054765", "0.67972505", "0.67966354", "0.675903", "0.66824466", "0.66542745", "0.6629672", "0.66156495", "0.6596522", "0.65769327", "0.65768266", "0.65686834", "0.65419495", "0....
0.0
-1
Is the string trytes length 27.
static isTag(trytes) { return /^[9A-Z]{27}$/.test(trytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isValidLength(puzzleString) {\n return (puzzleString.length === 81);\n }", "function isValidPuzzleStringLength(str)\n{\n return (str.length === 81);\n}", "function isValidLength()\n{\n var validLength = false;\n if ( numInString.length === 16 )\n {\n validLength = true;\n }\n return validLength;\n...
[ "0.7569379", "0.75555336", "0.7254754", "0.71186435", "0.70128787", "0.68055815", "0.6754439", "0.6694942", "0.66630006", "0.6650987", "0.6633999", "0.6590635", "0.6568428", "0.6566314", "0.6553788", "0.6546863", "0.6536838", "0.64908135", "0.64501226", "0.64482784", "0.64127...
0.0
-1
Is the string trytes of any length.
static isTrytes(trytes) { return /^[9A-Z]+$/.test(trytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringHasLength(str) {\n return isString(str) && str.length > 0;\n}", "function isAString(string){\n if(typeof string === \"string\" & string.length >= 8){\n return true;\n }\n else {\n return false;\n }\n}", "function checkLength(text) {\n\tif (text.length < 8) {\n\t\tret...
[ "0.77884716", "0.7200303", "0.694999", "0.6810172", "0.68060595", "0.67882365", "0.67699206", "0.6689032", "0.6667264", "0.6667264", "0.6667264", "0.6667264", "0.6667264", "0.6667264", "0.6667264", "0.6667264", "0.663255", "0.66295564", "0.6625089", "0.66197795", "0.65806186"...
0.0
-1
Create a trits array from trytes.
static toTrits(value) { const trits = new Int8Array(value.length * 3); for (let i = 0; i < value.length; i++) { const idx = TrytesHelper.ALPHABET.indexOf(value.charAt(i)); trits[i * 3] = TrytesHelper.TRYTES_TRITS[idx][0]; trits[(i * 3) + 1] = TrytesHelper.TRYTES_TRITS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fromTrits(trits) {\n let trytes = \"\";\n for (let i = 0; i < trits.length; i += 3) {\n // Iterate over all possible tryte values to find correct trit representation\n for (let j = 0; j < TrytesHelper.ALPHABET.length; j++) {\n if (TrytesHelper.TRYTES_TRITS[...
[ "0.64936715", "0.59654146", "0.5820442", "0.56701195", "0.5540392", "0.55187094", "0.55149335", "0.5484661", "0.5457103", "0.53286976", "0.5275953", "0.5242093", "0.51750344", "0.5173847", "0.51536375", "0.51399106", "0.512207", "0.51203924", "0.50740373", "0.5042938", "0.503...
0.72565037
0
Get trytes from trits array.
static fromTrits(trits) { let trytes = ""; for (let i = 0; i < trits.length; i += 3) { // Iterate over all possible tryte values to find correct trit representation for (let j = 0; j < TrytesHelper.ALPHABET.length; j++) { if (TrytesHelper.TRYTES_TRITS[j][0] === tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static toTrits(value) {\n const trits = new Int8Array(value.length * 3);\n for (let i = 0; i < value.length; i++) {\n const idx = TrytesHelper.ALPHABET.indexOf(value.charAt(i));\n trits[i * 3] = TrytesHelper.TRYTES_TRITS[idx][0];\n trits[(i * 3) + 1] = TrytesHelper.TR...
[ "0.6644181", "0.5693761", "0.54829425", "0.54226094", "0.5328266", "0.5254292", "0.5174185", "0.51489687", "0.5060267", "0.5023379", "0.4987914", "0.49000654", "0.48833552", "0.48429912", "0.48354617", "0.4833022", "0.48321393", "0.48248473", "0.47547653", "0.4742466", "0.473...
0.66756845
0
Convert trits to an integer.
static tritsValue(trits) { let value = 0; for (let i = trits.length - 1; i >= 0; i--) { value = (value * 3) + trits[i]; } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toInt(val){\n\t // we do not use lang/toNumber because of perf and also because it\n\t // doesn't break the functionality\n\t return ~~val;\n\t }", "function termsToInts(terms) {\n for(var i in terms) {\n terms[i] = parseInt(terms[i].replace(/[A-Z]+:0*/, \"\"));\n }\...
[ "0.6467356", "0.624471", "0.61379457", "0.5918492", "0.59025276", "0.58363205", "0.5821711", "0.5813184", "0.5794233", "0.5791293", "0.5780492", "0.5753898", "0.57493883", "0.57440263", "0.5715488", "0.57012546", "0.56996626", "0.5673874", "0.5673874", "0.56680506", "0.566768...
0.62994367
1
Convert a string value into trytes.
static fromAscii(value) { let trytes = ""; for (let i = 0; i < value.length; i++) { const asciiValue = value.charCodeAt(i); const firstValue = asciiValue % 27; const secondValue = (asciiValue - firstValue) / 27; trytes += TrytesHelper.ALPHABET[firstValue] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static stringToTrytes(str) {\n const encoded = TextHelper.encodeNonASCII(str);\n return encoded ? TrytesHelper.fromAscii(encoded) : \"\";\n }", "function tryConvert(value, tUnit){\n\tvar tryNumber = Number(value);\n\tif(isNaN(tryNumber)){\n\t\t//This is a !!!NOT!!! a valid number we can work wit...
[ "0.62298393", "0.5838278", "0.5784118", "0.5753696", "0.5673119", "0.55328625", "0.5516015", "0.5500077", "0.54602534", "0.5456468", "0.54466194", "0.5362593", "0.53490084", "0.5330149", "0.5310798", "0.5310737", "0.5301908", "0.52953917", "0.52947503", "0.52693564", "0.52670...
0.4847153
70
Convert trytes into a string value.
static toAscii(trytes) { const trytesString = trytes; if (trytesString.length % 2 === 1) { throw new Error("The trytes length must be an even number"); } let ascii = ""; for (let i = 0; i < trytesString.length; i += 2) { const firstValue = TrytesHelper.ALP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static stringFromTrytes(trytes) {\n // Trim trailing 9s\n let trimmed = trytes.replace(/\\9+$/, \"\");\n // And make sure it is even length (2 trytes per ascii char)\n if (trimmed.length % 2 === 1) {\n trimmed += \"9\";\n }\n const ascii = TrytesHelper.toAscii(t...
[ "0.6293191", "0.609871", "0.59341073", "0.59341073", "0.59341073", "0.59341073", "0.59341073", "0.59341073", "0.59341073", "0.59341073", "0.5892704", "0.5874412", "0.58598304", "0.5851546", "0.58355784", "0.58355784", "0.58355784", "0.58355784", "0.58355784", "0.58355784", "0...
0.0
-1
Convert an object to Trytes.
static objectToTrytes(obj) { const json = JSON.stringify(obj); const encoded = TextHelper.encodeNonASCII(json); return encoded ? TrytesHelper.fromAscii(encoded) : ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static objectFromTrytes(trytes) {\n if (typeof (trytes) !== \"string\") {\n throw new TypeError(\"fromTrytes can only convert strings\");\n }\n // Trim trailing 9s\n const trimmed = trytes.replace(/\\9+$/, \"\");\n if (trimmed.length === 0) {\n throw new Err...
[ "0.64362705", "0.56534714", "0.5624258", "0.55773777", "0.5575906", "0.5397345", "0.5385264", "0.53769344", "0.5269874", "0.52356446", "0.52226955", "0.5161595", "0.5109556", "0.5106686", "0.5083051", "0.50811887", "0.506996", "0.5054868", "0.50454915", "0.5036745", "0.502928...
0.72488993
0
Convert an object from Trytes.
static objectFromTrytes(trytes) { if (typeof (trytes) !== "string") { throw new TypeError("fromTrytes can only convert strings"); } // Trim trailing 9s const trimmed = trytes.replace(/\9+$/, ""); if (trimmed.length === 0) { throw new Error("fromTrytes tryt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static objectToTrytes(obj) {\n const json = JSON.stringify(obj);\n const encoded = TextHelper.encodeNonASCII(json);\n return encoded ? TrytesHelper.fromAscii(encoded) : \"\";\n }", "static convertToUserObject(obj) {\n return new User(obj[\"Gender\"], obj[\"HeightCm\"], obj[\"Weight...
[ "0.6567426", "0.59752816", "0.5956088", "0.58760566", "0.5843455", "0.5768976", "0.57285887", "0.5699939", "0.56928265", "0.5609585", "0.56072444", "0.55960923", "0.5554434", "0.5469647", "0.54664844", "0.54198277", "0.54175997", "0.54126203", "0.54126203", "0.5402608", "0.53...
0.7327166
0
Convert a string to Trytes.
static stringToTrytes(str) { const encoded = TextHelper.encodeNonASCII(str); return encoded ? TrytesHelper.fromAscii(encoded) : ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static stringFromTrytes(trytes) {\n // Trim trailing 9s\n let trimmed = trytes.replace(/\\9+$/, \"\");\n // And make sure it is even length (2 trytes per ascii char)\n if (trimmed.length % 2 === 1) {\n trimmed += \"9\";\n }\n const ascii = TrytesHelper.toAscii(t...
[ "0.61041635", "0.585691", "0.56263816", "0.549703", "0.5366533", "0.53483546", "0.53302425", "0.5319685", "0.5286127", "0.52678216", "0.5197348", "0.51744443", "0.51744443", "0.5166351", "0.5031094", "0.50156665", "0.50073576", "0.49864316", "0.49450734", "0.49247748", "0.490...
0.7023796
0
Convert a string from Trytes.
static stringFromTrytes(trytes) { // Trim trailing 9s let trimmed = trytes.replace(/\9+$/, ""); // And make sure it is even length (2 trytes per ascii char) if (trimmed.length % 2 === 1) { trimmed += "9"; } const ascii = TrytesHelper.toAscii(trimmed); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static stringToTrytes(str) {\n const encoded = TextHelper.encodeNonASCII(str);\n return encoded ? TrytesHelper.fromAscii(encoded) : \"\";\n }", "function convert(str){\n return str;\n}", "function coerce (str) {\n try {\n return JSON.parse(str)\n } catch (e) {\n return str\n }\n}",...
[ "0.7501122", "0.6943783", "0.64002836", "0.6275087", "0.5997178", "0.5992103", "0.5897909", "0.5894704", "0.5863965", "0.5856365", "0.58176816", "0.5733705", "0.571639", "0.5563628", "0.5552599", "0.54941475", "0.5491516", "0.54898494", "0.5486269", "0.5475119", "0.5475119", ...
0.6880116
2
Pack trytes into bytes.
static packTrytes(trytes) { const trytesBits = []; for (const tryte of trytes) { trytesBits.push(TrytesHelper .ALPHABET .indexOf(tryte) .toString(2) .padStart(5, "0")); } let allBits = trytesBits.join(""); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "encodeAsBinary(obj) {\n const deconstruction = binary_1.deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n\n return buffers; // write all the buffers\n }...
[ "0.56534636", "0.5605469", "0.5583371", "0.558166", "0.5568217", "0.555306", "0.55430585", "0.54927486", "0.5477515", "0.5426732", "0.5320077", "0.52508295", "0.5212543", "0.51167244", "0.49226207", "0.48526952", "0.48353463", "0.48353463", "0.48353463", "0.48353463", "0.4835...
0.72818375
0
Unpack bytes into trytes.
static unpackTrytes(packed) { const allBits = Converter.bytesToBinary(packed); const trytes = []; for (let i = 0; i < allBits.length; i += 5) { const charBits = allBits.slice(i, i + 5); if (charBits.length < 5 || charBits === "111111") { break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unpackBytes(packed) {\r\n var result = new Array();\r\n for (var j = 0; j < packed[0].length; j++) {\r\n result[result.length] = packed[0][j];\r\n result[result.length] = packed[1][j];\r\n result[result.length] = packed[2][j];\r\n result[result.length] = packed[3][j];\r\n...
[ "0.591868", "0.5693436", "0.5693436", "0.5623769", "0.561803", "0.5510061", "0.5417284", "0.54125845", "0.54125845", "0.5305431", "0.5278607", "0.5250264", "0.52134854", "0.5168097", "0.51653486", "0.51653486", "0.51653486", "0.51653486", "0.51653486", "0.51653486", "0.514745...
0.6069342
0
Returns an object that can be retrieved when package is activated
serialize() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function packageObject() {\n\tvar type = \"\";\n\tswitch (currentExport._type) {\n\t\tcase \"completeAggregate\":\n\t\t\ttype = \"AGGREGATE\";\n\t\t\tbreak;\n\t\tcase \"custom\":\n\t\t\ttype = \"CUSTOM\";\n\t\t\tbreak;\n\t\tcase \"dashboardAggregate\":\n\t\t\ttype = \"DASHBOARD\";\n\t\t\tbreak;\n\t\tcase \"tracker...
[ "0.6097995", "0.586488", "0.5604242", "0.55675286", "0.5532283", "0.54686093", "0.54481316", "0.53096503", "0.5279696", "0.5265718", "0.5254097", "0.5209936", "0.5202466", "0.51952755", "0.517815", "0.5141616", "0.5129789", "0.5122461", "0.51168144", "0.5115264", "0.51127154"...
0.0
-1
Tear down any state and detach
destroy() { this.element.remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function destroy() {\n var keys = Object.keys(state);\n for (var i = 0; i < keys.length; i++) {\n state[keys[i]] = undefined;\n }\n for (var _i4 = 0; _i4 < listeners.length; _i4++) {\n listeners[_i4] = undefined;\n }\n }", "unload () {\n this.#timers.off()\n this.#display.off()\n ...
[ "0.74209", "0.7239787", "0.7175902", "0.71646506", "0.7070273", "0.7029382", "0.69396776", "0.69261146", "0.68722874", "0.6868177", "0.68072116", "0.67815065", "0.67429405", "0.6732776", "0.6724871", "0.67080885", "0.6699586", "0.6697714", "0.6681155", "0.6677289", "0.6648941...
0.0
-1
Helpers const lightHelper = new THREE.PointLightHelper(pointLight); const gridHelper = new THREE.GridHelper(200, 50); scene.add(lightHelper, gridHelper); const controls = new OrbitControls(camera, renderer.domElement);
function addStar() { const geometry = new THREE.SphereGeometry(0.25, 24, 24); const material = new THREE.MeshStandardMaterial({ color: 0xffffff }); const star = new THREE.Mesh(geometry, material); const [x, y, z] = Array(3) .fill() .map(() => THREE.MathUtils.randFloatSpread(100)); star.position.set(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n scene = new THREE.Scene();\n\n gridHelper = new THREE.GridHelper(10, 10);\n scene.add(gridHelper);\n\n axisHelper = new THREE.AxisHelper(10);\n scene.add(axisHelper);\n\n camera = new THREE.PerspectiveCamera(VIEW_ANGLE, ASPECT, NEAR, FAR);\n camera.position.set(15, 10, 15);\n // camera....
[ "0.77184176", "0.75935304", "0.757593", "0.75514656", "0.7492367", "0.74832153", "0.7468182", "0.74153984", "0.74059105", "0.7400812", "0.73873395", "0.7361028", "0.7328964", "0.7295874", "0.7284576", "0.7268358", "0.72627115", "0.7242624", "0.72265077", "0.7218793", "0.71889...
0.0
-1
function to play and pause video
playPauseVideo() { if (this.state.showPlay) { this.refs.video.play(); this.setState({ showPlay: false }) } else { this.refs.video.pause(); this.setState({ showPlay: true }) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playPauseVideo() {\n // Check if video is paused or playing\n if ( video.paused ) {\n // if video is paused, play the video\n video.play();\n } else {\n // if video is playing, pause the video\n video.pause();\n }\n\n}", "function videoPause() {\n video.pause()...
[ "0.8308945", "0.8128393", "0.8128393", "0.79416233", "0.78657705", "0.7817365", "0.7814147", "0.77767706", "0.7718794", "0.77059835", "0.7670685", "0.76363695", "0.7628747", "0.76173115", "0.75680774", "0.7552179", "0.7552179", "0.7552179", "0.7552179", "0.7552179", "0.754375...
0.7643927
11
console.log(appId, cityName, cityId, countryCode);
function forecastPromise(){ return new Promise( function (resolve,reject){ let inquiry = new XMLHttpRequest(); //inquiry.open ('GET', "http://api.openweathermap.org/data/2.5/weather?q="+cityName+","+countryCode+"&APPID="+appId+"&units=metric", true); inquiry.open ('GET', "htt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logPlanets() \n{\n console.log('Here is the list of planets:');\n console.log(planets);\n}", "function home(city, state) {\n\t\n\tconsole.log(\"I am from \" + city + ' ' + state);\n}", "debug() {\n console.log(this.get_all().map(x => `${x}`).join(\"; \"));\n }", "static print() {\n ...
[ "0.61679256", "0.61290556", "0.6112486", "0.6020591", "0.58870476", "0.5868962", "0.58575714", "0.5823668", "0.58210903", "0.58153564", "0.5775003", "0.5773389", "0.577263", "0.57690996", "0.57690996", "0.57690996", "0.57690996", "0.5756392", "0.574169", "0.5735625", "0.57330...
0.0
-1
Function to open popup
function openPopup() { "use strict"; popup.style.display = "block"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function popup(){\r\n\talert(\"You opened a popup!\")\r\n\t}", "function popup (url) {\n fenster = window.open(url, \"Diese Seite Teilen\", \"width=500,height=350,resizable=yes\");\n fenster.focus();\n return false;\n}", "function basicPopup(url) {\r\npopupWindow = window.open(url,'popUpWindow','heigh...
[ "0.7750538", "0.76349217", "0.75273937", "0.7465126", "0.7425376", "0.7422166", "0.7369008", "0.73524827", "0.73186284", "0.7293209", "0.725956", "0.72358364", "0.72065246", "0.7205949", "0.7203367", "0.7196211", "0.7190421", "0.71472263", "0.71470624", "0.7135208", "0.712358...
0.7281841
10
Function to close popup
function closePopup() { "use strict"; popup.style.display = "none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n this._showPopup = false;\n }", "function close_popup() {\n\twindow.close();\n}", "function closePopup() {\n\tpopup.style.display = \"none\";\n}", "function closePopup() {\n\twindow.close();\n}", "function Cancelpopup()\n{\n\twindow.close();\n}", "function closePopup() {\n $moda...
[ "0.83654416", "0.8310154", "0.82591146", "0.8169729", "0.8140002", "0.8030266", "0.80128765", "0.79581875", "0.79500836", "0.7886311", "0.7871473", "0.78575397", "0.78358155", "0.78073406", "0.77863127", "0.7768082", "0.7618688", "0.7615341", "0.7603647", "0.75955623", "0.758...
0.79901916
7
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.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095" ]
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
Convert Stringformatted options into Objectformatted ones and store in cache
function createOptions( options ) { var object = optionsCache[ options ] = {}; jQuery.each( options.match( 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.65983355", "0.6588602", "0.65088433", "0.64988786", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.6476238", "0.647308", "0.6450778", "0.64444906", "0.6403399", "0.6280776", ...
0.0
-1
Cleanup method for dom ready events
function detach() { if ( document.addEventListener ) { document.removeEventListener( "DOMContentLoaded", completed, false ); window.removeEventListener( "load", completed, false ); } else { document.detachEvent( "onreadystatechange", completed ); window.detachEvent( "onload", completed ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"load\",completed);jQuery.ready();}// Catch cases where $(document).ready() is called", "function completed(){document.removeEventListener(\"DOMContentLoaded\",completed);window.removeEventListener(\"loa...
[ "0.76165706", "0.76165706", "0.76165706", "0.76165706", "0.7559291", "0.7559291", "0.7508524", "0.7364877", "0.73230135", "0.73230135", "0.73230135", "0.73230135", "0.73230135", "0.73230135", "0.73230135", "0.73230135", "0.7263893", "0.7263893", "0.7263893", "0.7263893", "0.7...
0.0
-1
The ready event handler and self cleanup method
function completed() { // readyState === "complete" is good enough for us to call the dom ready in oldIE if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { detach(); jQuery.ready(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readyCallBack() {\n}", "static ready() { }", "onReady() {}", "ready() {\r\n\t\tsuper.ready();\r\n\t}", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\...
[ "0.72463065", "0.7211212", "0.7172562", "0.7149137", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.7042607", "0.7042607", "0.7042607", "0.7042607", "0....
0.0
-1
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.70517987", "0.70517987", "0.6629567", "0.6556332", "0.6533182", "0.64966077", "0.64923435", "0.64923435", "0.64923435", "0.6364117", "0.6348747", "0.62630934", "0.6232238", "0.61704683", "0.61589825", "0.61395884", "0.6134505", "0.6134505", "0.61306685", "0.61306685", "0.6...
0.0
-1
Used in buildFragment, fixes the defaultChecked property
function fixDefaultChecked( elem ) { if ( 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.80656034", "0.80656034", "0.80656034", "0.80656034", "0.80656034", "0.80656034", "0.80656034", "0.80656034", "0.80656034", "0.80...
0.7996019
92
Support: IE<8 Manipulating tables requires a tbody
function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && jQuery.nodeName( content.nodeType !== 11 ? 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.7501409", "0.74235845", "0.71012956", "0.7088856", "0.6881842", "0.681869", "0.6817269", "0.6817269", "0.6807573", "0.67780167", "0.67652106", "0.6745558", "0.6745558", "0.6683416", "0.6683416", "0.66757476", "0.6658776", "0.66572535", "0.66502017", "0.66502017", "0.664657...
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.70161474", "0.6984925", "0.6984925", "0.6984925", "0.6984925", "0.6984925", "0.6984925", "0.6984925", "0.6984925", "0.6984925", "0.6984925", "0.6941539", "0.69368035", "0.68992126", "0.6887862", "0.6887862", "0.6887862", "0.68861306", "0.68847114", "0.68824273", "0.6873957...
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.5987435", "0.5798831", "0.5772783", "0.57142234", "0.5673525", "0.56659687", "0.5592892", "0.5492997", "0.5467838", "0.53731847", "0.5336245", "0.5309647", "0.5303123", "0.52803385", "0.52720535", "0.52717704", "0.52695596", "0.52677536", "0.52672625", "0.52672625", "0.525...
0.0
-1
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.81199294", "0.81199294", "0.78175336", "0.78175336", "0.78175336", "0.78175336", "0.78175336", "0.78175336", "0.78175336", "0.78175336", "0.7741535", "0.77281314", "0.76649904", "0.76344436", "0.76290935", "0.7543812", "0.7490448", "0.74820906", "0.7476511", "0.74624354", ...
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.72297084", "0.7172655", "0.6751781", "0.6701827", "0.66490537", "0.6644208", "0.66413045", "0.65767395", "0.6515558", "0.64943016", "0.64906734", "0.6407048", "0.6392758", "0.6383256", "0.63779354", "0.6373179", "0.63684577", "0.6353303", "0.63494754", "0.6331653", "0.6321...
0.0
-1
Generate parameters to create a standard animation
function genFx( type, includeWidth ) { var which, 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 ) { whic...
{ "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
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.6271232", "0.62278324", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.607385", "0.60586876", "0.60586876", "0.6036968", "0.601241", "0.601241", "0.601241", "0.601241", "0.601241", "0.6...
0.0
-1
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.766761", "0.7610888", "0.7566639", "0.7566639", "0.7566639", "0.7566639", "0.7566639", "0.7566639", "0.7547469", "0.7547469", "0.75272965", "0.74552345", "0.73182935", "0.7312161", "0.7292023", "0.7291235", "0.7256261", "0.7242029", "0.7240754", "0.7240754", "0.7226047", ...
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 || ...
{ "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.7850089", "0.783792", "0.783792", "0.7776847", "0.77623504", "0.77577513", "0.7719322", "0.7716072", "0.76733786", "0.7630334", "0.7614668", "0.7604933", "0.76007", "0.7599817", "0.7597701", "0.7597701", "0.7597701", "0.7597701", "0.7597701", "0.7597701", "0.7597701", "0...
0.0
-1
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.62716246", "0.62648493", "0.62052524", "0.6195548", "0.619494", "0.61795634", "0.61795634", "0.61767954", "0.61534816", "0.6096223", "0.60912085", "0.60880023", "0.60880023", "0.60880023", "0.60880023", "0.60880023", "0.6075834", "0.6075834", "0.6075834", "0.6050951", "0.6...
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.7607877", "0.73473793", "0.73289984", "0.7317956", "0.7304225", "0.72417575", "0.7235767", "0.69856775", "0.68565404", "0.6855536", "0.6845145", "0.6817738", "0.6773241", "0.6773241", "0.6773241", "0.6773241", "0.677228", "0.67654777", "0.67654777", "0.6763289", "0.6711056...
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
Gets a window from an element
function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWindow(elem) {\n return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n }", "function getWindow(elem) {\n return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;\n }", "getWindow(editor) {\n var window = EDITOR_TO...
[ "0.6866738", "0.683033", "0.68162566", "0.68095726", "0.67838144", "0.67838144", "0.6768642", "0.675673", "0.675673", "0.675673", "0.675673", "0.67387426", "0.66907203", "0.6682642", "0.66686505", "0.6648396", "0.6642138", "0.6642138", "0.6642138", "0.6642138", "0.6642138", ...
0.0
-1
If there is no license, return an empty string
function renderLicenseBadge(license) { if(license == "MIT") { return `[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)` }else if(license == "IBM") { return `[![License: IPL 1.0](https://img.shields.io/badge/License-IPL%201.0-blue.svg)](https://opensour...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderLicenseSection(license) {\n if (license === \"No License\") {\n return \"\";\n }\n}", "function renderLicenseSection(license) {\n if (license === \"No License\") {\n return '';\n }\n return`\n ${license}\n `\n }", "function renderLicenseSection(license) {\n if (license =...
[ "0.79780984", "0.7420088", "0.7409821", "0.7368981", "0.73630404", "0.7360713", "0.7347794", "0.73095804", "0.73028255", "0.7270648", "0.72688854", "0.72641104", "0.72291195", "0.7145436", "0.71392155", "0.71347904", "0.7120692", "0.71194", "0.7112502", "0.7112415", "0.711131...
0.0
-1
Function to put Installer question into a string
function genInstaller(require){ if (true){ return '>'+require; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testInstaller(test){\n if (true){\n return '>'+test; \n }\n}", "function create_question_str(detail, path) {\n let def = ''\n if (detail.def) {\n def = ' (' + detail.def + ') '\n }\n \n if (detail.input_type == 'option') {\n def = ' (' + Object.keys(detail.options).join...
[ "0.6098104", "0.59388274", "0.5658826", "0.5496593", "0.529732", "0.52847236", "0.5252801", "0.5199685", "0.51246643", "0.5120072", "0.5118592", "0.5112317", "0.5062141", "0.5061681", "0.5029935", "0.50238264", "0.5022281", "0.50042874", "0.5001754", "0.50001943", "0.49919984...
0.5632089
3
Function to display Test section into a string
function testInstaller(test){ if (true){ return '>'+test; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formattedTestCase(test) {\n const formattedTest = {\n $: {\n classname: test.describeLabel,\n name: test.description,\n time: test.time\n }\n }\n\n // If the test failed, add a failure XML element.\n if (test.errorMessage) { formattedTest.failure = formattedTestError(test) }\n re...
[ "0.6338122", "0.62880605", "0.6132139", "0.6116079", "0.6091702", "0.6050617", "0.5987404", "0.59111464", "0.590161", "0.5897169", "0.58651274", "0.58554333", "0.58219665", "0.5791861", "0.57846", "0.5763551", "0.5739808", "0.569696", "0.56895113", "0.5688371", "0.5665008", ...
0.5724041
17
Function to put people you want to Credit into a github link
function giveCredit(creditNames){ if (creditNames==true){ return "https://github.com/"+creditNames; }else{ return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createGithubURL(data) {\n var url = 'not found...';\n if (data['user'] != '' && data['repo'] != '') {\n url = \"https://github.com/\" + data['user'] + \"/\" + data['repo'] \n url += \"/blob/master/\" + createGithubPath(data);\n } else if (data['name'] != '') {\n ...
[ "0.64749265", "0.64233", "0.64233", "0.6355876", "0.63044304", "0.6243344", "0.61845106", "0.61240333", "0.60751945", "0.60195994", "0.5950688", "0.59416556", "0.59215087", "0.590243", "0.58936787", "0.5870146", "0.5789636", "0.5766195", "0.57460475", "0.5718581", "0.57067776...
0.77601707
0
TODO: Create a function to generate markdown for README
function generateMarkdown(data) { let licenseString = renderLicenseBadge(data.license) let installerString = genInstaller(data.require) let contributeString = giveCredit(data.contributeName) let testString= testInstaller(data.test) return `# ${data.title} ## License ${licenseString} ## Table of Contents ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateMarkdown({ title, description, installation, usage, contributing, tests, license, email, github }) {\n return `\n## ${title}\n\n## Description\n\n${description}\n\n\n${renderLicenseBadge(license)}\n\n## Table of Contents\n1. [Description](#description)\n2. [Installation](#installation)\n3. [Usa...
[ "0.8411209", "0.8311551", "0.82650626", "0.80591756", "0.8039517", "0.80377734", "0.7997847", "0.79814047", "0.7979699", "0.797878", "0.79749024", "0.79652435", "0.79647464", "0.796421", "0.79359895", "0.79306734", "0.79305935", "0.7926566", "0.79264593", "0.7921531", "0.7917...
0.7791347
46
Render any loading content that you like here
render() { return ( <View> <ActivityIndicator /> <StatusBar barStyle="default" /> </View> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderLoader() {\n $('.schedule-page__content', scheduled.$el).empty().html(scheduled.template.loadingTemplate());\n }", "_render() {\n const loaderInner = htmlHelper.createDivWithClass('');\n this.loader.appendChild(loaderInner);\n }", "render(){\n return (this.data.dataLoaded) ? ...
[ "0.7975903", "0.73663944", "0.7241082", "0.72083676", "0.71457154", "0.7106039", "0.70048237", "0.6981044", "0.6978636", "0.6968844", "0.6960897", "0.69382685", "0.6931847", "0.68998164", "0.6886192", "0.68804353", "0.6869426", "0.68350995", "0.68350995", "0.68350995", "0.683...
0.0
-1
Sandbox functions, interactively testing our notify utility
function Msg(modal) { closeSideBar(); notify({ msg: 'Msg by itself.\nExpecting a default OK', modal, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "desktopNotification(title, message) {\n const notifier = require('node-notifier');\n const path = require('path');\n notifier.notify(\n {\n title: title,\n message: message,\n icon: path.join(__dirname, '../public/logo/logo.png'), // Abso...
[ "0.6238375", "0.6058605", "0.6051613", "0.6008773", "0.59813774", "0.5967111", "0.5956809", "0.59342945", "0.5820522", "0.5812443", "0.57138187", "0.5709084", "0.5702354", "0.5690239", "0.5686132", "0.5677337", "0.56655073", "0.56638485", "0.5631744", "0.5558173", "0.5511791"...
0.0
-1
var id7 = document.getElementById("fd_1");
function validate() { if (id1.value == "" || id2.value == "" || id3.value == "" || id4.value == "" || id5.value == "" || id6.value == "") { alert("all feilds are mandatory_feilds cannot be empty"); return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function id(id){return d.getElementById(id)}", "function ElemId(id){\n\treturn document.getElementById(id);\n}", "function forid_1(id) {\n return document.getElementById(id);\n}", "function e(id) {\n return document.getElementById(id);\n}", "function gId(id) {\n return document.getElementById(id)\n}",...
[ "0.6709355", "0.6666882", "0.65643287", "0.6476068", "0.6475712", "0.6472229", "0.646854", "0.6428865", "0.6410807", "0.6410807", "0.6410542", "0.63963866", "0.63938624", "0.63669467", "0.6347889", "0.6314049", "0.62758344", "0.62749046", "0.6274553", "0.6239257", "0.62272906...
0.0
-1