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
Sets the CommandDomain name identifier associated with this Command
setDomain( domain ) { this.domain = domain }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDomain(d) {\n domain = d;\n }", "function update_domain(value) {\n console.log(\"Setting domain to \" + value);\n domain_str = value;\n start();\n}", "get domainId() {\n return this.getStringAttribute('domain_id');\n }", "_setDomain() {\n this.debounce('_setDomai...
[ "0.6110077", "0.56195974", "0.54738057", "0.5304134", "0.5228866", "0.5165355", "0.5059887", "0.50392133", "0.5006604", "0.49770504", "0.49734637", "0.49185735", "0.4880456", "0.46640137", "0.4649088", "0.4614399", "0.4538363", "0.4528864", "0.4512309", "0.44893637", "0.44494...
0.59752905
1
Get the security level of this command. If the security level was specified as a function, returns the return value of that callback
getSecurityLevel() { if( "number" === typeof this.securityLevel ) return this.securityLevel // The possibility of specifying a callback enables dynamic security level detection for user // scripts //TODO: may not be necessary anymore - UserScript implementation calculates sec levels without callback if( "function" === typeof this.securityLevel ) return this.securityLevel() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLevel(){\n return level\n}", "getLevel() {\n return this.level;\n }", "getProtectionLevel() {\n return (this.flags & 0x07);\n }", "_selectLevel() {\n this.level = this.win === 0 ? document.getElementById('level').value : this.level;\n return this.level;\n }...
[ "0.5291448", "0.5202517", "0.5202026", "0.50688964", "0.49205717", "0.4885525", "0.4854984", "0.47991908", "0.47859016", "0.47842178", "0.47842053", "0.47604012", "0.46479693", "0.46141386", "0.45574328", "0.4551828", "0.45497516", "0.4540572", "0.45132726", "0.4507998", "0.4...
0.8057754
0
Performs argument validation then returns a failure response (or usage string), or the return value of the Command operation if all arguments passed validation
execute( context, args ) { if( !args ) { if( this.commandArguments.some( commandArg => commandArg.required ) ) return "function" === typeof this.usage ? this.usage() : this.usage return this.operation( context ) } for( let commandArg of this.commandArguments ) { if( !args[ commandArg.name ] ) { if( commandArg.required ) return {ok: false, msg: this.usage} continue } if( !commandArg.validate( args[ commandArg.name ] ) ) return {ok: false, msg: commandArg.invalidRespose || this.usage} } if( !context.this_script ) { if( this.domain ) context.this_script = `${this.domain.name}.${this.name}` else context.this_script = this.name } return this.operation( context, args ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate() {\n\n if( _this.default ) return;\n\n if( !_this.args[0] ) {\n console.log('Error Name must be specified');\n return args.done();\n }\n }", "function validation(yargs, usage, y18n) {\n const __ = y18n.__;\n const __n = y18n.__n;\n const self = {};\n ...
[ "0.6951666", "0.68177897", "0.66325104", "0.6445509", "0.63689005", "0.63407826", "0.6306658", "0.5906155", "0.58963096", "0.5892994", "0.5888693", "0.5865365", "0.57682407", "0.57586926", "0.5731963", "0.5731358", "0.572676", "0.5715413", "0.56563216", "0.5648754", "0.564649...
0.6175876
7
Method called from client to get the temporary url to upload file.
function get_presigned_url(info){ file_manager.get_presigned_url(info) .then( request_resolved_handler, request_failure_handler ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUploadUrl() {\n\t$.get('/generate_upload_url',\n\t\t{},\n\t\tfunction(message) {\n\t\t\tconsole.log('/generate_upload_url response:' + message);\n\n\t\t\t$('#upload_song_form').attr('action', message);\n\t\t}\n\t);\n}", "uploadFileURL() {\n return `${this.baseUrl}/renku/cache.files_upload?override...
[ "0.68468076", "0.6492023", "0.6389003", "0.62240815", "0.61902213", "0.59957194", "0.5923", "0.5915313", "0.58653253", "0.5827945", "0.5819527", "0.57852304", "0.57613397", "0.573842", "0.57219476", "0.5705448", "0.5694784", "0.5668632", "0.5666034", "0.56566244", "0.56455785...
0.5297862
39
Method used to send file to box conversion
function send_file_to_conversion(info){ conversion.start(info) .then( request_resolved_handler, request_failure_handler ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendFile(id, option) {\n let fileReader = new FileReader();\n let files = document.getElementById(\"sendFile\").files; // Gets an array of our selected files\n for (let i in files) {\n if (files[i].name == option) { // Find the requested file\n\n fileReader.readAsArrayBuffer(files[i]); // Get t...
[ "0.6984915", "0.6727951", "0.6410764", "0.6326571", "0.6247063", "0.61967427", "0.61744654", "0.61729664", "0.60851234", "0.6063756", "0.6052784", "0.6044149", "0.60301656", "0.59962004", "0.59663683", "0.5913222", "0.59029764", "0.58864355", "0.5880568", "0.5880568", "0.5754...
0.68635476
1
An ES6 shortcut for grabbing state's weather property
function mapStateToProps( { weather } ) { return { weather } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get weatherState() {\n if (this._numberOfPassedTests === 0) {\n return this._testWeatherState.STORM.value;\n } else if (this._numberOfPassedTests > 0 && this._numberOfFailedTests > 0) {\n return this._testWeatherState.RAIN.value;\n } else if (this._numberOfPassedTests > 0 && this._numberOfSkippe...
[ "0.7433041", "0.7229588", "0.71036255", "0.7014664", "0.7014664", "0.7014664", "0.7014664", "0.6556008", "0.6432508", "0.6369011", "0.6362607", "0.6338683", "0.62956", "0.62896675", "0.62883353", "0.6268833", "0.6265695", "0.6180074", "0.6084729", "0.6075449", "0.60602474", ...
0.5914153
34
Adding a function somewhat like onClick
function checkcalcHandler(e){ e.preventDefault(); var cp= inputs[0].value; var quantity= inputs[1].value; var sell= inputs[2].value; if( !isNaN(cp) && !isNaN(quantity) && !isNaN(sell)){ cp= Number(cp); quantity= Number(quantity); sell= Number(sell); //loss-calculation if( cp>0 && quantity>0 && sell>0){ if(cp>sell){ var loss= ((cp-sell)*quantity).toFixed(2); var losspercent= (((cp-sell)*100)/cp).toFixed(2); outputDiv.innerHTML= `<div> You lost ${losspercent}%. Your total loss is ₹${loss}. </div>`; motion.innerHTML = "<img src='images/poverty.jpg' width='350px' height='300px' />"; } else{ //profit-calculation var profit = ((sell-cp)*quantity).toFixed(2) var profitPercent=(((sell-cp)*100)/sell).toFixed(2) ; outputDiv.innerHTML= `<div> You gained ${profitPercent}%. Your total profit is ₹${profit}</div>`; motion.innerHTML = "<img src='images/rich.jpg' width='400px' height='300px' />"; }} else { //error-display output.innerHTML= "Please Enter values greater than 0 that is positive value"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onClick() {\n}", "function onClick(e) {\n }", "onClick() {\n }", "onClick() {\n // Verifica se existe a função para processar o click e a invoca\n if(this.handleClick) {\n this.handleClick(this);\n }\n }", "onclick(){}", "onClick(functionName) {\n return functionName;\n ...
[ "0.74852437", "0.7390515", "0.7314762", "0.7284413", "0.72449476", "0.69785166", "0.69364333", "0.6913145", "0.68753654", "0.68709433", "0.68111765", "0.68111765", "0.68111765", "0.6791457", "0.6729995", "0.669639", "0.6646971", "0.662027", "0.6552217", "0.65108156", "0.64728...
0.0
-1
Constructs a new Campaign.
constructor() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Campaign(CampaignName,CampaignStatus,Clicks,ClickType,Impressions,Ctr,AverageCpc,Cost,AveragePosition,Conversions,ConversionRate,CostPerConversion) {\n\t\t\tthis.CampaignName = CampaignName;\n\t\t\tthis.CampaignStatus=CampaignStatus;\n\t\t\tthis.Clicks = Clicks;\n\t\t\tthis.ClickType = ClickType;\n\t\t\tt...
[ "0.70029306", "0.5826962", "0.573166", "0.55905443", "0.54817784", "0.5456376", "0.53232956", "0.53116", "0.5267801", "0.51886314", "0.5174087", "0.5128615", "0.50974685", "0.5067083", "0.49931994", "0.49164897", "0.48905104", "0.4885483", "0.4805636", "0.47975293", "0.479452...
0.0
-1
Active Threads Over Time
function refreshActiveThreadsOverTime(fixTimestamps) { var infos = activeThreadsOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotActiveThreadsOverTime"))) { infos.createGraph(); }else{ var choiceContainer = $("#choicesActiveThreadsOverTime"); createLegend(choiceContainer, infos); infos.createGraph(); setGraphZoomable("#flotActiveThreadsOverTime", "#overviewActiveThreadsOverTime"); $('#footerActiveThreadsOverTime .legendColorBox > div').each(function(i){ $(this).clone().prependTo(choiceContainer.find("li").eq(i)); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendActiveThreadCountRes() {\n \n }", "function inc_busy()\n{\n background_jobs++;\n update_busy_indicator();\n}", "get threads() {\r\n return new Threads(this);\r\n }", "scheduler() {\n const {busyApps, appPriorities, ticks} = this;\n this.__apps.map((app, appId) => {\n return...
[ "0.6576497", "0.59847337", "0.58223873", "0.5718862", "0.55958724", "0.5595724", "0.55418223", "0.55237967", "0.5521639", "0.5500782", "0.54795545", "0.54381746", "0.54291314", "0.5426496", "0.54111665", "0.5372322", "0.53668267", "0.5361897", "0.53617936", "0.5358493", "0.53...
0.0
-1
Bytes throughput Over Time
function refreshBytesThroughputOverTime(fixTimestamps) { var infos = bytesThroughputOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotBytesThroughputOverTime"))){ infos.createGraph(); }else{ var choiceContainer = $("#choicesBytesThroughputOverTime"); createLegend(choiceContainer, infos); infos.createGraph(); setGraphZoomable("#flotBytesThroughputOverTime", "#overviewBytesThroughputOverTime"); $('#footerBytesThroughputOverTime .legendColorBox > div').each(function(i){ $(this).clone().prependTo(choiceContainer.find("li").eq(i)); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _calculateDownloadTime(sizeInBytes) {\n return Math$floor(sizeInBytes / _throughput); \n }", "_measureSpeed() {\n\t\tif(!this._socket) return;\n\t\tif(!this._connected) {\n\t\t\tthis._upspeed = 0;\n\t\t\tthis._downspeed = 0;\n\t\t}\n\t\tconst dt = new Date();\n\t\tconst dtime = (dt - this._mea...
[ "0.6508586", "0.6091145", "0.5925868", "0.591433", "0.5827529", "0.5751863", "0.57444245", "0.57324314", "0.56583023", "0.56513727", "0.5635747", "0.5610187", "0.56025785", "0.5594923", "0.55727565", "0.5547173", "0.5543636", "0.55419546", "0.5533669", "0.5532342", "0.5529149...
0.0
-1
Response Times Over Time
function refreshResponseTimeOverTime(fixTimestamps) { var infos = responseTimesOverTimeInfos; prepareSeries(infos.data); if(infos.data.result.series.length == 0) { setEmptyGraph("#bodyResponseTimeOverTime"); return; } if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotResponseTimesOverTime"))){ infos.createGraph(); }else{ var choiceContainer = $("#choicesResponseTimesOverTime"); createLegend(choiceContainer, infos); infos.createGraph(); setGraphZoomable("#flotResponseTimesOverTime", "#overviewResponseTimesOverTime"); $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){ $(this).clone().prependTo(choiceContainer.find("li").eq(i)); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseTime (req, res) {\n if (!res._header || !req._startAt) {\n return ''\n }\n\n var tdiff = process.hrtime(req._startAt)\n , ms = tdiff[0] * 1e3 + tdiff[1] * 1e-6\n\n return ms.toFixed(3)\n}", "function getServerTime(request, response) {\r\n\tvar time = new Date();\r\n\t\r\n\tvar result =...
[ "0.7092822", "0.6836103", "0.639537", "0.63374466", "0.6251988", "0.61462384", "0.6100139", "0.6068924", "0.6020777", "0.60106874", "0.60009605", "0.59932894", "0.59754544", "0.597369", "0.59192896", "0.5914399", "0.5872192", "0.5872192", "0.5872192", "0.5850241", "0.5811009"...
0.0
-1
Connect Time Over Time
function refreshConnectTimeOverTime(fixTimestamps) { var infos = connectTimeOverTimeInfos; prepareSeries(infos.data); if(infos.data.result.series.length == 0) { setEmptyGraph("#bodyConnectTimeOverTime"); return; } if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotConnectTimeOverTime"))) { infos.createGraph(); }else { var choiceContainer = $("#choicesConnectTimeOverTime"); createLegend(choiceContainer, infos); infos.createGraph(); setGraphZoomable("#flotConnectTimeOverTime", "#overviewConnectTimeOverTime"); $('#footerConnectTimeOverTime .legendColorBox > div').each(function(i){ $(this).clone().prependTo(choiceContainer.find("li").eq(i)); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connectTimeout() {\n var worker = cluster.workers[this.worker_key]\n if ( worker !== undefined ) {\n if ( !(worker.isConnected()) ) {\n var onset = this.trackingStartTime\n var diff = Date.now() - onset\n //\n //if ( diff > MAX_CONNECT_FAIL_TIME ) writeConsoleLog('log',{com...
[ "0.57900476", "0.5770421", "0.5753667", "0.5660272", "0.55595124", "0.553363", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5528221", "0.55238473", "0.55238473", "0.55238473", "0.55238473", "0.55238473", "0.5523847...
0.55215293
64
Response Time Percentiles Over Time
function refreshResponseTimePercentilesOverTime(fixTimestamps) { var infos = responseTimePercentilesOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotResponseTimePercentilesOverTime"))) { infos.createGraph(); }else { var choiceContainer = $("#choicesResponseTimePercentilesOverTime"); createLegend(choiceContainer, infos); infos.createGraph(); setGraphZoomable("#flotResponseTimePercentilesOverTime", "#overviewResponseTimePercentilesOverTime"); $('#footerResponseTimePercentilesOverTime .legendColorBox > div').each(function(i){ $(this).clone().prependTo(choiceContainer.find("li").eq(i)); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getReqPerTime() {\n let sum_time = 0.0\n let dif = 0.0\n for (let d = 0; d < this.state.data.length; d++) {\n dif = new Date(this.state.data[d].dt_end_log).getTime() - new Date(this.state.data[d].dt_Start_Log).getTime()\n sum_time += dif / 1000\n }\n \n return (sum_time / this.state.data....
[ "0.6469232", "0.59043026", "0.57266444", "0.55641556", "0.55416846", "0.55416846", "0.55416846", "0.55416846", "0.55416846", "0.5537933", "0.5534539", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", ...
0.55332816
44
Response Time vs Request
function refreshResponseTimeVsRequest() { var infos = responseTimeVsRequestInfos; prepareSeries(infos.data); if (isGraph($("#flotResponseTimeVsRequest"))){ infos.createGraph(); }else{ var choiceContainer = $("#choicesResponseTimeVsRequest"); createLegend(choiceContainer, infos); infos.createGraph(); setGraphZoomable("#flotResponseTimeVsRequest", "#overviewResponseTimeVsRequest"); $('#footerResponseRimeVsRequest .legendColorBox > div').each(function(i){ $(this).clone().prependTo(choiceContainer.find("li").eq(i)); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseTime (req, res) {\n if (!res._header || !req._startAt) {\n return ''\n }\n\n var tdiff = process.hrtime(req._startAt)\n , ms = tdiff[0] * 1e3 + tdiff[1] * 1e-6\n\n return ms.toFixed(3)\n}", "function getServerTime(request, response) {\r\n\tvar time = new Date();\r\n\t\r\n\tvar result =...
[ "0.75744617", "0.7416566", "0.6893877", "0.68084794", "0.6781717", "0.6561443", "0.652187", "0.65142745", "0.6462254", "0.6462254", "0.6462254", "0.6245028", "0.6245028", "0.62287295", "0.6191165", "0.61851764", "0.61500037", "0.61434627", "0.6104452", "0.60714453", "0.594592...
0.0
-1
Total Transactions per second
function refreshTotalTPS(fixTimestamps) { var infos = totalTPSInfos; // We want to ignore seriesFilter prepareSeries(infos.data, false, true); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 25200000); } if(isGraph($("#flotTotalTPS"))){ infos.createGraph(); }else{ var choiceContainer = $("#choicesTotalTPS"); createLegend(choiceContainer, infos); infos.createGraph(); setGraphZoomable("#flotTotalTPS", "#overviewTotalTPS"); $('#footerTotalTPS .legendColorBox > div').each(function(i){ $(this).clone().prependTo(choiceContainer.find("li").eq(i)); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "totalTime() {\n let time = 0\n this.measures.forEach(m => time += m.totalTime())\n return time\n }", "function updateValues() {\n\tconst amounts = transactions.map((transaction) => transaction.time);\n\n\tconst total = amounts.reduce((acc, item) => (acc += item), 0);\n\t//console.log(time...
[ "0.65046084", "0.6479991", "0.6461238", "0.6340553", "0.63175285", "0.62999165", "0.6285214", "0.6285214", "0.6269029", "0.62109965", "0.6122031", "0.611619", "0.5952385", "0.587621", "0.5870545", "0.584586", "0.58369875", "0.58181375", "0.5804055", "0.5803499", "0.579104", ...
0.0
-1
Collapse the graph matching the specified DOM element depending the collapsed status
function collapse(elem, collapsed){ if(collapsed){ $(elem).parent().find(".fa-chevron-up").removeClass("fa-chevron-up").addClass("fa-chevron-down"); } else { $(elem).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-up"); if (elem.id == "bodyBytesThroughputOverTime") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshBytesThroughputOverTime(true); } document.location.href="#bytesThroughputOverTime"; } else if (elem.id == "bodyLatenciesOverTime") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshLatenciesOverTime(true); } document.location.href="#latenciesOverTime"; } else if (elem.id == "bodyCustomGraph") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshCustomGraph(true); } document.location.href="#responseCustomGraph"; } else if (elem.id == "bodyConnectTimeOverTime") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshConnectTimeOverTime(true); } document.location.href="#connectTimeOverTime"; } else if (elem.id == "bodyResponseTimePercentilesOverTime") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshResponseTimePercentilesOverTime(true); } document.location.href="#responseTimePercentilesOverTime"; } else if (elem.id == "bodyResponseTimeDistribution") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshResponseTimeDistribution(); } document.location.href="#responseTimeDistribution" ; } else if (elem.id == "bodySyntheticResponseTimeDistribution") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshSyntheticResponseTimeDistribution(); } document.location.href="#syntheticResponseTimeDistribution" ; } else if (elem.id == "bodyActiveThreadsOverTime") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshActiveThreadsOverTime(true); } document.location.href="#activeThreadsOverTime"; } else if (elem.id == "bodyTimeVsThreads") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshTimeVsThreads(); } document.location.href="#timeVsThreads" ; } else if (elem.id == "bodyCodesPerSecond") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshCodesPerSecond(true); } document.location.href="#codesPerSecond"; } else if (elem.id == "bodyTransactionsPerSecond") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshTransactionsPerSecond(true); } document.location.href="#transactionsPerSecond"; } else if (elem.id == "bodyTotalTPS") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshTotalTPS(true); } document.location.href="#totalTPS"; } else if (elem.id == "bodyResponseTimeVsRequest") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshResponseTimeVsRequest(); } document.location.href="#responseTimeVsRequest"; } else if (elem.id == "bodyLatenciesVsRequest") { if (isGraph($(elem).find('.flot-chart-content')) == false) { refreshLatenciesVsRequest(); } document.location.href="#latencyVsRequest"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collapse_unload(d,svg_dom)\n\t\t{\n\n\t\t\t//get all nodes\n\t\t\tvar nodes = d3.select(svg_dom).selectAll(\"g.node\").data();\n\t\t\tvar idx = nodes.findIndex( //find node that is already opened\n\t\t\t\t\tfunction(element)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn ( element.depth === d.depth && element.children ...
[ "0.6733574", "0.66582936", "0.6610769", "0.6518608" ]
0.0
-1
Activates or deactivates all series of the specified graph (represented by id parameter) depending on checked argument.
function toggleAll(id, checked){ var placeholder = document.getElementById(id); var cases = $(placeholder).find(':checkbox'); cases.prop('checked', checked); $(cases).parent().children().children().toggleClass("legend-disabled", !checked); var choiceContainer; if ( id == "choicesBytesThroughputOverTime"){ choiceContainer = $("#choicesBytesThroughputOverTime"); refreshBytesThroughputOverTime(false); } else if(id == "choicesResponseTimesOverTime"){ choiceContainer = $("#choicesResponseTimesOverTime"); refreshResponseTimeOverTime(false); }else if(id == "choicesResponseCustomGraph"){ choiceContainer = $("#choicesResponseCustomGraph"); refreshCustomGraph(false); } else if ( id == "choicesLatenciesOverTime"){ choiceContainer = $("#choicesLatenciesOverTime"); refreshLatenciesOverTime(false); } else if ( id == "choicesConnectTimeOverTime"){ choiceContainer = $("#choicesConnectTimeOverTime"); refreshConnectTimeOverTime(false); } else if ( id == "choicesResponseTimePercentilesOverTime"){ choiceContainer = $("#choicesResponseTimePercentilesOverTime"); refreshResponseTimePercentilesOverTime(false); } else if ( id == "choicesResponseTimePercentiles"){ choiceContainer = $("#choicesResponseTimePercentiles"); refreshResponseTimePercentiles(); } else if(id == "choicesActiveThreadsOverTime"){ choiceContainer = $("#choicesActiveThreadsOverTime"); refreshActiveThreadsOverTime(false); } else if ( id == "choicesTimeVsThreads"){ choiceContainer = $("#choicesTimeVsThreads"); refreshTimeVsThreads(); } else if ( id == "choicesSyntheticResponseTimeDistribution"){ choiceContainer = $("#choicesSyntheticResponseTimeDistribution"); refreshSyntheticResponseTimeDistribution(); } else if ( id == "choicesResponseTimeDistribution"){ choiceContainer = $("#choicesResponseTimeDistribution"); refreshResponseTimeDistribution(); } else if ( id == "choicesHitsPerSecond"){ choiceContainer = $("#choicesHitsPerSecond"); refreshHitsPerSecond(false); } else if(id == "choicesCodesPerSecond"){ choiceContainer = $("#choicesCodesPerSecond"); refreshCodesPerSecond(false); } else if ( id == "choicesTransactionsPerSecond"){ choiceContainer = $("#choicesTransactionsPerSecond"); refreshTransactionsPerSecond(false); } else if ( id == "choicesTotalTPS"){ choiceContainer = $("#choicesTotalTPS"); refreshTotalTPS(false); } else if ( id == "choicesResponseTimeVsRequest"){ choiceContainer = $("#choicesResponseTimeVsRequest"); refreshResponseTimeVsRequest(); } else if ( id == "choicesLatencyVsRequest"){ choiceContainer = $("#choicesLatencyVsRequest"); refreshLatenciesVsRequest(); } var color = checked ? "black" : "#818181"; if(choiceContainer != null) { choiceContainer.find("label").each(function(){ this.style.color = color; }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchAllGraphItems(flag) {\n\t$$('.graphCheckBox').each(function(checkbox) {\n\t\tif (!checkbox.disabled) {\n\t\t\tcheckbox.checked = flag;\n\t\t}\n\t});\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id)...
[ "0.5351941", "0.5350363", "0.5350363", "0.5350363", "0.5350363", "0.5350363", "0.5350363", "0.5350363", "0.5350363", "0.5350363", "0.5308214", "0.5308214", "0.5308214", "0.5308214", "0.5308214", "0.5308214", "0.5308214", "0.5308214", "0.5308214", "0.5308214", "0.5308214", "...
0.0
-1
Private static check type of enemies.
function checkType(type) { var types = TankWar.enemies.types.clone(); if (!type) type = 'r'; if (TankWar.enemies[type].leftNum > 0) return type; types.remove(type); for (var i = 0, len = types.length; i < len; i++) { if (TankWar.enemies[types[0]].leftNum === 0) { types.remove(types[0]); } else { return types[0]; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spawnEnemy(enemyType) {\r\n var e;\r\n\r\n if (enemyType == 1) {\r\n e = new beetle_lvl1();\r\n } else if (enemyType == 2) {\r\n e = new beetle_lvl2();\r\n } else if (enemyType == 3) {\r\n e = new beetle_lvl3();\r\n } else if (enemyType == 4) {\r\n e = new beetle_lvl4();\r\n } else if (e...
[ "0.62351185", "0.6115415", "0.60894954", "0.6046621", "0.60350686", "0.59915715", "0.59114295", "0.5905346", "0.59028345", "0.5832799", "0.5796177", "0.5788861", "0.57878995", "0.57813156", "0.5762436", "0.5730507", "0.56194705", "0.56044203", "0.55833244", "0.55823857", "0.5...
0.6481294
0
FB to make sure arr contains 0 and 1 only
function validateList(arr) { var res = true; arr.forEach(val => { if ( val != 0 && val != 1) { res = false; } }); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkArray(arr) {\n return arr.reduce(function(a, b){ return (a === b) ? a : false; });\n }", "function isUniform(arr) {\n var first = arr[0];\n arr.forEach(function(element) {\n if(element !== first) {\n return false;\n }\n });\n ...
[ "0.74468416", "0.71956456", "0.7164281", "0.70977324", "0.7050056", "0.6990928", "0.6937012", "0.69178784", "0.6902553", "0.6901011", "0.6889636", "0.6883734", "0.6764717", "0.6717112", "0.6687193", "0.6598319", "0.6590741", "0.65788174", "0.655681", "0.6533295", "0.6531268",...
0.6993638
5
Update global shader uniform values
updateShaders(time, obj) { let shader, x; obj = obj || {}; for (x = 0; shader = this.runningShaders[x++];) { for (let uniform in obj.uniforms) { if (uniform in shader.material.uniforms) { shader.material.uniforms[uniform].value = obj.uniforms[uniform]; } } if ('cameraPosition' in shader.material.uniforms && this.mainCamera) { shader.material.uniforms.cameraPosition.value = this.mainCamera.position.clone(); } if ('viewMatrix' in shader.material.uniforms && this.mainCamera) { shader.material.uniforms.viewMatrix.value = this.mainCamera.matrixWorldInverse; } if ('time' in shader.material.uniforms) { shader.material.uniforms.time.value = time; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateUniformValues() {\n this.scene.shaders[0].setUniformsValues({ uSampler: 0, uSampler2: 1 });\n this.scene.shaders[0].setUniformsValues({ normScale: this.heightScale });\n }", "function updateUniforms() {\n material.uniforms.useModelCoordinates.value = guiProperties.coordinates ? 1 : 0...
[ "0.7787042", "0.7478398", "0.7416255", "0.6985785", "0.696874", "0.68516946", "0.6749683", "0.67397606", "0.6673904", "0.66558725", "0.66522264", "0.66163236", "0.65320814", "0.6476947", "0.6475208", "0.6472943", "0.64253014", "0.64156896", "0.6405456", "0.6405456", "0.640545...
0.60453546
90
Convenience methods so we don't have to include underscore
function extend() { let length = arguments.length, obj = arguments[0]; if (length < 2) { return obj; } for (let index = 1; index < length; index++) { let source = arguments[index], keys = Object.keys(source || {}), l = keys.length; for (let i = 0; i < l; i++) { let key = keys[i]; obj[key] = source[key]; } } return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _() { }", "function _() { }", "function _() { }", "function _() { }", "function _() { }", "function baseLodash() {}", "function baseLodash() {}", "function baseLodash() {}", "function baseLodash() {}", "function baseLodash() {}", "function _() { undefined; }", "function baseLodash() ...
[ "0.6913383", "0.6913383", "0.6913383", "0.6913383", "0.6913383", "0.6790308", "0.6790308", "0.6790308", "0.6790308", "0.6790308", "0.66982484", "0.66088045", "0.6563799", "0.6526402", "0.6526402", "0.6526402", "0.6526402", "0.6526402", "0.6526402", "0.6526402", "0.6526402", ...
0.0
-1
generateYoutubeModal This function creates a modal and the video contained within when clicking the button with the ID of HowToPlay. It also adds an event listener to the close button to destroy the video to prevent it playing when unseen. Returns nothing.
function generateYoutubeModal() { let trigger = $("#HowToPlay"); trigger.click(function() { let targetModal = $(this).data("target"); videoSource = $(this).attr("data-video"); $(`${targetModal} iframe`).attr('src', videoSource); $(`${targetModal} button.close`).click(function() {//fast and kinda dirty way of getting the elements in the modal, but as long as it works $(`${targetModal} iframe`).attr('src', ''); //destroys the videoplayer when the modal closes, should keep potential issues to a minimum. }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoPlayYouTubeModal() {\n var trigger = $(\"body\").find('[data-toggle=\"modal\"]');\n trigger.click(function () {\n var theModal = $(this).data(\"target\"),\n videoSRC = $(this).attr(\"data-theVideo\"),\n videoSRCauto = videoSRC + \"?autoplay=1\";\n $(theModal +...
[ "0.73287", "0.7281577", "0.72691715", "0.72438484", "0.72402877", "0.7192516", "0.71870756", "0.7170352", "0.71472573", "0.7139449", "0.6827689", "0.67540294", "0.66793746", "0.6631816", "0.6434449", "0.6431375", "0.6341636", "0.62298244", "0.6214074", "0.6136257", "0.6109957...
0.85131836
0
Generates and returns a text string of the location of the card's art.
getImageSource(){ return `assets/images/cards/${this.rank}_of_${this.suit}.png`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCard(place){\n\treturn `\n<div>\n\t<p>\n <image width=\"30\" src=\"data:image/png;base64,${place.photos[0].photo_reference}\"/> \n\t\t<strong>${place.name}</strong>\n\n\t\t<em class=\"red\">${place.rating}</em>\n\t</p>\n</div>`;\n}", "function createArtCard(holder, art) {\n\tvar card = new Card(...
[ "0.61005825", "0.60164374", "0.5869127", "0.5848913", "0.5828174", "0.5824972", "0.580682", "0.5779558", "0.576762", "0.57061845", "0.5705451", "0.56569093", "0.5631677", "0.5622399", "0.5613949", "0.55961263", "0.5595953", "0.55926627", "0.5590978", "0.5585789", "0.5583683",...
0.0
-1
Takes takes a number and sets the cards rank and value based on that number, with special considerations taken for Aces, Jacks, Queens, and Kings.
setCardValue(number){ this.rank = SPECIAL_NUMBER.includes(number) ? CARD_NUMBER[number] : (number + 1).toString(); this.value = SPECIAL_NUMBER.includes(number) ? CARD_VALUES[number] : (number+1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rankCard(card) {\n switch (card.value) {\n case \"jack\":\n return 11;\n break;\n case \"queen\":\n return 12;\n break;\n case \"king\":\n return 13;\n break;\n case \"ace\":\n return 14;\n break;\n default:\n return card.value;\n }\n}", "fun...
[ "0.77104133", "0.7178996", "0.6837831", "0.679273", "0.6684823", "0.6636286", "0.66160685", "0.6585314", "0.6556737", "0.6517061", "0.6509793", "0.6375928", "0.6272848", "0.62511504", "0.62299204", "0.61970526", "0.6183948", "0.6164831", "0.61410415", "0.6117873", "0.6115325"...
0.8092839
0
Sets the suit based on the value passed via the 'suit' variable.
setCardSuit(suit){ this.suit = CARD_SUITS[suit]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function /*char*/ suit(/*int*/ card) {\n\t//return( suits['c'+(card % NSUITS)] );\n\treturn( suits[card % NSUITS] );\n}", "function Card(suit, value) {\n this.suit = suit;\n this.name = value;\n if (value == 'jack' || value == 'queen' || value == 'king') {\n this.value = 10;\n } else if (value =...
[ "0.69348425", "0.67010504", "0.65837353", "0.65429366", "0.6219257", "0.6212316", "0.6187196", "0.61849874", "0.6177993", "0.6114057", "0.60399914", "0.5979556", "0.5949233", "0.5936645", "0.5885299", "0.5838449", "0.5746469", "0.5732587", "0.566931", "0.5643273", "0.56217414...
0.8081808
0
Calculates the total value for the player's hand Returns this total as a number.
calulateHandValue(){ //Sorts the hand by in ascending order of card value, then reverses it for simpler calculation. const sortedHand = this.hand.slice().sort((a,b)=>a.value - b.value).reverse(); //Now, to add up the sum of the cards. let handTotal = 0; sortedHand.forEach(element => { if(element.value === 0) { if(handTotal <= 10){ handTotal += 11; //Ace is 11 if it wouldn't make the hand go bust, }else{ handTotal += 1;//and is 1 otherwise. } }else{ handTotal += element.value; } }); return handTotal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumPlayerTotal () {\nfor ( var i = 0; i < playerHand.length; i++){\n playerTotal += playerHand[i].weight;\n }\n return playerTotal;\n}", "function totalValue(player) {\n let result = 0;\n for (i = 0; i < player.length; i++) {\n result += player[i].value\n }\n return resul...
[ "0.7391013", "0.72718483", "0.7199414", "0.7132879", "0.70239073", "0.70239073", "0.70239073", "0.6981031", "0.6981031", "0.6981031", "0.6981031", "0.6981031", "0.6981031", "0.6981031", "0.6917842", "0.69051707", "0.6862698", "0.6862698", "0.6862698", "0.6825158", "0.67407644...
0.72690266
2
Draws a card from the targeted deck 'tarDeck' and adds it to the player's hand. It then checks if the new value of the hand would cause the player's turn to end. Returns true if the player's turn has not ended, and false if it has ended.
hit(tarDeck){//returns false if the drawn card causes the player's turn to end, either by hitting 21 or going bust, or by hitting 5 cards. this.hand.push(tarDeck.shift());//removes a card from the top of the deck into the entity's hand. let total = this.calulateHandValue();//I know i should probably have the total be a member variable, but the amount of work it'd take to get it working neatly with display code and aces is too much to bother with. if(total >= 21 || this.hand.length == 5) this.endTurn(); return this.turn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkCard(){\n\tdidSomeoneWin();\n\tif(weHaveAWinner === true || (weHaveAWinner === false && shuffledDeck.length === 0)){\n\t\tchangeDiscard();\n\t}else{\n\t\tif(cardPlayed[0].color === discardPile[0].color || cardPlayed[0].value === discardPile[0].value && cardPlayed[0].value !== \"wild\" && cardPlayed[0...
[ "0.65482134", "0.5860547", "0.5860239", "0.58602345", "0.5859148", "0.58189946", "0.58173674", "0.5784788", "0.57784843", "0.5717243", "0.5699908", "0.56913936", "0.5676046", "0.5673035", "0.56682354", "0.56456745", "0.5637207", "0.5634307", "0.5623366", "0.5606974", "0.56046...
0.6961486
0
Sets the player's turn value to false, as this acts oddly without a method. Returns nothing.
endTurn(){ this.turn = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "switchTurn() {\n if (!this.extraTurn) {\n this.playerOne.isTurn = !this.playerOne.isTurn;\n this.playerTwo.isTurn = !this.playerTwo.isTurn;\n }\n else {this.extraTurn = false;}\n }", "function swapTurns() {\n\toTurn = !oTurn\n}", "function swapPlayer(){\r\n circleTurn ...
[ "0.69536674", "0.6931628", "0.6708265", "0.6572756", "0.65698135", "0.64895564", "0.6465205", "0.6393858", "0.6389651", "0.63673615", "0.6362833", "0.6352224", "0.62905", "0.6285383", "0.6275287", "0.626583", "0.62560356", "0.62508917", "0.6248485", "0.6238539", "0.62042034",...
0.6903717
2
Runs the card.getImageSource() method for each card in the player's hand, then returns an array of these strings.
getHandImages(){ let handImageSources = []; this.hand.forEach(element => handImageSources.push(element.getImageSource())); return handImageSources; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCards(imgPath){\n const suitMap = {\n 0: 'S',\n 1: 'H',\n 2: 'C',\n 3: 'D'\n }\n let allImages = []\n for (let i = 0; i < this.hand.length; i++){\n if (this.hand[i] === 0){\n allImages.push('Purple.png')\n ...
[ "0.6513561", "0.60545", "0.5703962", "0.56681126", "0.5644581", "0.56418496", "0.5622966", "0.5601071", "0.5487944", "0.5480824", "0.5471902", "0.5467087", "0.5401998", "0.5388744", "0.53823876", "0.5367874", "0.5348991", "0.5320926", "0.53206384", "0.53038234", "0.53038234",...
0.72641927
0
updates the card sizes based on 'width' and relocates the originX and originY values based on the passed x and y values.
updateSize(width, xPos, yPos){ this.cardWidth = width; this.cardHeight = width*1.5; this.originX = xPos; this.originY = yPos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSizes()\n {\n if (DOM.container.offsetHeight > DOM.container.offsetWidth)\n {\n DOM.container.style.minWidth = DOM.container.offsetHeight + \"PX\";\n }\n\n desk.style.height = sizes.desk.height + \"PX\";\n desk.style.width = sizes.desk.width + \"PX\";\n ...
[ "0.6318473", "0.6245825", "0.61415374", "0.6134852", "0.60917795", "0.6043265", "0.60203564", "0.60123837", "0.5958191", "0.588248", "0.5870205", "0.5868129", "0.58477664", "0.58032167", "0.5744057", "0.5713869", "0.5708864", "0.56859994", "0.56708646", "0.5645714", "0.559038...
0.8510442
0
generateCardDeck() This function takes no parameters. This function creates a new deck in the deck[] global variable, and is run when generating the game area to ensure every card remains drawable in a given round. This function does not return a value.
function generateCardDeck(){ cardDeck.length = 0;//empty any potentially existing instance of the deck, to prevent it duplicating entries. cardDeck = []; for(let suitNo = 0; suitNo < 4; suitNo++){ //condensed it all down to two for loops, and a two switch statements in a constructor. for(let rankNo = 0; rankNo< 13; rankNo++){ //4 Suits and 13 Ranks of cards. cardDeck.push(new card(rankNo, suitNo)); } } shuffleDeck(cardDeck); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateDeck() {\r\n var cards = [];\r\n for (var i=1; i<53; i+=1) {\r\n cards.push(i);\r\n }\r\n return cards;\r\n}", "function createDeck() {\n\n deck.push(new Card('Frigate', 'ship', 1, 1, 'red', 0));\n deck.push(new Card('Frigate', 'ship', 1, 1, 'red', 0));\n deck.push(new Card('Frig...
[ "0.7227477", "0.7003594", "0.69096726", "0.6905256", "0.68513757", "0.6804359", "0.67911595", "0.6785211", "0.67501634", "0.6741474", "0.67378205", "0.6705325", "0.66787755", "0.6674325", "0.6646519", "0.66421324", "0.65970093", "0.65525043", "0.65505034", "0.65346277", "0.65...
0.7213254
1
Implementation of a FisherYates shuffle, taken from bost.ocks Takes an array. Returns a shuffled array in an efficient manner.
function shuffleDeck(array) { let m = array.length, t, i; // While there remain elements to shuffle… while (m) { // Pick a remaining element… i = Math.floor(Math.random() * m--); // And swap it with the current element. t = array[m]; array[m] = array[i]; array[i] = t; } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fisherYates(array, seed) {\n var _a;\n var length = array.length;\n // need to clone array or we'd be editing original as we goo\n var shuffled = array.slice();\n for (var i = (length - 1); i > 0; i -= 1) {\n var randomIndex = void 0;\n if (seed) {\n randomIndex = M...
[ "0.80475676", "0.80475676", "0.7929715", "0.78717077", "0.7819004", "0.77909833", "0.7787949", "0.7787455", "0.7787455", "0.7783868", "0.7783868", "0.7783868", "0.7783868", "0.7783868", "0.7783868", "0.7783868", "0.7783868", "0.778315", "0.77825963", "0.77825963", "0.7768391"...
0.0
-1
gameLogic(moveChoice) Takes a variable moveChoice A boolean which denotes which move the player chose, true for 'hit', false for 'stand'. It then performs the necessary logic for the game: checking to see if the player's turn ended with that move, then allowing the dealer to act according to its rules. The canvas is then cleared and the new hands are drawn. If the last move taken resulted in an end state, this function then passes the appropriate value to the gameEnd(state) function. returns void.
function gameLogic(moveChoice){ //moveChoice is True if the player decided to hit, and false if they decided to stand. let dealerIsActive = false; if(moveChoice) dealerIsActive = !clientPlayer.hit(cardDeck); if(dealerIsActive || !moveChoice){//dealer turn is true if the player has gotten 21 or bust, !movechoice is true if the player chose to stand. clientPlayer.endTurn(); document.getElementById("gameControlHit").disabled = true; document.getElementById("gameControlStand").disabled = true; while(dealerPlayer.turn && dealerPlayer.calulateHandValue() < 17){//dealer's turn loop. dealerPlayer.hit(cardDeck); } dealerPlayer.endTurn(); } wipeCanvas();//clearing canvas to prevent any bugs from redrawing images. loadImages(dealerPlayer.getHandImages(), drawImageCallback, dealerPlayer.originX, dealerPlayer.originY, dealerPlayer.cardWidth, dealerPlayer.cardHeight); loadImages(clientPlayer.getHandImages(), drawImageCallback, clientPlayer.originX, clientPlayer.originY, clientPlayer.cardWidth, clientPlayer.cardHeight); //Game has ended if it runs this if() statement. if(!clientPlayer.turn && !dealerPlayer.turn){ document.getElementById("gameControlHit").style.display = "none"; document.getElementById("gameControlStand").style.display = "none"; document.getElementById("replayGame").style.display = "inline-block"; let clientTotal = clientPlayer.calulateHandValue(); let dealerTotal = dealerPlayer.calulateHandValue(); if((clientPlayer.hand.length === 2 && clientTotal === 21) && dealerPlayer.hand.length !== 2){ gameEnd("Win"); } else if(clientTotal > 21){ gameEnd("Lose"); } else if(dealerTotal > 21){ gameEnd("Win"); } else if(clientTotal > dealerTotal){ gameEnd("Win"); } else if(dealerTotal > clientTotal){ gameEnd("Lose"); } else{ gameEnd("Draw"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finish(move) {\r\n yourHand.sortCards();\r\n updatePage();\r\n yourRemove = false;\r\n \r\n // Perform user's move: pick or discard\r\n if (move == \"p\") {\r\n yourRemove = false;\r\n if (deck.length == 0) {\r\n newDrawPile();\r\n }\r\n yourHand.push(deck.pop(...
[ "0.63858396", "0.6297229", "0.5839233", "0.5820107", "0.581763", "0.57764393", "0.5753991", "0.5670125", "0.5669017", "0.5668887", "0.5668469", "0.5645096", "0.56387997", "0.56029713", "0.55704033", "0.5569616", "0.5550613", "0.55384105", "0.55335116", "0.55311525", "0.552626...
0.7224929
0
loadImages code taken & adapted from: html5canvastutorials.com / loadImages(sources, callback, x, y, width, height) This function takes 6 parameters. These are: sources An array of strings that are locations of images to be loaded. callback A function to be run for each of the elements within sources. x the X position to start the image drawing at. y the Y position to start the image drawing at. width the width of the image to be drawn. height the height of the image to be drawn. The function begins by retreiving the canvas and context for the images to be drawn to, it then calculates the number of images to be drawn, and stores the value in numImages. Then, it begins to create an Image element for each of these sources, waiting for it to load. Once the image loads, it increments the number of loaded images. It then sets the source for the generated image. Once all the requesite images have loaded it performs the callback function with the necessary parameters. This function has no return value.
function loadImages(sources, callback, x, y, width, height) { let images = {}; let loadedImages = 0; let numImages = 0; let canvas = document.getElementById('GameCanvas'); let context = canvas.getContext('2d'); // get num of sources for(let src in sources) { numImages++; } for(let src in sources) { images[src] = new Image(); images[src].onload = function() { if(++loadedImages >= numImages) { callback(context, images, x, y, width, height); } }; images[src].src = sources[src]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadImages(sources, callback) {    \n\t\tfor(var src in sources) {         \t// get num of sources\n        numImages++;\n        }\n    for(var src in sources) {\n        images[src] = new Image();\n\t\t\timages[src].onload = function() {\n\t\t\t\tif(++loadedImages >= numImages) {\n\t\t\t\tcallback(image...
[ "0.84508646", "0.8066721", "0.7716689", "0.75229686", "0.73585653", "0.724484", "0.710879", "0.6984751", "0.6968905", "0.69621676", "0.6945968", "0.69166183", "0.6836859", "0.6831233", "0.6791183", "0.67911136", "0.67419744", "0.66900134", "0.6633778", "0.660852", "0.66054434...
0.8431206
1
drawImageCallback This function takes 6 parameters: context the context of the canvas element to draw to. images an array of image elements to be drawn to said canvas. x & y the pixel coordinate position of the start point of the desired location of the images. width & height The width and height of the images to be drawn. This function simply iterates through the images array, drawing each image onto the canvas, then moving half the image width across to draw the next image in the array. This creates a visually pleasing overlap that somewhat resembles an actual hand of cards. This image has no return values.
function drawImageCallback(context, images, x, y, width, height){ for(let imageNo in images){ context.drawImage(images[imageNo], x + ((0.5*imageNo)*width), y, width, height); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render()\n {\n context.clearRect(0, 0, canvas.width, canvas.height);\n\n for (var i=0; i < images.length; i++)\n {\n context.drawImage(images[i].image, images[i].currX, images[i].currY, images[i].currWidth, images[i].currHeight);\n }\n }", "function renderImages(images, scope) {\n ...
[ "0.63270205", "0.6251312", "0.6251169", "0.6208428", "0.6098208", "0.60875756", "0.60152024", "0.597099", "0.5947157", "0.592553", "0.59096336", "0.59065336", "0.5888023", "0.5877738", "0.58387285", "0.58023375", "0.57903117", "0.5788837", "0.57794714", "0.5749872", "0.569467...
0.77382475
0
wipeCanvas This function has no Parameters. This function obtains the canvas and context to be cleared, then runs the context method clearRect to empty the canvas of images and text. This function returns no values.
function wipeCanvas(){ let canvas = document.getElementById('GameCanvas'); let context = canvas.getContext('2d'); context.clearRect(0, 0, canvas.width, canvas.height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearCanvas() {\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n}", "function clearCanvas() {\n context.clearRect(0, 0, canvas.width, canvas.height)\n}", "function clearCanvas(context){\n context.beginPath();\n context.clearRect(0, 0, canvasWidth, canvasHeight);\n}", "functi...
[ "0.79661715", "0.7924688", "0.79230255", "0.78918856", "0.7880677", "0.78701055", "0.7820102", "0.78156036", "0.7810169", "0.77892274", "0.7782441", "0.77669", "0.77668357", "0.7759236", "0.77551466", "0.7755092", "0.7749216", "0.7736077", "0.7722293", "0.7711378", "0.7691868...
0.7701202
20
gameEnd This function takes a string 'state' as a parameter, which represents the state of the game in regards to the client player when it is called.
function gameEnd(state){ //we need to draw the right statement based on the game state. switch(state){ case "Win": afterGameDisplay("You Win!", 0); break; case "Lose": afterGameDisplay("You Lose...", 1); break; case "Draw": afterGameDisplay("It's a Draw!", 2); break; //no default, as that was handled in the only place this function is called. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endGame(state){\n\t//render the board visible\n\trenderState(1,state,[]);\n\t//close the loading popup\n\thideLoader();\n\t//show the dialog popup\n\t$('#popupDialog').jqmShow();\n\t//call the interaction function, passing in the state.\n\tendGameInteraction(state);\n}", "endGame(){\n this.state ...
[ "0.8410527", "0.7925731", "0.77470857", "0.77197164", "0.7596322", "0.7457913", "0.74535096", "0.7432826", "0.74193203", "0.74109983", "0.7404978", "0.73650295", "0.73331094", "0.73253834", "0.73119426", "0.73056483", "0.72897476", "0.7286046", "0.72703725", "0.7263933", "0.7...
0.8329716
1
afterGameDisplay Gets the canvas and context, setting appropriate font styles to use in drawing text. draws a message to the canvas based on if the player won, lost, or drew with the dealer. increments the appropriate entry for winLossDrawRate. entry 0 being wins, 1 being losses, and 2 being draws. Returns void
function afterGameDisplay(label, index){ //get the canvas context for drawing let canvas = document.getElementById('GameCanvas'); let context = canvas.getContext('2d'); context.font = "3rem Sriracha"; context.fillStyle = "white"; context.textAlign = "center"; context.fillText(label, canvas.width/2, canvas.height/2); winLossDrawRate[index]++; document.getElementById("ScoreDisplay").textContent=`Wins: ${winLossDrawRate[0]} | Losses: ${winLossDrawRate[1]} | Draws: ${winLossDrawRate[2]}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawHUD() {\n\tcontext.fillStyle = \"#100505\";\n\tcontext.font = \"15px Verdana\";\n\tlet textWidth;\n\tswitch (screen) {\n\t\tcase 'game':\n\t\t\t\tbirghtenBackGround(0, 0, 150, 100);\n\t\t\tcontext.fillText(\"Cadeaux : \"+ gift, 10, 20);\n\t\t\tcontext.fillText(\"Monnaie : \"+ money, 10, 40);\n\t\t\tco...
[ "0.6791679", "0.65354425", "0.64367974", "0.6422245", "0.6399722", "0.63874644", "0.6375447", "0.6361291", "0.6340428", "0.6321078", "0.62934965", "0.627829", "0.6271471", "0.62702936", "0.62248117", "0.6221648", "0.62192494", "0.6200799", "0.6193565", "0.6188754", "0.6183505...
0.6846117
0
The url to access the backend Groups the galaxies' data
function groupGalaxyData(indexToGroupOn, selectionString, selection) { var temp = {}; //Group data on particular piece of data (indexToGroupOn) for (var i = 0; i < galaxyData[selectionString][selection].length; i++) { if (temp[galaxyData[selectionString][selection][i][indexToGroupOn]] == null) { temp[galaxyData[selectionString][selection][i][indexToGroupOn]] = []; } //Push the current reference information onto the temp array temp[galaxyData[selectionString][selection][i][indexToGroupOn]].push(galaxyData[selectionString][selection][i]); } //Clear the galaxy data array galaxyData[selectionString][selection] = []; //Group the data for (var key in temp) { for (var i = 0; i < temp[key].length; i++) { galaxyData[selectionString][selection].push(temp[key][i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get url() {\n return this._data.url;\n }", "function DataUrl() \n{ \n var url = \"json.php?bucket=m\";\n url += \"&publisher=\";\n if (params['publisher']) \n {\t\n url += params['publisher'];\n }\n url += \"&advertiser=\";\n if (params['advertiser']) \n {\t\n ur...
[ "0.5962606", "0.5891519", "0.58144677", "0.5762933", "0.57546145", "0.574541", "0.57251245", "0.5637561", "0.5625645", "0.5620025", "0.56167305", "0.5609998", "0.55995697", "0.55959", "0.5553886", "0.5544402", "0.55363566", "0.55363566", "0.55363566", "0.55363566", "0.5536356...
0.0
-1
Adds reference(s) to the galaxy
function addDataToGalaxy(selection) { if (document.getElementById("pills-galaxies-tab").classList.contains('disabled')) { document.getElementById("pills-galaxies-tab").classList.remove("disabled"); } var selectionString = ""; //Build the search query (in a array format) into a string for (var i = 0; i < currSearchQuery.length; i++) { selectionString += currSearchQuery[i]; if (i != currSearchQuery.length - 1) { selectionString += " "; } } //Check if there is a galaxy already if (galaxyData[selectionString] == null) { galaxyData[selectionString] = [[], [], []]; } else { var element = document.getElementById("galaxyColumn-" + selectionString); element.parentNode.removeChild(element); } //Check if the data is already in the galaxy for (var i = 0; i < referencesSelected.length; i++) { var found = false; for (var j = 0; j < galaxyData[selectionString][selection].length; j++) { if (galaxyData[selectionString][selection][j][0] == referencesSelected[i][0] && galaxyData[selectionString][selection][j][1] == referencesSelected[i][1]) { found = true; break; } } if (found == false) { galaxyData[selectionString][selection].push(referencesSelected[i]); //TBD - perhaps make it such that you cant select same references in positive/negative/neutral } } //Sort the galaxies' data for (var i = 0; i < galaxyData[selectionString][selection].length; i++) { for (var j = i; j < galaxyData[selectionString][selection].length; j++) { if (galaxyData[selectionString][selection][i][0] < galaxyData[selectionString][selection][j][0]) { var temp = galaxyData[selectionString][selection][i]; galaxyData[selectionString][selection][i] = galaxyData[selectionString][selection][j]; galaxyData[selectionString][selection][j] = temp; //break; } } } //Group the data by the current global grouping variable, the search query, and the reference to be selected groupGalaxyData(galaxyGroupBy, selectionString, selection); //Draw the galaxy drawGalaxy(selectionString); //Remove the selected references from the paper screen referencesSelected = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addLinkedSphere(sphere1,sphere2){//add the link wanted by the user\n var indexSphere1 = findIndexSphere(sphere1);//get the number of the sphere 1\n var indexSphere2 = findIndexSphere(sphere2);//get the number of the sphere 2\n //fill the lists\n listSpheres2[indexSphere1].connectedSphere.push(...
[ "0.5814039", "0.56471384", "0.55987084", "0.54769546", "0.5472254", "0.54656744", "0.53488356", "0.533158", "0.52906895", "0.5282972", "0.5233879", "0.522779", "0.522779", "0.5208662", "0.5208662", "0.51837647", "0.5173578", "0.5151378", "0.5151223", "0.5139579", "0.51204056"...
0.50313914
29
Formulas used to convert radians to locations
function circleFormulaX(angle, height, width, radius) { return ((radius * Math.cos(angle)) + (width / 2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculate_coordinates () {\n\t }", "function radians(xx) {return (Math.PI * xx / 180.0);}", "function convertToRadians(val) { return convertToDegrees(val) * Math.PI / 180; }", "static ria_to_xyz(radius, inclination, azimuth){\n return [radius * Math.sin(inclination) * Math.cos(azimuth), //x\n...
[ "0.6482727", "0.6434538", "0.6235616", "0.62262744", "0.61664397", "0.6133813", "0.6110181", "0.60761625", "0.60462606", "0.60456365", "0.6044036", "0.6015019", "0.60143566", "0.59928703", "0.59910685", "0.5989156", "0.59725153", "0.5954384", "0.59532356", "0.59428525", "0.59...
0.0
-1
Will be called when page is loaded using the WAT jsInitFunction feature
function segmentLabelingInitialize(component) { segmentLabelingUpdateCounter(component); $('#' + component + '-body .segment').each(function() { $(this).find('img').attr('src', '../img/dropdown.png'); segmentLabelingUpdateVisuals(component, $(this)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\n }", "function onInit() {\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\n }", "function onInit() {\r\n\r\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), th...
[ "0.7971756", "0.7352848", "0.73157614", "0.72531265", "0.7163237", "0.7150258", "0.7144849", "0.7049139", "0.70283324", "0.6966022", "0.6961798", "0.69407165", "0.6940404", "0.6918705", "0.6910638", "0.68945515", "0.68790233", "0.6877684", "0.6877502", "0.6871477", "0.6862411...
0.0
-1
========================================================================== Function to write README file
function writeToFile(fileName, data) { fs.writeFile(fileName, data, (err) =>{ err ? console.error(err) : console.log("\x1b[32mREADME Complete!!!"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeREADME(savefileName, data) {\n fs.writeFile(savefileName, data, () => {});\n \n console.log('Your README has been generated, check the dist folder')\n}", "function writeToFile() {\n fs.writeFile(\"README.md\", \"\", function(err){console.log(err || \"File written successfully!\")})\n}", "func...
[ "0.8017304", "0.7631024", "0.7586313", "0.75727916", "0.7532172", "0.75198203", "0.75086397", "0.7469576", "0.7466792", "0.7455722", "0.73815167", "0.7370343", "0.73673594", "0.7352603", "0.73236424", "0.73128724", "0.7284989", "0.72812694", "0.72406185", "0.71906424", "0.717...
0.6305442
96
Function to initialize app
function init() { inquirer .prompt(questions) .then((answers) =>{ console.log("Generating README...") writeToFile('./README.md', generateReadMe(answers)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initApp() {\n\tinitSounds();\n\tinitSensors();\n\tshowWelcome();\n}", "function initApp() {\n var router = new App.Router();\n var dispatcher = new App.Dispatcher();\n\n router.once('route', function() {\n dispatcher.runAction(router.getCurrent(), router.getParams());\n });\n\n // Start!\n rout...
[ "0.8063331", "0.7852481", "0.76652044", "0.764012", "0.7635961", "0.75173485", "0.74268746", "0.737255", "0.7348796", "0.7317697", "0.7265372", "0.7109698", "0.70797944", "0.7073826", "0.7014672", "0.7011994", "0.6967887", "0.6959301", "0.6909012", "0.6846514", "0.6840695", ...
0.0
-1
var users = u.callCommandJson('sfdx force:data:soql:query q "select id , name ,ContactId from User where username=\''+config.TestUser+'\'" r json');
soql(soql){ this.log(soql); var ret = this.callCommandJson('sfdx force:data:soql:query -q "' + soql +'" -r json'); if(ret != undefined || ret.result.totalSize > 0){ return ret.result.records; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserId( userName ) {\n\n // We're using SOQL here\n var queryParms = \"q=select%20Id,%20name,%20username%20from%20User%20where%20Alias='\" + encodeURI( userName ) + \"'\";\n console.log(queryParms);\n\n var request = http.request({\n 'endpoint': 'SalesForce',\n 'method': 'GE...
[ "0.68533593", "0.67414963", "0.66826963", "0.6494922", "0.6153009", "0.58636326", "0.5820565", "0.5802086", "0.5796736", "0.5756371", "0.5745923", "0.57405436", "0.5626101", "0.5601778", "0.5589748", "0.5582596", "0.55654395", "0.55363995", "0.5533995", "0.55310065", "0.55046...
0.64649373
4
options is a quick fix ? return true if handled
goToDeeplink(deeplink: Deeplink, options?: any) { const result = this.parseDeeplink(deeplink, options) console.debug('go to link: ', deeplink, result); let {modal, handler, tab} = result if (modal) { Navigation.showModal({ ...modal, navigatorButtons: Nav.CANCELABLE_MODAL, }) return true } else if (tab) { Navigation.handleDeepLink({ link: 'topTab', payload: tab }) return true } else if (handler) { //TODO: remove handler() return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOptions(){\n for (var key in options)\n if (options.hasOwnProperty(key)) return true;\n return false;\n }", "ifSelected(option, options) {\n let index = options.indexOf(option);\n if (index > -1) {\n return true;\n } else {\n ...
[ "0.75434285", "0.72740346", "0.722761", "0.7085215", "0.69333094", "0.6780047", "0.6780047", "0.6470491", "0.6470491", "0.6445373", "0.6426802", "0.642547", "0.64177585", "0.6413209", "0.639043", "0.6366468", "0.6311733", "0.63117176", "0.6261732", "0.62597996", "0.6239029", ...
0.0
-1
temporary: should be provided by the backend
localDeeplink(activity: Activity): Deeplink { const activityType = sanitizeActivityType(activity.type); if (!activityType) return null; let resource = activity.resource; switch (activityType) { case 'comments': { if (resource) { let {id, type} = resource; return `${Config.SERVER_URL}${sanitizeActivityType(type)}/${id}/comments` } break; } default: if (resource) { let {id, type} = resource; return `${Config.SERVER_URL}${sanitizeActivityType(type)}/${id}` } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "obtain(){}", "transient private internal function m185() {}", "transient private protected internal function m182() {}", "prepare() {}", "function TMP() {\n return;\n }", "transient protected internal function m189() {}", "static _tempUpdateContextForOp(resultOp, actio...
[ "0.5873605", "0.5801066", "0.5696644", "0.5658289", "0.551117", "0.5496322", "0.5392461", "0.5364804", "0.53558826", "0.53540933", "0.53357273", "0.53187764", "0.53133345", "0.5253687", "0.5253687", "0.5253687", "0.5253687", "0.5253687", "0.5253687", "0.5253687", "0.52467465"...
0.0
-1
function that searches for javascript es6 methods/properties and populates a popup
function buildPopup(url, html, rectObject, title){ // Init a new j$ node, and append the parsed HTML tree. let node = $("<div id='mdnthis'></div>").append($.parseHTML(html)); // Calculate the pop-ups css left and top properties, set to appropriate node. let cssLeft = Math.floor(rectObject.x + rectObject.width/2) - 150 + window.pageXOffset; let cssTop = Math.floor(rectObject.y + rectObject.height) + window.pageYOffset + 11; node.find("#mdnthis-bubble-host").css("top", cssTop).css("left", cssLeft); // Set arrow position. node.find("#mdnthis-arrow-main").css("left", 150); node.find("#mdnthis-arrow-main").css("top", -11); // Init var to hold a request as a j$ tree. let requestTree = undefined; // Send GET request to provided URL. fetch(url) // Extract reponses text. .then((response) => { return response.text(); }) // Parse text and convert to j$ tree. .then((responseText) => { // Parse text and convert to j$ tree. requestTree = $("<div></div>").append($.parseHTML(responseText)); // Get the description. const descriptionText = requestTree.find("#wikiArticle").find("p").first().text(); // set popup descriptionText to new text found node.find('#mdnthis-bubble-description').html(descriptionText); /// Get the syntax. const syntaxText = requestTree.find("#wikiArticle").find(".syntaxbox").text(); node.find('#mdnthis-bubble-syntax').html(syntaxText); // Set the title. node.find("#mdnthis-bubble-query").html(title); // Get the example code. let exampleText = (requestTree.find("#wikiArticle").find("#Example").length !== 0) ? requestTree.find("#wikiArticle").find("#Example").nextAll("pre:first").text() : requestTree.find("#wikiArticle").find("#Examples").nextAll("pre:first").text(); node.find('#mdnthis-bubble-example').html(exampleText); // Set the link node.find('#urltarget').attr('href', url); // Append node. node.css("display","none") $("html").append(node); node.fadeIn(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_popupPassthrough(id, method) {\n let word = this.getWord(id);\n if (method === \"_defaultPopup\") {\n this._defaultPopup(id, word.title, word.text);\n } else {\n window[method](id, word.title, word.text);\n }\n\n }", "function popupHello() {\n console.log(\"...
[ "0.5984474", "0.57881707", "0.5550509", "0.5531968", "0.5477162", "0.5463066", "0.53713065", "0.536237", "0.5339114", "0.5336952", "0.5327921", "0.5312634", "0.5297425", "0.52829045", "0.52693784", "0.52659965", "0.52354", "0.52302194", "0.5229794", "0.52166516", "0.51961774"...
0.0
-1
Fetch additional necessary scripts.
function preinit() { const head = document.getElementsByTagName('head')[0]; for (let i = 0; i < additionalScripts.length; i++) { const newScript = document.createElement('script'); newScript.src = additionalScripts[i].url; newScript.type = 'text/javascript'; if (additionalScripts[i].nowait) { numInit++; } else { newScript.onload = handleScriptLoad; } head.appendChild(newScript); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function loadExtraScripts() {\n}", "function getFetchAllScripts () {\n\n fetch('/scripts')\n .then((response) => response.json())\n .then((fetchedScripts) => {\n // console.log(fetchedScripts)\n setAllScripts(fetchedScripts)\n })\n }", "async function ...
[ "0.753873", "0.69841415", "0.66434276", "0.6435181", "0.63916487", "0.6237811", "0.62211025", "0.5994666", "0.598993", "0.58703", "0.5869088", "0.58136165", "0.5792323", "0.57822794", "0.5777006", "0.5722402", "0.57179207", "0.5702472", "0.56784743", "0.5678152", "0.5674911",...
0.6093262
7
If any of these get an error code, the promise should reject with
static token() { return document.querySelector('meta[name="csrf-token"]').content }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function FailIfRejected() {}", "function ...
[ "0.67824334", "0.67824334", "0.67824334", "0.67824334", "0.67824334", "0.67824334", "0.67824334", "0.67824334", "0.67824334", "0.6563106", "0.64345133", "0.6414005", "0.6395045", "0.6392071", "0.63891315", "0.63891315", "0.6374636", "0.6368572", "0.6356191", "0.63528574", "0....
0.0
-1
.create() => Promise] create and update passes the new/edited course as the object. The renderer should know how to handle filling in the data based on the schema received from the server.
static create(params) { return CourseModel.send_post("/courses", params) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createCourse() {\n vm.course = datacontext.createCourse();\n }", "function createCourse(course) {\n courseService.createCourse(course)\n .then(function (actualCourse) {\n courses.push(actualCourse)\n renderCourses(courses)\n })\n}", "async create(item) {\n let result = awai...
[ "0.71131873", "0.6629543", "0.65750796", "0.6432593", "0.6368266", "0.632262", "0.6238316", "0.62302417", "0.61614865", "0.61236477", "0.6111301", "0.6106042", "0.610255", "0.60173714", "0.5966564", "0.596231", "0.5938569", "0.58790857", "0.5878744", "0.58737135", "0.586204",...
0.6612443
2
.update(id, ) => Promise create and update passes the new/edited course as the object. The renderer should know how to handle filling in the data based on the schema received from the server.
static update(id, params) { return CourseModel.send_put("/courses/" + id, params) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateCourse(id) {\n let inname = document.getElementById('inname');\n let incode = document.getElementById('incode');\n let inprogression = document.getElementById('inprogression');\n let insyllabus = document.getElementById('insyllabus');\n \n inname = inname.value;\n incode = incod...
[ "0.7345162", "0.7311038", "0.7284679", "0.72241753", "0.72165906", "0.721651", "0.71727383", "0.71599466", "0.7111358", "0.7089479", "0.7036602", "0.6742242", "0.6713442", "0.6684643", "0.66241556", "0.6502858", "0.64122254", "0.6271807", "0.6261179", "0.6232513", "0.61959714...
0.7300945
2
.test_delete(id) => Promise This only tests to see if delete is permitted, but does not perform the deletion
static test_delete(id) { return CourseModel.send_delete("/courses/" + id + "?query_only=true") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testDelete(deleteInfo, path) {\n describe('DELETE methods', function() {\n // perform the test for each authentication type\n for (var aType in authTypes) {\n // closure for iterator scope control\n (function (authType) {\n if (deleteInfo.auth[authType]) {\n it(authTypes[a...
[ "0.7485885", "0.71590555", "0.705522", "0.6973753", "0.67506045", "0.6672354", "0.6575559", "0.6545424", "0.65370715", "0.6533875", "0.6521119", "0.6503544", "0.6490858", "0.6474735", "0.6473871", "0.64682555", "0.64638287", "0.64582676", "0.6450335", "0.6427885", "0.64176345...
0.76988477
0
autoPlay, added since 0.9.4
function autoPlay(){ var currentDate = $(settings.datesDiv).find('a.'+settings.datesSelectedClass); if(settings.autoPlayDirection == 'forward') { if(currentDate.parent().is('li:last-child')) { $(settings.datesDiv+' li:first-child').find('a').trigger('click'); } else { currentDate.parent().next().find('a').trigger('click'); } } else if(settings.autoPlayDirection == 'backward') { if(currentDate.parent().is('li:first-child')) { $(settings.datesDiv+' li:last-child').find('a').trigger('click'); } else { currentDate.parent().prev().find('a').trigger('click'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoPlay() {\r\n if (settings.autoPlayDirection == 'forward') {\r\n last2first();\r\n } else if (settings.autoPlayDirection == 'backward') {\r\n first2last();\r\n }\r\n}", "set playAutomatically(value) {}", "get playAutomatically() {}", "Play() {}", "play(){\n\n\n }", "...
[ "0.77207935", "0.7648141", "0.7557224", "0.7438991", "0.7225437", "0.72098285", "0.71711665", "0.7167299", "0.70892346", "0.7033325", "0.7028874", "0.7028874", "0.70241016", "0.7002702", "0.69476295", "0.693742", "0.6905301", "0.68472195", "0.68408936", "0.68145925", "0.68064...
0.0
-1
ADDED FUNCTIONAL New functions to show the transaction pop up for functional
function injectDivPopup(iframeContainerId, controlsWrapperId, iframeWrapperId){ if (document.getElementById(iframeContainerId) === null) { chrome.storage.local.get('position', function (itemsLocal) { var div = document.createElement('div'); div.style.border = '1px solid #aeaeae'; div.style.borderRadius = '5px'; div.style.boxShadow = '0px 3px 10px #888888'; div.style.position = 'fixed'; div.style.width = '360px'; div.style.height = '230px'; div.style.margin = '0px'; div.style.padding = '0px'; if (!$.isEmptyObject(itemsLocal.position)) { //Restore iframe position from saved coordinates div.style.top = itemsLocal.position.top + "px"; div.style.left = itemsLocal.position.left + "px"; } else { div.style.top = '0px'; div.style.left = window.innerWidth - 380 + "px"; } div.style.zIndex = '9000000000000000000'; div.style.backgroundColor = '#f8fbff'; //'white'; div.frameBorder = 'none'; //Updated id with GUID div.setAttribute('id', iframeContainerId); if (top === self) { $('html').append(div); } else { $(parent.document).append(div); } }); chrome.storage.local.get('theme', function (item) { //Load logo for appropriate theme (BlazeMeter vs Dynatrace) var theme = item.theme; var logoName = 'bm_logo.svg'; if (theme == 'dynatrace') { logoName = 'dt.svg'; } var logoURL = chrome.extension.getURL('theme') + '/' + theme + '/images/' + logoName; $('#' + iframeContainerId).html('<div class="header-logo-wrapper" style="background: #494961; float: none; height: 45px;cursor: move;border-radius: 5px 5px 0 0;overflow:hidden; width: auto; padding: 0; margin: 0;">' + '<span class="header-logo-blazemeter" style="background-image: url(' + logoURL + '); background-repeat: no-repeat;height: 35px;background-size: 140px 22px;display: inline-block;width: 57%;background-position: 10px 10px;"></span><div id="' + controlsWrapperId + '" style="border-radius:0; top:3px; position: relative;border-top-right-radius: 5px;border-top-left-radius: 5px;display: inline-block;overflow: hidden;float: right; width: auto; padding: 0; margin: 0;"></div></div>' + '<div id="' + iframeWrapperId + '" style="visibility:hidden; float: none; width: auto; padding: 0; margin: 0;"><span style="color: #494961 !important;font-family: Segoe UI, Tahoma, sans-serif !important;font-size: 18px !important;font-weight: 500 !important; margin-top: 70px !important;display: block !important;text-align: center !important;">Waiting for the content...</span></div>'); $('#' + iframeContainerId).draggable({ containment: "window", stop: function (event, ui) { //Remember iframe position across tabs and across requests var position = ui.position; chrome.storage.local.set({"position": position}); } }); //issue with iframe reloading }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAddFundInstructionalMessage(){\n\tshowGeneralSuccessMsg(messages[\"checkout.instructional_message\"]);\n}", "OnClickPutMoneyIn() {\n this.setPopupTransaction(SessionConstant.POPUP_PUT_MONEY_IN);\n }", "function addTransaction(e) {\n document.getElementById(\"myModal\").style.display = \...
[ "0.6729011", "0.65765256", "0.6393175", "0.6389114", "0.63413745", "0.6333997", "0.63239294", "0.62865996", "0.6261296", "0.6238321", "0.6191418", "0.6168895", "0.61482424", "0.6141001", "0.6114568", "0.6066419", "0.6066121", "0.6047833", "0.6047294", "0.6032921", "0.60179806...
0.0
-1
renders all the pagelevel providers
function ProviderStack(props) { return ( <UserProvider> <FeatureFlagProvider> <SearchFacetProvider> <StudySearchProvider> <GeneSearchProvider> { props.children } </GeneSearchProvider> </StudySearchProvider> </SearchFacetProvider> </FeatureFlagProvider> </UserProvider> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IdentityProvidersListPage() {\n }", "renderPage() {\t\t\n\t\tswitch (this.props.data.active) {\n\t\t\tcase 'user': \n\t\t\t\treturn this.renderUserInfo(this.props.data.body);\t\t\t\n\t\t\tcase 'repos': \n\t\t\t\treturn this.renderRepos(this.props.data.body);\n\t\t\tcase 'about': \n\t\t\t\treturn this...
[ "0.6652012", "0.59074867", "0.576621", "0.5740998", "0.5562623", "0.55352896", "0.5529848", "0.54773086", "0.54639703", "0.53706104", "0.5367439", "0.5336935", "0.5314286", "0.5299065", "0.5299065", "0.5284973", "0.52573454", "0.52432966", "0.5236531", "0.52360845", "0.521778...
0.5640585
4
Wrapper component for search and result panels
function RawHomePageContent() { return ( <ErrorBoundary> <ProviderStack> <LinkableSearchTabs/> </ProviderStack> </ErrorBoundary> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onShowSearchResultPanel() {\n mediator.getView('searchResult');\n }", "function SearchPanel() {\n Panel.call(this, $('<section>'\n +'<form class=\"form-row margin-bottom\">'\n + '<input class=\"form-control col-11\" type=\"text\" name=\"query\" placeholder=\"...\">'\n + '<butto...
[ "0.7172646", "0.69643384", "0.690901", "0.6862", "0.67365885", "0.67203015", "0.6630378", "0.64529413", "0.6414635", "0.6386819", "0.6358964", "0.633883", "0.632405", "0.63193", "0.62924767", "0.6281042", "0.6145499", "0.6144535", "0.61412245", "0.6140561", "0.61347514", "0...
0.0
-1
this will create debugger u will put any break point u can verified the value of any variable, u can see the any prototype of any variable or object
function callback(req, res) { console.log('client connected'); res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('webtuning'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debug() {\n if (attrs.isDebug) {\n //stringify func\n var stringified = scope + \"\";\n \n // parse variable names\n var groupVariables = stringified\n //match var x-xx= {};\n .match(/var\\s+([\\w])+\\s*=\\s*{\\s*}/gi)\n ...
[ "0.6561651", "0.63600236", "0.6276172", "0.6273131", "0.61730987", "0.61026734", "0.6081019", "0.6069633", "0.60018784", "0.597665", "0.59664464", "0.59598356", "0.59382284", "0.58625734", "0.5852168", "0.5826537", "0.5794196", "0.5781232", "0.5775782", "0.5775782", "0.577578...
0.0
-1
Start section: command_properties End section: command_properties
function GetMedicalTranscriptionJobCommand(input) { var _this = // Start section: command_constructor _super.call(this) || this; _this.input = input; return _this; // End section: command_constructor }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get properties() {\n return {\n title: {\n type: String\n },\n initialTool: {\n attribute: 'initialtool',\n type: String\n },\n }\n }", "function openproperties(){\n //post(\"openproperties\" + my...
[ "0.6223608", "0.6099833", "0.60820085", "0.5998052", "0.59291244", "0.58592075", "0.5721678", "0.56934226", "0.56416667", "0.5578898", "0.5544703", "0.5537109", "0.5513366", "0.5508303", "0.55068964", "0.54810596", "0.5480039", "0.54352444", "0.5433169", "0.5426056", "0.54211...
0.0
-1
TODO: Create a function to write README file
function writeToFile(fileName, answers) { //function to write README.md here const markdown = generateMarkdown({ ...answers}) // "..." needs to be used as answers has multiple values // write the file with the fileName, markdown and an error function fs.writeFile(fileName, markdown, function (error) { if (error) { return console.log(error, "There has been an error. Please try again"); }; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeREADME(savefileName, data) {\n fs.writeFile(savefileName, data, () => {});\n \n console.log('Your README has been generated, check the dist folder')\n}", "function writeToFile(data) {\n fs.writeFile(\"./README.md\", generatePage(data), (err) => {\n if (err) throw new Error(err);\n\n conso...
[ "0.80459154", "0.769568", "0.7688438", "0.7662486", "0.7625201", "0.7613852", "0.7600793", "0.75778055", "0.7540343", "0.7540213", "0.75199854", "0.75136596", "0.7454612", "0.74240106", "0.7417176", "0.7403209", "0.7387397", "0.73748857", "0.736913", "0.7356774", "0.7356653",...
0.66109735
88
Learnt async functions at the start of week 13 Monday class... before I wrote this code!
async function init() { const userInput = await inquirer.prompt(questions) writeToFile("READMEtest.md", userInput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async method(){}", "async method(){}", "async function startUnstable(){\n\n}", "async function runCheck(){\n /*await getRSS();\n //console.log(\"finish rss\");\n if(rss != null){ //if the rss feed is not there don't execute the other functions\n await getShows();\n //console.log...
[ "0.65998286", "0.64473134", "0.64296305", "0.63480914", "0.61971354", "0.6157486", "0.61221117", "0.6042514", "0.60097", "0.5977808", "0.59474593", "0.5929504", "0.5929504", "0.5929504", "0.5929504", "0.5929504", "0.5927201", "0.591812", "0.59168065", "0.59109026", "0.5906442...
0.0
-1
defining type "named date"
function name() { return { get: nd => nd.name || '', set: (nd, x) => nd.name = x } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DateType() {\n DateType.super_.call(this, this._hooks());\n}", "function date() {\n return struct('Date', value => {\n return value instanceof Date && !isNaN(value.getTime());\n });\n}", "function date() {\n return struct('Date', value => {\n return value instanceof Date && !isNaN(value.getT...
[ "0.7448783", "0.6796973", "0.6796973", "0.6752427", "0.6648685", "0.6648685", "0.6530362", "0.6422404", "0.6229443", "0.62225556", "0.61524224", "0.6113348", "0.6095718", "0.6001254", "0.5979521", "0.59766567", "0.59501904", "0.59046316", "0.5903114", "0.5900135", "0.5884877"...
0.0
-1
add product to cart
function addProductToCart(buttonID) { let cart = document.getElementById("rightDiv"); switch (buttonID) { case "addSeedmix": qty = document.getElementById("SeedmixQty").value; addHTML = document.createElement("p"); addHTML.className="orderedProducts"; addHTML.innerHTML = "Seedmix: "+qty+" Price: <strong class='price'>" +(2*Number(qty)) +"</strong>"; console.log(addHTML); cart.insertBefore(addHTML, document.getElementById("checkOut")); break; case "addEnergypellet": qty = document.getElementById("EnergypelletQty").value; addHTML = document.createElement("p"); addHTML.className="orderedProducts"; addHTML.innerHTML = "Energypellet: "+qty+" Price: <strong class='price'>"+(3*Number(qty)) +"</strong>"; console.log(addHTML); cart.insertBefore(addHTML, document.getElementById("checkOut")); break; case "addTux": qty = document.getElementById("TuxQty").value; addHTML = document.createElement("p"); addHTML.className="orderedProducts"; addHTML.innerHTML = "Tux: "+qty+" Price: <strong class='price'>"+(3*Number(qty)) +"</strong>"; console.log(addHTML); cart.insertBefore(addHTML, document.getElementById("checkOut")); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addProductToCart(product) {\n let cart = getCart();\n cart.items.push(product);\n\n setCart(cart);\n alert(product.name + ' added to cart, Total is R' + getTotal(cart));\n}", "function addItemToCart() {}", "function addItemToCart() {}", "function addToCart()\n\t{\n\t\t// avoid adding to ...
[ "0.8494622", "0.8299411", "0.8299411", "0.814405", "0.81171566", "0.7965254", "0.7964354", "0.79539484", "0.79265773", "0.7920025", "0.7888233", "0.7877574", "0.78454065", "0.7844753", "0.78202486", "0.7773486", "0.77525187", "0.77493525", "0.76295596", "0.76031363", "0.76005...
0.0
-1
DO NOT EDIT. Use zipCodeMaker.py to generate.
function constructZipCodeArray() { var zipCoords = [ new google.maps.LatLng( 0.475555173890342E+02, -0.122543084625005E+03), new google.maps.LatLng( 0.475555550000000E+02, -0.122545895000000E+03), new google.maps.LatLng( 0.475548610000000E+02, -0.122548489000000E+03), new google.maps.LatLng( 0.475526710000000E+02, -0.122548611000000E+03), new google.maps.LatLng( 0.475517410000000E+02, -0.122545635000000E+03), new google.maps.LatLng( 0.475525903520031E+02, -0.122542963813079E+03), new google.maps.LatLng( 0.475525903520031E+02, -0.122542963813079E+03), new google.maps.LatLng( 0.475378400000000E+02, -0.122542355000000E+03), new google.maps.LatLng( 0.475282570000000E+02, -0.122547207000000E+03), new google.maps.LatLng( 0.475277305814389E+02, -0.122547140344920E+03), new google.maps.LatLng( 0.475235500000000E+02, -0.122546611000000E+03), new google.maps.LatLng( 0.475234773068571E+02, -0.122545881833496E+03), new google.maps.LatLng( 0.475228649528488E+02, -0.122539739465545E+03), new google.maps.LatLng( 0.475221840000000E+02, -0.122532909000000E+03), new google.maps.LatLng( 0.475229374522997E+02, -0.122528818534018E+03), new google.maps.LatLng( 0.475239377730799E+02, -0.122523387827756E+03), new google.maps.LatLng( 0.475240000000000E+02, -0.122523050000000E+03), new google.maps.LatLng( 0.475235782568169E+02, -0.122521961447956E+03), new google.maps.LatLng( 0.475227124928617E+02, -0.122519726843674E+03), new google.maps.LatLng( 0.475188582437283E+02, -0.122509778726100E+03), new google.maps.LatLng( 0.475152800000000E+02, -0.122500543000000E+03), new google.maps.LatLng( 0.475102650000000E+02, -0.122494882000000E+03), new google.maps.LatLng( 0.475102650152546E+02, -0.122494881938827E+03), new google.maps.LatLng( 0.475102650152546E+02, -0.122494881938827E+03), new google.maps.LatLng( 0.475098180000000E+02, -0.122494958000000E+03), new google.maps.LatLng( 0.475043160000000E+02, -0.122503091000000E+03), new google.maps.LatLng( 0.475032250000000E+02, -0.122503839000000E+03), new google.maps.LatLng( 0.475012440000000E+02, -0.122504057000000E+03), new google.maps.LatLng( 0.475012440000000E+02, -0.122504057000000E+03), new google.maps.LatLng( 0.475012420000000E+02, -0.122513772000000E+03), new google.maps.LatLng( 0.475048200000000E+02, -0.122513834000000E+03), new google.maps.LatLng( 0.475052920000000E+02, -0.122566952000000E+03), new google.maps.LatLng( 0.475047270000000E+02, -0.122610060000000E+03), new google.maps.LatLng( 0.475049020000000E+02, -0.122640258000000E+03), new google.maps.LatLng( 0.475046200000000E+02, -0.122641921000000E+03), new google.maps.LatLng( 0.475028340000000E+02, -0.122644042000000E+03), new google.maps.LatLng( 0.475019570000000E+02, -0.122646408000000E+03), new google.maps.LatLng( 0.475118900000000E+02, -0.122653199000000E+03), new google.maps.LatLng( 0.475189700000000E+02, -0.122659273000000E+03), new google.maps.LatLng( 0.475256390000000E+02, -0.122661531000000E+03), new google.maps.LatLng( 0.475273630000000E+02, -0.122662859000000E+03), new google.maps.LatLng( 0.475288510000000E+02, -0.122665942000000E+03), new google.maps.LatLng( 0.475292400000000E+02, -0.122669238000000E+03), new google.maps.LatLng( 0.475275300000000E+02, -0.122677813000000E+03), new google.maps.LatLng( 0.475271710000000E+02, -0.122682696000000E+03), new google.maps.LatLng( 0.475275070000000E+02, -0.122682803000000E+03), new google.maps.LatLng( 0.475275070000000E+02, -0.122682803000000E+03), new google.maps.LatLng( 0.475278270000000E+02, -0.122682955000000E+03), new google.maps.LatLng( 0.475278270000000E+02, -0.122682955000000E+03), new google.maps.LatLng( 0.475289180000000E+02, -0.122677889000000E+03), new google.maps.LatLng( 0.475321460000000E+02, -0.122667971000000E+03), new google.maps.LatLng( 0.475330770000000E+02, -0.122666552000000E+03), new google.maps.LatLng( 0.475379600000000E+02, -0.122663836000000E+03), new google.maps.LatLng( 0.475396690000000E+02, -0.122661868000000E+03), new google.maps.LatLng( 0.475370600000000E+02, -0.122649370000000E+03), new google.maps.LatLng( 0.475371890000000E+02, -0.122646608000000E+03), new google.maps.LatLng( 0.475401040000000E+02, -0.122641786000000E+03), new google.maps.LatLng( 0.475422020000000E+02, -0.122639879000000E+03), new google.maps.LatLng( 0.475429950000000E+02, -0.122638414000000E+03), new google.maps.LatLng( 0.475419960000000E+02, -0.122634218000000E+03), new google.maps.LatLng( 0.475437510000000E+02, -0.122625000000000E+03), new google.maps.LatLng( 0.475464970000000E+02, -0.122623246000000E+03), new google.maps.LatLng( 0.475483280000000E+02, -0.122621323000000E+03), new google.maps.LatLng( 0.475478930000000E+02, -0.122616913000000E+03), new google.maps.LatLng( 0.475469250000000E+02, -0.122613083000000E+03), new google.maps.LatLng( 0.475468190000000E+02, -0.122607391000000E+03), new google.maps.LatLng( 0.475595600000000E+02, -0.122596939000000E+03), new google.maps.LatLng( 0.475608190000000E+02, -0.122595458000000E+03), new google.maps.LatLng( 0.475614140000000E+02, -0.122593521000000E+03), new google.maps.LatLng( 0.475634430000000E+02, -0.122591796000000E+03), new google.maps.LatLng( 0.475788550000000E+02, -0.122573165000000E+03), new google.maps.LatLng( 0.475831420000000E+02, -0.122569228000000E+03), new google.maps.LatLng( 0.475872550000000E+02, -0.122561949000000E+03), new google.maps.LatLng( 0.475905050000000E+02, -0.122554945000000E+03), new google.maps.LatLng( 0.475892530000000E+02, -0.122550199000000E+03), new google.maps.LatLng( 0.475872700000000E+02, -0.122548124000000E+03), new google.maps.LatLng( 0.475827230000000E+02, -0.122548475000000E+03), new google.maps.LatLng( 0.475802740000000E+02, -0.122549512000000E+03), new google.maps.LatLng( 0.475786030000000E+02, -0.122549650000000E+03), new google.maps.LatLng( 0.475781380000000E+02, -0.122544919000000E+03), new google.maps.LatLng( 0.475773370000000E+02, -0.122544141000000E+03), new google.maps.LatLng( 0.475757280000000E+02, -0.122545026000000E+03), new google.maps.LatLng( 0.475744220000000E+02, -0.122546964000000E+03), new google.maps.LatLng( 0.475699050000000E+02, -0.122550611000000E+03), new google.maps.LatLng( 0.475680670000000E+02, -0.122547803000000E+03), new google.maps.LatLng( 0.475689300000000E+02, -0.122545118000000E+03), new google.maps.LatLng( 0.475689070000000E+02, -0.122541912000000E+03), new google.maps.LatLng( 0.475661990639408E+02, -0.122534506182578E+03), new google.maps.LatLng( 0.475661990639408E+02, -0.122534506182578E+03), new google.maps.LatLng( 0.475661220000000E+02, -0.122534664000000E+03), new google.maps.LatLng( 0.475630650577484E+02, -0.122537302157390E+03), new google.maps.LatLng( 0.475564433098382E+02, -0.122543016760987E+03), new google.maps.LatLng( 0.475563260000000E+02, -0.122543118000000E+03), new google.maps.LatLng( 0.475560101993416E+02, -0.122543104965493E+03), new google.maps.LatLng( 0.475555173890342E+02, -0.122543084625005E+03), ]; return zipCoords }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n var year_zip = define_zippy('year');\n var month_zip = define_zippy('month');\n var topic_zip = define_zippy('topic');\n var collection_zip = define_zippy('collection');\n}", "get zip(){return this._zip;}", "get zip(){return this._zip;}", "get zip(){return this._zip;}", "get zip() {...
[ "0.62616396", "0.6171133", "0.6171133", "0.6171133", "0.6141213", "0.58906025", "0.58729374", "0.58729374", "0.58729374", "0.58729374", "0.586976", "0.5866391", "0.5833366", "0.5823646", "0.5813035", "0.56864625", "0.5640382", "0.56234306", "0.5590841", "0.5552588", "0.552158...
0.0
-1
Beginning of Cookie Code Based on code by Bill Dortch of hidaho designs who has generously placed it in the public domain.
function SetCookie(name,value,expires,path,domain,secure){ var temp = name + "=" + escape(value); if (expires){ temp += "; expires=" + expires.toGMTString(); } if (path){ temp += "; path=" + path; } if (domain){ temp += "; domain=" + domain; } if (secure){ temp += "; secure"; } document.cookie = temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ibp_getCookie(name)\n{ // DEFINE THE PATTERN TO SEARCH FOR IN THE COOKIE LIST WHICH IS THE COOKIE NAME\n arg = name + \"=\";\n\n // DETERMINE HOW LONG THE PATTERN IS\n alen = arg.length;\n\n // DETERMINE HOW LONG THE COOKIE LIST IS\n clen = document.cookie.length;\n\n // DEFINE A COOKI...
[ "0.72857565", "0.7215099", "0.7121274", "0.7096425", "0.7064467", "0.70463854", "0.70463854", "0.70463854", "0.7033588", "0.7032797", "0.70172274", "0.69854796", "0.69799834", "0.69762754", "0.6961185", "0.69577223", "0.6903522", "0.6899398", "0.68957037", "0.6877518", "0.687...
0.65306234
83
End of Cookie Code / converts days to milliseconds
function daysToMS(days){ return days * 24 * 60 * 60 * 1000; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCookieExpireDate() { \n var cookieTimeout = 34214400000;// Le nombre de millisecondes que font 13 mois \n var date = new Date();\n date.setTime(date.getTime()+cookieTimeout);\n var expires = \"; expires=\"+date.toGMTString();\n return expires;\n}", "function getCookieExpireDate() {\n // Le no...
[ "0.63584214", "0.6346879", "0.61624104", "0.6020829", "0.5995083", "0.58745426", "0.58745426", "0.58616513", "0.58616513", "0.58616513", "0.58616513", "0.58459795", "0.5825772", "0.5825772", "0.5825772", "0.5810466", "0.5810466", "0.5810466", "0.57604784", "0.5736261", "0.571...
0.0
-1
converts weeks to milliseconds
function weeksToMS(weeks){ return weeks * 7 * 24 * 60 * 60 * 1000; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function weeksToMS(weeks){\n\treturn weeks * 7 * 24 * 60 * 60 * 1000;\n}", "function getUpdateTime(dm) {\n let weeksSenconds = dm[\"numOfWeeks\"] * 7 * 24 * 3600;\n let daySeconds = dm[\"dayOfWeek\"] * 24 * 3600;\n return (weeksSenconds + daySeconds + parseInt(dm[\"secondsOfDay\"]) + unixGpsTimeDiff) * ...
[ "0.80830675", "0.6003127", "0.59572816", "0.5927343", "0.5923708", "0.58959943", "0.5859408", "0.5836889", "0.5817182", "0.5804553", "0.5803973", "0.57857335", "0.5779679", "0.57616794", "0.57556546", "0.5740247", "0.5701495", "0.5694171", "0.5688041", "0.5670923", "0.5642596...
0.82270604
0
converts years to milliseconds
function yearsToMS(years){ return years * 365.25 * 24 * 60 * 60 * 1000; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yearsToMS(years){\n\treturn years * 365.25 * 24 * 60 * 60 * 1000;\n}", "function secondsToYear(seconds) {\n console.log(500000000 / 31536000)\n}", "function myYear(year){\n return year * 365 * 24 * 60 * 60;\n}", "function ms_seconds(x){ return x / 1000;}", "function ms(e,t,n){var a=\" \";retur...
[ "0.78170484", "0.63454074", "0.6320979", "0.63021255", "0.62207794", "0.6144206", "0.6138022", "0.60783035", "0.60678715", "0.60396916", "0.60089886", "0.60051125", "0.59724534", "0.5971102", "0.59505254", "0.59505254", "0.59505254", "0.59505254", "0.5934785", "0.59276325", "...
0.7980099
0
ensures that the navigation bar will not provide a link to the current page
function refreshNavLinks() { var nav = document.getElementById("navigation"); var navLinks = nav.lastElementChild.children; var current = window.location.href; for (var i = 0; i < navLinks.length; ++i) { if (current == navLinks[i].lastElementChild.href) { navLinks[i].lastElementChild.className = "disabled"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function noNav(event){\n event.preventDefault()\n}", "function beforeNavigate(e) {\n\t\tvar tab = e.target,\n\t\t\tcurrent_url = e.target.url,\n\t\t\tnav_url = e.url,\n\t\t\tanchor_navigation = (\n\t\t\t\tcurrent_url &&\n\t\t\t\tnav_url &&\n\t\t\t\tcurrent_url != nav_url &&\n\t\t\t\tcurrent_url.replace(/#.*$/...
[ "0.6634693", "0.64176345", "0.6382012", "0.6364649", "0.634125", "0.6331599", "0.62769544", "0.6272325", "0.6265618", "0.6226701", "0.620163", "0.6073878", "0.60560447", "0.6048904", "0.60435945", "0.60172236", "0.60089266", "0.59985745", "0.5998006", "0.59953684", "0.5909539...
0.5764574
38
adds a welcome message for whoever is insession to the navigation bar
function addWelcome(){ var name = getCookie("name"); if (!name) { //in case this is called without the cookie being set throw new Error("User's name was not set"); } var nav = document.getElementById("navigation"); var navList = nav.lastElementChild; var welcome = document.createElement("li"); welcome.innerHTML = "Welcome, " + name; navList.insertBefore(welcome, navList.firstChild); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayWelcomeMessage(){\n DisplayNotification(\n config[\"welcome\"][\"title\"],\n welcome_message,\n [],\n true\n );\n}", "function sayGreeting() {\r\n let username = sessionStorage.getItem('username');\r\n if (username != undefined) {\r\n $('...
[ "0.68339264", "0.6810861", "0.67842263", "0.6584419", "0.6442455", "0.6361557", "0.6327743", "0.6297694", "0.6282869", "0.6207072", "0.61515915", "0.61383283", "0.61166936", "0.61132294", "0.6084906", "0.6083154", "0.6081239", "0.608034", "0.60108405", "0.6008082", "0.6005908...
0.6895224
0
gets the contents of a cookie of the given name cookies come from document.cookie in the form of: "cookie1=value; cookie2=value; ..."
function getCookie(cName){ var fullCookies = document.cookie.split(";"); for (var i = 0; i < fullCookies.length; ++i) { curr = fullCookies[i].split("="); curr[0].trim(); if (curr[0] == cName) { return curr[1]; } } return undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetCookie(name) {\n var cookies = (document.cookie || \"\").split(\";\");\n var i = 0, l = cookies.length, c;\n for ( i; i < l; i++ ) {\n c = cookies[i].replace(/^\\s+|\\s|\\s$/g, \"\").split(\"=\");\n if ( (c.shift()) == name ) {\n return c.join(\" \");\n }\n }\n\n return null;\n}", ...
[ "0.8386842", "0.8384067", "0.8373448", "0.83704793", "0.83704793", "0.83704793", "0.83704793", "0.83704793", "0.8366832", "0.8362262", "0.83517224", "0.8345222", "0.83450574", "0.8329781", "0.82723826", "0.8269475", "0.82615894", "0.8249257", "0.8243188", "0.8237059", "0.8237...
0.0
-1
populate a questionStream with instructor permissions for the currentClass
function questionStreamInstructor(currentClass) { var title = document.createElement("H1"); title.innerHTML = currentClass var questionWrapper = document.createElement("DIV"); questionWrapper.id = "questionWrapper"; var questionStream = document.createElement("DIV"); questionStream.id = "questionStream"; var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); var labels = ["Questions", "Topics", "Flagged"]; for (var i = 0; i < 3; ++i) { var g = document.createElementNS("http://www.w3.org/2000/svg", "g"); g.id = labels[i]; g.setAttribute("class", "inactiveTab"); var text = document.createElementNS("http://www.w3.org/2000/svg", "text"); text.innerHTML = labels[i]; text.setAttribute("x", 6 + 195 * i); text.setAttribute("y", 30); var path = document.createElementNS("http://www.w3.org/2000/svg", "path"); var d = "M" + (195 * i) + ",40 L" + (195 * i) + ",0 L" + (185 + 185 * i) + ",0 L" + (195 + 195 * i) + ",40"; path.setAttribute("d", d); //"M0,40 L0,0 L142,0 L158,40" g.appendChild(path); g.appendChild(text); svg.appendChild(g); } questionWrapper.appendChild(svg); var questionScroll = document.createElement("DIV"); questionScroll.id = "scrollMenu"; var content = document.getElementById("content"); while(content.firstChild) { content.removeChild(content.firstChild); } content.appendChild(title); questionStream.appendChild(questionScroll); questionWrapper.appendChild(questionStream); content.appendChild(questionWrapper); var activeTab = document.getElementById("Questions"); activeTab.setAttribute("class", "activeTab"); populateQuestions(40, "null", 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function specifyInstructor(prevAnswers){\n inquirer.prompt([\n {\n name: 'instructor',\n message: 'Choose the instructor for this class',\n type: 'list',\n choices: function (answers) {\n // return an array with name/value props that inquirer prefers\n return formatForChoices(...
[ "0.60548645", "0.534759", "0.52014256", "0.52014256", "0.52014256", "0.51002467", "0.5074256", "0.50637865", "0.5047914", "0.5021441", "0.49871245", "0.495291", "0.49509344", "0.49509344", "0.49397814", "0.4918687", "0.49182567", "0.48724222", "0.48497495", "0.48433426", "0.4...
0.6261367
0
called when a student presses the submit button on the home page if input was given, create the questions popup, otherwise display error
function submitQuestion() { var input = document.getElementById("questionInput").value || null; var error = document.getElementById("questionError"); if (input) { error.style.display = "none"; //hide error message createPopup(); //the button to proceed with posting the question var continueB = popupVerify(); continueB.onclick = function() { loadingIMG("whitePrompt"); //process the question with processQ.php var data = "question=" + input; XMLRequest("processQ.php", data, function(xhttp) { if (xhttp.responseText) { popupResult(true); } else { popupResult(false); } }); } } else { error.innerHTML = "Please enter a question first.<br />"; error.style.display = "inline"; //show error message } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createQuestion() {\n if (questionNumber < STORE.length) {\n return createForm(questionNumber);\n } else {\n $('.questionArea').hide();\n\n finalScore();\n\n $('.questionNumber').text(10);\n }\n}", "function validateInput()\n{\n /*\n let errorLabel = document.ge...
[ "0.6724262", "0.6526547", "0.6509709", "0.649247", "0.6459917", "0.6437196", "0.64169896", "0.64088017", "0.6388925", "0.63796735", "0.6347118", "0.6342203", "0.6326724", "0.6325776", "0.63240725", "0.62947994", "0.6287242", "0.6280675", "0.62671435", "0.6258139", "0.62541085...
0.6899776
0
sets up a whitePrompt for verifying if a student wants to post their question assumes a whitePrompt element is available for use returns the continue posting button so action can be added to it
function popupVerify() { var prompt = document.getElementById("whitePrompt"); var title = document.createElement("P"); title.innerHTML = "What about these:"; prompt.appendChild(title); var questionScroll = document.createElement("DIV"); questionScroll.id = "scrollMenu"; prompt.appendChild(questionScroll); //puts questions in the questionScroll populateQuestions(40, "null"); var continueB = document.createElement("SPAN"); continueB.style.float = "right"; continueB.innerHTML = "<button>Post my question</button>"; var goBack = document.createElement("SPAN"); goBack.innerHTML = "<button>Go Back</button>"; goBack.onclick = function() { hidePopup(); } prompt.appendChild(goBack); prompt.appendChild(continueB); return continueB; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "promptUser(question, buttonLeftText, buttonRightText, callback) {\n this.dialog.innerHTML = `\n <h2>${question}</h2>\n <span>\n <button type=\"button\" class=\"magic-button yes\">${buttonLeftText}</button>\n <button type=\"button\" class=\"magic-button no\">${buttonRightText}</button>\n ...
[ "0.6200012", "0.6131003", "0.5996856", "0.59134686", "0.5898033", "0.58965355", "0.58800817", "0.5873849", "0.5861574", "0.5845949", "0.5832991", "0.5813005", "0.5810798", "0.5799279", "0.5798793", "0.57976377", "0.5795308", "0.57930875", "0.5792922", "0.57837164", "0.5783562...
0.6201446
0
calls a php file to get questions related to the class chosen from the database in format that is directly placed into the questionScroll HTML
function populateQuestions(amount, classChosen, isInstructor) { isInstructor = isInstructor || 0; var data = "amount=" + amount + "&class=" + classChosen + "&isInstructor=" + isInstructor; questionScroll = document.getElementById("scrollMenu"); loadingIMG("scrollMenu"); if (isInstructor) { //get questions related to class and amount for istructor XMLRequest("populateQ.php", data, function(xhttp) { questionScroll.innerHTML = xhttp.responseText; populateVotes(); populateChecks(); populateFlags(); }); } else { //get questions related to class and amount for student XMLRequest("populateQ.php", data, function(xhttp) { questionScroll.innerHTML = xhttp.responseText; populateVotes(); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_questions(){\n\t\tvar req = new XMLHttpRequest();//activates this object which establishes continous asynchronous connection to the database\n\t\treq.onreadystatechange = function() {//checks the readiness of the connection\n\t\t\tif(req.readyState == 4 && req.status == 200){\n\t\t\t\tdocument.getElem...
[ "0.65463746", "0.6495609", "0.6221166", "0.6208267", "0.6186867", "0.6167647", "0.6123852", "0.60954", "0.6089556", "0.6040194", "0.60391444", "0.60385513", "0.60370046", "0.6030478", "0.6007781", "0.6007327", "0.6006398", "0.60039896", "0.5994312", "0.5977077", "0.5973866", ...
0.66203946
0
assumes all elements of class "vote" are img elements and gives them the inactive arrow picture and a click action
function populateVotes() { var allVotes = document.getElementsByClassName("vote"); for (var i = 0; i < allVotes.length; i++) { allVotes[i].src = "images/inactiveArrow.png"; allVotes[i].onclick = function() { this.onclick = null; handleVote(this.parentElement.parentElement.id); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function voting(event) {\n voteTracker -= 1;\n for (var i = 0; i < imgArr.length; i++) {\n if (event.target.name === imgArr[i].name) {\n imgArr[i].votes += 1;\n }\n }\n if (voteTracker > 0) {\n refresh();\n } else {\n imgOneEl.classList.add('noHover');\n imgTwoEl.classList.add('noHover');\...
[ "0.6857941", "0.6653287", "0.64448583", "0.63679904", "0.63223225", "0.6314531", "0.62864876", "0.6285075", "0.62615937", "0.62522477", "0.61782396", "0.6162978", "0.6154525", "0.6095629", "0.6075661", "0.59430224", "0.59278387", "0.5906873", "0.5898814", "0.5879291", "0.5876...
0.7496945
0
assumes all elements of class "check" are img elements and gives them the inactive check picture hovering and clicking cause the image to change
function populateChecks() { var allChecks = document.getElementsByClassName("check"); for (var i = 0; i < allChecks.length; i++) { allChecks[i].src = "images/inactiveCheck.png"; allChecks[i].onmouseenter = function() { this.src = "images/hoverCheck.png"; } allChecks[i].onmouseleave = function() { this.src = "images/inactiveCheck.png"; } allChecks[i].onclick = function() { this.onclick = null; this.onmouseenter = null; this.onmouseleave = null; this.src = "images/activeCheck.png"; handleCheck(this.parentElement.parentElement.id); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imageClick() {\n $(\"#gifs img\").click(function() {\n \n var IMG = $(this).data(\"status\");\n var HTML = $(this).data(\"html\");\n \n for (var i = 0; i < buttons.length; i++) {\n if (IMG === \"still\" && HTML === buttons[i].html) {\n $(this).replaceWith(\"<img data-st...
[ "0.6393228", "0.6334721", "0.6329619", "0.62593347", "0.62184227", "0.6142677", "0.61380327", "0.61007464", "0.6095733", "0.60924447", "0.60228324", "0.5978308", "0.5952335", "0.5918307", "0.5871251", "0.5853594", "0.5850994", "0.58509576", "0.58361787", "0.5826404", "0.58169...
0.74838173
0
tells the server that a certain question has been upvoted
function handleVote(qID) { id = qID.substring(1, qID.length); data = "qID=" + id; XMLRequest("addWeight.php", data, function(xhttp) { if (xhttp.responseText == 1) { makeVoted(qID); } else { console.log(xhttp.responseText); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function whatIsQuestion() {\n\n if(anonymousvotingAddr.state() > 0) {\n var q = anonymousvotingAddr.question();\n document.getElementById('title').innerHTML = q;\n }\n}", "function updateVotes(tag) {\n var c = tag.className;\n var id1 = $(tag).parent().parent().parent().parent().parent().attr('id')...
[ "0.69591916", "0.62301", "0.618836", "0.6174684", "0.6139304", "0.6127556", "0.6100493", "0.60970956", "0.60930514", "0.60806537", "0.60796106", "0.6077507", "0.6048451", "0.60397154", "0.60363555", "0.6025027", "0.6017567", "0.6003538", "0.5988409", "0.5975849", "0.59426737"...
0.6157945
4
updates the question's vote element to show its been upvoted
function makeVoted(qID) { var question = document.getElementById(qID); var vote = question.getElementsByClassName("vote")[0]; var weight = vote.parentElement.lastElementChild; weight.innerHTML = parseInt(weight.innerHTML) + 1; vote.src = "images/activeArrow.png"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateNewVotes(newVotes) {\n\t$('#current-votes').text(newVotes)\n}", "function upVoteUpdate(counter, newval){\n\t \t$(counter).text(parseFloat(newval));\n\t }", "function updateVote(result, status) {\n console.log(result);\n $('p.votes').text(result.voted); // update the curr...
[ "0.701828", "0.69826126", "0.69644326", "0.69491243", "0.6826897", "0.6791278", "0.6774754", "0.6530343", "0.65130997", "0.6471664", "0.6366108", "0.6348133", "0.6332756", "0.6274421", "0.62457776", "0.6220201", "0.61921114", "0.61877805", "0.6162256", "0.6154584", "0.6141631...
0.6309565
13
does a POST request to the target url and gives it the callback function
function XMLRequest(url, postData, callback) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { callback(xhttp); } else if (xhttp.status == 404){ console.log("page not found"); console.log(xhttp.readyState); } else { } }; xhttp.open("POST", url, true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.send(postData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function post_request(url, callback, data){\n $.ajax({\n url : url,\n success : callback,\n type : \"POST\",\n data : data\n });\n }", "function post_request(url, callback, data){\n $.ajax({\n url : url,\n success : callback,\n type : \"POST\",\n data : data\n ...
[ "0.79391444", "0.79391444", "0.739491", "0.7290342", "0.7280939", "0.7278143", "0.7246299", "0.724037", "0.7209188", "0.7171526", "0.71203053", "0.71184766", "0.7035874", "0.69271463", "0.68976665", "0.6873692", "0.6863053", "0.68339306", "0.68316996", "0.6816678", "0.6815322...
0.0
-1
creates a new Popup, consisting of a blackOverlay and whitePrompt
function createPopup() { if (document.getElementById("blackOverlay")) { document.body.removeChild(document.getElementById("blackOverlay")); } var popup = document.createElement("DIV"); popup.id = "blackOverlay"; var prompt = document.createElement("DIV"); prompt.id = "whitePrompt"; popup.appendChild(prompt); document.body.appendChild(popup); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_popup(text,target)\n {\n //alert(text);\n var status_window = $('acts_as_monitor_status_window');\n status_window.update(text);\n Position.clone(target,\n status_window, {\n offsetLeft: 20\n });\n new Effect.Appear(status_window);\n //alert(\"Fatto\");\n }", "...
[ "0.69983315", "0.68958634", "0.67815334", "0.67484826", "0.6710066", "0.67093796", "0.6678858", "0.6615132", "0.65714383", "0.6556891", "0.65053445", "0.64798075", "0.64798075", "0.64596033", "0.64434904", "0.6432225", "0.6408007", "0.6360923", "0.6310325", "0.6250126", "0.62...
0.8573802
0
puts a success or failure image in the Popup based on the boolean parameter
function popupResult(success) { var prompt = document.getElementById("whitePrompt"); while(prompt.firstChild) { prompt.removeChild(prompt.firstChild); } if (success) { prompt.innerHTML = "<img src=\"images/check.png\"></img>"; } else { prompt.innerHTML = "<img src=\"images/X.png\"></img>"; } var goBack = document.createElement("P"); goBack.innerHTML = "<button>Go Back</button>"; goBack.onclick = function() { questionInput = document.getElementById("questionInput"); questionInput.value = ""; hidePopup(); } prompt.appendChild(goBack); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayPopup(statusFlag, answer){\n $('.feedback-section').show();\n if(statusFlag){\n $(\".popup-box img\").attr(\"src\",correctAnswerIcon);\n $(\".popup-box #popup-text\").text(\"You are right!\");\n $(\".popup-box\").show();\n }\n else{\n if(answer === undefined) {\n questionC...
[ "0.67316055", "0.6513748", "0.6444065", "0.6297815", "0.6282017", "0.6247494", "0.6217212", "0.6183169", "0.61675", "0.60339224", "0.6032826", "0.60260946", "0.6023194", "0.6008983", "0.5978298", "0.594329", "0.5915554", "0.5912774", "0.5905831", "0.5892263", "0.58919775", ...
0.6836067
0
Removes all children from element of given ID and then places a loading gif image
function loadingIMG(id) { var prompt = document.getElementById(id); if (prompt) { while(prompt.firstChild) { prompt.removeChild(prompt.firstChild); } loading = document.createElement("IMG"); loading.src = "images/ajax-loader.gif"; prompt.appendChild(loading); } else { console.log("loading passed bad id"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeGifs() {\n $('#gif-results').children().remove();\n}", "function displayLoadingImage(element) {\r\n\t\t// clear any other HTML before displaying it\r\n\t\telement.html(\"\");\r\n\r\n\t\telement.prepend($(\"<img>\", {\r\n\t\t \"src\": BASE_IMG_URL + \"bigbluebutton/ajax-loader.gif\",\r\n\t\t \"i...
[ "0.67828315", "0.6394208", "0.6381084", "0.63363206", "0.6322895", "0.63086975", "0.6305894", "0.6296466", "0.6230115", "0.6223565", "0.6220338", "0.61535114", "0.61298263", "0.6113981", "0.6106013", "0.6088218", "0.60586256", "0.60294163", "0.5975264", "0.5973056", "0.592313...
0.6655164
1
Level 8kyu Directions Given a number n, draw stairs using the letter "I", n tall and n wide, with the tallest in the top left. For example n = 3 result in "I\n I\n I", or printed: I I I Function
function drawStairs(n) { // need a stairs variable to hold the string let stairs = []; // need a loop to draw the stairs for (let i = 0; i < n - 1; i++) { // Add 'I' followed by '\n' and the number of spaces that equal the index number stairs.push('I\n' + Array(i+1).fill(' ').join('')); } // add the final 'I' stairs.push('I'); console.log(stairs.join('')); // return joined stairs string return stairs.join(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawStairs(n) {\n //empty string\n var stairs = \"\";\n // establish a space\n const space = \" \";\n // count up from one to n\n for (let i = 1; i < n; i++) {\n // add I\\n and the i number of spaces to stairs\n stairs += \"I\\n\" + space.repeat(i);\n }\n // return stairs with the initial...
[ "0.80917555", "0.70374644", "0.6922148", "0.6848745", "0.68453044", "0.6818625", "0.6809449", "0.67627037", "0.6728271", "0.6726916", "0.67090076", "0.6700973", "0.66719115", "0.6667084", "0.66459113", "0.6637352", "0.66288066", "0.6612043", "0.66102886", "0.6577692", "0.6539...
0.77745456
1
Author: Nergal Date: 20141117 ==============================================================================
function VoxelData() { this.x; this.y; this.z; this.color; VoxelData.prototype.Create = function(buffer, i, subSample) { this.x = (subSample? buffer[i] & 0xFF / 2 : buffer[i++] & 0xFF); this.y = (subSample? buffer[i] & 0xFF / 2 : buffer[i++] & 0xFF); this.z = (subSample? buffer[i] & 0xFF / 2 : buffer[i++] & 0xFF); this.color = buffer[i] & 0xFF; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "transient private internal function m185() {}", "transient protected internal function m189() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "static private internal fun...
[ "0.6493483", "0.64572185", "0.6311186", "0.6260086", "0.62363034", "0.6212571", "0.6141003", "0.602183", "0.6017783", "0.58911896", "0.5797196", "0.5755842", "0.5738838", "0.5714699", "0.57002884", "0.56846744", "0.5667253", "0.55975646", "0.5527406", "0.5524762", "0.55061126...
0.0
-1
checking the user entered name
function check(name) { var new_name = name.value; if (!isNaN(new_name)) { new_name = new_name.substring(0, (new_name.length - 1)); name.value = new_name; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_name(){\n name_outcome = validate.validateStr(name); //bool\n \n if(!name_outcome){ //if incorrect data - inform user\n $('#name_error').text('* please enter a valid name');\n }else{\n $('#name_error').text('');\n ...
[ "0.80228597", "0.79169977", "0.7909316", "0.783597", "0.7783605", "0.77192724", "0.76279444", "0.75716716", "0.7567348", "0.756014", "0.7556078", "0.7556013", "0.7531552", "0.74208283", "0.7383483", "0.7360164", "0.7342701", "0.733383", "0.73254406", "0.7308641", "0.7300443",...
0.6839853
94
calculating and validating the F L A M E S
async function calc() { fetchData("Flames - Clicked"); //getting names from user var fname = document.getElementById('yname').value; var sname = document.getElementById('pname').value; //alert if button is pressed without entering the names if (fname == '') { alert("Enter First Name"); } else if (sname == '') { alert("Enter Second Name"); } var r = /\s+/g; var orfirst = document.first.name.value.toUpperCase(); var nam = orfirst; orfirst = orfirst.replace(r, ""); if (orfirst != "") { var count = 0; var first = orfirst; second = eval("document.first.name" + 1).value.toUpperCase(); var names = second; second = second.replace(r, ""); if (second != "") { for (var i = 0; i < first.length; i++) { for (var j = 0; j < second.length; j++) { if (first[i] == second[j]) { var a1 = first.substring(0, i); var a2 = first.substring(i + 1, first.length); first = a1 + a2; i = -1; var b1 = second.substring(0, j); var b2 = second.substring(j + 1, second.length); second = b1 + b2; j = -1; break; } } } var ss = (first + second); var l = ss.length; var ar = new Array("F", "L", "A", "M", "E", "S"); var stp = 1; for (var x = 6; x > 1; x--) { var g = ((l % x) + stp) - 1; if (g > x) { g = g % x; } if (g == 0) { g = ar.length; } ar.splice(g - 1, 1); stp = g; //alert(ar); } if (ar == "F") { //res="FRIENDS"; document.getElementById("display_flame").innerHTML = 'FRIENDS'; document.getElementById("display_flame").style.color = '#4285F4'; } else if (ar == "L") { //res="LOVER"; document.getElementById("display_flame").innerHTML = 'LOVER'; document.getElementById("display_flame").style.color = 'var(--Secondary-color)'; } else if (ar == "A") { //res="AFFECTION"; document.getElementById("display_flame").innerHTML = 'AFFECTION'; document.getElementById("display_flame").style.color = '#DBA901'; } else if (ar == "M") { //res="MARRIAGE"; document.getElementById("display_flame").innerHTML = 'MARRIAGE'; document.getElementById("display_flame").style.color = 'var(--Primary-color)'; } else if (ar == "E") { //res="ENEMY"; document.getElementById("display_flame").innerHTML = 'ENEMY'; document.getElementById("display_flame").style.color = '#FBBC04'; } else if (ar == "S") { //res="SISTER"; document.getElementById("display_flame").innerHTML = 'SISTER'; document.getElementById("display_flame").style.color = 'white'; } document.getElementById("nam" + 1).style.display = 'block'; document.getElementById("nam" + 1).textContent = "Relationship status of " + nam + " & " + names + " is :"; } else { document.getElementById("nam" + 1).style.display = 'none'; count++; if (count == 4) { alert("Enter other name"); document.getElementById("result").style.display = 'block'; } } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateFormAndCalculatePl() {\n addCommas(\"rp-annual-input\");\n addCommas(\"rp-annual-save-input\");\n addCommas(\"rp-month-input\");\n addCommas(\"rp-expense-input\");\n }", "function exam(a)\r\n{\r\n //solving fexam\r\nlet fexam = (60/100)*a\r\n//allowing access to...
[ "0.62301934", "0.5956539", "0.5919092", "0.5891971", "0.5869705", "0.5851588", "0.57822496", "0.57629883", "0.5749128", "0.5725911", "0.57237625", "0.56865585", "0.5636967", "0.5585511", "0.5563349", "0.55535895", "0.55523837", "0.55504507", "0.55478036", "0.55470276", "0.554...
0.55515164
17
a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc.
function special_poth(number) { for (var c = 1; c < number; c++) { for (var b = 1; b < c; b++) { for (var a = 0; a <b; a++) { if ((a+b+c) === number && (Math.pow(a,2) + Math.pow(b,2) === Math.pow(c,2))) { return a * b * c } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pythogoreanTriplet(){\n const sum = 1000;\n for (a=1;a<=sum/3;a++){\n for (b=a+1;b<=sum/2;b++){\n c = sum-(a+b);\n if (a*a + b*b == c*c){\n var product = a*b*c;\n break;\n }\n }\n }\n return product;\n}", "function ...
[ "0.79558086", "0.7811164", "0.7695554", "0.7584783", "0.74205506", "0.73390716", "0.72622424", "0.691476", "0.678388", "0.6713765", "0.67117065", "0.66552776", "0.66542095", "0.65907204", "0.65892994", "0.6528874", "0.6434588", "0.64098066", "0.637206", "0.6371204", "0.635753...
0.6721004
9
Event handler for mouse enter.
function onMouseEnter() { $element.addClass(CLASS_SIDEBAR_OPEN); body.addClass(CLASS_HAS_SIDEBAR_OPEN); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "e_mouseEnter(e)\n\t{\n\t\t\n\t}", "function OnMouseEnter() {\n\tisMouseEnter = true;\n\t\n}", "_handleMouseEnter() {\n this._hovered.next(this);\n }", "function handleMouseEnterFix() {\n !mouseEntered.current && handleMouseEnter();\n }", "function mouseEntered(e) {\r\n DoHover(this, tr...
[ "0.8043586", "0.78714746", "0.77313685", "0.76644117", "0.76436186", "0.76008976", "0.75129956", "0.75077593", "0.7420314", "0.7227512", "0.719384", "0.71613395", "0.7124858", "0.71219075", "0.71219075", "0.69925076", "0.6942599", "0.6877558", "0.6877558", "0.68086934", "0.67...
0.0
-1
Event handler for mouse leave.
function onMouseLeave() { $element.removeClass(CLASS_SIDEBAR_OPEN); body.removeClass(CLASS_HAS_SIDEBAR_OPEN); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseleave(e){\n\t\t// console.log(e);\n\t\tmouseIsDown = false;\n\t}", "e_mouseLeave(e)\n\t{\n\t\t\n\t}", "function mouseleave(e){\n\t\tmouseIsDown = false;\n\t\tnewFurniture = undefined;\n\t}", "function onMouseLeave() {\n ipc.send('electron-notify-mouseleave', winId, notificationObj);\n ...
[ "0.80788124", "0.7943846", "0.7839001", "0.77024823", "0.7450401", "0.7426352", "0.7422002", "0.737279", "0.7311398", "0.7226963", "0.7208545", "0.71669084", "0.71257925", "0.71257925", "0.7124441", "0.70658857", "0.7018195", "0.6941451", "0.6937447", "0.6922591", "0.68143183...
0.66581905
31
Hay manera de invocar directamente a la funcion de eliminar desde la accion de onclick???
removeAction(){ // Elimino el todo seleccionado removeTodo(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarEntrada() {\n\tli.remove(); //remueve la entrada con el click del botoncito\n\t}", "function eliminaSingolo(elemento){\n\tif (confirm('Confermare la cancellazione di questo punteggio?')) { \n\tfunzioneCancella(elemento);\n }\n}", "function preguntar() {\n confirmar = confirm('¿Desea eliminar ...
[ "0.70469344", "0.69828147", "0.69341815", "0.69110894", "0.6790467", "0.67776734", "0.66299236", "0.65206486", "0.6502999", "0.6493706", "0.64792365", "0.64690655", "0.64413416", "0.6435334", "0.64292824", "0.6419726", "0.64055115", "0.6399637", "0.638842", "0.6386566", "0.63...
0.64701766
11
gets gameState from database
getState() { // refers to gamestate field in database var gameStateRef = database.ref("gameState"); // checks for change and gives value to gameState gameStateRef.on("value", function(data) { gameState = data.val(); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStates(game) {\n\n}", "function getAllState() {\n return {\n data : GameStore.getAll(),\n }\n}", "getState(){\n var gsref = database.ref(\"gameState\");\n gsref.on(\"value\", function(data){\n gameState = data.val();\n }); //local function - created & used si...
[ "0.7246655", "0.69032896", "0.68816715", "0.687851", "0.68508714", "0.685021", "0.6842702", "0.6831531", "0.67910254", "0.6779701", "0.67391706", "0.6723401", "0.66933036", "0.668204", "0.6652834", "0.66131", "0.65961033", "0.6572329", "0.6572329", "0.6480222", "0.6469648", ...
0.7152578
1
updates database with gameState
update(state) { // refer to gameState field and set as 1 or 0 database.ref("/").update({ gameState: state }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(state){\r\n\r\n database.ref('/').update({\r\n gameState: state\r\n });\r\n\r\n }", "update(state){\r\n database.ref('/').update({\r\n gameState: state\r\n });\r\n }", "update(state)\r\n {\r\n //updating the database and referring\r\n database.ref('/...
[ "0.8056265", "0.8021346", "0.80087847", "0.7951873", "0.7927393", "0.7868417", "0.78507257", "0.78414124", "0.78267854", "0.78069544", "0.7758292", "0.7750851", "0.77477705", "0.77466327", "0.77185774", "0.7712269", "0.76139826", "0.75881946", "0.6980752", "0.6891478", "0.676...
0.79740804
3
at the start of the game (menu)
async start() { // if 4 players have not joined if(gameState === 0) { // create a player player = new Player(); // refers to playerCount field and reads the value var playerCountRef = await database.ref("playerCount").once("value"); // when there is a value if(playerCountRef.exists()) { // gets value in playerCount field and stores in playerCount local var playerCount = playerCountRef.val(); player.getCount(); } // makes the menu form and displays form = new Form(); form.display(); } // when 4 players have joined // creates 4 cars and adds to cars array var y = height - 200; car1 = createSprite(width/2 - 300, y); car1.addImage(car1Img); car2 = createSprite(width/2 - 100, y); car2.addImage(car2Img); car3 = createSprite(width/2 + 100, y); car3.addImage(car3Img); car4 = createSprite(width/2 + 300, y); car4.addImage(car4Img); cars = [car1, car2, car3, car4]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pressedStart()\n\t\t\t{\n\t\t\tif(this.gamestate === 'starting')\n\t\t\t\t{\n\t\t\t\tthis.gamestate = 'choose';\n\t\t\t\t}\n\t\t\telse if(this.gamestate === 'choose')\n\t\t\t\t{\n\t\t\t\t}\n\t\t\telse if(this.gamestate === 'stats')\n\t\t\t\t{\n\t\t\t\tthis.gamestate = 'bedroom';\n\t\t\t\t}\n\t\t\telse if(this.game...
[ "0.7500952", "0.7429073", "0.7314835", "0.7263886", "0.7258708", "0.72565097", "0.7245303", "0.72389126", "0.72135997", "0.71798503", "0.7132931", "0.71103674", "0.7087802", "0.7084508", "0.70718193", "0.70610327", "0.7042325", "0.7022666", "0.7014924", "0.7009375", "0.698092...
0.0
-1
when 4 players join
play() { // hide the form form.hide(); // display start text textSize(20); text("START", width/2 - 30, 40); // gets all players details Player.getPlayerInfo(); // if there are players if(allPlayers!=undefined) { background("green"); image(trackImg, 0, -displayHeight*4, width, displayHeight*5); // give index as 0 to be incremented var index = 0; var x = width/2 - 500; var y; for(var plr in allPlayers) { index = index + 1; x += 200; y = height - allPlayers[plr].distance; cars[index - 1].x = x; cars[index - 1].y = y; if(index === player.index) { fill("red"); ellipse(cars[index-1].x, cars[index-1].y, 60, 60); camera.position.x = width/2; camera.position.y = y; imageMode(CENTER); image(this.titleImage, width/2, cars[index-1].y - 250, 400, 100); } } if(keyDown(UP_ARROW) && player.index != null) { player.distance += 30; player.update(); } if(player.distance >= 4590) { gameState = 2; } } drawSprites(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "serverSidePlayerJoined (ev) {\n const plates = this.world.queryObjects({ instanceType: Plate })\n\n let joined = false\n\n plates.filter(p => p.playerId === 0).forEach(plate => {\n if (joined) {\n return\n }\n\n if (plate.playerId === 0) {\n plate.playerId = ev.playerId\n\n ...
[ "0.68992215", "0.6877004", "0.67602235", "0.6577929", "0.6567791", "0.64240915", "0.64200896", "0.6419622", "0.6316671", "0.6265641", "0.626218", "0.62590253", "0.622291", "0.6197084", "0.6196278", "0.6179527", "0.61630285", "0.61223304", "0.6102902", "0.60898006", "0.6084422...
0.0
-1
Functions that will be used as bindings
function expandEvent (params) { // Expand a node (with event handler) if (params.nodes.length) { //Did the click occur on a node? console.log("params for the nodes are ", params.nodes); var page = params.nodes[0]; //The id of the node clicked console.log("Expanding page " + page); expandNode(page); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindable(){\n\t\t\n\t}", "function Bind_A_A_A() {\r\n}", "bindFunctions () {\n this.tick = this.tick.bind(this)\n this.jump = this.jump.bind(this)\n this.navMeshLoaded = this.navMeshLoaded.bind(this)\n this.computeBoundsTree = this.computeBoundsTree.bind(this)...
[ "0.7025309", "0.6989131", "0.69308835", "0.69178694", "0.6914219", "0.6911248", "0.6746633", "0.67198265", "0.662502", "0.65921104", "0.65712506", "0.65019834", "0.64058757", "0.6398749", "0.6395449", "0.63393956", "0.63393956", "0.63393956", "0.63343877", "0.63109916", "0.62...
0.0
-1
Bind the network events function that is invoked on button click
function bind() { // Prevent iOS scrolling document.ontouchmove = function(event){ event.preventDefault(); }; console.log("This is a call from the bind function"); console.log("Got graph nodes " + JSON.stringify(graphNodes)); // Bind actions for search component. // var cf = document.getElementsByClassName("commafield")[0]; //Bind the action of pressing the button // var submitButton = document.getElementById('submit'); // submitButton.onclick = function() { // console.log("This is on submit button click."); // shepherd.cancel(); // Dismiss the tour if it is in progress resetNetworkFromInput(graphNodes); // reset the tree network - main.js // }; // Bind tour start // var tourbtn = document.getElementById("tourinit"); // tourbtn.onclick = function() {shepherd.start();}; // // // Bind GitHub button // var ghbutton = document.getElementById("github"); // ghbutton.onclick = function(event) { // window.open("https://github.com/The-Penultimate-Defenestrator/wikipedia-map"); // }; // // // Bind twitter button // var sharebutton = document.getElementById("share"); // var buttons = document.getElementById("buttons"); // sharebutton.onclick = function(event) { // // }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function theClick() {\r\n console.log('inicia')\r\n dataNodes()\r\n dataElements()\r\n backEnd()\r\n}", "function OnBtnServerSynch_Click( e )\r\n{\r\n OnBtnServerSynch() ;\r\n}", "function handleClick(e) {\n sendRequest()\n }", "function makerequest(){\n console.log(\"Buton Clicked\");\n\...
[ "0.6610068", "0.6477704", "0.63672704", "0.63170743", "0.6292566", "0.6232115", "0.620386", "0.6172805", "0.612563", "0.6123774", "0.6105521", "0.6077353", "0.6044903", "0.60169834", "0.6011921", "0.59980977", "0.5988589", "0.59756446", "0.59626484", "0.59142", "0.58600235", ...
0.5822912
25
Deals with node expansion on click Don't deal with it in the start
function bindNetwork() { if (isTouchDevice) { // Device has a touchscreen network.on("hold", expandEvent); // Long press to expand network.on("click", mobileTraceEvent); // Highlight traceback on click } else { // Device does not have a touchscreen network.on("click", expandEvent); // Expand on click console.log("Expand click here"); network.on("hoverNode", function(params) { // Highlight traceback on hover traceBack(params.node); }); network.on("blurNode", resetProperties); // un-traceback on un-hover } // Bind double-click to open page network.on("doubleClick", openPageEvent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onNodeClick(e) {\r\n\tif (!e) var e = window.event\r\n\tvar target\r\n\tif ( e.target )\r\n\t\ttarget = e.target;\r\n\telse if ( e.srcElement )\r\n\t\ttarget = e.srcElement;\r\n\r\n\tif ( target == this || target.parentNode == this )\r\n\t{\r\n\t\tif ( target.parentNode == this )\r\n\t\t\ttarget = target....
[ "0.73016614", "0.7044309", "0.6994681", "0.6981441", "0.6962765", "0.696072", "0.6918616", "0.6904466", "0.6865545", "0.6824307", "0.68215925", "0.67953044", "0.67864573", "0.677207", "0.676735", "0.67513114", "0.6697624", "0.6673068", "0.6651276", "0.66436464", "0.6642172", ...
0.0
-1
================================= Display functions ================================= returns html text of a rate's display
function rateHTML(currency, rate) { return "<div id='"+currency+"' class='rate_card'><span onclick='baseChange(\""+currency+"\")'>"+ currency+"</span><span>"+rate+"</span></div>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayExchangeRate() {\n // Calc expected Rate in ETH not Wei\n expectedRateEth = expectedRate / (10 ** 18);\n // Calcualte user Exchange rate\n expectedRateHTML.innerText = `1 ${srcSymbol} = ${expectedRateEth} ${destSymbol}`;\n // expectedRate / (10 ** 18)\n}", "function display() {\n // Updat...
[ "0.7074852", "0.68635446", "0.6658359", "0.6578017", "0.6511254", "0.6485525", "0.64167774", "0.63932425", "0.63433015", "0.6343055", "0.631845", "0.62921053", "0.6290573", "0.6278329", "0.6251226", "0.6240607", "0.6225207", "0.6215641", "0.62036115", "0.6199685", "0.618294",...
0.6558822
4
insert rateHTML after an element of given ID
function insertAfterID(id, currency, rate) { document.getElementById(id).insertAdjacentHTML("afterend", rateHTML(currency, rate)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rateHTML(currency, rate) {\n return \"<div id='\"+currency+\"' class='rate_card'><span onclick='baseChange(\\\"\"+currency+\"\\\")'>\"+\n currency+\"</span><span>\"+rate+\"</span></div>\";\n}", "function rateUpdate(currency, rate) {\n document.getElementById(currency).lastChild.innerText = ...
[ "0.64289796", "0.6422957", "0.6295", "0.6156509", "0.6105741", "0.60970634", "0.60354394", "0.59234625", "0.5905654", "0.5905654", "0.59006786", "0.58070296", "0.5759939", "0.5696904", "0.56854486", "0.56854486", "0.56854486", "0.56826323", "0.5678283", "0.5633629", "0.562519...
0.82600445
0