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
Display demographic info from JSON metadata
function demographicInfo(sampleId){ var metadataInfo = d3.select("#sample-metadata"); d3.json("data/samples.json").then((incomingData) => { metadataInfo.html(""); var metadataVar = incomingData.metadata; console.log(metadataVar); //filtering data with ID chosen by the user var itemsList = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sampleMetaData(value){\n url = \"/metadata/\";\n Plotly.d3.json(url + value, (error, data) => {\n if (error) return console.warn(error);\n $cardText = Plotly.d3.select('#sample-metadata');\n $cardText.html('');\n Object.keys(data).forEach((key) => {\n $cardText\n ...
[ "0.7352095", "0.73417807", "0.7277301", "0.71999466", "0.71886367", "0.7171232", "0.7162792", "0.7153268", "0.715262", "0.70248187", "0.7005684", "0.69514644", "0.69173986", "0.68637663", "0.6855104", "0.68427765", "0.6839695", "0.6837385", "0.68088305", "0.6773677", "0.67724...
0.6498157
33
Initiate the webpage with the default visualizations
function init(){ var selector = d3.select("#selDataset"); d3.json("data/samples.json").then(incomingData => { var nameId = incomingData.names; //filling the dropdown list of ID's nameId.forEach(id => {selector.append("option").text(id).property("value", id);}); //default ID to generate the gr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeWebpage() {\r\n drawGridLines();\r\n drawGridLines();\r\n initArray();\r\n populateGameGrid(gameGrid);\r\n // Add any necessary functionality you need for the Reach portion below here\r\n }", "function initPage () {\n // Applying styles to a...
[ "0.692247", "0.6729887", "0.67226017", "0.6676069", "0.6632677", "0.66055197", "0.6588383", "0.6580578", "0.6461093", "0.6456474", "0.6442683", "0.64402604", "0.64346385", "0.64128834", "0.64107823", "0.6392999", "0.6390571", "0.63831747", "0.6383004", "0.6370113", "0.6359963...
0.0
-1
From index.html onchange of selDataset
function optionChanged(SubjectID){ demographicInfo(SubjectID); barChart(SubjectID); bubbleChart(SubjectID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function optionChanged(){\r\n var dropdownMenu = d3.select('#selDataset');\r\n var subjectID = dropdownMenu.property('value');\r\n// run the plot data function (which includes the dropdownValue function)\r\n plotData(subjectID);\r\n}", "function optionChanged () {\n id = d3.select('#selDataset').prop...
[ "0.71637946", "0.71618605", "0.7111019", "0.7111019", "0.7102964", "0.70220983", "0.6930491", "0.6880302", "0.68738693", "0.6864434", "0.6852886", "0.6849894", "0.6821627", "0.67366636", "0.67059267", "0.66800827", "0.66518974", "0.6645639", "0.6625451", "0.6608131", "0.66004...
0.0
-1
Advanced challenge Gauge Char
function buildGauge(wfreq) { console.log(wfreq); var level = parseFloat(wfreq) * 20; var degrees = 180 - level; var textlevel = level / 20; var radius = 0.5; var radians = (degrees * Math.PI) / 180; var x = radius * Math.cos(radians); var y = radius * Math.sin(radians); var mainPath = "M -.0 -0....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disarm_cg_insig() {\r\n while (dcgi < dcgs.length) {\r\n var c = dcgs.charAt(dcgi++).toUpperCase();\r\n if ((c >= \"A\") && (c <= \"Z\")) {\r\n //dump(\"c\", c);\r\n return c;\r\n }\r\n }\r\n return \"\";\r\n}", "function lettersToGuess() {\n va...
[ "0.627934", "0.6277242", "0.6172538", "0.61572987", "0.61565423", "0.60607004", "0.598429", "0.5981207", "0.5948695", "0.5948275", "0.59100723", "0.5901065", "0.5886577", "0.5877408", "0.587437", "0.58537275", "0.5852753", "0.58525217", "0.58333933", "0.5819561", "0.58183736"...
0.0
-1
load the main menu
function loadMenu(){ pgame.state.start('menu'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadMenu() {\n var nav = $('.navigation');\n if (nav.html() == \"\" || !nav.hasClass('settings_menu') || nav.hasClass('user_menu')) {\n nav.text('');\n $('.main').ready(function () {\n $http.get($rootScope.contextPath + '/components/settings/settings_menu...
[ "0.7608732", "0.74284774", "0.7232722", "0.7225084", "0.7198799", "0.7092776", "0.7044938", "0.7030987", "0.6989321", "0.6959533", "0.6922993", "0.69172233", "0.6883626", "0.6871499", "0.68668133", "0.68262374", "0.6801431", "0.67479944", "0.6747484", "0.6720265", "0.6705218"...
0.8382835
0
To deal with files longer than the minimap, slowely scroll the minimap as you go up and down and take into account the minimap.session.$scrollTop for your calculations scrolling the editor
function updateScrollOver(event){ var newScrBoxTop = (event.clientY+10) - (scrBoxHeight/2), isUnderTop = ((newScrBoxTop + self.minimap.session.$scrollTop) >= scrollOver.offsetTop), newScrBoxBottom = (event.clientY+10) + (scrBoxHeight/2), isOverBottom = ((newScrBoxBottom + self.minimap.session.$sc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function syncSrcScroll () {\n var resultHtml = $(resultClass),\n scrollTop = resultHtml.scrollTop(),\n textarea = $(srcClass),\n lineHeight = parseFloat(textarea.css('line-height')),\n lines,\n i,\n line;\n\n if (!scrollMap) { scrollMap = buildScrollMap(); }\n\n lines = Object.keys(scrollMap);...
[ "0.6471689", "0.6057487", "0.60402244", "0.5946359", "0.5820106", "0.5816053", "0.5775414", "0.576942", "0.57249874", "0.5717371", "0.5680687", "0.566385", "0.5656268", "0.5654267", "0.5649125", "0.5647867", "0.5627636", "0.56238145", "0.55900973", "0.55503035", "0.5532952", ...
0.5708626
10
Here you can put in the text you want to make it type.
function type() { document.getElementById('screen').innerHTML +=text.charAt(index); index += 1; var t = setTimeout('type()',100); // The time taken for each character here is 100ms. You can change it if you want. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function typeText(text){\n var chars = text.split('');\n chars.forEach(function(char, index){\n $(settings.el).delay(settings.speed).queue(function (next){\n var text = $(this).html() + char;\n $(this).html(text);\n next(...
[ "0.7147511", "0.69886845", "0.69886845", "0.6972693", "0.68526036", "0.6841061", "0.682003", "0.65776974", "0.65669364", "0.65552783", "0.6533473", "0.6510645", "0.6510645", "0.64854515", "0.6403195", "0.6386045", "0.63331556", "0.63029134", "0.6264683", "0.62430984", "0.6215...
0.0
-1
Resets all the local state on this scope
function resetLocalState() { $scope.transactionSent = null; $scope.transactionNeedsApproval = null; clearReturnedTxData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset() {\r\n this.state=this.initial;\r\n this.statesStack.clear();\r\n\r\n }", "reset() {\n this.resetFields();\n this.resetStatus();\n }", "reset() {\r\n this.currentState = this.initalState;\r\n this.clearHistory();\r\n }", "reset(){\n this.enable();\...
[ "0.7494326", "0.73974353", "0.7364746", "0.7307454", "0.72181076", "0.71871376", "0.7110051", "0.7068902", "0.70276034", "0.70210123", "0.69935924", "0.6967193", "0.69577533", "0.69442296", "0.69368047", "0.6935591", "0.69266456", "0.69206697", "0.6905557", "0.6905557", "0.69...
0.746674
1
Triggers otp modal to open if user needs to otp before sending a tx
function openModal(params) { if (!params || !params.type) { throw new Error('Missing modal type'); } var modalInstance = $modal.open({ templateUrl: 'modal/templates/modalcontainer.html', controller: 'ModalController', scope: $scope, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openSendToModal()\n\t{\n\t\tclearSendto();\n\t\t$(\"#sendto\").modal(\"show\");\n\t\t\n\t}", "generateOtp(){\n this.showspinner = true;\n this.generatedOtpValue = Math.floor(Math.random()*1000000);\n \n saveOtp({\n otpNumber: this.generatedOtpValue,\n recor...
[ "0.68997574", "0.63105434", "0.625521", "0.62495005", "0.6211756", "0.60834605", "0.6058182", "0.6006721", "0.6000307", "0.59783703", "0.5905664", "0.5847605", "0.58248264", "0.57819647", "0.5747678", "0.57372344", "0.5729575", "0.5723744", "0.5712608", "0.5702302", "0.570078...
0.0
-1
function which returns a needs unlock error
function otpError() { return $q.reject(UtilityService.ErrorHelper({ status: 401, data: { needsOTP: true, key: null }, message: "Missing otp" })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tryUnlock() {\n const JSCell = {\n blockHash: \"0x48a6c8692765e37fa327cd827b7ec2e30aa66b0f4aea85a0ed7e4db8ef14a6c5\",\n cell: {\n txHash: \"0x94dfb6395434e5d7142aa14c765763d905ec1bc6913d880d7a03865690ada522\",\n index: '0'\n }\n }\n\n const EngineCell = ...
[ "0.63849026", "0.6351125", "0.62299156", "0.59223515", "0.5878366", "0.58180267", "0.58180267", "0.58180267", "0.58180267", "0.58180267", "0.58180267", "0.58180267", "0.58180267", "0.58180267", "0.58086437", "0.575238", "0.5710583", "0.5689586", "0.5677696", "0.5641779", "0.5...
0.0
-1
Fetch a wallet to sync it's balance/data with the latest data from the server based on the user's recent action taken
function syncCurrentWallet() { if (syncCounter >= MAX_WALLET_SYNC_FETCHES) { return; } var params = { bitcoinAddress: $rootScope.wallets.current.data.id }; WalletsAPI.getWallet(params, false).then(function(wallet) { // If the new bala...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function fetchAccountData() {\n // Hide error message\n $(\"#eth-wallet-danger\").hide();\n $(\"#eth-wallet-danger\").text(\"\");\n\n // Get a Web3 instance for the wallet\n const web3 = new Web3(provider);\n\n console.log(\"Web3 instance is\", web3);\n\n // Get connected chain id from E...
[ "0.6660032", "0.6631854", "0.6615793", "0.6583423", "0.657073", "0.6427267", "0.6401395", "0.63983786", "0.6394166", "0.638086", "0.63560534", "0.6325544", "0.6325153", "0.63162255", "0.6277071", "0.624337", "0.6203192", "0.6162223", "0.61570483", "0.6156683", "0.61560416", ...
0.72206116
0
change tag_id to tag names
function handlePostTags(data) { let tagArr = []; for (let i = 0; i < data.length; i++) { tagArr.push(data[i].tag_name); } return tagArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set_tags(self) {\n var tags = [];\n for (var i = 0; i < self.items.length; i++) {\n if (self.items[i]['tags']) {\n var these_tags = self.items[i]['tags'];\n var slugs = these_tags.map(self.slugify);\n tags = tags.concat(these_tags);\n if (self.items[i]['className']) {\...
[ "0.619169", "0.61647934", "0.6133643", "0.6024926", "0.60090107", "0.60002893", "0.59881663", "0.5889364", "0.58690417", "0.5857717", "0.5829866", "0.58055496", "0.58024853", "0.579754", "0.57947767", "0.5757236", "0.5745489", "0.57231486", "0.5705612", "0.5705612", "0.570561...
0.5494101
45
0 is false 1 is true
function getBudget() { budget = parseInt(Math.floor(Math.random() * 15)+15); document.getElementById("budget").disabled = true; document.getElementById("curBudget").innerHTML = "$"+ budget; //document.getElementById("rollBudget").disabled = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trueOrFalse1() {\n\t\t \tconsole.log(eachone[count].option1.truth);\n\t\t \tif (eachone[count].option1.truth == true){\n\t\t \t\tcorrectAnswers++;\n\t\t \t\tguessedIt = true;\n\t\t \t} else {\n\t\t \t\tincorrectAnswers++;\n\t\t \t\tguessedIt = false;\n\t\t \t};\n\t\t}", "function isTrue(boolean){\n r...
[ "0.6946256", "0.6801192", "0.6783927", "0.66684", "0.6621297", "0.6592657", "0.6563788", "0.6560356", "0.65308", "0.65022117", "0.65022117", "0.65022117", "0.65022117", "0.6478607", "0.64704686", "0.6461497", "0.64568436", "0.6401179", "0.6398329", "0.6394248", "0.6375605", ...
0.0
-1
Affichage liste message & user
function usersListRefresh() { $.ajax({ url:"http://localhost/tchat/API/index.php?action=listUsers", type:"GET" }).done(function(response) { //console.log(response); $('#userList ul').empty(); for (var i = 0; i < response.length; i++) { //console.log(i); $('#userList ul').append('<li>' + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showUserMessges (user) {\r\n var list = document.getElementById('message-list');\r\n var user = JSON.parse(localStorage.getItem(user.email));\r\n for (var msg of user.messages) {\r\n let item = document.createElement('li');\r\n if (msg.from === user.email) {\r\n createSen...
[ "0.6978265", "0.6966728", "0.69108284", "0.6882009", "0.6752527", "0.6717182", "0.671635", "0.66754943", "0.6660735", "0.66254634", "0.6580257", "0.6571969", "0.6571284", "0.6486938", "0.64795035", "0.64167166", "0.6413631", "0.64014405", "0.63722277", "0.6367521", "0.6307415...
0.0
-1
Fonction de connection au t'chat du nouvel utilisateur
function userConnect() { $.ajax({ // On définit l'URL appelée url: 'http://localhost/tchat/API/index.php', // On définit la méthode HTTP type: 'GET', // On définit les données qui seront envoyées data: { action: 'userAdd', userNickname: $('#userNickname').val() }, // l'équi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showChat(username) {\r\n\tsocket.emit('newChatter', username);\r\n}", "function connect() {\n console.log(sock);\n\n var user = document.getElementById(\"pseudo\").value.trim();\n if (! user) return;\n document.getElementById(\"radio2\").check = true;\n id = user;\n ...
[ "0.699693", "0.67756325", "0.6755393", "0.66420716", "0.662397", "0.66102284", "0.660765", "0.66032517", "0.65728927", "0.6553588", "0.65514296", "0.6545943", "0.651757", "0.6507488", "0.6501222", "0.6477189", "0.647256", "0.64710164", "0.64645565", "0.644537", "0.64385533", ...
0.60497224
88
import Blog from "./components/Blog/Blog"; import Team from "./components/Team/Team";
function App() { return ( <BrowserRouter> <div className="App"> <Navbarx /> <Route exact path="/" component={Home} /> <Route path="/about" component={About} /> <Route path="/products" component={Products} /> <Route path="/gallery" component={Gallery} /> {/* <...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function App() {\n return (\n <div className=\"App\">\n\n\n<HomePage></HomePage>\n{/* <NewsEvents></NewsEvents> */}\n{/* <ContactFrom></ContactFrom> */}\n\n\n </div>\n );\n}", "function componentName() {\n return (\n <div>\n <BlogList />\n {/* <BlogDetails/> */}\n <...
[ "0.6112332", "0.6043444", "0.5795258", "0.57648414", "0.5762315", "0.5705003", "0.56934285", "0.5665387", "0.56451756", "0.56362164", "0.56143516", "0.55437773", "0.5531811", "0.55315185", "0.5522978", "0.55227834", "0.5517167", "0.5512909", "0.5511386", "0.5495315", "0.54879...
0.5448223
27
all currently selected associations are kept here the main submission function for when
function addMetadataEdits() { $('#meta_textarea').addClass('meta_ajaxwait').removeAttr('id'); $.ajax({ url: arcs.baseURL + "metadataedits/add", type: "post", data: { resource_kid: resource_kid, resource_name: resource_name, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mutate() {\n // Update relationships here\n // Optimising Organisations\n let newOrgs = [];\n for (let org of organisations) {\n const newOrg = this.optimise(org, Organisation, ORGANISATIONS);\n newOrgs.push(newOrg);\n }\n organisations = newOrgs;\n ...
[ "0.5511209", "0.5372658", "0.531038", "0.52924573", "0.51596075", "0.5127055", "0.5123417", "0.51117015", "0.51034164", "0.5090165", "0.5084233", "0.50790113", "0.5073295", "0.5064676", "0.5062036", "0.506079", "0.5054088", "0.50481683", "0.504514", "0.50447446", "0.50376046"...
0.0
-1
load in associator checkboxes based on the current page number
function populateAssociatorCheckboxes(currentPage) { var associatorPreview = { 'excavations' : 'Title', 'archival objects' : 'Name', 'subjects' : 'Resource_Identifier'//go ask kora for this pls }; var populateCheckboxes = "<hr>"; currentPage = currentP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectPagesInList() {\n\n\tif (($(this).children('input')).is(':checked')) {\n\n\t\t$(this).children('input').removeAttr('checked');\n\t\t$(this).removeClass('selected');\n\n\t} else {\n\n\t\t$(this).children('input').attr('checked', 'checked');\n\t\t$(this).addClass('selected');\n\t}\n}", "function pre...
[ "0.6302366", "0.607973", "0.60235935", "0.5897849", "0.5787513", "0.5602354", "0.5587718", "0.5574504", "0.5573683", "0.55676943", "0.5523294", "0.551985", "0.5515246", "0.55046284", "0.54901373", "0.54881644", "0.5463226", "0.5451636", "0.5435843", "0.53943294", "0.53852904"...
0.79220134
0
check if the value was a &nsbp.. that won't save in mysql well.
function checkForNbsp(text){ if(text == "\u00a0"){ text = ''; } return text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isDataSafe(type, value) {\n\n return true;\n }", "function checkFieldNull(field,Strflag)\n{ \n var str = field.value;\n\n if(str == null)//for netscape\n {\n str = field.options[field.selectedIndex].value;\n }\n \n if(str == \"\")\n {\n //alert(\"修改投保单需要选择投保单号\");\n //fiel...
[ "0.53694344", "0.5256359", "0.52243227", "0.52089447", "0.51995593", "0.5182345", "0.51631117", "0.51407635", "0.5136123", "0.5136123", "0.5133355", "0.5130084", "0.5124512", "0.5122446", "0.5107383", "0.51035196", "0.50921404", "0.5075348", "0.5053554", "0.50516665", "0.5051...
0.0
-1
save was clicked. this is just a helper function that is run to grab the data before submit.
function getMetadataForSubmit(){ meta_new_value = ''; if (meta_control_type == 'text') { meta_new_value = checkForNbsp( $("#meta_textarea").val() ); } else if (meta_control_type == 'list') { meta_new_value = checkForNbsp( $("#meta_textarea option:selected").text() ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "save () {\n\n // Validate\n if (this.checkValidity()) {\n\n // Collect input\n this.info.item = this.collectInput();\n\n // Show modal\n this.modal.show();\n }\n }", "function Save(e) {\n\t// saveURL is a switch used to check whether this is a n...
[ "0.7044786", "0.6961385", "0.69376624", "0.69375515", "0.69053787", "0.6905036", "0.68994737", "0.68904287", "0.6866641", "0.68442833", "0.6843944", "0.68310714", "0.68140966", "0.6800253", "0.67923254", "0.6787124", "0.6786178", "0.67747575", "0.6773818", "0.671149", "0.6637...
0.0
-1
Given a latest finalized DBR object, decide whether to import it
function importDBRCheck (finalizedDBR) { let dbrMonth = finalizedDBR.Month.format('MMMM YYYY') return redshift.hasMonth(finalizedDBR.Month).then(function (hasMonth) { if (hasMonth) { log.info(`No new DBRs to import.`) if (args.force) { log.warn(`--force specified, importing DBR for ${dbrMont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stageDBRCheck (finalizedDBR) {\n return dbr.findStagedDBR(finalizedDBR.Month).then(\n function (stagedDBR) {\n let dbrMonth = stagedDBR.Month.format('MMMM YYYY')\n // DBR is staged!\n if (!args.force) {\n // No need to re-stage\n log.warn(`Using existing staged DBR for ${d...
[ "0.56698275", "0.54464036", "0.54464036", "0.53402126", "0.52092147", "0.5175762", "0.51743627", "0.5021658", "0.49325806", "0.48964417", "0.48744404", "0.48551345", "0.48498148", "0.48346767", "0.48335588", "0.48110187", "0.47725433", "0.47594666", "0.47549152", "0.47402713", ...
0.6206688
0
Given a DBR, (optionally) stage it
function stageDBRCheck (finalizedDBR) { return dbr.findStagedDBR(finalizedDBR.Month).then( function (stagedDBR) { let dbrMonth = stagedDBR.Month.format('MMMM YYYY') // DBR is staged! if (!args.force) { // No need to re-stage log.warn(`Using existing staged DBR for ${dbrMonth}.`) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DBVTBroadPhase() {\n\n _BroadPhase.BroadPhase.call(this);\n\n this.types = _constants.BR_BOUNDING_VOLUME_TREE;\n\n this.tree = new _DBVT.DBVT();\n this.stack = [];\n this.leaves = [];\n this.numLeaves = 0;\n}", "function _addStage(funcParamObj,onExecuteComplete){\r\n\r\n /** default...
[ "0.50146896", "0.49512193", "0.48900294", "0.4831163", "0.48262903", "0.47168937", "0.46789825", "0.46443695", "0.46065322", "0.45829472", "0.45658687", "0.45603934", "0.4559333", "0.45510262", "0.45469394", "0.45300382", "0.44928783", "0.4479802", "0.4471626", "0.44711", "0....
0.6583978
0
Run VACUUM on the line_items table
function vacuum () { if (!args.no_vacuum) { log.info('Running VACUUM on line_items...') return redshift.vacuum(process.env.LINE_ITEMS_TABLE_NAME || 'line_items') } else { log.info('--no-vacuum specified, skiping vacuum.') return } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "vacuum () {\n this.db.exec('VACUUM')\n }", "async function dbVacuum() {\n db.run(/*sql*/`VACUUM \"main\"`);\n}", "async UPDATE_QUANTITY({ state, commit }, lineItems) {\n let client = this.app.apolloProvider.defaultClient;\n\n const checkoutData = await client.mutate({\n mutation: CheckoutLine...
[ "0.57560194", "0.5642123", "0.49177557", "0.4869999", "0.4334779", "0.43320096", "0.42345592", "0.42293197", "0.4187086", "0.41862658", "0.41783383", "0.41738325", "0.4143337", "0.41373187", "0.4128018", "0.41192642", "0.41055834", "0.4096731", "0.40937638", "0.40873325", "0....
0.78819424
0
This is for the .txt system (bad)
function parse(file) { let names = []; let parts = file.split(':'); parts[0].split('\n').forEach(function(line) { if (line !== '') { names.push(line.split(',')[0]); } }); let n = -1; parts[1].split('\n').forEach(function(line) { if (n >= 0) { data[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $textfile(path)\n{\n\tvar thisPtr=this;\n\tvar data=\"\";\n\tvar file=null;\n\tvar file_is_tmp = false;\n\t\t\n\tthis.inlet1=new this.inletClass(\"inlet1\",this,\"data is appended to the buffer. methods: \\\"bang\\\", \\\"clear\\\", \\\"write\\\", \\\"cr\\\", \\\"tab\\\", \\\"dump\\\", \\\"open\\\", \\\"r...
[ "0.63146454", "0.6283607", "0.566496", "0.5661632", "0.564107", "0.5626804", "0.5594489", "0.5593659", "0.55753285", "0.55447704", "0.55447704", "0.55336475", "0.55014366", "0.5476736", "0.54633933", "0.5455586", "0.54367346", "0.54200983", "0.54191923", "0.5414083", "0.54121...
0.0
-1
generic for ALL calls, todo, why optimize now!
function getResource(u, cb) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function all(func) {\n return function() {\n var params = getParams(arguments);\n var length = params.length;\n for (var i = 0; i < length; i++) {\n if (!func.call(null, params[i])) {\n return false;\n }\n }\n ...
[ "0.5767316", "0.5767316", "0.5767316", "0.5733055", "0.5611387", "0.55834943", "0.55788726", "0.5536664", "0.5461371", "0.54512393", "0.5443003", "0.5428783", "0.5418442", "0.5386806", "0.5358905", "0.5334537", "0.5329419", "0.5316431", "0.52966267", "0.5258802", "0.52530056"...
0.0
-1
Function created to extract data from the Search.gov API
function createJobListForGovJobs(dataInfo) { let result = ""; for (let i = 0; i < dataInfo.length; i++) { result += "<div class='list' style='cursor: pointer;' onclick='window.location=" + '"' + dataInfo[i].url + '"' + ";'> "; result += "<img src='https://search....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getData() {\n\tvar query = \"http://api.nytimes.com/svc/search/v2/articlesearch.json?q=\" + search + \"&api-key=\" + key;\n\trequest({\n\t\turl: query,\n\t\tjson: true\n\t}, \n\tfunction(error, response, data) {\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\t\tvar urls = [];\n\t\tvar docs = data.response...
[ "0.66069025", "0.66008765", "0.6473155", "0.6405202", "0.63661987", "0.6336309", "0.6201802", "0.6135798", "0.6096908", "0.6095673", "0.60842526", "0.60638577", "0.6046756", "0.60341024", "0.6010977", "0.5998806", "0.5962297", "0.5958549", "0.5953394", "0.59469163", "0.593982...
0.0
-1
Function created to extract data from the GitHub API
function createJobListForGitHub(dataInfo) { let result = ""; for (let i = 0; i < dataInfo.length; i++) { result += "<div class='list' style='cursor: pointer;' onclick='window.location=" + '"' + dataInfo[i].url + '"' + ";'> "; // If logo not found, display GitHu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function smallDataFetch(search){\n return fetch('https://api.github.com/repos/'+search+'/stats/contributors')\n .then(data=>data.json())\n .then(data=>{\n let betterData = []\n for(i=0; i<data.length; i++){\n betterData.push({'total':data[i].total,'user':data[i].author.login})\n }\n ...
[ "0.70566154", "0.68153846", "0.67723554", "0.662757", "0.66255426", "0.66205907", "0.66160524", "0.661236", "0.65927804", "0.65598136", "0.6531574", "0.65167135", "0.65033126", "0.64917696", "0.648345", "0.64240247", "0.64116985", "0.63572", "0.63380253", "0.6311581", "0.6295...
0.0
-1
A light source. This type describes an interface and is not intended to be instantiated directly. Together, color and intensity produce a highdynamicrange light color. intensity can also be used individually to dim or brighten the light without changing the hue.
function Light() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LightSource(x, y, intensity, color, timing, startrad, radlen) {\r\n this.x = x;\r\n this.y = y;\r\n this.intensity = intensity;\r\n this.timing = 0;\r\n if (timing) {\r\n this.timing = timing;\r\n }\r\n this.color = {r: 255, g: 255, b: 255};\r\n if (color)\r\n {\r\n ...
[ "0.75867665", "0.6660433", "0.6113195", "0.6092757", "0.606568", "0.6062579", "0.592106", "0.59023035", "0.5828595", "0.57889444", "0.57036", "0.56835806", "0.562803", "0.55945426", "0.5563289", "0.55441725", "0.5532543", "0.55298793", "0.5465395", "0.5434022", "0.5418213", ...
0.58202857
9
Reload tiles on pan and zoom
function zoomed() { // Get the height and width height = el.clientHeight; width = el.clientWidth; // Set the map tile size tile.size([width, height]); // Get the current display bounds var bounds = display.llBounds(); // Project the bounds based on the current projection var psw =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "refreshZoom() {}", "zoomMap() {\n PaintGraph.Pixels.zoomExtent(this.props.map, this.props.bbox)\n window.refreshTiles()\n window.updateTiles()\n }", "refresh() {\n this.props.loadGrid(5);\n this.resetTiles();\n }", "function load()\n {\n\n var tiles = this.getVisibleT...
[ "0.73879206", "0.70817816", "0.66822094", "0.6676514", "0.6676514", "0.66381276", "0.66329783", "0.6629257", "0.6604387", "0.65883344", "0.6573622", "0.65008533", "0.6447563", "0.6447563", "0.6447563", "0.6447563", "0.6447563", "0.6447563", "0.6447563", "0.6447563", "0.644756...
0.6762653
2
Get the 3D Transform Matrix
function matrix3d(scale, translate) { var k = scale / 256, r = scale % 1 ? Number : Math.round; return 'matrix3d(' + [k, 0, 0, 0, 0, k, 0, 0, 0, 0, k, 0, r(translate[0] * scale), r(translate[1] * scale), 0, 1] + ')'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gettransMatrix(x,y,z){\n var obj = new THREE.Matrix4().set(1,0,0,x, 0,1,0,y, 0,0,1,z, 0,0,0,1);\n return obj;\n}", "getMatrix() {\n let x, y;\n\n x = this.transform.getPosition().x;\n y = this.transform.getPosition().y;\n\n this._transformMatrix.identity();\n\n //mat...
[ "0.75727534", "0.7211375", "0.7081503", "0.70688283", "0.7024047", "0.6907114", "0.6874175", "0.6870416", "0.68625015", "0.6768968", "0.6766473", "0.6758295", "0.67460614", "0.6712685", "0.66226155", "0.65945375", "0.6571049", "0.6561792", "0.6559732", "0.6504042", "0.6481886...
0.7177795
2
Match the transform prefix
function prefixMatch(p) { var i = -1, n = p.length, s = document.body.style; while (++i < n) if (p[i] + 'Transform' in s) return '-' + p[i].toLowerCase() + '-'; return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prefixMatch(name, prefix) {\n if (name.length < prefix.length)\n return false;\n if (name.substr(0, prefix.length) != prefix)\n return false;\n if (name[prefix.length] && name[prefix.length] != '/')\n return false;\n return true;\n }", "get _idPrefix() { return \"Transform\" ...
[ "0.5740492", "0.5598484", "0.5527312", "0.5523422", "0.5523422", "0.54414165", "0.5412586", "0.5411533", "0.5409869", "0.5356969", "0.5333388", "0.53262943", "0.53262943", "0.53262943", "0.53262943", "0.53262943", "0.53262943", "0.53262943", "0.53262943", "0.53262943", "0.532...
0.67472386
0
Since it is often desirable to operate on bounding data before the final rendering, wrapping can be precalced here
static wrap(str, targetWidth, opts={}) { const words = str.split(' ') const lines = [] const lineHeight = 1.1 let line = [] let lineBounds = Bounds.empty() _.each(words, (word, i) => { let nextLine = line.concat([word]) let nextBounds = Bounds.forText(nextLine.join(' '), opts) if (nextBounds.widt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleWrapping() {\n // Off the left or right\n if (this.x < 0) {\n this.x += width;\n } else if (this.x > width) {\n this.x -= width;\n }\n // Off the top or bottom\n if (this.y < 0) {\n this.y += height;\n } else if (this.y > height) {\n this.y -= height;\n }\n }", ...
[ "0.6963676", "0.6963676", "0.6497933", "0.58999884", "0.58678913", "0.586718", "0.573446", "0.5566548", "0.55641305", "0.5530922", "0.5503147", "0.5433796", "0.5421997", "0.5417514", "0.5388392", "0.53417534", "0.5322144", "0.5319725", "0.53148735", "0.53148735", "0.53148735"...
0.0
-1
LA FONCTION TRAITER FLUX
function traiterFluxConnexion(flux){ var ERROR = ''; switch( flux['ERROR'] ) { case 1: ERROR = 'Please fill all the fields.'; break; case 2: ERROR = 'Account doesn\'t exists.'; break; case 3: ERROR = 'Wrong password.'; break; case 4: //Redirige le particulier vers l'index2 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FunctionalComponent() {}", "function jT(e){let{basename:t,children:n,window:r}=e,i=S.useRef();i.current==null&&(i.current=HC({window:r,v5Compat:!0}));let o=i.current,[s,a]=S.useState({action:o.action,location:o.location});return S.useLayoutEffect(()=>o.listen(a),[o]),S.createElement(NT,{basename:t,child...
[ "0.5591639", "0.5526943", "0.5496889", "0.54299366", "0.537102", "0.5348672", "0.52790433", "0.52532446", "0.5217039", "0.51681733", "0.51662445", "0.51312584", "0.5122255", "0.5114822", "0.50758934", "0.5075797", "0.5050161", "0.50327957", "0.50119686", "0.4992939", "0.49927...
0.48308617
31
LA FONCTION AFFICHE ERROR
function affiche_error_connexion(ERROR){ $(".msg_error").html(ERROR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fallo() {\n return error(\"Reportar fallo\");\n}", "function onError(error) {\n\n\t\t$.each(fiches_patrimoine, function(index, fiche) {\n\t \tfiche.distanceLabel = \"Position indisponible\";\n \t\t });\n\n\t\tbuildListePatrimoine();\n\t\tshouldDisplayListe = true;\n }", "function muestraErr...
[ "0.6021847", "0.58426523", "0.5744112", "0.57429934", "0.5739135", "0.57275105", "0.5657397", "0.5655892", "0.56383514", "0.55890566", "0.5568116", "0.55483764", "0.55483764", "0.55483764", "0.5535928", "0.55299985", "0.5503031", "0.54895383", "0.5483835", "0.5477989", "0.547...
0.0
-1
1.function gcb_manifest_content will write any other files underpackage of course builder. / 2.function gcb_manifest will call gcb_manifest_content() to write the manifest.json. / function gcb_manifest_content will write any other files under package of course builder.
function gcb_manifest_content(filepath){ var fs = require("fs"); var y = document.getElementById("fileImportDialog"); var file = y.files[0]; var new_file_name = file.name.replace(/ELO/, ""); var gcb_path = file.path.replace(file.name, "") + "GCB" + new_file_name.replace(/ /g, "_"); fs.appendFile(gcb_path + "/ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gcb_manifest(){\n\tvar fs = require(\"fs\");\n\tvar y = document.getElementById(\"fileImportDialog\");\n\tvar file = y.files[0];\n\tvar new_file_name = file.name.replace(/ELO/, \"\");\n\tvar gcb_path = file.path.replace(file.name, \"\") + \"GCB\" + new_file_name.replace(/ /g, \"_\");\n\tvar count = 0;\n\n...
[ "0.7450435", "0.6612072", "0.6487672", "0.64505833", "0.6382626", "0.6315528", "0.6282556", "0.59809566", "0.59745485", "0.585672", "0.5856709", "0.5847147", "0.5835128", "0.5802598", "0.57041276", "0.56962323", "0.56509733", "0.5643752", "0.56177825", "0.5606977", "0.5510360...
0.7219483
1
function gcb_manifest will call gcb_manifest_content() to write the manifest.json.
function gcb_manifest(){ var fs = require("fs"); var y = document.getElementById("fileImportDialog"); var file = y.files[0]; var new_file_name = file.name.replace(/ELO/, ""); var gcb_path = file.path.replace(file.name, "") + "GCB" + new_file_name.replace(/ /g, "_"); var count = 0; fs.open(gcb_path + "/manifest....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeManifestToFile() {\n var jsonContent = JSON.stringify(this.manifest, null, \" \");\n var strFileName = io.appendPath(conf.manifestPath, this.strManifestFileName);\n io.writeFile(strFileName, jsonContent);\n}", "function gcb_manifest_content(filepath){\n\tvar fs = require(\"fs\");\n\tvar y = doc...
[ "0.71355593", "0.68693477", "0.6838236", "0.64548486", "0.6330793", "0.63183814", "0.6239282", "0.61496115", "0.6144178", "0.611945", "0.6096671", "0.60907567", "0.6086794", "0.6053947", "0.5905843", "0.58320963", "0.5776444", "0.5727883", "0.57065827", "0.5663672", "0.562867...
0.687763
1
This page gets the code and saves the access token to local storage and updates the Redux state
function Login() { const query = useQuery() const history = useHistory() const store = useStore() const dispatch = useDispatch() useEffect(() => { // do not login twice const u = store.getState().user if (Object.keys(u).length) { return history.push('/') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAccessToken() {\n /*\n *The access token is returned in the hash part of the document.location\n * #access_token=1234&response_type=token\n */\n\n const response = hash.replace(/^#/, '').split('&').reduce((result, pair) => {\n const keyValue = pair.split('=');\n result[keyValue[0]] = keyValu...
[ "0.6530216", "0.6521224", "0.6401203", "0.62646776", "0.62597233", "0.6186736", "0.61462903", "0.6140405", "0.6137285", "0.6071918", "0.6046987", "0.60310996", "0.6028939", "0.6028723", "0.5999013", "0.59963614", "0.59857714", "0.5967867", "0.59616613", "0.59514266", "0.59310...
0.61889124
5
output swf object,return string
function swf(w,h,p){ var pm=$.extend({path:'',wmode:'opaque',quality:'high'},p||{}),rswf; if($.browser.msie){ rswf='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cabversion=6,0,0,0" width="' + w + '" height="' + h + '">\n'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WriteFlash(txtObject)\r\n{\r\n document.write(txtObject);\r\n}", "function WriteSwfObject(strSwfFile, nWidth, nHeight, strScale, strAlign, strQuality, strBgColor, bCaptureRC, strWMode, strFlashVars, targetElement, bFillWindow)\n{\n\tvar strHtml = \"\";\n\tvar strWidth = nWidth + \"px\";\n\tvar strHeig...
[ "0.67393667", "0.6662848", "0.6519858", "0.64617425", "0.64402497", "0.6374038", "0.63086313", "0.6263122", "0.61251736", "0.6041687", "0.5904372", "0.57356757", "0.57356757", "0.5706012", "0.56840575", "0.56354696", "0.56339085", "0.55923235", "0.55923235", "0.55923235", "0....
0.699041
0
Find a store on Store Number Search
function searchStore(storeNumber) { //Clear Form $('#region').prop('selectedIndex', 0); $('#district').prop('selectedIndex', 0); // If empty if (storeNumber === '' || storeNumber === null) { // Search all stores $.get('/stores/findAllStores', function (stores) { // Pass ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchStore( isMore, sType ) {\r\n\tsearchType = sType;\r\n\t\r\n\tif( !isMore ) {\r\n\t\tclearStorInfo( true );\t// Clear data.\r\n\t}\r\n\t\r\n\t// Validation of phone number.\r\n\tif( !chkPhoneNo( \"telNo\", false ) ) {\r\n\t\t// 매장 전화번호를 확인해 주세요\r\n\t\tshowComModal( {msg:mLang.get(\"checkstorephonenum...
[ "0.6748883", "0.62277853", "0.6093353", "0.5794093", "0.5776255", "0.57494336", "0.56563085", "0.5615086", "0.5604466", "0.5597354", "0.5587947", "0.5543716", "0.55373484", "0.55329365", "0.54986095", "0.544252", "0.54330754", "0.54229265", "0.5417769", "0.5407844", "0.539166...
0.5910084
3
Find stores by district
function searchDistrict(districtID) { //Clear Form $('#region').prop('selectedIndex', 0); $('#store').prop('value', ''); //Send Post Request $.get('/stores/findStoreByDistrictManagerID/' + districtID, function (stores) { createTable(stores); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadDistricts(callback) {\n const searchQuery = {\n index: districtIndex,\n body: {\n size: 100,\n _source: ['properties', 'center', 'geometry'],\n },\n }\n client\n .search(searchQuery, ((error, body) => {\n if (error) {\n console.trace('error', error.mes...
[ "0.6052889", "0.59486824", "0.5925734", "0.5824342", "0.5639068", "0.5557288", "0.55348706", "0.5528033", "0.54513234", "0.5431554", "0.5410327", "0.53406394", "0.5332917", "0.52601254", "0.52437896", "0.52402973", "0.5229046", "0.52225107", "0.5187601", "0.515177", "0.515085...
0.6341829
0
Find stores by region
function searchRegion(regionID) { //Clear Form $('#district').prop('selectedIndex', 0); $('#store').prop('value', ''); //Send Post Request $.get('/stores/findStoreByRegionManagerID/' + regionID, function (stores) { createTable(stores); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchStores() {\n var foundStores = [];\n var zipCode = document.getElementById('zip-code-input').value;\n console.log(zipCode) // zipCode entered in search area\n \n if(zipCode) {\n foundStores = stores.filter(function(store, index) {\n return zipCode === store.address.p...
[ "0.58368534", "0.57639545", "0.5550132", "0.55342746", "0.55314344", "0.5512601", "0.5496436", "0.54734695", "0.5456566", "0.54498345", "0.5440358", "0.5416627", "0.5407859", "0.53666186", "0.5363098", "0.5304816", "0.5286601", "0.52518666", "0.52494156", "0.52399844", "0.522...
0.5816194
1
Create table with store search
function createTable(stores) { // Clear Table $('#table').empty(); // check if array if (stores !== undefined && stores.length > 0) { // Loop through stores array stores.forEach(store => { // Clean null values so they dont show up as null if (store.storeRM === nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "create_search_history_table(){\n\t\tvar create_search_history_cols = \"(id integer PRIMARY KEY AUTOINCREMENT, project_id integer, keyword varchar, file_name varchar, file_line integer, file_pos integer, user_id integer, created_at datetime, updated_at datetime)\";\n\t\tvar create_search_history_query = \"CREATE T...
[ "0.68993884", "0.6390192", "0.6312664", "0.62736255", "0.6247299", "0.6235868", "0.62232095", "0.6168056", "0.6139181", "0.60783637", "0.6055402", "0.6055402", "0.6055402", "0.6055402", "0.6055402", "0.6055402", "0.6048085", "0.60276055", "0.60185426", "0.5995055", "0.5989276...
0.58418673
33
Go back to prior page
function goBack() { window.history.back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "goBackToPreviousPage() {\n this.location.back();\n }", "goBackToPreviousPage() {\n this.location.back();\n }", "function goBack() {\n history.go(-1);\n }", "function goBack() {\n\t\t\t$window.history.back();\n\t\t}", "function previousPage()\r\n{\r\n\thistory.go(-1);\r...
[ "0.8395198", "0.8395198", "0.8380944", "0.8265042", "0.8262944", "0.82248926", "0.8205531", "0.81706524", "0.8133696", "0.81112975", "0.80715114", "0.80715114", "0.80715114", "0.8013673", "0.798435", "0.7966998", "0.7934467", "0.7918586", "0.79010165", "0.79003525", "0.782531...
0.7628234
50
Want to populate the initial state with any missing items. Might not be necessary if the server does this for us, but no bad thing to have
didReceiveAttrs () { get(this, 'populateFunctions').buildState(get(this, 'form.state'), get(this, 'form.formElements')) .then(state => { set(this, 'form.state', state) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addEmptyItemIfNeeded(initialItems: ?Object): Object {\n return _.isEmpty(initialItems) ? { '1': null } : initialItems;\n }", "getInitialItems(props) {\n if (props.showAllItems) {\n return props.items;\n }\n else {\n return [];\n }\n }", "initState() {\n return {\n items: [],\...
[ "0.65540034", "0.6526892", "0.6374483", "0.63715225", "0.6247323", "0.6238908", "0.61368346", "0.60796964", "0.60468864", "0.6043633", "0.6017442", "0.6001874", "0.5963538", "0.5954484", "0.5949951", "0.5949812", "0.5916636", "0.5911915", "0.5909339", "0.5902661", "0.5890988"...
0.0
-1
UI function that displays the current username on top banner
function displayCurrentUser(username) { if(username) $("#CurrentLogin").html("Logged in as: " + username); else $("#CurrentLogin").html("Not logged in"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayUserName(data) {\n\t$('.welcome_message').html(`Welcome ${data.currentUser.username}, you are now logged into`)\n}", "function showLoggedInUser(user) {\n login_status.text(\"Logged in as: \" + user.profile.name);\n login_button.text(\"Logout\");\n }", "function onGe...
[ "0.7615899", "0.75988203", "0.74327683", "0.74327683", "0.74327683", "0.74327683", "0.72426176", "0.7141142", "0.7066686", "0.70350623", "0.7016093", "0.69467944", "0.69455683", "0.6917003", "0.68814", "0.687251", "0.6860499", "0.68435514", "0.6815681", "0.6809622", "0.680199...
0.75920707
2
called immediately after login
function postLogin() { displayCurrentUser(global_username); $(".prelogin-content, #landingpagebutton, .login-hide").fadeOut( function() { $(".postlogin-content").fadeIn(); $(".login-show").fadeIn().css("display","inline"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loginCompleted() {\n }", "function login() {\n self.isLoggedIn = true;\n }", "function loginUserCallback() {\n loginUser();\n }", "function onLogin() {}", "function handleLoginOnStartUp() {\n //if user is signed in, show their profile info\n if (b...
[ "0.76315916", "0.7506858", "0.7211727", "0.7104413", "0.69989294", "0.6981114", "0.6943253", "0.6918658", "0.689412", "0.6876089", "0.6873072", "0.6871407", "0.6859591", "0.6846437", "0.6839957", "0.68332255", "0.68320006", "0.6807252", "0.68036205", "0.67986095", "0.67936754...
0.0
-1
Fade for successful data submission
function postSubmit() { $('#successAlert').fadeTo( 400, .75 ) $('#successAlert').delay(2000).fadeTo( 400, 0 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FADER() {\n $('.FADE').hide(0).delay(500).fadeIn(500);\n console.log('done');\n }", "function formEventHaveBeenSubmitted() {\n $('.event_not_yet').hide();\n $('.event_submitted').fadeIn();\n}", "function setSucessMessageWithFade(message){\n setSucessMessage(message);\n ...
[ "0.68984556", "0.6705069", "0.6659334", "0.664806", "0.6635045", "0.66007245", "0.6485719", "0.64496183", "0.6443553", "0.6421428", "0.638331", "0.63638717", "0.63483256", "0.6344242", "0.6341263", "0.6251685", "0.62480515", "0.62372655", "0.6221893", "0.6216189", "0.61609465...
0.80628824
0
Called after loading forms from db
function postFormLoad(requestedDate) { $(".tables").fadeIn(function() { var length = Patient2Date[global_patientInfo.currentPatient].length; var index = length - Patient2Date[global_patientInfo.currentPatient].indexOf(requestedDate.toString()) - 1; var scroll = document.getElementById('Form...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _qForm_loadFields(){\n\tvar strPackage = _getCookie(\"qForm_\" + this._name + \"_\" + _c_strName);\n\t// there is no form saved\n\tif( strPackage == null ) return false;\n\n\tthis.setFields(_readCookiePackage(strPackage), null, true);\n}", "function loadExistingFormValues() {\n\n // lesion has been f...
[ "0.68086445", "0.66354704", "0.6361539", "0.63008463", "0.62909263", "0.62107235", "0.6209275", "0.61616904", "0.61513704", "0.61452925", "0.6125843", "0.60595214", "0.6002192", "0.59995353", "0.5994709", "0.5991958", "0.5988343", "0.5926666", "0.5850189", "0.5849011", "0.584...
0.0
-1
Called after closing a patient injury
function postCloseInjury() { removeForms(); $('html, body').animate({ scrollTop: 0 }, 400); $("#queryResetButton").click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onClose() {\n\t\t}", "_close() {\n // mark ourselves inactive without doing any work.\n this._active = false;\n }", "function doneClosing()\n\t{\n\t\tthat.terminate();\n\t}", "onClose(){}", "onClose() {}", "onClose() {}", "onClosed() {\r\n // Stub\r\n }", "onClose() {\n th...
[ "0.6687301", "0.6391017", "0.625934", "0.62345546", "0.6136394", "0.6136394", "0.61324286", "0.60531926", "0.60444236", "0.60337144", "0.6001027", "0.5998009", "0.5996477", "0.5972554", "0.5969136", "0.5947968", "0.5944226", "0.5928413", "0.59108454", "0.59066826", "0.5893836...
0.0
-1
Called after creating a new patient entry (not a new form within a patient)
function postCreateNewForm() { $(".tables").fadeIn(function () { $(".forms").animate({ scrollLeft: scroll}, 400); }); $('html, body').animate({ scrollTop: $("#BreakOne").offset().top }, 400); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPatient(){\n \n var pname = readline.question('\\nEnter patient name : ');\n var pmobile = readline.questionInt('Enter Mobile number : ');\n var page = readline.questionInt('Enter patient age : ');\n \n var patient = {\n \"PName\" : pname,\n \"PMobi...
[ "0.65605295", "0.63394827", "0.6076077", "0.59873825", "0.5979979", "0.59717774", "0.58715147", "0.5827756", "0.57883996", "0.5781332", "0.57645655", "0.5680425", "0.56733364", "0.5669627", "0.56656396", "0.5658745", "0.5657888", "0.5656485", "0.56321526", "0.56216335", "0.56...
0.0
-1
Called after patient deletion
function postDeleteAll() { $(".forms").animate({ scrollLeft: 0}, 400); removeForms(); $('html, body').animate({ scrollTop: 0 }, 400); $("#queryResetButton").click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removePatient(id) {\n\tmyDB.transaction(function(transaction) {\n\t\ttransaction.executeSql(\"DELETE FROM patients_local where id=?\", [id], function(tx, result) {\n\t\t\tmyDB.transaction(function(transaction) {\n\t\t\t\ttransaction.executeSql(\"DELETE FROM drawings_local where pid=?\", [id], function(tx,...
[ "0.67174804", "0.66252625", "0.66109514", "0.65196264", "0.64667106", "0.6379333", "0.63758755", "0.6369018", "0.63427943", "0.6326941", "0.6283064", "0.6272925", "0.621679", "0.6215669", "0.6193164", "0.6180675", "0.61581457", "0.6155598", "0.6140773", "0.6138371", "0.613174...
0.0
-1
Called after user logs out
function postLogout() { $(".postlogin-content, .login-show, #successAlert").fadeOut( function() { $(".prelogin-content, #landingpagebutton, .logout-show").fadeIn(); $("#queryResetButton").click(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _onLogout() {\n\t sitools.userProfile.LoginUtils.logout();\n\t}", "function handleLogout() {\n\t\ttry {\n\t\t\t//Resetting the user info\n\t\t\tuserContext.setUserInfo({ username: \"\", id: \"\" });\n\n\t\t\t//Changing authenticated to false\n\t\t\tuserContext.setIsAuthenticated(false);\n\n\t\t\t//De...
[ "0.8253849", "0.7945836", "0.7901897", "0.78789586", "0.78309596", "0.78073835", "0.7718061", "0.771072", "0.7692442", "0.7652144", "0.7638575", "0.762981", "0.75814915", "0.755828", "0.75564253", "0.75453377", "0.7545109", "0.7529268", "0.75284123", "0.749999", "0.74986994",...
0.0
-1
without access to workspace
async function getBoardById(boardId) { const workspaces = await storageService.query(STORAGE_KEY) const workspace = workspaces.find(workspace => { return workspace.boards.find(board => board._id === boardId) }) const board = workspace.boards.find(board => board._id === boardId) return board ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WorkspacePlain() {\n }", "static clearWorkspace() {\n Gamepad.workspace.clear();\n }", "clearWorkspace(){\n this.ffauWorkspace.clear();\n }", "function _____SHARED_functions_____(){}", "StartWorkspaceEx() {\n\n }", "StartWorkspaceEx2() {\n\n }", "private internal f...
[ "0.65282273", "0.5814893", "0.5784608", "0.5768638", "0.5717587", "0.5606703", "0.55839086", "0.5496288", "0.54780936", "0.53287315", "0.525075", "0.52214694", "0.5207095", "0.52064526", "0.5197071", "0.51900536", "0.5188168", "0.5171612", "0.51608986", "0.5155399", "0.515350...
0.0
-1
Contains the liceses for assets used in this we app
function Licenses() { const classes = useStyles; return ( <Card className={classes.root}> <CardContent> <Typography className={classes.title} color="textSecondary" gutterBottom > Icon Licenses </Typography> <Typography variant="h5" c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLostvibeAssets() {\n\n}", "get mainAsset() {}", "function createAssets(){\n assets = [];\n assets.push(path.join(__dirname, '../plug/pip_resolve.py'));\n assets.push(path.join(__dirname, '../plug/distPackage.py'));\n assets.push(path.join(__dirname, '../plug/package.py'));\n assets.push(path.j...
[ "0.63874334", "0.6268631", "0.62115675", "0.61566925", "0.6150884", "0.59513843", "0.59396005", "0.59266645", "0.5908541", "0.59050435", "0.58907056", "0.5887752", "0.58661747", "0.58569646", "0.57613844", "0.5746067", "0.5719985", "0.5717615", "0.5712064", "0.5703589", "0.56...
0.0
-1
Prisma ==> Node ==> Client (GrapfQL Playground)
subscribe(parent, { postId }, { prisma }, info) { // Se recomienda que los atributos que devuelve Prisma en la suscripción coincidadn con los del backend con los clientes // return prisma.subscription.comment({ where: { node: { post: { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function main() {\n\n // // Create a new user with a new post\n // const newUser = await prisma\n // .createUser({\n // name: \"Chris\",\n // email: \"chris@prisma.io\",\n // trips: {\n // create: [{\n // country: \"US\",\n // }, {\n // country: \"Italy\",\...
[ "0.65022564", "0.64900005", "0.6258283", "0.6217162", "0.61853683", "0.6086763", "0.6044733", "0.60078126", "0.598656", "0.5985974", "0.5849738", "0.5717077", "0.56887454", "0.5666524", "0.56056833", "0.5576886", "0.5575047", "0.55744165", "0.55226535", "0.54728675", "0.54645...
0.0
-1
Signs the given transaction data and sends it. Abstracts some of the details of buffering and serializing the transaction for web3.
function sendSigned(txData,privKey, cb) { const privateKey = new Buffer(privKey, 'hex') const transaction = new Tx(txData) transaction.sign(privateKey) const serializedTx = transaction.serialize().toString('hex') web3.eth.sendSignedTransaction('0x' + serializedTx, cb) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sign(err, data) {\n if (err !== null) {\n console.log(err);\n } else {\n var tx = data;\n console.log(\"Recieved: \" + data.tx.received);\n console.log(\"Transaction recieved, signing...\");\n\n\n tx.pubkeys = [];\n tx.signatures = data.tosign.map(function (...
[ "0.7808991", "0.7243803", "0.7177426", "0.7037895", "0.69075143", "0.68765384", "0.6782755", "0.67223024", "0.6698356", "0.6698356", "0.6660681", "0.6656824", "0.6370981", "0.63476235", "0.6275696", "0.6179538", "0.6166933", "0.61061424", "0.60243094", "0.6010027", "0.5988504...
0.7201386
2
construct object, with constructor function constructor is so obverious
function Person(firstName, lastName, dob){ this.firstName = firstName; this.lastName = lastName; this.dob = new Date(dob); this.getBirthYear = function(){ return this.dob.getFullYear(); } this.getFullName = function(){ return `${this.firstName} ${this.lastName}`; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "function construct() { }", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function _ctor() {\n\t}", "function _construct()\n\t\t{;\n\t\t}", "function Ctor() {}", "construct (target, args) {\n return new target(...args)\n }", "constr...
[ "0.83247906", "0.8264945", "0.78754985", "0.78754985", "0.78754985", "0.7595078", "0.7570385", "0.7475717", "0.72375315", "0.72144437", "0.72144437", "0.72144437", "0.72144437", "0.72144437", "0.72144437", "0.72144437", "0.7148642", "0.71142364", "0.7107709", "0.7094159", "0....
0.0
-1
The dummy class constructor
function Class() { // All construction is actually done in the init method if ( !initializing && this.init ) this.init.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "function DummyClass() {\r\n // All construction is actually done in the construct method\r\n if ( !init && this.construct )\r\n this.construct.apply(this, arguments);\r\n }", "constructor(){}", "constructor(){}", "constructor(){}", "construc...
[ "0.83117235", "0.8150335", "0.8125716", "0.8125716", "0.8125716", "0.8125716", "0.8125716", "0.8125716", "0.8125716", "0.81216276", "0.81216276", "0.81216276", "0.80153376", "0.80066764", "0.7822476", "0.7822476", "0.7822476", "0.7822476", "0.7822476", "0.7822476", "0.7822476...
0.0
-1
alias transcendable > transcends server and client, javascript and php, ajax act()s on it when done, html can refer to it via callMethod()
function Stateable(arr,realThis) { var that = realThis != undefined ? realThis : this; this.objectId = -1; // necessary to receive html events - stored when object displays received html (on act) - also re-stored again on re-creation when deserializing an already stored object. // if parent is declare...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TransformedAjaxCommand(xslt, xml, templParms, handler)\n{\n\tPromise.apply(this);\n\tif(handler) this.setOnAvail(handler);\n\n\tvar self = this;\n\tthis.xsltSource = new TemplateQuery(xslt, function(xslt)\n\t{\n\t\tself.onLoaded(xslt, xml);\n\t});\n}", "function EngineWrapper(adapter) {\n var AjaxEng...
[ "0.51261014", "0.502349", "0.502349", "0.49813956", "0.49795645", "0.4917732", "0.4911214", "0.4903649", "0.48723844", "0.48723844", "0.48585975", "0.48149747", "0.4808979", "0.4802675", "0.4779681", "0.4751991", "0.47223747", "0.47164014", "0.47143552", "0.46962377", "0.4684...
0.0
-1
assumes html already trimmed and tag names are lowercase
function computeContainerTag(html) { return containerTagHash[html.substr(0, 3) // faster than using regex ] || 'div'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function captureTagName() {\n var startIdx = currentTag.idx + (currentTag.isClosing ? 2 : 1);\n return html.slice(startIdx, charIdx).toLowerCase();\n }", "function captureTagName() {\n var startIdx = currentTag.idx + (currentTag.isClosing ? 2 : 1);\n return html.slice(startId...
[ "0.7300031", "0.7180153", "0.69721156", "0.66043717", "0.6506701", "0.64355326", "0.6374739", "0.6302117", "0.6286601", "0.6213519", "0.61980546", "0.6160311", "0.6159732", "0.6108086", "0.60845923", "0.6064076", "0.6051057", "0.5988401", "0.59689945", "0.59150696", "0.591481...
0.0
-1
accepts multiple subject els returns a real array. good for methods like forEach
function findElements(container, selector) { var containers = container instanceof HTMLElement ? [container] : container; var allMatches = []; for (var i = 0; i < containers.length; i++) { var matches = containers[i].querySelectorAll(selector); for (var j = 0; j < matches...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_array( subject ) {\n\treturn Array.isArray( subject ) ? subject : [ subject ];\n}", "function makeArray( subject ) {\n\treturn Array.isArray( subject ) ? subject : [ subject ];\n}", "function make_array(subject) {\n return Array.isArray(subject) ? subject : [subject];\n}", "function make_array...
[ "0.66539496", "0.661664", "0.65957767", "0.65957767", "0.658102", "0.658102", "0.65661657", "0.65661657", "0.65661657", "0.65661657", "0.65661657", "0.6491883", "0.63846815", "0.61401844", "0.602592", "0.5959882", "0.580902", "0.570216", "0.569725", "0.5681502", "0.56532896",...
0.0
-1
accepts multiple subject els only queries direct child elements
function findChildren(parent, selector) { var parents = parent instanceof HTMLElement ? [parent] : parent; var allMatches = []; for (var i = 0; i < parents.length; i++) { var childNodes = parents[i].children; // only ever elements for (var j = 0; j < childNodes.length; j+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __(elm) { return document.querySelectorAll(elm) }", "function qsa(parent, selector){return [].slice.call(parent.querySelectorAll(selector) )}", "function findElements(container, selector) {\n var containers = container instanceof HTMLElement ? [container] : container;\n var allMatches = [];\...
[ "0.60676503", "0.59663564", "0.5962775", "0.57596546", "0.57596546", "0.57036203", "0.56000346", "0.5528174", "0.5528174", "0.5519154", "0.54946864", "0.54843074", "0.5441801", "0.5434945", "0.5434945", "0.543411", "0.5377221", "0.5373684", "0.53438085", "0.5337317", "0.53271...
0.0
-1
Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false
function intersectRects(rect1, rect2) { var res = { left: Math.max(rect1.left, rect2.left), right: Math.min(rect1.right, rect2.right), top: Math.max(rect1.top, rect2.top), bottom: Math.min(rect1.bottom, rect2.bottom) }; if (res.left < res.right && ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function intersectRects(rect1,rect2){var res={left:Math.max(rect1.left,rect2.left),right:Math.min(rect1.right,rect2.right),top:Math.max(rect1.top,rect2.top),bottom:Math.min(rect1.bottom,rect2.bottom)};if(res.left<res.right&&res.top<res.bottom){return res;}return false;}", "function intersect(rectangle1, rectangl...
[ "0.7830384", "0.76907814", "0.76501125", "0.7638328", "0.7638328", "0.7638328", "0.7638328", "0.7638328", "0.75928366", "0.7586829", "0.7566629", "0.7566629", "0.7566629", "0.7566629", "0.7566629", "0.7566629", "0.7566629", "0.7566629", "0.7507798", "0.7495892", "0.7448045", ...
0.7594002
10
Returns a new point that will have been moved to reside within the given rectangle
function constrainPoint(point, rect) { return { left: Math.min(Math.max(point.left, rect.left), rect.right), top: Math.min(Math.max(point.top, rect.top), rect.bottom) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _movePointOnRectangleToPoint(rect, rectanglePoint, targetPoint) {\n var leftCornerXDifference = rectanglePoint.x - rect.left;\n var leftCornerYDifference = rectanglePoint.y - rect.top;\n return _moveTopLeftOfRectangleToPoint(rect, { x: targetPoint.x - leftCornerXDifference, y: targetP...
[ "0.7201602", "0.7201602", "0.68819237", "0.65519136", "0.6524093", "0.6524093", "0.6524093", "0.6524093", "0.6524093", "0.6524093", "0.6524093", "0.6524093", "0.6495272", "0.64936244", "0.6491237", "0.6491237", "0.6491237", "0.6491237", "0.6491237", "0.6420683", "0.6376799", ...
0.6418015
22
Returns a point that is the center of the given rectangle
function getRectCenter(rect) { return { left: (rect.left + rect.right) / 2, top: (rect.top + rect.bottom) / 2 }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRectCenter(rect){return{left:(rect.left+rect.right)/2,top:(rect.top+rect.bottom)/2};}", "function computeCenter(rect) {\n return {\n top: rect.top + (rect.height / 2),\n left: rect.left + (rect.width / 2)\n };\n}", "function getRectCenter(rect) {\n return {\n left: (re...
[ "0.76871496", "0.7517487", "0.73158824", "0.73158824", "0.73158824", "0.73158824", "0.73158824", "0.7304731", "0.7200921", "0.7200921", "0.7200921", "0.7200921", "0.7200921", "0.7200921", "0.7200921", "0.7200921", "0.7182221", "0.7140653", "0.7130934", "0.7116732", "0.7073354...
0.7206926
10
Subtracts point2's coordinates from point1's coordinates, returning a delta
function diffPoints(point1, point2) { return { left: point1.left - point2.left, top: point1.top - point2.top }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function diffPoints(point1,point2){return{left:point1.left-point2.left,top:point1.top-point2.top};}", "function diffPoints(point1, point2) {\n return {\n left: point1.left - point2.left,\n top: point1.top - point2.top,\n };\n }", "function diffPoints(point1, point2) {\n ...
[ "0.7472936", "0.7177514", "0.71587425", "0.7150767", "0.7145625", "0.7145625", "0.7145625", "0.7145625", "0.7145625", "0.7013921", "0.699561", "0.699561", "0.699561", "0.699561", "0.699561", "0.699561", "0.699561", "0.699561", "0.6977615", "0.6808039", "0.67970824", "0.6792...
0.7157248
6
The scrollbar width computations in computeEdges are sometimes flawed when it comes to retina displays, rounding, and IE11. Massage them into a usable value.
function sanitizeScrollbarWidth(width) { width = Math.max(0, width); // no negatives width = Math.round(width); return width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateEdgeWidth() {\n var windowWidth = $(window).width();\n var slideWidth = $('.slide.active').outerWidth();\n return (windowWidth - slideWidth) / 2;\n }", "function getScrollbarWidth() {\n return window.innerWidth - document.documentElement.clientWidth;\n}", "function returnScrollbarW...
[ "0.6753931", "0.64934933", "0.64165056", "0.6389134", "0.63150173", "0.61602956", "0.61571985", "0.61508745", "0.6126553", "0.6110899", "0.609638", "0.6074233", "0.60657185", "0.6063914", "0.60432935", "0.6031688", "0.6031688", "0.6025472", "0.60207087", "0.5964213", "0.59490...
0.0
-1
does not return window
function getClippingParents(el) { var parents = []; while (el instanceof HTMLElement) { // will stop when gets to document or null var computedStyle = window.getComputedStyle(el); if (computedStyle.position === 'fixed') { break; } if ((/(au...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getWindow() {\n return this._document.defaultView || window;\n }", "_getWindow() {\n return this._document.defaultView || window;\n }", "_getWindow() {\n const doc = this._getDocument();\n\n return doc.defaultView || window;\n }", "_getWindow() {\n return this._document.defaultView || ...
[ "0.7417811", "0.7417811", "0.730527", "0.72826046", "0.72826046", "0.72826046", "0.7259252", "0.7259252", "0.7259252", "0.7259252", "0.7259252", "0.7259252", "0.72521734", "0.7209393", "0.7180999", "0.7130325", "0.7130325", "0.7130325", "0.7130325", "0.7104723", "0.7103669", ...
0.0
-1
Stops a mouse/touch event from doing it's native browser action
function preventDefault(ev) { ev.preventDefault(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cancelTouch() {\n this.stopTouching_();\n this.endTracking_();\n // If clients needed to be aware of this, we could fire a cancel event\n // here.\n }", "stopDrag() {\n document.body.onmousemove = null;\n document.body.onmouseup = null;\n }", "stopTouching_() {\n // Mark as no longer bei...
[ "0.7440415", "0.73385", "0.7294391", "0.72323716", "0.7153118", "0.7153118", "0.7078613", "0.7012811", "0.6898709", "0.6885639", "0.68139887", "0.6790691", "0.6758636", "0.6741793", "0.6721983", "0.6721983", "0.6721983", "0.6711374", "0.6703125", "0.6611802", "0.66071373", ...
0.0
-1
triggered only when the next single subsequent transition finishes
function whenTransitionDone(el, callback) { var realCallback = function (ev) { callback(ev); transitionEventNames.forEach(function (eventName) { el.removeEventListener(eventName, realCallback); }); }; transitionEventNames.forEach(function (even...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "transitionCompleted() {\n // implement if needed\n }", "function delayTransitionInComplete() { \n\t\t//setTimeout(transitionInComplete, 0);\n\t\ttransitionInComplete();\n\t}", "function completeOnTransitionEnd(ev) {\n if (ev.target !== this) return;\n transitionComplete(...
[ "0.8053293", "0.6732831", "0.6469532", "0.6469532", "0.63581985", "0.6311598", "0.6296233", "0.62911075", "0.62775064", "0.6253864", "0.62344706", "0.62264836", "0.6170652", "0.60836476", "0.6074085", "0.6068321", "0.6050904", "0.6034632", "0.60260266", "0.60075784", "0.59972...
0.6236204
13
Diffing (all return floats)
function diffWeeks(m0, m1) { return diffDays(m0, m1) / 7; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function diff(a, b) {\n totalDifference += Math.abs(a - b);\n }", "function diff(v1, v2) {\n return {\n x: v1.x - v2.x,\n y: v1.y - v2.y\n };\n}", "function difference(a, b) {\n return Math.abs(a - b);\n }", "function diff(a, b) {\n if (a == null || b == null || isNaN(a) || isNaN(b))\n ...
[ "0.6974578", "0.6840192", "0.6753703", "0.6678451", "0.6586779", "0.64633137", "0.6445426", "0.6445426", "0.64208776", "0.63634884", "0.6357478", "0.6332286", "0.6332286", "0.6332286", "0.6332286", "0.6332286", "0.6332286", "0.63061816", "0.63023365", "0.6285084", "0.62376", ...
0.0
-1
Conversions "Rough" because they are based on averagecase Gregorian months/years
function asRoughYears(dur) { return asRoughDays(dur) / 365; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcGregorian() { updateFromGregorian(); }", "function JtoG($, _, n, y) { function a($, _) { return Math.floor($ / _) } for ($g_days_in_month = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31), $j_days_in_month = new Array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29), $jy = $ - 979, $jm = _ ...
[ "0.63384634", "0.6263492", "0.624544", "0.60358506", "0.60230696", "0.59796584", "0.5967904", "0.59665346", "0.59378636", "0.5937252", "0.58944184", "0.5768215", "0.576375", "0.57607144", "0.57513475", "0.57389665", "0.5721542", "0.57164466", "0.568165", "0.5678887", "0.56626...
0.5324381
72
FullCalendarspecific DOM Utilities Given the scrollbar widths of some other container, create borders/margins on rowEls in order to match the left and right space that was offset by the scrollbars. A 1pixel border first, then margin beyond that.
function compensateScroll(rowEl, scrollbarWidths) { if (scrollbarWidths.left) { applyStyle(rowEl, { borderLeftWidth: 1, marginLeft: scrollbarWidths.left - 1 }); } if (scrollbarWidths.right) { applyStyle(rowEl, { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compensateScroll(rowEls,scrollbarWidths){if(scrollbarWidths.left){rowEls.css({'border-left-width':1,'margin-left':scrollbarWidths.left-1});}if(scrollbarWidths.right){rowEls.css({'border-right-width':1,'margin-right':scrollbarWidths.right-1});}}", "function compensateScroll(rowEls, scrollbarWidths) {\n ...
[ "0.7313346", "0.6622791", "0.6622791", "0.6622791", "0.6622791", "0.6530672", "0.6396445", "0.6375848", "0.6332526", "0.62115324", "0.62115324", "0.62115324", "0.62115324", "0.62115324", "0.62115324", "0.62115324", "0.62115324", "0.6177679", "0.6138433", "0.6054187", "0.59617...
0.6240635
10
Undoes compensateScroll and restores all borders/margins
function uncompensateScroll(rowEl) { applyStyle(rowEl, { marginLeft: '', marginRight: '', borderLeftWidth: '', borderRightWidth: '' }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uncompensateScroll(rowEls){rowEls.css({'margin-left':'','margin-right':'','border-left-width':'','border-right-width':''});}", "function uncompensateScroll(rowEl) {\n dom_manip_1.applyStyle(rowEl, {\n marginLeft: '',\n marginRight: '',\n borderLeftWidth: '',\n ...
[ "0.7537144", "0.7326638", "0.7144274", "0.70553714", "0.7036137", "0.7036137", "0.7036137", "0.7036137", "0.6989386", "0.69088274", "0.68808717", "0.68808717", "0.68808717", "0.68808717", "0.68808717", "0.68808717", "0.68808717", "0.68808717", "0.67463994", "0.6733815", "0.66...
0.7100836
4
Make the mouse cursor express that an event is not allowed in the current area
function disableCursor() { document.body.classList.add('fc-not-allowed'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableCursor() {\n\t\t$('body').addClass('fc-not-allowed');\n\t}", "function disableCursor() {\n $('body').addClass('fc-not-allowed');\n }", "function ignorePendingMouseEvents() { ignore_mouse = guac_mouse.touchMouseThreshold; }", "function onMouseNothing(e) {\n e.preventDefault();\n ...
[ "0.70906544", "0.6955675", "0.69034046", "0.6894298", "0.6821689", "0.68163365", "0.68157244", "0.68157244", "0.68157244", "0.68157244", "0.68157244", "0.68157244", "0.68157244", "0.68157244", "0.680039", "0.66946816", "0.66603494", "0.6659255", "0.66155076", "0.66128623", "0...
0.6657292
21
Returns the mouse cursor to its original look
function enableCursor() { document.body.classList.remove('fc-not-allowed'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeCursor(newCursor) {\n canvas.style.cursor = newCursor\n}", "showCursor() {\n this.canvas.style.cursor = CURRENT_CURSOR;\n }", "get cursor() {\n return this.element.style.cursor;\n }", "function getCursor() {\r\n\treturn [cursorLine,cursorColumn];\r\n}", "function deriveCur...
[ "0.6688787", "0.662058", "0.6609745", "0.6585528", "0.64344704", "0.63849705", "0.63757133", "0.6317564", "0.6317564", "0.6317564", "0.6317564", "0.6294201", "0.62843525", "0.62513316", "0.62478805", "0.62478805", "0.62478805", "0.6245575", "0.6236398", "0.62335247", "0.62335...
0.0
-1
Given a total available height to fill, have `els` (essentially child rows) expand to accomodate. By default, all elements that are shorter than the recommended height are expanded uniformly, not considering any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and reduces...
function distributeHeight(els, availableHeight, shouldRedistribute) { // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions, // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars. var minOffset1 = Math.floor(av...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function distributeHeight(els, availableHeight, shouldRedistribute) {\n // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,\n // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.\n var minOffset1 = Math....
[ "0.809538", "0.8044173", "0.8043992", "0.8038227", "0.8015", "0.8012711", "0.8012711", "0.8012711", "0.8012711", "0.8012711", "0.8012711", "0.8012711", "0.8012711", "0.79982144", "0.79982144", "0.79982144", "0.79982144", "0.79920906", "0.79196715", "0.7593259", "0.5908195", ...
0.80237633
4
Undoes distrubuteHeight, restoring all els to their natural height
function undistributeHeight(els) { els.forEach(function (el) { el.style.height = ''; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function undistributeHeight(els){els.height('');}", "function undistributeHeight(els) {\n els.height('');\n}", "function undistributeHeight(els) {\n els.height('');\n}", "function undistributeHeight(els) {\n els.height('');\n}", "function undistributeHeight(els) {\n els.height('');\n}", "func...
[ "0.7625745", "0.7465431", "0.7465431", "0.7465431", "0.7465431", "0.74344325", "0.74344325", "0.74344325", "0.74344325", "0.74344325", "0.74344325", "0.74344325", "0.74344325", "0.740191", "0.7360089", "0.72297835", "0.7191031", "0.61986786", "0.6076183", "0.584065", "0.57682...
0.7114636
19
Given `els`, a set of cells, find the cell with the largest natural width and set the widths of all the cells to be that width. PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline
function matchCellWidths(els) { var maxInnerWidth = 0; els.forEach(function (el) { var innerEl = el.firstChild; // hopefully an element if (innerEl instanceof HTMLElement) { var innerWidth_1 = innerEl.getBoundingClientRect().width; if (innerWidth_1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.forEach(function (el) {\n var innerEl = el.firstChild; // hopefully an element\n\n if (innerEl instanceof HTMLElement) {\n var innerWidth_1 = innerEl.getBoundingClientRect().width;\n\n if (innerWidth_1 > maxInn...
[ "0.7652596", "0.759597", "0.7585141", "0.75660205", "0.74210787", "0.74210787", "0.74210787", "0.74210787", "0.74210787", "0.74210787", "0.74115", "0.74115", "0.74115", "0.74115", "0.74111044", "0.7385479", "0.7257213", "0.7257213", "0.69547397", "0.5850203", "0.57952607", ...
0.7566943
4
Given one element that resides inside another, Subtracts the height of the inner element from the outer element.
function subtractInnerElHeight(outerEl, innerEl) { // effin' IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked var reflowStyleProps = { position: 'relative', left: -1 // ensure reflow in case the el was already relative. negative is le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subtractInnerElHeight(outerEl, innerEl) {\n\t\tvar both = outerEl.add(innerEl);\n\t\tvar diff;\n\n\t\t// effin' IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked\n\t\tboth.css({\n\t\t\tposition: 'relative', // cause a reflow, which will force fresh dimension re...
[ "0.79460895", "0.7903913", "0.7903913", "0.7903913", "0.7903913", "0.7903913", "0.7903913", "0.7903913", "0.78986686", "0.78986686", "0.78986686", "0.78986686", "0.776178", "0.7750443", "0.7718971", "0.7678886", "0.7668906", "0.75993633", "0.6871529", "0.6586655", "0.63690597...
0.77671176
12
Object Ordering by Field
function parseFieldSpecs(input) { var specs = []; var tokens = []; var i; var token; if (typeof input === 'string') { tokens = input.split(/\s*,\s*/); } else if (typeof input === 'function') { tokens = [input]; } else if (Ar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "genSortAscendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = -1\n if (valA > valB) order = 1\n return order\n }\n }", "genSortDescendingByField(field) {\n return...
[ "0.7003094", "0.6617245", "0.65855557", "0.65081936", "0.64261514", "0.64052695", "0.63869286", "0.6359571", "0.6353804", "0.6353142", "0.63472986", "0.6337718", "0.63208765", "0.62880594", "0.6262062", "0.6237014", "0.6211151", "0.62089473", "0.6185", "0.61471325", "0.613285...
0.0
-1
Returns a function, that, as long as it continues to be invoked, will not be triggered. The function will be called after it stops being called for N milliseconds. If `immediate` is passed, trigger the function on the leading edge, instead of the trailing.
function debounce(func, wait) { var timeout; var args; var context; var timestamp; var result; var later = function () { var last = new Date().valueOf() - timestamp; if (last < wait) { timeout = setTimeout(later, wait - last); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var args = arguments,\n callNow = immediate && !timeout,\n later = function () {\n timeout = null;\n if (!immediate) {\n ...
[ "0.6005919", "0.60009474", "0.5987767", "0.59641325", "0.5930723", "0.5930723", "0.5927139", "0.59211427", "0.5913452", "0.5913241", "0.5901756", "0.58908737", "0.5889581", "0.58882964", "0.5881058", "0.5878666", "0.5877016", "0.5877016", "0.5877016", "0.5877016", "0.5876547"...
0.0
-1
Number and Boolean are only types that defaults or not computed for TODO: write more comments
function refineProps(rawProps, processors, defaults, leftoverProps) { if (defaults === void 0) { defaults = {}; } var refined = {}; for (var key in processors) { var processor = processors[key]; if (rawProps[key] !== undefined) { // found i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function boolStrNum() {\n return {\n type: [Boolean, String, Number],\n default: false\n };\n}", "function boolStrNum() {\n return {\n type: [Boolean, String, Number],\n default: false\n };\n}", "function boolStrNum() {\n return {\n type: [Boolean, String, Number],\n default: false\n };...
[ "0.6462342", "0.6462342", "0.6462342", "0.6462342", "0.6462342", "0.6126447", "0.6126447", "0.6086038", "0.5911671", "0.58751214", "0.58306396", "0.58240354", "0.58238184", "0.58221024", "0.5672407", "0.5655449", "0.5655416", "0.56443924", "0.5619155", "0.5568987", "0.5561214...
0.0
-1
Date stuff that doesn't belong in datelib core given a timed range, computes an allday range that has the same exact duration, but whose start time is aligned with the start of the day.
function computeAlignedDayRange(timedRange) { var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1; var start = startOfDay(timedRange.start); var end = addDays(start, dayCnt); return { start: start, end: end }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return {\n start: start,\n end: end\n };\n } // given a timed range, ...
[ "0.78592855", "0.73053396", "0.7223152", "0.6931339", "0.6145467", "0.6138421", "0.611688", "0.611688", "0.611688", "0.611688", "0.60401464", "0.6025646", "0.6015353", "0.5999061", "0.5834712", "0.5834712", "0.5824354", "0.5769818", "0.5768904", "0.57657516", "0.5733505", "...
0.71547514
6
given a timed range, computes an allday range based on how for the end date bleeds into the next day TODO: give nextDayThreshold a default arg
function computeVisibleDayRange(timedRange, nextDayThreshold) { if (nextDayThreshold === void 0) { nextDayThreshold = createDuration(0); } var startDay = null; var endDay = null; if (timedRange.end) { endDay = startOfDay(timedRange.end); var endTimeMS = timedRange...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return {\n start: start,\n end: end\n };\n } // given a timed range, ...
[ "0.74374276", "0.7254077", "0.7252402", "0.7189147", "0.70831287", "0.63452417", "0.63063514", "0.63063514", "0.63063514", "0.63063514", "0.6273759", "0.6051898", "0.5702109", "0.5639365", "0.561791", "0.5588953", "0.5581098", "0.55699825", "0.55687726", "0.5563964", "0.55442...
0.72647214
4
spans from one day into another?
function isMultiDayRange(range) { var visibleRange = computeVisibleDayRange(range); return diffDays(visibleRange.start, visibleRange.end) > 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DaySpan(start, end) {\r\n this.start = start;\r\n this.end = end;\r\n }", "function moveFwd() {\r\n var d1 = new Date($(\"#date1\").val())\r\n var d2 = new Date($(\"#date2\").val())\r\n var span = (d2 - d1)/(24*3600*1000);\r\nconsole.log(\"move forward:\", span);\r\n $(\"#date1\").v...
[ "0.61173284", "0.6108083", "0.605244", "0.6019503", "0.5906417", "0.57993567", "0.5658041", "0.56109667", "0.5560023", "0.5557615", "0.5511641", "0.550994", "0.54231775", "0.53779316", "0.5321665", "0.5298226", "0.52858686", "0.52763397", "0.5263714", "0.52461654", "0.5220022...
0.0
-1
Event MUST have a recurringDef
function expandRecurringRanges(eventDef, duration, framingRange, dateEnv, recurringTypes) { var typeDef = recurringTypes[eventDef.recurringDef.typeId]; var markers = typeDef.expand(eventDef.recurringDef.typeData, { start: dateEnv.subtract(framingRange.start, duration), end: frami...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "detachFromRecurringEvent() {\n const me = this,\n // For access further down, breaking the link involves engine if trying to get the occurrenceDate later,\n // resulting in the wrong date\n {\n recurringTimeSpan,\n occurrenceDate,\n startDate\n } = me; // Break the link\n\n m...
[ "0.6250065", "0.6193538", "0.61593086", "0.61259276", "0.5959278", "0.5946913", "0.5869192", "0.58194005", "0.5787982", "0.57395273", "0.5701669", "0.56963146", "0.5679349", "0.5674768", "0.56331956", "0.5631717", "0.5628544", "0.55883616", "0.5558141", "0.55292577", "0.55247...
0.53987664
29
Merges an array of objects into a single object. The second argument allows for an array of property names who's object values will be merged together.
function mergeProps(propObjs, complexProps) { var dest = {}; var i; var name; var complexObjs; var j; var val; var props; if (complexProps) { for (i = 0; i < complexProps.length; i++) { name = complexProps[i]; co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeObjects(args) {\n for (var i = 0; i < args.length; i++) {\n if (Object.prototype.toString.call(args[i]) !== '[object Object]') {\n throw new Error('Will only take objects as inputs');\n }\n }\n var result = {};\n for (var i = 0; i < args.length; i++) {\n fo...
[ "0.69373506", "0.6712163", "0.67021805", "0.6658761", "0.6516402", "0.6401773", "0.634528", "0.6338674", "0.6338553", "0.6322913", "0.62239677", "0.6167969", "0.6166625", "0.6122369", "0.61187977", "0.6116542", "0.61050516", "0.6099282", "0.60824347", "0.60762733", "0.6004798...
0.0
-1
retrieves events that have the same groupId as the instance specified by `instanceId` or they are the same as the instance. why might instanceId not be in the store? an event from another calendar?
function getRelevantEvents(eventStore, instanceId) { var instance = eventStore.instances[instanceId]; if (instance) { var def_1 = eventStore.defs[instance.defId]; // get events/instances with same group var newStore = filterEventStoreDefs(eventStore, function (lookDef...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRelevantEvents(eventStore, instanceId) {\n var instance = eventStore.instances[instanceId];\n if (instance) {\n var def_1 = eventStore.defs[instance.defId];\n // get events/instances with same group\n var newStore = filterEventStoreDefs(eventStore, function (lookDef) {\n ...
[ "0.70782846", "0.7045974", "0.6984887", "0.69343823", "0.6912373", "0.5262535", "0.52316386", "0.5119974", "0.5064087", "0.5043418", "0.5043418", "0.5043418", "0.4945412", "0.49238515", "0.47870988", "0.47679257", "0.4758424", "0.46505588", "0.4594084", "0.45679685", "0.45670...
0.7002734
4
SIDEEFFECT: will mutate ranges. Will return a new array result.
function invertRanges(ranges, constraintRange) { var invertedRanges = []; var start = constraintRange.start; // the end of the previous range. the start of the new range var i; var dateRange; // ranges need to be in order. required for our date-walking algorithm ranges.so...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rangeArr(start, end) {\n if (start === end) return [];\n\n return ([start].concat(rangeArr(start + 1, end)));\n\n}", "function addArray(ranges) {\n var origRanges = ranges;\n var newRanges = [];\n var overlap = false;\n for (var i = 0; i < origRanges.length; i += 1) {\n for (var j =...
[ "0.72443277", "0.70423394", "0.69378763", "0.69124013", "0.67867565", "0.6784122", "0.6778448", "0.67751783", "0.6754953", "0.67325306", "0.6716926", "0.6714848", "0.67017925", "0.6695746", "0.66920924", "0.66432124", "0.66388494", "0.6626336", "0.6597729", "0.6596321", "0.65...
0.0
-1
If the given date is not within the given range, move it inside. (If it's past the end, make it one millisecond before the end).
function constrainMarkerToRange(date, range) { if (range.start != null && date < range.start) { return range.start; } if (range.end != null && date >= range.end) { return new Date(range.end.valueOf() - 1); } return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveFwd() {\r\n var d1 = new Date($(\"#date1\").val())\r\n var d2 = new Date($(\"#date2\").val())\r\n var span = (d2 - d1)/(24*3600*1000);\r\nconsole.log(\"move forward:\", span);\r\n $(\"#date1\").val($(\"#date2\").val());\r\n //$(\"#date2\").val(new Date(d2.getTime()+span).toISOString().split('T')[...
[ "0.640521", "0.628524", "0.62778217", "0.62440205", "0.61757237", "0.6140865", "0.6140865", "0.6140865", "0.6007711", "0.59873414", "0.56692207", "0.5478504", "0.5436301", "0.5418885", "0.53912234", "0.53270054", "0.51932496", "0.5190712", "0.5190712", "0.5190712", "0.5105092...
0.6266933
6
always executes the workerFunc, but if the result is equal to the previous result, return the previous result instead.
function memoizeOutput(workerFunc, equalityFunc) { var cachedRes = null; return function () { var newRes = workerFunc.apply(this, arguments); if (cachedRes === null || !(cachedRes === newRes || equalityFunc(cachedRes, newRes))) { cachedRes = newRes; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoizeOutput(workerFunc, equalityFunc) {\n var cachedRes = null;\n return function () {\n var newRes = workerFunc.apply(this, arguments);\n\n if (cachedRes === null || !(cachedRes === newRes || equalityFunc(cachedRes, newRes))) {\n cachedRes = newRes;\n }\n\n ...
[ "0.67986786", "0.6793849", "0.6693426", "0.65086395", "0.60093176", "0.53951335", "0.536148", "0.5309094", "0.52749926", "0.5168996", "0.5131221", "0.5096157", "0.50795597", "0.5065873", "0.5060239", "0.5016241", "0.5007648", "0.50023794", "0.49737942", "0.49678874", "0.49523...
0.67426485
4
Range Formatting Utils 0 = exactly the same 1 = different by time and bigger
function computeMarkerDiffSeverity(d0, d1, ca) { if (ca.getMarkerYear(d0) !== ca.getMarkerYear(d1)) { return 5; } if (ca.getMarkerMonth(d0) !== ca.getMarkerMonth(d1)) { return 4; } if (ca.getMarkerDay(d0) !== ca.getMarkerDay(d1)) { return 2; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Format() {}", "function Format() {}", "function TStylingRange() {}", "function TStylingRange() {}", "function TStylingRange() { }", "_getRange() {\n const that = this;\n\n if (that.logarithmicScale) {\n that._range = that._drawMax - that._drawMin;\n return;\n ...
[ "0.61203897", "0.61203897", "0.5941997", "0.5941997", "0.5932185", "0.5861491", "0.5830515", "0.57634425", "0.57445264", "0.57125396", "0.57027084", "0.56629807", "0.5640768", "0.56320024", "0.56173265", "0.56012374", "0.5556259", "0.5536444", "0.55142504", "0.54970175", "0.5...
0.0
-1
String Utils timeZoneOffset is in minutes
function buildIsoString(marker, timeZoneOffset, stripZeroTime) { if (stripZeroTime === void 0) { stripZeroTime = false; } var s = marker.toISOString(); s = s.replace('.000', ''); if (stripZeroTime) { s = s.replace('T00:00:00Z', ''); } if (s.length > 10) { // t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timezone(offset) {\n var minutes = Math.abs(offset);\n var hours = Math.floor(minutes / 60);\n\tminutes = Math.abs(offset%60);\n var prefix = offset < 0 ? \"+\" : \"-\";\n//\tdocument.getElementById('atzo').innerHTML = prefix+hours+\":\"+minutes;\t\n return prefix+hours+\":\"+minutes;\t\n}", ...
[ "0.6731454", "0.6536645", "0.6523671", "0.6376978", "0.62868947", "0.6234645", "0.61826414", "0.61399025", "0.60549206", "0.5985354", "0.59629494", "0.59629494", "0.59629494", "0.59629494", "0.5925084", "0.5924408", "0.590883", "0.59074557", "0.59074557", "0.59074557", "0.590...
0.0
-1
Specifying nextDayThreshold signals that allday ranges should be sliced.
function sliceEventStore(eventStore, eventUiBases, framingRange, nextDayThreshold) { var inverseBgByGroupId = {}; var inverseBgByDefId = {}; var defByGroupId = {}; var bgRanges = []; var fgRanges = []; var eventUis = compileEventUis(eventStore.defs, eventUiBases); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeVisibleDayRange(timedRange, nextDayThreshold) {\n if (nextDayThreshold === void 0) {\n nextDayThreshold = duration_1.createDuration(0);\n }\n\n var startDay = null;\n var endDay = null;\n\n if (timedRange.end) {\n endDay = marker_1.startOfDay(tim...
[ "0.64540946", "0.6373471", "0.63233954", "0.63233954", "0.63233954", "0.63233954", "0.62766325", "0.6178975", "0.57483554", "0.5294317", "0.52778053", "0.51630205", "0.5162787", "0.5073957", "0.5036462", "0.5030246", "0.5023267", "0.49965647", "0.4993016", "0.49821252", "0.49...
0.5165313
13
applies the mutation to ALL defs/instances within the event store
function applyMutationToEventStore(eventStore, eventConfigBase, mutation, calendar) { var eventConfigs = compileEventUis(eventStore.defs, eventConfigBase); var dest = createEmptyEventStore(); for (var defId in eventStore.defs) { var def = eventStore.defs[defId]; dest.defs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyMutationToEventStore(eventStore, eventConfigBase, mutation, context) {\n var eventConfigs = compileEventUis(eventStore.defs, eventConfigBase);\n var dest = createEmptyEventStore();\n for (var defId in eventStore.defs) {\n var def = eventStore.defs[defId];\n ...
[ "0.68634754", "0.6662366", "0.6651558", "0.66345483", "0.5874537", "0.5667056", "0.5667056", "0.55764717", "0.54928976", "0.5418426", "0.5389518", "0.5369385", "0.53522754", "0.5299219", "0.5299219", "0.52860737", "0.5282436", "0.52693194", "0.5253856", "0.5213634", "0.521122...
0.67085457
3
QUESTION: why not just return instances? do a general objectpropertyexclusion util
function excludeInstances(eventStore, removals) { return { defs: eventStore.defs, instances: filterHash(eventStore.instances, function (instance) { return !removals[instance.instanceId]; }) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static restrict(o, p) {\n for(let prop in o) { // For all props in o\n if (!(prop in p)) delete o[prop]; // Delete if not in p\n }\n return o;\n }", "_applyInstanceProperties(){// Use forEach so this works even if for/of loops are compiled to for loop...
[ "0.5747486", "0.551643", "0.5354217", "0.5278089", "0.5237096", "0.52242744", "0.52242744", "0.52242744", "0.52242744", "0.52242744", "0.52242744", "0.52241045", "0.5222678", "0.5214406", "0.5205124", "0.52047193", "0.52014977", "0.51878345", "0.51825273", "0.5167843", "0.516...
0.5267797
6
highlevel segmentingaware tester functions
function isInteractionValid(interaction, calendar) { return isNewPropsValid({ eventDrag: interaction }, calendar); // HACK: the eventDrag props is used for ALL interactions }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inSegment(xP, yP) {\r\n }", "function SegmentBase() {\n}", "function handleSegment(segment) {\n if (segment[1].text == 'null') {\n return { intertype: 'value', ident: '0', type: 'i32' };\n } else if (segment[1].text == 'zeroinitializer') {\n Types.nee...
[ "0.6690998", "0.5910908", "0.5853755", "0.56974405", "0.5675473", "0.5634244", "0.5618745", "0.558083", "0.55739903", "0.55590624", "0.5554786", "0.55431694", "0.54993105", "0.54791415", "0.5475969", "0.54666835", "0.5439648", "0.54382384", "0.54382384", "0.54143935", "0.5412...
0.0
-1
TODO: move to eventstore file?
function eventStoreToRanges(eventStore) { var instances = eventStore.instances; var ranges = []; for (var instanceId in instances) { ranges.push(instances[instanceId].range); } return ranges; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dumpEvents(filename) {\n const config = this.getConfigFor(filename);\n const resolved = config.resolve();\n const source = resolved.transformFilename(filename);\n const engine = new Engine(resolved, Parser);\n return engine.dumpEvents(source);\n }", "async function saveEvent...
[ "0.58003414", "0.5779717", "0.5774173", "0.5758617", "0.5735078", "0.5735078", "0.56935245", "0.5642374", "0.5590159", "0.5589357", "0.5584359", "0.5529023", "0.54938024", "0.5440014", "0.5428335", "0.54159683", "0.54126257", "0.5412193", "0.5401869", "0.54002666", "0.5397391...
0.0
-1
TODO: move to geom file?
function anyRangesContainRange(outerRanges, innerRange) { for (var _i = 0, outerRanges_1 = outerRanges; _i < outerRanges_1.length; _i++) { var outerRange = outerRanges_1[_i]; if (rangeContainsRange(outerRange, innerRange)) { return true; } } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AstroGeometry() {}", "function GeometryDataProcessor () {}", "function walkGeom(theGeometry) {\n var theGeomPart;\n var coordX;\n var coordY;\n var coordM;\n\n for (var a=0; a < theGeometry.features.length; a++) {\n theGeomPart= theGeometry.features[a].geometry.paths;\n\n ...
[ "0.65883136", "0.65807104", "0.603482", "0.5982536", "0.592685", "0.58256423", "0.56433755", "0.56311667", "0.56293595", "0.56250817", "0.56193644", "0.5586216", "0.55813193", "0.5534764", "0.5502348", "0.54765415", "0.54731673", "0.5468276", "0.5456262", "0.5444078", "0.5425...
0.0
-1