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
send the client details to the gamelogin channel so that it can be added to the queue
function login() { stompClient.send( "/app/game-login", {}, JSON.stringify({ 'sessionId': $('#httpSessionId').val() }) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onJoin (client, options) {\r\n\t\tif(GameStarted == true){throw new Error(\"Partie Complète\")}\r\n\t\telse{\r\n\t\tthis.state.players.set(client.sessionId, new Player());\r\n\t\tif(this.state.carteInit==false)\r\n\t\t{\r\n\t\t\tthis.broadcast(\"CarteInit\",this.state.carte);\r\n\t\t\tthis.state.carteInit = true;\...
[ "0.6447892", "0.6389488", "0.6238252", "0.61537963", "0.6133987", "0.6103869", "0.6090923", "0.6043794", "0.59425205", "0.5887808", "0.5887446", "0.5880083", "0.5874908", "0.5869666", "0.5863665", "0.5825014", "0.5795789", "0.57941073", "0.5755674", "0.57522994", "0.57343775"...
0.6150181
4
updates the view of the board
function updateView(response) { game = response; setPitsValues(game.board); if (game.activePlayer !== null && typeof game.activePlayer !== undefined) { $("#waiting-message").attr("style", "display:none"); $("#ongoing-message").removeAttr("style", "display:none"); } if (game.over) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n this.drawBoard();\n }", "renderBoard () {\n\t\tthis.view.adjustBoardHeight( this.getBoardSize() );\n\t}", "updateView() {\n this.viewValue = this.getViewFromValue();\n this.renderView();\n }", "refreshBoard() {\n this.Canvas.clearLayer(this.Canvas.layerCo...
[ "0.741007", "0.71345526", "0.6976137", "0.675673", "0.6675591", "0.6664103", "0.6650803", "0.66014516", "0.65759856", "0.654491", "0.65080005", "0.64979935", "0.64697886", "0.64505976", "0.64194685", "0.6406581", "0.6402151", "0.63659257", "0.62857354", "0.624543", "0.6216209...
0.58247
68
updates the state of the small pits (number of stones, and active state)
function setPitsValues(board) { for (var i = 0; i < 6; i++) { $("#player2_pit" + i).val(board.pitsPlayer2[i].numberOfStones).removeAttr("disabled"); if (board.pitsPlayer2[i].active === false) { $("#player2_pit" + i).attr("disabled", "disabled"); } $("#player1_pit" + i).va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateState() {\n gState.push({\n board: copyMat(gBoard),\n shownCount: gGame.shownCount,\n markedCount: gGame.markedCount,\n lives: gGame.lives,\n safeClick: gGame.safeClick,\n hints: gGame.hints,\n manualMode: gGame.isManualOn,\n gManualMode: gM...
[ "0.6281369", "0.6280721", "0.61518496", "0.59371835", "0.58626884", "0.58375794", "0.5822219", "0.5812415", "0.579793", "0.57522804", "0.5737249", "0.57300293", "0.5715274", "0.5644076", "0.5633061", "0.5609718", "0.56063324", "0.5554363", "0.55511135", "0.5523274", "0.550416...
0.0
-1
Active Threads Over Time
function refreshActiveThreadsOverTime(fixTimestamps) { var infos = activeThreadsOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 0); } if(isGraph($("#flotActiveThreadsOverTime"))) { infos.createGraph(); }else{ var choic...
{ "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, 0); } if(isGraph($("#flotBytesThroughputOverTime"))){ infos.createGraph(); }else{ var ...
{ "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.6507428", "0.60907906", "0.59227574", "0.59149253", "0.5825179", "0.57521904", "0.57425064", "0.5732041", "0.56578", "0.5652652", "0.56324565", "0.5610195", "0.56014746", "0.55944264", "0.5573114", "0.5547082", "0.5542739", "0.55416393", "0.5531483", "0.55311495", "0.55264...
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...
{ "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.7093777", "0.6836466", "0.6396978", "0.6339968", "0.6251777", "0.6144966", "0.6103308", "0.6070227", "0.6020364", "0.6011662", "0.6004199", "0.5994051", "0.5977451", "0.5976078", "0.5919706", "0.59158826", "0.58723354", "0.58723354", "0.58723354", "0.585325", "0.5810553", ...
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, 0)...
{ "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.0
-1
Response Time Percentiles Over Time
function refreshResponseTimePercentilesOverTime(fixTimestamps) { var infos = responseTimePercentilesOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 0); } if(isGraph($("#flotResponseTimePercentilesOverTime"))) { infos.createGraph()...
{ "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.0
-1
Response Time vs Request
function refreshResponseTimeVsRequest() { var infos = responseTimeVsRequestInfos; prepareSeries(infos.data); if (isGraph($("#flotResponseTimeVsRequest"))){ infos.createGraph(); }else{ var choiceContainer = $("#choicesResponseTimeVsRequest"); createLegend(choiceContainer, infos); ...
{ "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.75745606", "0.7417381", "0.68942136", "0.6808638", "0.6782009", "0.6561855", "0.65220094", "0.65146655", "0.6463262", "0.6463262", "0.6463262", "0.6245444", "0.6245444", "0.622997", "0.6191374", "0.6185116", "0.6151143", "0.614297", "0.61048526", "0.6070699", "0.5946665", ...
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, 0); } if(isGraph($("#flotTotalTPS"))){ infos.createGraph(); }else{ ...
{ "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.6504919", "0.64800555", "0.6460406", "0.63422966", "0.63198924", "0.6301136", "0.6285017", "0.6285017", "0.626822", "0.6211449", "0.61221796", "0.61158377", "0.5952296", "0.58767927", "0.5870782", "0.5846311", "0.58381313", "0.5816877", "0.58047986", "0.5803337", "0.579269...
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 == "bodyBytesThrou...
{ "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 == "choicesBytesThroughpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function c...
[ "0.5349312", "0.5349312", "0.5349312", "0.5349312", "0.5349312", "0.5349312", "0.5349312", "0.5349312", "0.5349312", "0.53481287", "0.5307206", "0.5307206", "0.5307206", "0.5307206", "0.5307206", "0.5307206", "0.5307206", "0.5307206", "0.5307206", "0.5307206", "0.5307206", ...
0.0
-1
Main Function for error handling.
function mainFunction(error, laptimes, choro, winners, markers, rules) { if (error) { alert('An error has ocurred!\nPlease reload page.'); throw error; }; drawMap(markers, choro, laptimes, winners, rules); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ErrorHandler() {}", "error_handler(err) {\n console.log(`Problem encountered. Detail:${err.message}`);\n }", "function JPSpan_Util_ErrorReader() {}", "run() {\n\t\tthrow new Error;\n\t}", "function genericError(){\n output('Fatal error. Open the browser\\'s developer console for more de...
[ "0.6921064", "0.6759985", "0.65597796", "0.64962035", "0.6436452", "0.63997674", "0.635059", "0.6277896", "0.62387705", "0.62387705", "0.6230099", "0.6226865", "0.61751455", "0.61599946", "0.6158435", "0.6156018", "0.61465424", "0.6112193", "0.60964596", "0.6084738", "0.60804...
0.0
-1
Draws the map and calls further visualization functions upon completion.
function drawMap(data, choro, laptimes, winners, rules) { // get the min and max values in choro data var seasons = Object.keys(choro), domain = [0, Math.max.apply(null, Object.values(choro[seasons[seasons.length - 1]]))]; // sets the color transition on the map var firstColor = '#dcb2b2', lastColor = '#8b0000'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawMap(){\n\t\tthis.blocks.forEach(function (e) {\n\t\t\te.draw();\n\t\t});\n\t}", "function _draw() {\n _map.baseLayer.container.appendChild(_self.container);\n _redraw();\n }", "render() {\n MapPlotter.setUpFilteringButtons();\n MapPlotter.readFiltersValues();\n\n MapPl...
[ "0.75980335", "0.75451314", "0.7513786", "0.74951273", "0.7374279", "0.71516865", "0.7138214", "0.70461446", "0.7004737", "0.6998716", "0.6934003", "0.6929849", "0.6926487", "0.68957084", "0.6884974", "0.68535566", "0.6821827", "0.6807198", "0.67921203", "0.6770089", "0.67667...
0.0
-1
Adds scroll zoom and mouse drag functionality to the map. Updates both paths and circles.
function zoom() { map.projection.translate(d3.event.translate).scale(d3.event.scale); paths.attr('d', path); markers.circles .attr('cx', function(d) { return map.projection([d.longitude ,d.latitude])[0] }) .attr('cy', function(d) { return map.projection([d.longitude, d.latitude...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zoomed() {\n svgMap.attr(\"transform\",\n \"translate(\" + zoom.translate() + \")\" +\n \"scale(\" + zoom.scale() + \")\");\n svgMap.selectAll(\"circle\")\n .attr(\"d\", path.projection(projection))\n .attr(\"r\", circleRadius/zoom.scale());\n svgMap.se...
[ "0.6589771", "0.6504065", "0.6455635", "0.63251567", "0.62690914", "0.6068473", "0.605277", "0.6029338", "0.60189456", "0.59714127", "0.59667444", "0.5949144", "0.5949144", "0.59466124", "0.5862564", "0.5836897", "0.5831005", "0.5830816", "0.5821067", "0.5782427", "0.5766717"...
0.65665615
1
Given path data, calculates the center of the path and moves map to the new center location. Updates both paths and circles.
function center(d) { var centroid = path.centroid(d), translate = map.projection.translate(); // calculates correct coordinates var x = translate[0] - centroid[0] + width / 2, y = translate[1] - centroid[1] + height / 2; map.projection.translate([x, y]); zoom.translate(map.projection.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updatePathCenter(bbox) {\n let center = {\n x: bbox.x + bbox.width/2,\n y: bbox.y + bbox.height/2\n }\n this.getPath().center = center;\n }", "function update(data) {\r\n console.log(\"update\");\r\n\r\n var paths;\r\n var paths_all;\r\n var path_da...
[ "0.6312059", "0.6249932", "0.6187556", "0.6065315", "0.59963787", "0.5983688", "0.59654164", "0.57457626", "0.5641315", "0.562118", "0.55989367", "0.55608326", "0.5543733", "0.55220383", "0.5511877", "0.5490038", "0.5483402", "0.54774994", "0.5461013", "0.5455407", "0.5432736...
0.7236696
0
Uses slider input to update the map colors.
function slideUpdateMap(map, choro, color, slider, isos) { slider.on('input', function() { // build a new mapData dict and update map var season = this.value, mapData = mapDataBuilder(season, color, choro, isos); map.updateChoropleth(mapData); updateTitle('season1', 'Races per country in ' + season); });...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSliders() {\n\n\n $('.rgb-label').trigger('colorpickersliders.updateColor', pb.template().keyDoc.labelColor);\n $('.rgb-value').trigger('colorpickersliders.updateColor', pb.template().keyDoc.foregroundColor);\n $('.rgb-background').trigger('colorpickersliders.updateColor', pb.template().key...
[ "0.71917754", "0.7145737", "0.67761254", "0.67740315", "0.66846806", "0.66846806", "0.6653739", "0.66296613", "0.656028", "0.6559522", "0.6509297", "0.6455075", "0.6442742", "0.64329094", "0.6404789", "0.6383714", "0.6334", "0.62758124", "0.62674326", "0.62622684", "0.6258832...
0.67723465
4
Builds the bar next to the map and adds functionality. Adds the space to the right defined in the margin object to make space for the legend. pBar sets the height of the bar as a fraction of the height of the map.
function buildLegend(map, width, height, margin, firstColor, lastColor, domain, isos, pBar = 2 / 3, barWidth = 10) { // adds some margin to the right map.svg.attr('width', width + margin.right); // creates a definition element for legend var defs = map.svg.append('defs'); // sets vertical gradient from 0 to 100...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BarDrawUtil() {\n var me = this;\n /****Constants****/\n var BAR_COLOR = /*\"#4A87F8\"*/\"#178FB7\";\n //Layout\n var MAX_BAR_WIDTH = 24;\n var NICE_BAR_WIDTH = 12;\n var MIN_BAR_WIDTH = 2;\n var BEST_PAD_BETWEEN_BARS = 1;\n\n /****Externally set****/\n //Data\n var dataLi...
[ "0.63605875", "0.6258205", "0.62406", "0.595991", "0.59100634", "0.58970684", "0.5872237", "0.5781969", "0.5710273", "0.5671165", "0.565137", "0.56422585", "0.56347805", "0.5609649", "0.5592928", "0.5579304", "0.55451995", "0.55168927", "0.5509761", "0.5489813", "0.54874367",...
0.6510995
0
Adds marker show hide functionality.
function showHideMarkers(markers, paths, moveAll, map) { // show circle functionality var radio0 = d3.select('#radio0'), radio1 = d3.select('#radio1'); // groups circle transitions var duration = 1000, t = markers.circles.transition().duration(duration), d = markers.circles.transition().delay(duration); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideMarkers(){\r\n\t//this.setIcon(defaultIcon);\r\n for(var i=0; i<self.markerArray().length; i++){\r\n self.markerArray()[i][1].setVisible(false);\r\n\tself.markerArray()[i][1].setIcon(defaultIcon);\r\n }\r\n}", "function showMarkers() {\n // setMapOnAll(map);\n removeLine();\n}", "function s...
[ "0.72645575", "0.72329164", "0.7209773", "0.7056307", "0.7016815", "0.69983375", "0.6963387", "0.69389117", "0.69116604", "0.6870318", "0.6842861", "0.6840322", "0.6832909", "0.67943704", "0.67812616", "0.6738446", "0.67376924", "0.6683469", "0.6675389", "0.6664361", "0.66637...
0.0
-1
Changes the width of borders of countries with a data value equal to the one selected with the legend bar. Changes the borderwidth back to the one set in dataMaps for any country with another data value.
function borderChange(map, isos, value, borderThickness = 3, defaultThickness = 0.25) { // selects data stored in paths var countryData = map.options.data; isos.forEach(function(iso) { var path = map.svg.select('.datamaps-subunit.' + iso); if (value == countryData[iso].races) { // change the selected cou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function worldmapSelected(countrycode) {\n if (prevWidthLine) {\n d3.select(selectorCountry).style(\"stroke\", \"white\");\n d3.select(selectorCountry).style(\"stroke-width\", prevWidthLineCircle);\n }\n selectorCountry = \".\" + countrycode;\n if(!d3.select(selectorCountry).empty()){\n if (d3...
[ "0.6143447", "0.60158527", "0.59397125", "0.5842733", "0.5657683", "0.55211926", "0.54781026", "0.54065734", "0.5367155", "0.5357291", "0.5320742", "0.53122604", "0.53001356", "0.52186733", "0.5217387", "0.519488", "0.5161305", "0.51579624", "0.5141644", "0.51219237", "0.5117...
0.67254376
0
Builds the data dict in Datamaps format. Used to initialise and update the map data and colors for a given dataset.
function mapDataBuilder(season, color, data, isos) { // select the dataset for the selected season via the slider var isoData = data[season], mapData = {}; isos.forEach(function(iso) { var value = isoData[iso]; mapData[iso] = { fillColor: color(value), races: value } }); return mapData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildDataMap() {\n // Creating a p-element with the identity \"date\"\n let datamap_container = document.getElementById(\"datamap_container\");\n let text = document.createElement(\"P\");\n let date = new Date();\n text.setAttribute(\"id\", \"date\");\n datamap_container.prepend(text);\n...
[ "0.6554434", "0.6403993", "0.6242848", "0.6145366", "0.6113619", "0.6001572", "0.59777594", "0.5973378", "0.5942784", "0.5823586", "0.5744957", "0.5670574", "0.55679", "0.55643284", "0.5544331", "0.55420625", "0.5527754", "0.55206585", "0.54850835", "0.5484253", "0.54777783",...
0.6081161
5
Builds a gradient function that, when given an integer, returns a hex color string. The defaultFillValue will be given the defaultFill color, different from the linear scale.
function gradientBuilder(defaultFill, fromColor, toColor, step, domain, defaultFillValue = 1) { // sets start and stop values for linear scale var start = domain[0] + step, stop = domain[1]; // builds a linear scale with the domain and colors var linearColor = d3.scale.linear().domain([start, stop]).range([fromC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gradient(opt, i) {\n return '#' + (155 + i*20);\n }", "function buildBackground({current, max, backgroundColor = '#FFF', fillColor = '#369'}){\n\t\tconst fraction = Math.round(1000 * current / max) / 10;\n\t\tif (fraction < .2) {\n\t\t\treturn backgroundColor;\n\t\t}\n\t\tif (f...
[ "0.599867", "0.5926421", "0.58844155", "0.58200866", "0.5739409", "0.5723508", "0.5704504", "0.566314", "0.5657719", "0.5657594", "0.5643711", "0.56188613", "0.55606556", "0.5528728", "0.5525655", "0.5525655", "0.55118626", "0.5501445", "0.5500291", "0.54664963", "0.5464158",...
0.6281481
0
Draw the markers at circuit location and adds a popup and click event
function drawMarkers(data, map) { // sets the radius of the markers var circleRadius = 4; map.bubbles(data, { popupTemplate: function (geo, data) { return [ '<div class="hoverinfo"' + data.circuitId + '>', '<br/>' + data.circuit_name + '', '</div>' ].join(''); }, fillOpacity: 0.8, highli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMarkers(map) {\n\n // defines the clickable region of the icon\n // no real use yet\n // var shape = {\n // coords: [1, 1, 1, 20, 18, 20, 18, 1],\n // type: 'poly'\n // };\n\n for (var i=0; i<pins.length; i++) {\n // object (one pin)\n var pin = pins[i];\n\n ...
[ "0.67198324", "0.66150457", "0.6614441", "0.6575981", "0.65692365", "0.65372306", "0.65350485", "0.64984655", "0.64961755", "0.64651376", "0.6452973", "0.6427728", "0.64190817", "0.6417731", "0.6401908", "0.6391378", "0.6377989", "0.63639855", "0.6360385", "0.6359562", "0.633...
0.6247297
30
Draws empty axes to be filled with data.
function buildLineChart(laptimes, winners, rules, markers) { // mock domain to be updated by data var xDomain = [0, 0], yDomain = [0, 0]; // sets margins var svg = d3.select('#lineGraph'), margin = {top: 20, right: 20, bottom: 50, left: 50}, width =+ svg.attr('width') - margin.left - margin.right, height ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawEmpty() {\n\t\tdrawChart([[0,0]], \"none\");\n\t}", "function drawAxes() {\n return Axes.draw(gd, graphWasEmpty ? '' : 'redraw');\n }", "clearGraphic() {\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height)\n this.drawAxes()\n }", "function drawChart() {\n stroke...
[ "0.8025144", "0.68382835", "0.6465689", "0.64287907", "0.623452", "0.6233661", "0.6147535", "0.6132445", "0.60641825", "0.60399985", "0.6036962", "0.6015583", "0.60033154", "0.5998076", "0.5987584", "0.5987584", "0.5987584", "0.5928361", "0.59055305", "0.5904279", "0.5887941"...
0.0
-1
Updates the line graph with new laptime data.
function updateLineGraph(laptimes) { // updates domains xDomain = d3.extent(laptimes, function(d) { return d.season; }) yDomain = d3.extent(laptimes, function(d) { return d.time; }); // sets axes xAxis.scale(xScale.domain(xDomain)) .tickFormat(d3.time.format('%Y')); yAxis.scale(yScale.domain(yDomain)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTimescale() {\n var lineDataByBrand = captureLineData();\n\n d3.selectAll('.line')\n .transition()\n .duration(1000)\n .attr({ 'd': function(d) { return path(d); } });\n }", "function update(data) {\n\n //Axis x and x\n x.domain([0, d...
[ "0.7121812", "0.6800302", "0.67946786", "0.67506987", "0.6722994", "0.6716353", "0.6711151", "0.6681007", "0.6578274", "0.65365016", "0.6456453", "0.64318514", "0.6360791", "0.63233376", "0.62864023", "0.6283767", "0.6280475", "0.62264144", "0.62140965", "0.6186738", "0.61836...
0.7429933
0
General update function for title html elements.
function updateTitle(className, text) { d3.selectAll('.' + className).html(text); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_updateTitle() {\n if (this.$title) {\n const escapedTitle = escapeHtml(this.state.title);\n if (this.$title.innerHTML !== escapedTitle) {\n this.$title.innerHTML = escapedTitle;\n }\n }\n }", "function updateTitle(text) {\n $('title').html(\"Blacksmith - \" + text);\n}", "_update...
[ "0.78895074", "0.7739561", "0.7662904", "0.75889844", "0.75888747", "0.7585026", "0.7507833", "0.74420726", "0.7403821", "0.72775245", "0.72548825", "0.72454447", "0.7240574", "0.7148603", "0.7138903", "0.71277946", "0.71053237", "0.7080069", "0.7078223", "0.7078223", "0.7078...
0.6895986
42
From current mouse coordinates on a graph, returns data closest to the location of the mouse.
function getTrueData(laptimes, xScale, mouseX) { var mouseDate = xScale.invert(mouseX), // mousedate i = dataIndex(laptimes, mouseDate), // index to mouse date d0 = laptimes[i - 1], // trailing data d1 = laptimes[i]; // leading data // return the data closest to the mouse return mouseDa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closestPointChecker(mousePosition) {\n // get data from window\n dataList = window.data;\n\n // determine the closest datapoint to mouse\n var i;\n var bestI = 0;\n var bestDiff = 100;\n for (i = 0; i < dataList[0].length; i++) {\n newDiff = Math.abs(dataList[0][i] - mousePosition['x']);\n if...
[ "0.7176142", "0.65495956", "0.6481792", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", "0.64655566", ...
0.0
-1
Given a dataset (list) and a value, returns the index of the dict where the value is stored.
function dataIndex(data, mouse) { return d3.bisector(function(d) { return d.season; }).left(data, mouse); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index(value) {\n var match = this.detect(function(pair) { \n return pair.value === value; \n });\n return match && match.key;\n }", "function index(value) {\n var match = this.detect(function(pair) {\n return pair.value === value;\n });\n return match && match.key;\n }", ...
[ "0.74000233", "0.73677516", "0.7131956", "0.6953832", "0.679795", "0.6784953", "0.671359", "0.6629525", "0.6618747", "0.66159874", "0.6533749", "0.649426", "0.64785254", "0.647477", "0.6382608", "0.6335264", "0.63300973", "0.63022405", "0.6274068", "0.6269097", "0.6238178", ...
0.0
-1
Builds the pie chart with a dataset of winners.
function buildPieChart(winners, laptimes, rules, overlay, xScale, season) { // init on constructor data for user selected season var data = winners[season]['constructor']; // sets dimensions var width = 250, height = 250, radius = Math.min(width, height) / 2; var color = d3.scale.category20(); var arc = d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPieChart() {\r\n var names = [];\r\n var sales = [];\r\n var colours = [];\r\n\r\n // RGB for the pie chart sections\r\n var red = 0;\r\n var blue = 0;\r\n var green = 0;\r\n\r\n // Loop over each game in khGames and check if there's a 'sold' value, then add the game name and...
[ "0.7105444", "0.6682912", "0.668264", "0.6604807", "0.65902245", "0.65453756", "0.6538961", "0.6430334", "0.64179903", "0.64164144", "0.6407099", "0.63821113", "0.63494176", "0.63440025", "0.63384783", "0.6304367", "0.6303902", "0.628594", "0.6274237", "0.6264081", "0.6257133...
0.69975543
1
Updates the pie chart with new data.
function updatePie(data) { // update the data path = path.data(pie(data)); // redraws the arcs path.transition().duration(750).attrTween('d', arcTween); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePlotly(newdata) {\n Plotly.restyle(\"pie\", \"values\", [newdata]);\n }", "function updatePlotly(newdata) {\n Plotly.restyle(\"pie\", \"values\", [newdata]);\n }", "function updatePlotly(newdata) {\n Plotly.restyle(\"pie\", \"values\", [newdata]);\n}", "function updatePlotly(n...
[ "0.7817673", "0.7817673", "0.77913016", "0.77913016", "0.77913016", "0.75981724", "0.7248612", "0.713357", "0.70834154", "0.7032407", "0.7026675", "0.7012997", "0.69795704", "0.6953071", "0.6884878", "0.6834067", "0.67714006", "0.6734355", "0.6733908", "0.6720487", "0.6655929...
0.78200823
0
Handles the interpolation between two arced path elements.
function arcTween(a) { var i = d3.interpolate(this._current, a); this._current = i(0); return function(t) { return arc(i(t)); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static InterpolateBetween(geometry0, fraction, geometry1) {\n const handler = new ConstructCurveBetweenCurves(geometry0, fraction, geometry1);\n return geometry0.dispatchToGeometryHandler(handler);\n }", "function _interpolate(a, b, t) {\n\t return ((1 - t) * a) + (t * b);\n\t }", "f...
[ "0.610203", "0.60519296", "0.6027726", "0.6027726", "0.5849923", "0.58487403", "0.5826255", "0.57977664", "0.5795632", "0.5777207", "0.57606584", "0.5734969", "0.5734969", "0.5734969", "0.5734969", "0.5734969", "0.5734969", "0.5726709", "0.56974435", "0.5653723", "0.5653723",...
0.0
-1
Changes text in tables according to selected season. If the selected season has no data, then the left index is chosen. If an element is empty, then the index is decreased until a non empty value is found for the key. Index resets for any other keys with empty values.
function changeRules(rules, season, bisector) { // create a list of seasons with rule changes and select an index var seasons = Object.keys(rules), i = d3.bisector(function(d) { return d }).left(seasons, season) - 1; var data; // checks if rules changed in this season if (rules[season]) { data = rules[seaso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateText() {\n $('#title').text(TEXT.getText('title'));\n $('#home').text(TEXT.getText('home'));\n $('#stations_map').text(TEXT.getText('stations_map'));\n\n $('#station_list_text_tab').text(TEXT.getText('stations_list'));\n $('#location_text').text(TEXT.getText('location'));\n\n // WARNING\n // ...
[ "0.53636056", "0.50547683", "0.5005172", "0.49934638", "0.49725702", "0.4968615", "0.49365833", "0.4915718", "0.4906941", "0.48622727", "0.48559865", "0.4822313", "0.46887442", "0.46582142", "0.4656189", "0.46542558", "0.46435273", "0.46422458", "0.46326497", "0.4627606", "0....
0.50919795
1
Formats race dataset. Years are interpreted as Dates. Otherwise, axis interpreted Date as an integer and added a comma delimiter. Millisecond input is interpreted correctly and translated to correct output in line graph
function forceValue(data) { data.forEach(function(d) { d.time = new Date(d.time); d.season = new Date(d.season); }); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readTimeCSV(options, data, scale, names) {\r\n //split csv by lines\r\n var allLines = data.split('\\n');\r\n //if in YYYY-mm-dd then 0, if YYYY-mm then 1, if in mm/dd/YYYY then 2\r\n var utcFormat = 0;\r\n //iterate through each line\r\n $.each(allLines, function (lineNo, line) {\r\n ...
[ "0.5911461", "0.5765785", "0.5720054", "0.5656741", "0.5581716", "0.54140013", "0.53847593", "0.5357943", "0.53546154", "0.5298378", "0.5274977", "0.52504706", "0.52400094", "0.52400094", "0.52296996", "0.52138865", "0.5206679", "0.51929295", "0.51352763", "0.5122539", "0.512...
0.0
-1
Takes a date object and returns the year. The format string is a d3 acceptable parse string. Link:
function timeParse(dateObject, formatString) { return d3.time.format(formatString)(dateObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getYear(date){\n return moment(date.releaseDate).format('YYYY');\n }", "function getYear(date) {\n var year = date.substring(0, 2);\n return \"20\" + year;\n}", "function yearFromDate(dateIn)\r\n{\r\n return dateIn.getFullYear();\r\n}", "function getYear(date) {\n if (date in...
[ "0.73611075", "0.7353635", "0.73355997", "0.7252048", "0.7252048", "0.72100955", "0.70087194", "0.6872949", "0.6847936", "0.6815434", "0.67815334", "0.67166454", "0.6660712", "0.66586477", "0.6631483", "0.66158414", "0.6581228", "0.65690255", "0.65444475", "0.6508239", "0.642...
0.0
-1
Content Form Functions "?itemId=" + id
function itemBtnClick(action, param) { switch (action) { case "view": //alert("view"); loadViewModel(window.viewContent_url + param); break; case "edit": //alert("edit"); loadViewModel(window.editContent_url + param); break; case "remove": //alert(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editItem(id){\n sendRequest(\n 'usergroups',\n {\n 'action': 'getEditItemForm',\n 'id': id\n }, function(data){\n $('#listcontent').css('display','none');\n $('#editorholder').html(data);\n });\n}", "function EditRecordInList(id)...
[ "0.68020314", "0.63962436", "0.6351946", "0.6329287", "0.61737657", "0.6078799", "0.6016939", "0.5992332", "0.5951866", "0.58976877", "0.5832439", "0.58043516", "0.5794827", "0.57594025", "0.57573694", "0.57253593", "0.57138467", "0.571145", "0.57108665", "0.56767964", "0.567...
0.0
-1
TODO: jsDocify this if it works see [ChartConfigcalculateDimensions](chartconfig/calculatedimensions)
function calculate_xy_dimensions(width, opts) { var height; var aspectRatio = opts.displayConfig.aspectRatio; var metadata = opts.model.metadata; if (metadata.size == "auto" || opts.enableResponsive) { // use current width } else { width = chartSizes[metadata.size].width; } switch (metadata.size) { case ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setChartDimension(){\n // SVG element\n this.svg\n .attr(\"viewBox\", `0 0 ${this.cfg.width+this.cfg.margin.left+this.cfg.margin.right} ${this.cfg.height+this.cfg.margin.top+this.cfg.margin.bottom}`)\n .attr(\"width\", this.cfg.width + this.cfg.margin.left + this.cfg.margin.righ...
[ "0.6905205", "0.6895846", "0.68172896", "0.68125445", "0.67116797", "0.6634603", "0.66072625", "0.65504664", "0.65260106", "0.6257137", "0.62509614", "0.6233807", "0.61984736", "0.6012887", "0.5984311", "0.5984311", "0.5983013", "0.5982825", "0.5973719", "0.59421664", "0.5908...
0.5779378
30
Renders the form field.
render() { const { autoExpand, className, defaultValue, hasError, hasWarning, isLoading, helpText, errorText, isMaskedInput, label, name, onValidate, hidden, placeholder, inputclassName, inputRef, preventPaste, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n this.$el.html(this.model.get('fieldHTML'));\n\n return this;\n }", "render() {\n this.formElement.setAttribute(\"id\", this._id);\n this.formElement.setAttribute(\"method\", this._method);\n if (this._acceptFiles) {\n this.formElement.setAttribute(\"enctype\", \"multip...
[ "0.6497285", "0.64581704", "0.63278615", "0.6276575", "0.6149729", "0.61136514", "0.6081165", "0.60212237", "0.59937036", "0.597385", "0.5880659", "0.5871826", "0.58137757", "0.5803775", "0.57867527", "0.57509404", "0.5739924", "0.57266754", "0.5721472", "0.5711403", "0.56871...
0.52237326
86
argument is not a number 2
function isTriangle(a, b, c) { [a, b, c] = [a, b, c].sort((x, y) => x - y); return a + b > c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateArgType(functionName,type,position,argument){validateType(functionName,type,ordinal(position)+\" argument\",argument);}", "function increment2(x){\n if(typeof x === \"number\"){\n return x+1;\n }\n else{\n return \"Argumnent passed in not a number\";\n }\n}", "functio...
[ "0.65691066", "0.63388896", "0.62756056", "0.60976064", "0.6087104", "0.60701716", "0.6051111", "0.6036994", "0.6036994", "0.6036994", "0.60365397", "0.5979591", "0.5979591", "0.5979591", "0.5979591", "0.5979591", "0.5979591", "0.5979458", "0.59417427", "0.59299356", "0.59066...
0.0
-1
Before every request, we check to see if client is running
async getClientCredentials(){ if(!isEmpty(this.credentials) && this.isClientRunning()) return this.credentials; const processInformation = await this.getClientProcessInformation(); this.setClientProcessInformation(processInformation); return this.credentials; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async beforeStart(context) {\n const { store } = context;\n\n if (!store) return;\n\n if (store && context.isClient && window.__DATA__ && window.__DATA__.state) {\n const { state } = window.__DATA__;\n store.replaceState(state);\n }\n\n if (!context.app._isMounted) {\n // onHttpReques...
[ "0.6458871", "0.61493343", "0.6003641", "0.5982598", "0.592645", "0.59249645", "0.5879429", "0.5825726", "0.58238465", "0.5806773", "0.58006495", "0.5792409", "0.5784265", "0.57790065", "0.57590705", "0.5735626", "0.57335424", "0.5715342", "0.5704078", "0.57014567", "0.569805...
0.0
-1
implement this later to write the correct formula in each cacluated cell in each results table I.e. want something like this as an example =IFERROR(IF(B42/B46=0," ",B42/B46)) This should ultimately blank out any cells that are blank due to being zero or blank (i.e. the function above) Maybe dont need the IFERROR( bit D...
function setCellCalculations(i, gaQueries) { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0]; // gaQueries.resultRowStart (7 for first table) calculations start at row 8 (and there are 10 rows) // bottom row of table is some sums (this will be gaQueries[i].resultRowStart + 11) // column 1 is...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function not_Anumber () {\n document.getElementById(\"Not\").innerHTML = 0/0;\n}", "function checkIfZero() {\nif(calcDisplayBottom.innerHTML == 0){\ncalcDisplayBottom.innerHTML = '';\n}\n}", "function bottomDischargeCalculations(){\r\n\t//1. Assign 0 if input left blank\r\n\tvar assign_zero = [$bottomSpoutD...
[ "0.5826156", "0.5738383", "0.5733742", "0.5608576", "0.554495", "0.5531622", "0.5530365", "0.5511146", "0.54560566", "0.5444406", "0.5436176", "0.53960556", "0.5376935", "0.5367672", "0.5361082", "0.53599733", "0.5341323", "0.5277991", "0.5267403", "0.52345765", "0.5231283", ...
0.5125662
29
Api public key: 7259dfc17fbc60139f991fd2c2fab763 private key: 5dfb08362a5377cdc86065151cee224ea4884636 ts 1 ts+privatekey+publickey 15dfb08362a5377cdc86065151cee224ea48846367259dfc17fbc60139f991fd2c2fab763 hash 79b5faa956605d8c2cbda68b11ebf3a7
function Personajes2() { const [personajes, setPersonajes] = useState([]) useEffect(()=>{ axios.get('https://gateway.marvel.com/v1/public/series/22547/characters?ts=1&limit=10&offset=10&apikey=7259dfc17fbc60139f991fd2c2fab763&hash=79b5faa956605d8c2cbda68b11ebf3a7') .then(res=>[ setP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(k,p){\n this.privatekey = k;\n this.publickey = p;\n}", "constructor(publickey,privatekey){\n this.publickey = p\n this.privatekey = k\n\n}", "constructor(pri,pub){\n this.privatekey=pri;\n this.publickey=pub;\n}", "getPublicKey() {\n const token = this.getAuthKey();\n if (!token) ret...
[ "0.6853512", "0.67148644", "0.6702014", "0.66026914", "0.6507668", "0.6353733", "0.6331865", "0.6323705", "0.63193023", "0.6295568", "0.6274328", "0.62238204", "0.6199706", "0.6175048", "0.60927963", "0.60852677", "0.6074994", "0.60656714", "0.60565525", "0.6039422", "0.60217...
0.0
-1
Build out our basic SafeString type
function SafeString(string) { this.string = string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SafeString(string) {\n\t this.string = string;\n\t}", "function SafeString(string) {\n\t this.string = string;\n\t}", "function SafeString(string) {\n\t this.string = string;\n\t}", "function SafeString(string) {\n this.string = string;\n}", "function SafeString(string) {\n this.string = stri...
[ "0.73458534", "0.73458534", "0.73458534", "0.7250389", "0.7250389", "0.7250389", "0.7250389", "0.7250389", "0.7250389", "0.71955913", "0.7138423", "0.7136317", "0.7033672", "0.7033672", "0.7032327", "0.66436565", "0.6619141", "0.59785444", "0.5953897", "0.5946154", "0.5891636...
0.72434306
28
TODO: Remove this line and break up compilePartial
function template(templateSpec, env) { if (!env) { throw new Error("No environment passed to template"); } var invokePartialWrapper; if (env.compile) { invokePartialWrapper = function(partial, name, context, helpers, partials, data) { // TODO : Check this for all inputs and the opti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compile() {\n\n}", "CompileEmpty() {\n\n }", "Compile() {\n\n }", "_compile () {\n this.root._compile()\n }", "get partial() {\n let partial = this.vars.PERCY_PARTIAL_BUILD;\n return !!partial && partial !== '0';\n }", "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n...
[ "0.70096433", "0.64125943", "0.6320477", "0.5910553", "0.58323884", "0.5767173", "0.5762752", "0.5663498", "0.56327164", "0.55783904", "0.55768365", "0.55697376", "0.5561434", "0.55039465", "0.5479167", "0.54660434", "0.5462209", "0.5391041", "0.53561586", "0.5354746", "0.533...
0.0
-1
Portions of this code are from the Dojo Toolkit, received by The Closure Library Authors under the BSD license. All other code is Copyright 20052009 The Closure Library Authors. All Rights Reserved. The "New" BSD License: Copyright (c) 20052009, The Dojo Foundation All rights reserved. Redistribution and use in source ...
function Fb(a,b){var c=b||[];a&&c.push(a);return c}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshJsonPlanning() {\r\n param = false;\r\n if (dojo.byId(\"resourcePlanning\")) {\r\n url = \"../tool/jsonResourcePlanning.php\";\r\n } else if (dojo.byId(\"versionsPlanning\")) {\r\n url = \"../tool/jsonVersionsPlanning.php\";\r\n } else if (dojo.byId(\"globalPlanning\")) {\r\n url = \"....
[ "0.5310715", "0.5099856", "0.50828815", "0.50009024", "0.49938896", "0.49264514", "0.49222013", "0.49167135", "0.4915772", "0.48892027", "0.48806942", "0.48772007", "0.48454168", "0.47852948", "0.47592273", "0.4718421", "0.471684", "0.47120854", "0.47082072", "0.46666896", "0...
0.0
-1
Portions of this code are from the googlecaja project, received by Google under the Apache license ( All other code is Copyright 2009 Google, Inc. All Rights Reserved. Copyright (C) 2006 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the L...
function Sd(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jg(a,b){this.Lc=[];this.ue=a;this.Wd=b||null;this.Mb=this.lb=!1;this.ya=void 0;this.Gd=this.bf=this.bd=!1;this.Rc=0;this.o=null;this.dd=0}", "function cc(){var a;!(a=Ja()&&!Zb(10))&&(a=bc||ac)&&(a=!(0<=ua($b,10)));this.ae=a;this.fg=!(this.ae||Jb&&!Zb(10));!Jb||Zb(11);this.Ug=Ka()||Ja();this.ug=n(window....
[ "0.58134013", "0.5780798", "0.56159395", "0.557145", "0.54372746", "0.5404563", "0.5404563", "0.5308485", "0.5301681", "0.5299084", "0.5287875", "0.526386", "0.5260124", "0.52418673", "0.52418333", "0.52004236", "0.5184178", "0.51631784", "0.5150369", "0.5101921", "0.509141",...
0.0
-1
Portions of this code are from the googlecaja project, received by Google under the Apache license ( All other code is Copyright 2009 Google, Inc. All Rights Reserved. Copyright (C) 2006 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the L...
function ie(a,b,c){this.ca=a;this.P=[];this.la=n;this.Kd=b;this.Pb=c}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jg(a,b){this.Lc=[];this.ue=a;this.Wd=b||null;this.Mb=this.lb=!1;this.ya=void 0;this.Gd=this.bf=this.bd=!1;this.Rc=0;this.o=null;this.dd=0}", "function cc(){var a;!(a=Ja()&&!Zb(10))&&(a=bc||ac)&&(a=!(0<=ua($b,10)));this.ae=a;this.fg=!(this.ae||Jb&&!Zb(10));!Jb||Zb(11);this.Ug=Ka()||Ja();this.ug=n(window....
[ "0.58134013", "0.5780798", "0.56159395", "0.557145", "0.54372746", "0.5404563", "0.5404563", "0.5308485", "0.5301681", "0.5299084", "0.5287875", "0.526386", "0.5260124", "0.52418673", "0.52418333", "0.52004236", "0.5184178", "0.51631784", "0.5150369", "0.5101921", "0.509141",...
0.47093007
72
Creates an HTML button.
function buttonHtml(id,content,url){ // Throw exceptions. if (typeof id !='string' && typeof id!='number'){ throw "buttonHtml: id must be string or number."; } if (typeof content!='string' && typeof content!='number'){ throw "buttonHTML: content must be string or numb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createButton (text) {\n //console.log(\"Creating a button\");\n var element = document.createElement(\"BUTTON\");\n var textNode = document.createTextNode(text);\n element.appendChild(textNode);\n return element;\n }", "function makeButton() {\n const btn = document.createElement(\"BUTT...
[ "0.78602856", "0.75994307", "0.7541898", "0.7499998", "0.7477515", "0.7458288", "0.73738134", "0.73435414", "0.7260722", "0.7219667", "0.7170655", "0.7159909", "0.7151382", "0.71335375", "0.71213436", "0.7119559", "0.70920396", "0.70901656", "0.7087378", "0.7046934", "0.70221...
0.0
-1
Functions for creating forms. Public functions are in the form xInput and also the createForm function. The xInput functions create objects that need to be put into an array to put into createForm. See createForm for more details. The createXInputDiv are intermediate functions used by createForm. To create new input ty...
function createInputObj(){ return { objClass : 'Input' , type : null , label : null , id : null , options : null , defaultVal : '' , password : false , ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createForm(idInput,inputItemArray,corner){\n // Exceptions (one is later)\n if (typeof idInput!='string'){\n throw \"createForm: idInput must be string. Found \" + (typeof idInput) + \".\";\n }\n if (typeof inputItemArray!='object' || !(inputItemArra...
[ "0.6658323", "0.65527904", "0.6456514", "0.6396322", "0.6377723", "0.63007015", "0.62363416", "0.6115099", "0.6051788", "0.59438056", "0.5933734", "0.5927394", "0.5905111", "0.5895046", "0.58752525", "0.5854506", "0.5831128", "0.5825974", "0.58134395", "0.58057755", "0.579549...
0.65478545
2
Creates a JSON object of a text input to insert into createForm function.
function textInput(labelInput,idInput,password,placeHolderInput,defaultValInput){ // Exceptions if (typeof labelInput!='string' || typeof idInput!='string'){ throw "textInput: labelInput and idInput must both be strings. Received "+(typeof labelInput) + " and " + (typeof idInput) + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formToJSON_add() {\n\treturn JSON.stringify({\n\t\t\"Name\": $('#Name').val()\n\t\t//\"Category\": $('#Category').val()\n\t\t});\n}", "function formToJSON() {\n return JSON.stringify({\n \"title\": $(\"#titleinput\").val(),\n \"description\": $(\"#notedescription\").val(),\n \"im...
[ "0.69302136", "0.6715923", "0.6652817", "0.66187596", "0.65708053", "0.64918995", "0.6462162", "0.64172447", "0.6395799", "0.6370433", "0.6369691", "0.63391656", "0.6317779", "0.62805176", "0.6274346", "0.6196752", "0.61851794", "0.61791", "0.60789233", "0.607486", "0.6048509...
0.64569557
7
Creates a JSON object of a droplist input to insert into createForm function.
function droplistInput(labelInput,idInput,options,defaultValInput){ // Exceptions if (typeof labelInput!='string' || typeof idInput!='string'){ throw "droplistInput: labelInput and idInput must both be strings. Received " + (typeof labelInput) + " and " + (typeof idInput) + "."; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formToJSON_add() {\n\treturn JSON.stringify({\n\t\t\"Name\": $('#Name').val()\n\t\t//\"Category\": $('#Category').val()\n\t\t});\n}", "function newList(){\n let obj = {\n title: listTitleInput.value,\n listItems: []\n }\n exampleData.push(obj);\n saveData();\n populateDropDo...
[ "0.65166235", "0.6422948", "0.62042767", "0.6173349", "0.615838", "0.6039345", "0.60211515", "0.6014752", "0.5992016", "0.5991953", "0.59774256", "0.5967916", "0.5964315", "0.59565896", "0.5916344", "0.58771086", "0.58445245", "0.57934713", "0.57792974", "0.57345223", "0.5726...
0.67468685
0
Creates a JSON object of a timezone droplist input to insert into createForm function.
function timezoneInput(labelInput,idInput,defaultVal){ if (typeof idInput!='string') throw "timezoneInput: idInput must be string. Received "+(typeof idInput)+"."; var returnObj = createInputObj(); if (typeof defaultVal!='undefined' && typeof defaultVal!='string'){ throw "timezoneInp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTimezoneDroplistInputDiv(timezoneDroplistInputObj){\n // Exceptions\n if (typeof timezoneDroplistInputObj!='object' || timezoneDroplistInputObj['objClass']!=\"Input\"){\n throw \"createTimezoneDroplistInputDiv: timezoneDroplistInputObj must be an Input object.\";\n ...
[ "0.6417387", "0.5920166", "0.58042", "0.5799354", "0.57824403", "0.56136614", "0.5605874", "0.55840623", "0.55364096", "0.5382933", "0.5315302", "0.5298046", "0.5293547", "0.5293243", "0.523744", "0.5234724", "0.5224066", "0.52065635", "0.5192954", "0.5164287", "0.5161195", ...
0.68088317
0
Creates a JSON object of a button to insert into createForm function.
function buttonInput(labelInput,idInput){ if (typeof labelInput!='string' || typeof idInput!='string'){ throw "buttonInput: labelInput and idInput must be string. Received "+(typeof labelInput)+" and "+(typeof idInput)+"."; } var returnObj = createInputObj() ; retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createButton() {\n var newButton = new HmiObject();\n newButton.uid = Date.now();\n newButton.typeId = 'button';\n newButton.type = 'button';\n return newButton;\n }", "function createToolBtn(obj) {\n var btn = $('<button/>', {\n ...
[ "0.70321673", "0.6572162", "0.65215373", "0.64998895", "0.6445422", "0.64421517", "0.64141774", "0.63778853", "0.63755625", "0.6349343", "0.63186747", "0.6292543", "0.6276865", "0.6273907", "0.6228426", "0.6217691", "0.6185341", "0.6169734", "0.61674356", "0.61622834", "0.616...
0.60080147
34
Creates a JSON object of a textvalue to put into the form. Naming is different since it's not an actual input object.
function textItem(textValue,idValue){ // Exceptions if (typeof textValue!='string' || typeof idValue!='string'){ throw "textItem: textValue and idValue must be strings."; } var returnObj = createInputObj(); returnObj['type'] = 'textItem'; returnO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formToJSON_add() {\n\treturn JSON.stringify({\n\t\t\"Name\": $('#Name').val()\n\t\t//\"Category\": $('#Category').val()\n\t\t});\n}", "function userformToJSON() {\n return JSON.stringify({\"firstname\": $('#firstname').val(), \"lastname\": $('#lastname').val() });\n}", "function formToJSON(){\n\n\t...
[ "0.66510046", "0.643383", "0.64320076", "0.6354978", "0.6320221", "0.6167506", "0.6146764", "0.6139111", "0.61121505", "0.6077741", "0.60497934", "0.603514", "0.60271925", "0.600499", "0.600499", "0.59973246", "0.5964291", "0.5964139", "0.592537", "0.58560395", "0.5776774", ...
0.60327995
12
Creates a JSON object of an invisible element.
function invisibleInput(idInput,valueInput){ // Exceptions var func = arguments.callee.toString().match(/function ([^\(]+)/)[1]; if (typeof idInput!='string'){ throw `${func}: idInput must be string.`; } if (typeof valueInput!='string'){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toJSONHidden() {\r\n\t\t\treturn toJSONHidden\r\n\t\t}", "_createHiddenDiv() {\n const hidden = dom5.constructors.element('div');\n dom5.setAttribute(hidden, 'hidden', '');\n dom5.setAttribute(hidden, 'by-polymer-bundler', '');\n return hidden;\n }", "serialize() {\n ...
[ "0.63885325", "0.60739875", "0.59529155", "0.57296336", "0.5302155", "0.5294252", "0.5263268", "0.5263268", "0.5263268", "0.5263268", "0.5224776", "0.5197715", "0.5183301", "0.5181452", "0.51726633", "0.5137981", "0.512116", "0.5090164", "0.5076246", "0.50591654", "0.5054418"...
0.5158298
15
Create HTML for a form from array of JSON objects (created by the "Input" functions). Technically, does not create an actual "form" object, because this is using AJAX to submit, so it's not necessary.
function createForm(idInput,inputItemArray,corner){ // Exceptions (one is later) if (typeof idInput!='string'){ throw "createForm: idInput must be string. Found " + (typeof idInput) + "."; } if (typeof inputItemArray!='object' || !(inputItemArray instanceof A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function json_to_form(el, json) {\n f = document.getElementById(el.id + \"_form\");\n if (typeof f != \"undefined\" && f != null) {\n f.remove();\n }\n f = document.createElement(\"form\");\n f.id = el.id + \"_form\";\n for (let [key, value] of Object.entries(json)) {\n l = document.createElement(\"lab...
[ "0.7206664", "0.70343703", "0.69851506", "0.66118276", "0.65985554", "0.6511611", "0.64736396", "0.63751215", "0.6353233", "0.6323896", "0.62833947", "0.6266759", "0.62478465", "0.618835", "0.61480033", "0.6050814", "0.6046329", "0.6041974", "0.6016184", "0.6005856", "0.59981...
0.67117405
3
Create html for text input divs.
function createTextInputDiv(textInputObj){ // Exceptions if (typeof textInputObj!='object' || textInputObj['objClass']!='Input'){ throw "createTextInputDiv: textInputObj must be an Input object."; } if (textInputObj['type']!="text"){ throw "cre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildTextBox( options ){\n return $('<div/>')\n ._bsAddHtml( options )\n .addClass('input-group-with-text');\n }", "function __create_text_element() { \n var input_text = document.createElement(\"input\");\n input_text.setAttr...
[ "0.6795708", "0.678537", "0.66861033", "0.66840833", "0.665488", "0.65710586", "0.64644647", "0.6432524", "0.63572377", "0.63194495", "0.63042885", "0.62937987", "0.628675", "0.62744164", "0.61765504", "0.6162171", "0.61452276", "0.61442596", "0.6130402", "0.6130402", "0.6120...
0.71068746
0
Create html for droplist input divs.
function createDroplistInputDiv(droplistInputObj){ // Exceptions if (typeof droplistInputObj!='object' || droplistInputObj['objClass']!='Input'){ throw "createDroplistInputDiv: droplistInputObj must be an Input object."; } if (droplistInputObj['type']!="dropli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTimezoneDroplistInputDiv(timezoneDroplistInputObj){\n // Exceptions\n if (typeof timezoneDroplistInputObj!='object' || timezoneDroplistInputObj['objClass']!=\"Input\"){\n throw \"createTimezoneDroplistInputDiv: timezoneDroplistInputObj must be an Input object.\";\n ...
[ "0.66774917", "0.6547459", "0.6473871", "0.62848645", "0.62666386", "0.6246964", "0.6165819", "0.6125789", "0.6074309", "0.6073027", "0.6062948", "0.60580933", "0.6052965", "0.6020394", "0.600863", "0.6000331", "0.5964856", "0.5963705", "0.59357244", "0.5917525", "0.58965814"...
0.74074936
0
Create html for timezone droplist input divs. Yanked from this site:
function createTimezoneDroplistInputDiv(timezoneDroplistInputObj){ // Exceptions if (typeof timezoneDroplistInputObj!='object' || timezoneDroplistInputObj['objClass']!="Input"){ throw "createTimezoneDroplistInputDiv: timezoneDroplistInputObj must be an Input object."; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_selector(){\n var str = \"\";\n for (var key in time_zone_dict){\n str += '<option value=\"' + time_zone_dict[key] + '\">' + key + '</option>'\n } \n\n selector = document.getElementById(\"time_zone_selector\");\n selector.insertAdjacentHTML('beforeend', str);\n}", "function getOptionZone() ...
[ "0.6918117", "0.664604", "0.65326744", "0.638613", "0.63794386", "0.5938668", "0.5875197", "0.5808215", "0.57793534", "0.5730931", "0.5726532", "0.572122", "0.571525", "0.567263", "0.5662033", "0.56077254", "0.5581678", "0.5579876", "0.55717397", "0.55689335", "0.55650973", ...
0.74716794
0
Create button for form.
function createButtonInputDiv(buttonInputObj){ // Exceptions if (typeof buttonInputObj!='object' || buttonInputObj['objClass']!='Input'){ throw "createButtonInputDiv: createButtonInputDiv must be an Input object."; } if (buttonInputObj['type']!='button'){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSubmitButton() {\n var submitInstance = document.createElement(\"input\");\n var formEl = document.getElementById(\"form\");\n submitInstance.id = \"submitInstance\";\n submitInstance.type = \"button\";\n submitInstance.value = \"Preview Widget\";\n submitInstance.classList.add(\"submitInstanc...
[ "0.7484239", "0.7379365", "0.72977316", "0.72476655", "0.7202555", "0.70993155", "0.70632356", "0.7040293", "0.70094085", "0.6954408", "0.6898907", "0.6882717", "0.67955923", "0.6791799", "0.6789788", "0.6780217", "0.6771796", "0.6752388", "0.67517024", "0.67415524", "0.67387...
0.0
-1
Create text item for form.
function createTextItemDiv(textItemObj){ // Exceptions if (typeof textItemObj!='object' || textItemObj['objClass']!='Input'){ throw "createTextItemDiv: textItemObj must be an input object."; } if (textItemObj['type']!='textItem'){ throw "create...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newItem() {\n //get value of text input, with Type Assertion <HTMLInputElement>\n var newItem = document.getElementById('new-item').value;\n var newPrg = document.createElement('p');\n newPrg.appendChild(document.createTextNode(newItem));\n uiEl.appendChild(newPrg);\n}", "function createE...
[ "0.71323395", "0.69685376", "0.6944236", "0.6731214", "0.6605098", "0.65961397", "0.65381885", "0.64929914", "0.64886683", "0.6477863", "0.64249885", "0.6419325", "0.64143234", "0.64022654", "0.6330215", "0.63140446", "0.628864", "0.6263603", "0.61461353", "0.6143587", "0.613...
0.61762524
18
Create invisible input for form.
function createInvisibleInputDiv(invisibleInputObj){ // Exceptions var func = arguments.callee.toString().match(/function ([^\(]+)/)[1]; if (typeof invisibleInputObj!='object' || invisibleInputObj['objClass']!='Input'){ throw `${func}: invisibleInputObj must be an input o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function invisibleInput(idInput,valueInput){\n // Exceptions\n var func = arguments.callee.toString().match(/function ([^\\(]+)/)[1];\n if (typeof idInput!='string'){\n throw `${func}: idInput must be string.`;\n }\n if (typeof valueInput!='string')...
[ "0.7109714", "0.6581858", "0.65551186", "0.6541723", "0.64470154", "0.64458925", "0.6391207", "0.636743", "0.62655634", "0.6211313", "0.6157019", "0.6137894", "0.61218005", "0.6103146", "0.6097126", "0.6061371", "0.6011249", "0.60000783", "0.59764653", "0.5966618", "0.5948204...
0.70031446
1
Here I Create a function that creates to database instances.
function databaseSingletonTest(){ var databaseOne = DatabaseSingleton.getInstance(); var databaseTwo = DatabaseSingleton.getInstance(); ///Here I log whether the two objects are similar or different. console.log("Same Database Instance? " + (databaseOne===databaseTwo)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DatabaseFactory() {}", "function DatabaseFactory() {}", "function createInstance() {\n var postgresDatabase = new Object(\"Database instance initialized!\");\n return postgresDatabase;\n }", "static createNewDatabase() {\n idb.open(IdbHelper.dbName, idbVersion, function (upgradeDb...
[ "0.74776495", "0.74776495", "0.73869514", "0.702514", "0.70149714", "0.6992779", "0.6949327", "0.6942896", "0.6915828", "0.6833207", "0.6718149", "0.670802", "0.6706402", "0.6691289", "0.6679219", "0.65055853", "0.64254755", "0.63972515", "0.63957626", "0.63764524", "0.635778...
0.0
-1
I know this is not a full check
function isNumber(v) { return typeof v === 'number'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "static private internal function m121() {}", "protected internal function m252() {}", "static final private internal function m106() {}", "static transient final private internal function m43() {}", "transient protected interna...
[ "0.6597461", "0.63951534", "0.63255125", "0.609145", "0.59530026", "0.59406483", "0.59099317", "0.58613837", "0.5842611", "0.57891357", "0.5778999", "0.57440007", "0.5639648", "0.56262326", "0.56009316", "0.55725247", "0.55399066", "0.5529948", "0.5489806", "0.5478192", "0.54...
0.0
-1
WebGL1 void bufferData(GLenum target, GLsizeiptr size, GLenum usage); void bufferData(GLenum target, [AllowShared] BufferSource? srcData, GLenum usage); WebGL2: void bufferData(GLenum target, [AllowShared] ArrayBufferView srcData, GLenum usage, GLuint srcOffset, optional GLuint length = 0);
bufferData(gl, funcName, args) { const [target, src, /* usage */, srcOffset = 0, length = undefined] = args; let obj; switch (target) { case ELEMENT_ARRAY_BUFFER: { const info = webglObjectToMemory.get(sharedState.currentVertexArray); obj = info....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBuffer(data)\n{\n var buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW);\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n return buffer;\n}", "function bindAndBuffer(glArrayType, buffer, arrayToBuf...
[ "0.7248141", "0.6675606", "0.66463256", "0.6630176", "0.6617218", "0.6452833", "0.6442037", "0.6328554", "0.6217911", "0.61962634", "0.61550343", "0.6145662", "0.61311436", "0.61124706", "0.60707605", "0.6062798", "0.60621935", "0.6048666", "0.60368687", "0.6007941", "0.59799...
0.78537095
0
void gl.copyTexImage2D(target, level, internalformat, x, y, width, height, border);
copyTexImage2D(ctx, funcName, args) { const [target, level, internalFormat, x, y, width, height, border] = args; const info = getTextureInfo(target); updateMipLevel(info, target, level, internalFormat, width, height, 1, UNSIGNED_BYTE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "compressedTexImage2D(ctx, funcName, args) {\n const [target, level, internalFormat, width, height] = args;\n const info = getTextureInfo(target);\n updateMipLevel(info, target, level, internalFormat, width, height, 1, UNSIGNED_BYTE);\n }", "updateImage2D ( data, xoffset, yoffset, level,...
[ "0.7153603", "0.68713623", "0.65969", "0.6234603", "0.60958326", "0.6062689", "0.6028896", "0.590458", "0.589077", "0.5833379", "0.5823027", "0.58083487", "0.58041906", "0.5799173", "0.5787507", "0.5716697", "0.5669813", "0.5662595", "0.5653825", "0.56282", "0.5627595", "0....
0.7994276
0
WebGL 1: void gl.compressedTexImage2D(target, level, internalformat, width, height, border, ArrayBufferView? pixels); Additionally available in WebGL 2: read from buffer bound to gl.PIXEL_UNPACK_BUFFER void gl.compressedTexImage2D(target, level, internalformat, width, height, border, GLsizei imageSize, GLintptr offset)...
compressedTexImage2D(ctx, funcName, args) { const [target, level, internalFormat, width, height] = args; const info = getTextureInfo(target); updateMipLevel(info, target, level, internalFormat, width, height, 1, UNSIGNED_BYTE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createCompressedTexture(texture) {\n\t\tconst gl = this.gl;\n\n\t\tconst ext = (\n\t\t\tgl.getExtension('WEBGL_compressed_texture_s3tc') ||\n\t\t\tgl.getExtension('MOZ_WEBGL_compressed_texture_s3tc') ||\n\t\t\tgl.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc')\n\t\t);\n\n\t\tconst dataType = {\n\t\t\t'DXT1': ...
[ "0.68726987", "0.66540337", "0.6550164", "0.64813185", "0.6398234", "0.6398234", "0.6269883", "0.6269883", "0.6269883", "0.6245174", "0.62168145", "0.6176645", "0.61147135", "0.6109931", "0.600492", "0.59984714", "0.59936476", "0.5989889", "0.59490025", "0.5899105", "0.588764...
0.7907339
0
read from buffer bound to gl.PIXEL_UNPACK_BUFFER void gl.compressedTexImage3D(target, level, internalformat, width, height, depth, border, GLsizei imageSize, GLintptr offset); void gl.compressedTexImage3D(target, level, internalformat, width, height, depth, border, ArrayBufferView srcData, optional srcOffset, optional ...
compressedTexImage3D(ctx, funcName, args) { const [target, level, internalFormat, width, height, depth] = args; const info = getTextureInfo(target); updateMipLevel(info, target, level, internalFormat, width, height, depth, UNSIGNED_BYTE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setImage3D({\n level = 0,\n internalformat = GL.RGBA,\n width,\n height,\n depth = 1,\n border = 0,\n format,\n type = GL.UNSIGNED_BYTE,\n offset = 0,\n pixels\n }) {\n if (ArrayBuffer.isView(pixels)) {\n this.gl.texImage3D(this.target, level, internalformat, width, height, d...
[ "0.6601187", "0.5870817", "0.55025685", "0.54209155", "0.5367326", "0.5298093", "0.52621424", "0.5225577", "0.5195907", "0.51933545", "0.5179412", "0.51741856", "0.5167859", "0.5151221", "0.5123534", "0.5123534", "0.5123534", "0.5123534", "0.51055086", "0.50830525", "0.508187...
0.70271283
0
void gl.renderbufferStorage(target, internalFormat, width, height); gl.RGBA4: 4 red bits, 4 green bits, 4 blue bits 4 alpha bits. gl.RGB565: 5 red bits, 6 green bits, 5 blue bits. gl.RGB5_A1: 5 red bits, 5 green bits, 5 blue bits, 1 alpha bit. gl.DEPTH_COMPONENT16: 16 depth bits. gl.STENCIL_INDEX8: 8 stencil bits. gl.D...
renderbufferStorage(ctx, funcName, args) { const [target, internalFormat, width, height] = args; updateRenderbuffer(target, 1, internalFormat, width, height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupRenderBufferStorage( renderbuffer, renderTarget ) {\n\n\t \t\t_gl.bindRenderbuffer( _gl.RENDERBUFFER, renderbuffer );\n\n\t \t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t \t\t\t_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_COMPONENT16, renderTarget.width, ...
[ "0.7966254", "0.7938048", "0.7889559", "0.78830606", "0.7847822", "0.7847822", "0.779782", "0.779782", "0.779782", "0.779782", "0.779782", "0.779782", "0.779782", "0.779782", "0.779782", "0.779782", "0.779782", "0.779782", "0.7783449", "0.7783449", "0.7783449", "0.7783449",...
0.7432838
31
void gl.renderbufferStorageMultisample(target, samples, internalFormat, width, height);
renderbufferStorageMultisample(ctx, funcName, args) { const [target, samples, internalFormat, width, height] = args; updateRenderbuffer(target, samples, internalFormat, width, height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) {\n\n\t\t_gl.bindRenderbuffer( 36161, renderbuffer );\n\n\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tvar samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_...
[ "0.77405787", "0.7728886", "0.76148", "0.7486955", "0.74334365", "0.70441765", "0.6571984", "0.64933777", "0.6405953", "0.6382182", "0.6342502", "0.6333439", "0.6306193", "0.62850106", "0.62850106", "0.62579036", "0.6220704", "0.6220704", "0.6220704", "0.6220704", "0.6220704"...
0.8524571
0
void gl.texImage3D(target, level, internalformat, width, height, depth, border, format, type, GLintptr offset); void gl.texImage3D(target, level, internalformat, width, height, depth, border, format, type, HTMLCanvasElement source); void gl.texImage3D(target, level, internalformat, width, height, depth, border, format,...
texImage3D(ctx, funcName, args) { let [target, level, internalFormat, width, height, depth, border, format, type] = args; const info = getTextureInfo(target); updateMipLevel(info, target, level, internalFormat, width, height, depth, type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "compressedTexImage3D(ctx, funcName, args) {\n const [target, level, internalFormat, width, height, depth] = args;\n const info = getTextureInfo(target);\n updateMipLevel(info, target, level, internalFormat, width, height, depth, UNSIGNED_BYTE);\n }", "function Texture3D() {\n\t\tTexture...
[ "0.700476", "0.65979546", "0.6569357", "0.64884967", "0.6460608", "0.6397401", "0.6283649", "0.6198503", "0.617183", "0.6163041", "0.60963386", "0.60460377", "0.60423744", "0.60414666", "0.60284853", "0.602627", "0.5998093", "0.59895474", "0.5970311", "0.59638083", "0.5954868...
0.7363735
0
void gl.texStorage2D(target, levels, internalformat, width, height);
texStorage2D(ctx, funcName, args) { let [target, levels, internalFormat, width, height] = args; updateTexStorage(target, levels, internalFormat, width, height, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateImage2D ( data, xoffset, yoffset, level, format, type ) {\r\n if ( xoffset === undefined ) xoffset = 0;\r\n if ( yoffset === undefined ) yoffset = 0;\r\n if ( level === undefined ) level = 0;\r\n if ( format === undefined ) format = gl.RGBA;\r\n if ( type ===...
[ "0.646587", "0.6416635", "0.632489", "0.61795884", "0.60981613", "0.60971093", "0.6070463", "0.6002622", "0.5978413", "0.59568983", "0.58637613", "0.5862299", "0.5800668", "0.57798624", "0.57689404", "0.57689404", "0.5751769", "0.5751769", "0.5751769", "0.56535393", "0.564476...
0.79772747
0
void gl.texStorage3D(target, levels, internalformat, width, height, depth);
texStorage3D(ctx, funcName, args) { let [target, levels, internalFormat, width, height, depth] = args; updateTexStorage(target, levels, internalFormat, width, height, depth); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "compressedTexImage3D(ctx, funcName, args) {\n const [target, level, internalFormat, width, height, depth] = args;\n const info = getTextureInfo(target);\n updateMipLevel(info, target, level, internalFormat, width, height, depth, UNSIGNED_BYTE);\n }", "texImage3D(ctx, funcName, args) {\n...
[ "0.6966767", "0.67239165", "0.6658036", "0.6319468", "0.6182704", "0.6106876", "0.60350966", "0.56964165", "0.55785924", "0.55678535", "0.554982", "0.5534812", "0.55318856", "0.5468943", "0.5454718", "0.5448949", "0.5445324", "0.5442763", "0.5419763", "0.540567", "0.53977686"...
0.8155649
0
The MIT License (MIT) Copyright (c) 2021 Gregg Tavares Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
function wrapGetContext(Ctor) { const oldFn = Ctor.prototype.getContext; Ctor.prototype.getContext = function(type, ...args) { const ctx = oldFn.call(this, type, ...args); // Using bindTexture to see if it's WebGL. Could check for instanceof WebGLRenderingContext // but that might fail if wrap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n const canvas = document.createElement('canvas');\n\n canvas.style.display = 'none';\n canvas.style.position = 'fixed';\n canvas.style.top = '0px';\n canvas.style.left = '0px';\n canvas.style.zIndex = '1000000';\n this.canvas = canvas;\n\n this.context = canvas.getContext('2d');\n...
[ "0.62880456", "0.6269291", "0.6269291", "0.6090416", "0.60415226", "0.6013379", "0.60003376", "0.5997072", "0.5921734", "0.59093827", "0.58951664", "0.5860352", "0.5764358", "0.5726481", "0.5680094", "0.5673298", "0.56644416", "0.5659117", "0.56485003", "0.56012326", "0.55939...
0.0
-1
Los constructors ya no se hacen servir mucho, pero pueden haber proyectos antiguos que los tengan y haya que mantener
constructor(props){ super(props) this.state = { id:1, post: {}, message: 'Lifecycle', showClock: true, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructur() {}", "constructor (){}", "constructor( ) {}", "consructor() {\n }", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor(){}", "constructor() {\r\n // ohne Inhalt\r\n }", "constructor(...
[ "0.765981", "0.7315511", "0.7296339", "0.72920156", "0.72595966", "0.72595966", "0.72595966", "0.72595966", "0.72595966", "0.72595966", "0.72595966", "0.7240034", "0.71767235", "0.71630883", "0.69960374", "0.69658643", "0.6936408", "0.6920801", "0.6912245", "0.6912245", "0.69...
0.0
-1
Example For n = 3, the output should be [[1, 2, 3], [8, 9, 4], [7, 6, 5]]
function spiralNumbers(n) { // we need to make our matrix, we can initialize the values within it with 0's. let matrix = [] // function to create matrix buildMatrix(n, matrix) let i = 0 let j = 0 let counter = 1 // we would need to iterate over the matrix, we need 2 iterators while(true){ // as ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pyramid(n) {\r\n let pyramid =[]\r\n //loop n times to determine push right number of subarrays to pyramid. 0 should return an empty array\r\n for(let i=1; i<=n; i++){\r\n let subArray=[]\r\n //Each loop, push a subarray that has i # of elements (1). \r\n for(let j=1;j<=i;j++...
[ "0.6837634", "0.67793006", "0.67436206", "0.67231584", "0.6700464", "0.6632199", "0.6630481", "0.6558676", "0.6551254", "0.65103555", "0.6447019", "0.643951", "0.6434872", "0.6434872", "0.6434872", "0.6434546", "0.6414089", "0.63436323", "0.63322055", "0.63305825", "0.6328358...
0.0
-1
helper function to create matrix
function buildMatrix(n, matrix){ let subArr = [] for(let i = 0; i < n; i++){ for(let j = 0; j < n; j++){ subArr.push(0) } matrix.push(subArr) subArr = [] } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMatrix() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }", "_createMatrix () {\n let matrix = Array(...Array(200)).map(() => Array(200).fill(0))\n return matrix\n }", "new_matrix() {\n var mtx = new Array(this.height);\n for (var j = 0 ; j < this.height ...
[ "0.7798678", "0.7737619", "0.7367853", "0.72574294", "0.72412694", "0.72134745", "0.719443", "0.7189137", "0.71712303", "0.7163528", "0.70766234", "0.7072934", "0.7055607", "0.7033714", "0.70135736", "0.6970862", "0.6970862", "0.6931059", "0.69303674", "0.6908463", "0.6856127...
0.6747546
25
Parsing and data manipulation functions Print the file at fileName in JSON format
function printFile() { csvFileToJSON(function(data) { console.log(data); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseFile(file_data){\n let s = ''\n let read = false\n // find the index correspondding to the start of the json data\n for (i in file_data){\n if (file_data[i] == '{') {\n read = true\n }\n\n if (read) {\n s+=file_data[i]\n }\n }\n return s\n }", "f...
[ "0.68732613", "0.65176463", "0.64043397", "0.6403703", "0.6357166", "0.6269939", "0.6240204", "0.6195737", "0.6140317", "0.6111715", "0.60736394", "0.60660183", "0.6064623", "0.60133624", "0.6008011", "0.59889257", "0.5943921", "0.58805484", "0.58771867", "0.58650225", "0.583...
0.7002136
0
Convert the file at fileName to a JSON object
function csvFileToJSON(callback) { var fileStream = fs.createReadStream(process.argv[2]); var csvConverter = new Converter({ constructResult: true }); fileStream.pipe(csvConverter); csvConverter.on("end_parsed", function(jsonObj) { callback(jsonObj); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "readFile(fileName) {\n let data = {}\n data = JSON.parse(fs.readFileSync(fileName))\n return data\n }", "function parseFile(fileName) {\n try {\n var content = fs.readFileSync(fileName);\n var j = JSON.parse(content);\n } catch (e) {\n console.error('failed to p...
[ "0.73212975", "0.7238558", "0.70603263", "0.6921432", "0.6878059", "0.679861", "0.6714804", "0.66583765", "0.66088355", "0.66053194", "0.65309066", "0.6530056", "0.64950204", "0.6450376", "0.6444452", "0.64032656", "0.6401141", "0.6315609", "0.63094234", "0.62569255", "0.6255...
0.0
-1
Print each column name that was specified as a CL argument and all unique values in the column
function agregateColumnValues() { var values = {}, columns = [], i, j, prop, val; csvFileToJSON(function(data) { for (prop in data[0]) { values[prop] = {}; } for (i = 1; i < data.length; i++) { for (prop in data[i]) { val = data[i][prop]; if(val in values[prop]) { values[prop][val]++; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showUniqueColumnsValues(table, column, showCounts) {\n var query = 'SELECT DISTINCT \"' + column + '\" FROM ' + table;\n\n // Display results ordered by counts.\n // This could be slow on large sets without an index.\n if (showCounts) {\n query = 'SELECT DISTINCT \"' + column + '\", COUNT(1) AS tot...
[ "0.60050523", "0.5437092", "0.536514", "0.53313327", "0.5197039", "0.51792204", "0.5077808", "0.5077808", "0.50679594", "0.5031103", "0.5020134", "0.5002059", "0.498527", "0.49488783", "0.49429762", "0.49083295", "0.49073252", "0.48890465", "0.48682573", "0.48589617", "0.4821...
0.5402198
2
xxxHonza: will be part of FBTest 1.7b14
function getCurrentLocation() { var locationList = FW.document.getElementById("fbLocationList"); return locationList.label; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "function test_missing_thumb() {\n\n}", "static transient private protected internal function m55() {}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", ...
[ "0.63667536", "0.6323148", "0.59577703", "0.5957415", "0.5955386", "0.5955386", "0.5914538", "0.5909664", "0.59017074", "0.59017074", "0.58850473", "0.58779013", "0.58199924", "0.580901", "0.57563674", "0.5724406", "0.56986415", "0.5697414", "0.5696393", "0.5604158", "0.56019...
0.0
-1
xxxHonza: this should be generic and part of FBTest
function stepInto(callback) { var lineNo = (FBTest.compareFirefoxVersion("4") >= 0) ? 3 : 1; var fileUrl = basePath + "script/4213/issue4213-1.js"; FBTest.waitForBreakInDebugger(null, lineNo, false, function hitBreak(row) { FBTest.progress("The step happened: " + row.firstChild.textContent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testAPI() {\n FB.api('/me', function(response) {\n });\n }", "private public function m246() {}", "private internal function m248() {}", "transient private protected internal function m182() {}", "static transient private protected internal function m55() {}", "function test_missing_thu...
[ "0.5731113", "0.57205164", "0.5475962", "0.5314648", "0.5309715", "0.53009325", "0.5267672", "0.52062327", "0.5186871", "0.51720214", "0.5145619", "0.5137892", "0.51251185", "0.5115045", "0.5114696", "0.5102244", "0.5085687", "0.50843203", "0.50778097", "0.5063003", "0.505524...
0.0
-1
Get day of year
function getDayOfYear(date) { return Math.ceil((date.getTime() - Date.UTC(date.getUTCFullYear(), 0, 1)) / 8.64e7) + 1; //return Math.ceil((date.getTime() - new Date(date.getFullYear(), 0, 1).getTime()) / 8.64e7); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getYear() {\n return ''+ this._day.getYear();\n }", "function dayofyear(d) { // d is a Date object\n var yn = d.getFullYear();\n var mn = d.getMonth();\n var dn = d.getDate();\n var d1 = new Date(yn, 0, 1, 12, 0, 0); // noon on Jan. 1\n var d2 = new Date(yn, mn, dn, 12, 0, 0); // noon...
[ "0.8225", "0.7475346", "0.74281275", "0.7326805", "0.7271748", "0.71421206", "0.71282685", "0.7007406", "0.69674456", "0.689851", "0.68556875", "0.6848434", "0.68172073", "0.6751606", "0.67434627", "0.6733626", "0.6725603", "0.6716563", "0.6688045", "0.6676637", "0.66205096",...
0.68696517
10
Get sin of value in deg
function sinDeg(deg) { return Math.sin(deg * PIx2 / 360.0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sin() {\n return round(Math.sin((((this.angle + 180) * pi) / 180)), 2);\n }", "function sin(value) {\n return round(Math.sin(RADIANS * value), 10);\n}", "function sin (a) {\n return Math.sin(a / 360 * Math.PI * 2)\n}", "function sin(a) {\n return Math.sin(a/360*Math.PI*2);\n}", "function si...
[ "0.85870343", "0.85511047", "0.80477756", "0.7982682", "0.75403893", "0.73206264", "0.7311833", "0.7311833", "0.7257339", "0.7245447", "0.7239575", "0.72056884", "0.7183542", "0.69732976", "0.68800306", "0.6717612", "0.6709451", "0.6693021", "0.6645892", "0.64754754", "0.6439...
0.8116982
2
Get acos of value in deg
function acosDeg(x) { return Math.acos(x) * 360.0 / PIx2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cos() {\n return round(Math.cos((this.angle * pi) / 180), 2);\n }", "function cos(value) {\n return round(Math.cos(RADIANS * value), 10);\n}", "function acos(x) {\n if (x > 1 + 1e-6 || x < -1 - 1e-6) { \n throw Error(\"acos(\" + x + \")\"); \n }\n return Math.acos(x);\n }"...
[ "0.82642174", "0.78845614", "0.75369495", "0.74824905", "0.74824905", "0.73472106", "0.7168025", "0.7093826", "0.7093826", "0.70171916", "0.6941166", "0.68942535", "0.68942535", "0.6881845", "0.6847544", "0.67265755", "0.6695049", "0.6669667", "0.6663407", "0.6658312", "0.663...
0.7952437
1
Get asin of value in deg
function asinDeg(x) { return Math.asin(x) * 360.0 / PIx2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inRad(num) {return num * Math.PI / 180;}", "function degreeToRadians(n){\n return (n / 180 * Math.PI).toFixed(2);\n}", "function radsToDegrees(val){\n return val * 180/Math.PI;\n\n}", "function toDeg(num) {\r\n\treturn num * 180 / Math.PI;\r\n}", "function convertToDegrees(val) { return val ...
[ "0.6896573", "0.6683505", "0.66711485", "0.6668395", "0.66116416", "0.6585815", "0.6572926", "0.6524397", "0.65205294", "0.65154624", "0.65130967", "0.6509537", "0.6445864", "0.64302176", "0.64302176", "0.6418779", "0.63796526", "0.6372571", "0.63584405", "0.63523877", "0.634...
0.7475524
0
Get tan of value in deg
function tanDeg(deg) { return Math.tan(deg * PIx2 / 360.0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tan(value) {\n return round(Math.tan(RADIANS * value), 10);\n}", "static tanDeg(x)\n\t{\n\t\treturn Math.tan(x * GCMath_RADS);\n\t}", "function myTan() {\n if (this.currentInput == 0 || this.currentInput == \"\"){\n return;\n }\n if (this.trigMode == \"Degree\") {\n var tempR...
[ "0.8532253", "0.7879838", "0.7436828", "0.73797095", "0.73797095", "0.7071307", "0.70708853", "0.7039315", "0.7011297", "0.6964266", "0.689918", "0.68829894", "0.68136597", "0.67955124", "0.6791244", "0.67826855", "0.6750938", "0.6740933", "0.6706385", "0.6705092", "0.6658944...
0.8022304
1
Get cos of value in deg
function cosDeg(deg) { return Math.cos(deg * PIx2 / 360.0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cos(value) {\n return round(Math.cos(RADIANS * value), 10);\n}", "cos() {\n return round(Math.cos((this.angle * pi) / 180), 2);\n }", "function cosd(num) {\n return Math.cos(num / 180 * Math.PI);\n }", "static cosd( degrees ) {\n\n\t\treturn Math.cos( Utils.radians( degrees ) );\n\n...
[ "0.8580926", "0.8555003", "0.79324377", "0.75897944", "0.7533875", "0.75322944", "0.7515637", "0.7515637", "0.75149727", "0.7337821", "0.7002788", "0.699447", "0.6952947", "0.69392926", "0.69095", "0.67350686", "0.67076296", "0.6691385", "0.6691385", "0.6496035", "0.649388", ...
0.7993805
2
Calculate time distance(msec) from utc midnight for either sunrise or sunset. If there will be no sunrise/sunset that day return Number.MIN_VALUE
function calculate(dayOfYear, lp, isSunrise) { const approxTimeOfEventInDays = (isSunrise ? dayOfYear + ((6 - lp.hoursFromMeridian) / 24) : dayOfYear + ((18.0 - lp.hoursFromMeridian) / 24)); const sunMeanAnomaly = (0.9856 * approxTimeOfEventInDays) - 3.289; const sunTrueLongitude = mod(sunMeanAnomaly + (1.9...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcApparentSunriseSet(inpSunriseSetInd, inpJulianDayCnt, inpLatDegNbr, inpLongDegNbr, inpUTCOffsetNbr, inpDSTInd) {\n\t\tvar rtnTimeTxt = \"\";\n\n\t\tinpUTCOffsetNbr = (inpUTCOffsetNbr != \"undefined\" && typeof(inpUTCOffsetNbr) == \"number\") ? inpUTCOffsetNbr : 0.0;\n\t\tinpDSTInd = (inpDSTInd != \"un...
[ "0.5945235", "0.5764275", "0.5369153", "0.53576154", "0.53285104", "0.52804995", "0.52746016", "0.52591175", "0.5258533", "0.52493906", "0.52448267", "0.5224207", "0.522338", "0.51817304", "0.5144327", "0.51442075", "0.51406586", "0.5131454", "0.5110734", "0.5052001", "0.5049...
0.5776165
1
Debounce function based on underscores modified to use es6 and a cb
function debounce(func, wait, immediate, cb) { var timeout = void 0; return function fx() { var _this2 = this; for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var runLater = function runL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debouncer( func , timeout ) {\nvar timeoutID , timeout = timeout || 200;\nreturn function () {\nvar scope = this , args = arguments;\nclearTimeout( timeoutID );\ntimeoutID = setTimeout( function () {\n func.apply( scope , Array.prototype.slice.call( args ) );\n} , timeout );\n}\n}", "function debounce(...
[ "0.7266948", "0.72288835", "0.7214979", "0.7116285", "0.7087526", "0.7086898", "0.708373", "0.70163125", "0.69862574", "0.695563", "0.68644476", "0.6855373", "0.6844543", "0.68289644", "0.68279886", "0.68279886", "0.6819347", "0.6818298", "0.6815664", "0.67665815", "0.6756375...
0.0
-1
Function to build the charts for the selected Subject ID
function buildCharts(sample) { d3.json("samples.json").then(function(subject) { var samples = subject.samples; console.log(samples); var resultsArray = samples.filter(data => data.id == sample); var result = resultsArray[0]; console.log(result); var otu_ids = result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BuildCharts(SubjectID) {\n \n //------------------------------------------\n // Retrieve the Data\n //------------------------------------------\n // Read in JSON samples, getting the Subject ID from each one and using them to build the dropdown menu options\n d3.json(\"samples.json\").the...
[ "0.7008003", "0.6583766", "0.658221", "0.63236415", "0.63213474", "0.6316119", "0.6199624", "0.6193243", "0.59722674", "0.5950652", "0.5935824", "0.5918828", "0.5877759", "0.5822", "0.5805992", "0.5781706", "0.576462", "0.57611746", "0.5711245", "0.5708022", "0.5678973", "0...
0.0
-1
Function to display metadata for the selected Subject ID
function buildMetadata(sample) { d3.json("samples.json").then((data) => { var metadata = data.metadata; console.log(metadata); var resultsArray = metadata.filter(data => data.id == sample); var result = resultsArray[0]; var PANEL = d3.select("#sample-metadata"); // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDetail() {\n return getSubjectDetail(this._subject, this._school, this._degree, this._course);\n }", "function ShowMetadata(sampleId){\n console.log(`ShowMetadata for ID: (${sampleId})`);\n \n d3.json(\"samples.json\").then(data => {\n\n var metadata = data.metadata;\n console.l...
[ "0.64062595", "0.6339303", "0.6270408", "0.61800027", "0.61772346", "0.6136372", "0.6074828", "0.6039416", "0.6034038", "0.59755635", "0.5938057", "0.593501", "0.59140855", "0.58763224", "0.58617604", "0.57836825", "0.57520455", "0.57493025", "0.5733423", "0.5726577", "0.5704...
0.0
-1
List books an author has written
function listBooks(response, request) { var authorID = request.params.authorID; return memory.authors[authorID].books }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "books(parent) {\n\t\t\tconsole.log('parent!!')\n\t\t\t\treturn dataSources.bookService.getAuthorBooks(parent.id);\n\t\t}", "function listBooks(books){\n books.forEach(book => bookLi(book))\n }", "function getBook(authorName, authorSurname, library) {\n\n let listOfBooks = Object.values(library);\n ...
[ "0.68723357", "0.6843693", "0.6717539", "0.67095345", "0.6692301", "0.6664863", "0.6573721", "0.6530674", "0.6525329", "0.6462794", "0.6426931", "0.641048", "0.64058715", "0.63874793", "0.6341654", "0.63398474", "0.63337827", "0.6267688", "0.6253955", "0.6205828", "0.6201232"...
0.70271593
0
Check if it is admin or user
function checkIfAdmin() { const profile = JSON.parse(localStorage.getItem("profile")); if (profile == "User") { window.location.href = `${basepathClient}home.html`; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAdmin() {\n\treturn getMe() === getAdmin();\n}", "function isAdmin() {\n return service.user && service.admin && true;\n }", "function isAdmin(user) {\n return user.admin === true;\n}", "checkAdminPageAccess() {\n if (this.state.userLogged == true) {\n if (this.s...
[ "0.83171535", "0.8189031", "0.79756486", "0.7832103", "0.7788278", "0.7754486", "0.7712108", "0.76706153", "0.7643816", "0.7618068", "0.75870705", "0.75867265", "0.74849993", "0.7464933", "0.7393784", "0.7328513", "0.7325077", "0.73236984", "0.73189306", "0.73046076", "0.7272...
0.67282265
68
show selected route 2
function showSelectedRoute2() { if ($('#datetimePick').val() != null && $('#devicesList').val() != null) { clearSelectedRoute(); var dateFrom = new Date($('#datetimePick').val()); dateFrom.setHours($('#timeFrom').val()); var dateA = moment.utc(dateFrom).format(); var dateTo ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRoute(start,target) {\n\tapi({ data: \"cmd=getroute&start=\"+start+\"&target=\"+target, type: \"block\" },selectRoute);\n}", "function showRoute(evt) {\n clearRoutes();\n\n array.forEach(evt.result.routeResults, function(routeResult, i) {\n routes.push(\n map...
[ "0.62537026", "0.620916", "0.60715955", "0.6018426", "0.59964544", "0.59731287", "0.5958215", "0.5932424", "0.5922219", "0.5872467", "0.58306915", "0.577569", "0.57661325", "0.5611758", "0.5592339", "0.5578827", "0.5557489", "0.55538833", "0.5532258", "0.5522524", "0.5518394"...
0.0
-1
check if users in battle, set ID if so
tryGetBattle() { axios.get("battle/check").then(response => { if (response.data.battle) { this.setState({ battle_id: response.data.battle.id, turn: response.data.turn }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkForPlayer (id) {\n return this.turns.indexOf(id) >= 0\n }", "function selectID(belly) {\r\n return belly.id == userSelection;\r\n }", "function getUsersId(){\n users.forEach(function(user,index){\n user.id = index + 1\n })\n}", "function checkBattleId() {\n\tlet curren...
[ "0.61610806", "0.5765947", "0.57538456", "0.57298976", "0.5695469", "0.56925005", "0.5657933", "0.56557816", "0.562449", "0.55780643", "0.5559529", "0.5554166", "0.55526173", "0.5545459", "0.55292195", "0.55138063", "0.5507401", "0.54805434", "0.54628766", "0.54290193", "0.54...
0.0
-1
Displays the "Subject" and "From" fields, based on the current mail item
function displayItemDetails(){ var item = Office.cast.item.toItemRead(Office.context.mailbox.item); jQuery('#subject').text(item.subject); var from; if (item.itemType === Office.MailboxEnums.ItemType.Message) { from = Office.cast.item.toMessageRead(item).from; } else if (item.itemType ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayItemDetails()\n {\n var item = Office.cast.item.toItemRead(Office.context.mailbox.item);\n var from = Office.cast.item.toMessageRead(item).from;\n var email = from.emailAddress;\n\n var name = from.displayName.substr(0, from.displayName.indexOf(' '));\n $(\"#na...
[ "0.7217837", "0.6386436", "0.60202885", "0.5920955", "0.5804648", "0.56507033", "0.554863", "0.5466263", "0.5444884", "0.54008216", "0.53718567", "0.533304", "0.52676654", "0.52438223", "0.52364004", "0.5158542", "0.51520705", "0.51152414", "0.5113056", "0.5100004", "0.509986...
0.6871524
1
Show the color palette. The palette is created on the fly. showColorPalette
function showColorPalette(formName, elementName, imageId) { this.selectedFormName = formName; this.selectedElementName = elementName; this.selectedImageId = imageId; colorPane.show(); if (colorPicker != null) { return; } colorPicker = dojo.widget.fromScript("ColorPalette", {widgetId: "textP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderPalette(palette){\n //create box and set rgb value\n for(var i=0; i<palette.length; i++){\n let colorBox = document.createElement(\"div\"); \n colorBox.className = 'color-box';\n colorBox.style.backgroundColor = `rgb(${palette[i][0]},${palette[i][1]},${palette[i][2]})`;\n ...
[ "0.67929065", "0.67238", "0.667656", "0.65763915", "0.65422666", "0.64350694", "0.6287105", "0.6280552", "0.6258037", "0.61972815", "0.6162339", "0.60854137", "0.60214204", "0.59074163", "0.5891419", "0.58871245", "0.58639264", "0.58331186", "0.58210397", "0.582091", "0.57554...
0.65680057
4
Update the color. updateColorAndClose
function updateColorAndClose(color) { colorPane.hide(); document.forms[this.selectedFormName].elements[this.selectedElementName].value = color; document.getElementById(selectedImageId).style.backgroundColor = color; //if (this.selectedFormName == "fontPaneForm") writeFontPane("fontPaneForm"); //if (this.selec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateColor(e) {\n var colorHasChanged = !tinycolor.equals(get(), colorOnShow);\n\n if (colorHasChanged) {\n if (clickoutFiresChange && e !== \"cancel\") {\n updateOriginalInput(true);\n } else {\n revert();\n ...
[ "0.72364664", "0.7070488", "0.69703144", "0.68957037", "0.67824584", "0.677334", "0.67577875", "0.67481977", "0.66384834", "0.6557208", "0.64910674", "0.6489261", "0.64891845", "0.6483796", "0.64811605", "0.64431846", "0.6439772", "0.6437426", "0.6402209", "0.6397736", "0.635...
0.6895924
3
Older IE versions do not directly support indexOf so we must implement our own, sadly.
function indexOf(array, value) { for (var i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "indexOf(val) {}", "function _indexOf(a,s){\n\t// Do we need the hack?\n\tif(a.indexOf){\n\t\treturn a.indexOf(s);\n\t}\n\n\tfor(var j=0;j<a.length;j++){\n\t\tif(a[j]===s){\n\t\t\treturn j;\n\t\t}\n\t}\n\treturn -1;\n}", "indexOf(data) {}", "indexOf(elemento){}", "function indexOf(val) {\n return this.in...
[ "0.7916359", "0.77092797", "0.74749786", "0.73746306", "0.71530366", "0.70452815", "0.690191", "0.68818694", "0.68818694", "0.6858705", "0.68193734", "0.6813246", "0.6766874", "0.6751775", "0.6741953", "0.6736097", "0.66619396", "0.66619396", "0.66619396", "0.66619396", "0.66...
0.0
-1
Build out our basic SafeString type
function SafeString(string) { this.string = string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SafeString(string) {\n\t this.string = string;\n\t}", "function SafeString(string) {\n\t this.string = string;\n\t}", "function SafeString(string) {\n\t this.string = string;\n\t}", "function SafeString(string) {\n this.string = string;\n}", "function SafeString(string) {\n this.string = stri...
[ "0.73472", "0.73472", "0.73472", "0.72517234", "0.72517234", "0.72517234", "0.72517234", "0.72517234", "0.72517234", "0.71967566", "0.71400875", "0.71376", "0.7034812", "0.7034812", "0.7034065", "0.6644753", "0.6620316", "0.5978205", "0.5953448", "0.5948248", "0.5891067", "...
0.7245017
23