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
Process the argument ISF file name
function ParseArguments() { // Assume failure var RC = false; var Txt = ""; var Help = "Syntax: CScript HDRLockedFingers.js <ISF File Name> [Excel File Name]\n" + "Eg: CScript HDRLockedFingers.js \"HDR Finger.isf\" \"HDR Finger.xls\"\n"; // Grab the shell var SH = new ActiveXObject( "WS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleArg(argv){\n //when arguement is a filename\n if(argv.f){\n readFile(argv.f)\n //when arguemnt is a url\n }else if(argv.u){\n checkUrlAndReport(argv.u)\n }\n}", "function FileName() { }", "function inputName(arg) {\n if(arg==undefined) return;\n if((arg[0]=='h'...
[ "0.55536985", "0.53700435", "0.5359511", "0.53029966", "0.52980417", "0.52587706", "0.5248428", "0.52332395", "0.5189357", "0.517219", "0.5160977", "0.5111586", "0.5103232", "0.5071891", "0.50233656", "0.49894962", "0.49629313", "0.49336845", "0.49180362", "0.49118653", "0.49...
0.45494157
65
Perform analysis (obtain locked fingers data from ISF file)
function Analyze() { // Assume failure var RC = false; var Txt = ""; Txt = "Loading ISF file:\n" + ISFAbsolutePath; WScript.StdOut.WriteLine( Txt ); // Load the item store file var Handle = IISF.LoadItemStore( ISFAbsolutePath ); if (Handle == 0xFFFFFFFF) { Txt = "Unable to load ISF:\...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Execute()\n{\n // Parse out arguments\n var RC = ParseArguments();\n if (RC == false)\n {\n return;\n }\n\n // Initialize ISF automation interface\n RC = Initialize();\n if (RC == false)\n {\n return;\n }\n\n // Obtain locked fingers data from ISF file\n RC = Analyze();\n...
[ "0.5383484", "0.5293031", "0.5265998", "0.5205388", "0.5131746", "0.5112181", "0.5105427", "0.50269777", "0.49450845", "0.4923091", "0.49006742", "0.48756954", "0.4822329", "0.48097256", "0.4806594", "0.4760821", "0.472762", "0.4721916", "0.4721916", "0.472061", "0.46977198",...
0.53028893
1
Generate an Excel spreadsheet with the analysis results
function GenerateExcelSpreadsheet() { // Assume failure var RC = false; var Txt = ""; // Start Excel and get automation object var XL = new ActiveXObject( "Excel.Application" ); if (XL == null) { Txt = "Error launching Excel"; WScript.StdOut.WriteLine( Txt ); return RC; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createReports() {\r\n var RawDataReport = AdWordsApp.report(\"SELECT Domain, Clicks \" + \"FROM AUTOMATIC_PLACEMENTS_PERFORMANCE_REPORT \" + \"WHERE Clicks > 0 \" + \"AND Conversions < 1 \" + \"DURING LAST_7_DAYS\");\r\n RawDataReport.exportToSheet(RawDataReportSheet);\r\n}", "function writeCalcu...
[ "0.6222583", "0.62089926", "0.6159351", "0.6130673", "0.60925", "0.60206217", "0.5994975", "0.5980732", "0.5980444", "0.59343266", "0.5907707", "0.58989424", "0.58714694", "0.5857018", "0.5818055", "0.58031404", "0.58006537", "0.5750388", "0.5738071", "0.57039016", "0.5661787...
0.5456599
41
Populate Excel spreadsheet with analysis data
function PopulateExcelSpreadsheet( Sheet ) { // Assume failure var RC = false; Sheet.Cells( 1, 1 ).Value = "Total Samples"; Sheet.Cells( 1, 1 ).Font.Bold = true; Sheet.Cells( 1, 1 ).ColumnWidth = 14; Sheet.Cells( 1, 2 ).Value = gSamples; Sheet.Cells( 2, 1 ).Value = "Locked Fingers"; Sheet.Cell...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PopulateExcelSpreadsheet( Sheet )\n{\n // Assume failure\n var RC = false;\n\n Sheet.Cells( 1, 1 ).Value = \"Camped Cell Samples\";\n Sheet.Cells( 1, 1 ).Font.Bold = true;\n Sheet.Cells( 1, 2 ).Value = gCampedSamples;\n\n Sheet.Cells( 2, 1 ).Value = \"Best Cell Samples\";\n Sheet.Cells( 2, 1...
[ "0.67145187", "0.62211055", "0.62096936", "0.612006", "0.61181134", "0.6088887", "0.60420173", "0.597469", "0.5963698", "0.5940129", "0.58284754", "0.5788499", "0.5760381", "0.57247156", "0.5706517", "0.5704335", "0.56910205", "0.5661749", "0.5639755", "0.55928975", "0.559070...
0.5967155
8
Main body of script
function Execute() { // Parse out arguments var RC = ParseArguments(); if (RC == false) { return; } // Initialize ISF automation interface RC = Initialize(); if (RC == false) { return; } // Obtain locked fingers data from ISF file RC = Analyze(); if (RC == false) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Script() {}", "function main() {\r\n\t// Init the myGM functions.\r\n\tmyGM.init();\r\n\r\n\t// If the script was already executed, do nothing.\r\n\tif(myGM.$('#' + myGM.prefix + 'alreadyExecutedScript'))\treturn;\r\n\r\n\t// Add the hint, that the script was already executed.\r\n\tvar alreadyExecuted\t...
[ "0.7165051", "0.7107813", "0.6833344", "0.6792179", "0.6684481", "0.66397905", "0.6564415", "0.6532038", "0.6510321", "0.64907974", "0.6485136", "0.6476064", "0.64310676", "0.640327", "0.63867325", "0.6366844", "0.63439775", "0.6329587", "0.6311022", "0.6307362", "0.62917274"...
0.0
-1
adding new cards to dom
function addItemtoDom(event) { event.preventDefault(); const colnumber = event.currentTarget.dataset.colnumber; const inputField = $(`#addCard${colnumber}`); const inputValue = inputField.val(); const newItem = {}; //give each column unique date const uniqueId = Date.now(); console.log("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEachCard(div) {\n document.getElementById(\"observation-cards\").appendChild(div);\n}", "function addingCards(newCards) {\n $(\".card-group\").html(\"\");\n for (let i = 0; i < newCards.length; i++) {\n $(\".card-group\").append(newCards[i]);\n }\n}", "function AddCards(allCards) {...
[ "0.7971572", "0.78237605", "0.7815331", "0.7746124", "0.75726765", "0.75204164", "0.74663734", "0.7434464", "0.7406498", "0.74064136", "0.7401438", "0.73679054", "0.7351043", "0.7347119", "0.7344003", "0.7342261", "0.7339863", "0.73112017", "0.7298399", "0.7288684", "0.728067...
0.0
-1
Funcion que permite cargar la informacion de los controles de la ventana winFrmCgg_res_tipo_tramite.
function cargarCgg_res_tipo_tramiteCtrls(){ if(inRecordCgg_res_tipo_tramite){ txtCrtpt_codigo.setValue(inRecordCgg_res_tipo_tramite.get('CRTPT_CODIGO')); txtCrtpt_nombre.setValue(inRecordCgg_res_tipo_tramite.get('CRTPT_NOMBRE')); txtCrtpt_abreviatura.setValue(inRecordCgg_res_tipo_tramite.get('CRTPT_ABREVIATU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargarCgg_res_beneficiarioCtrls(){\n if(inInfoPersona.CRPER_CODIGO_AUSPICIANTE != undefined && inInfoPersona.CRPER_CODIGO_AUSPICIANTE.length>0){\n if(inInfoPersona.CRPJR_CODIGO.length>0)\n {\n txtCrper_codigo.setValue(inInfoPersona.CRPJR_RAZON_SOCIAL);\n ...
[ "0.70468134", "0.6995546", "0.6770277", "0.67004454", "0.66322136", "0.652097", "0.64441854", "0.6369144", "0.6304318", "0.6212062", "0.6144936", "0.61073387", "0.6054101", "0.60518086", "0.5889436", "0.5856644", "0.58169246", "0.5762397", "0.5759952", "0.57533777", "0.565848...
0.80802685
0
The bookstore example uses a simple, inmemory database for illustrative purposes only.
function inMemoryDatabase() { this.shelves = {}; this.id = 0; var db = this; db.createShelf('Fiction', function(err, fiction) { db.createBook(fiction.id, 'Neal Stephenson', 'REAMDE', function(){}); }); db.createShelf('Fantasy', function(err, fantasy) { db.createBook...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function booksInBookshelf(id) {\n// var db = ScriptDb.getMyDb();\n var dbShelf = ParseDb.getMyDb(applicationId, restApiKey, \"bookshelf\");\n var dbGen = ParseDb.getMyDb(applicationId, restApiKey, \"book_generic\");\n var books = []; \n var bookshelf = dbShelf.load(id);\n \n for (var i = 0 ; i < bookshelf....
[ "0.65561855", "0.64541733", "0.6342942", "0.6342942", "0.62446105", "0.6206391", "0.6196477", "0.6141604", "0.6138874", "0.6064659", "0.6064659", "0.603558", "0.6026368", "0.6025438", "0.60168475", "0.6015919", "0.6014612", "0.6013844", "0.601143", "0.5985367", "0.59779066", ...
0.74283147
0
If raw data provided, give this data to each plugin, for either streaming or nonstreaming plugins (preferring the nonstreaming interface) and then return the result of the first plugin to produce an output. Extensionmatched plugins take priority over MIMEmatched plugins.
function loadData(data, plugins, next) { async.map(plugins, function(plugin, next) { if(plugin.load instanceof Function) { try { plugin.load(data); } catch(e) { plugins.splice(plugins.indexOf(plugin), 1); } } else { try { plugin.stream(data); } catch(e) { plugins.splice(plugins.index...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pluginData(data) {\r\n // if (!data.result || data.result.length == 0) {\r\n // return;\r\n // }\r\n\r\n switch (data.method) {\r\n // This is here so plugins not using JS can run JS code.\r\n case 'eval':\r\n eval(data.params);\r\n break;\r\n\r\n case 'log':\r\n cons...
[ "0.5340591", "0.52842176", "0.49914593", "0.4940922", "0.4870833", "0.48523527", "0.4847092", "0.48440716", "0.48066893", "0.475991", "0.47563764", "0.47371867", "0.47350153", "0.47303733", "0.46849784", "0.4680363", "0.46726793", "0.46650863", "0.46170825", "0.46162766", "0....
0.51387393
2
Turn the ``cols`` object into a CSV string
function toString() { // If there are any results if(module.exports.cols instanceof Object) { // Get the list of columns var columns = Object.keys(module.exports.cols); // And determine how many rows exist with a map-reduce of each column's length var rows = columns.map(function(column) { return module.exp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static tableToCsv(columns, data) {\n let csv = '';\n let i;\n\n for (i = 0; i < columns.length; i++) {\n csv += ExperimentView.csvEscape(columns[i]);\n if (i < columns.length - 1) {\n csv += ',';\n }\n }\n csv += '\\n';\n\n for (i = 0; i < data.length; i++) {\n for (let...
[ "0.7343767", "0.6465807", "0.64262605", "0.63624156", "0.6087266", "0.606725", "0.5989563", "0.59763926", "0.59590274", "0.5917005", "0.5848988", "0.58420706", "0.58368874", "0.5815534", "0.5803173", "0.578276", "0.578276", "0.5758503", "0.5710925", "0.5710925", "0.5680611", ...
0.7055212
1
Queries form from the DOM document. Reregisters event listener to the form element.
refresh() { this._setForm(); let data = this._eventData; this._eventData = []; for (let item of data) { this.addElementListener(item.event, item.name, item.listener, item.options); } data = this._submitData; this._submitData = []; for (let ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeForm() {\n if (this.$formContainer === null) {\n return;\n }\n\n delete this.formSaveAjax;\n // Allow form widgets to detach properly.\n Drupal.detachBehaviors(this.$formContainer.get(0), null, 'unload');\n this.$formContainer\n .off('change.quicked...
[ "0.5764669", "0.5510994", "0.5470158", "0.5444036", "0.53967774", "0.52977955", "0.52552336", "0.52324224", "0.5222056", "0.5200516", "0.5123161", "0.51040363", "0.50716543", "0.50447", "0.50371873", "0.503678", "0.49965283", "0.49911445", "0.49903798", "0.49865714", "0.49832...
0.0
-1
Setup the form and form elements.
_setForm() { this.$form = $(this._selector); this._form = this.$form[0]; if (!(this._form instanceof HTMLFormElement)) { if (typeof this._selector === 'string') { throw new TypeError(`Form with selector "${this._selector}" does not exist.`); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initForm(){\n\t\tsetActions();\n\t\tvalidateForm();\n\t}", "function initForms () {\n selectize.initSelectize()\n forms.initDefaultForm()\n comment.initCommentForm()\n tutorial.initTutorialForm()\n}", "function setupForm() {\n Handlebars.registerHelper('if_eq', function(a, b, options) {\n if (...
[ "0.7110128", "0.7036048", "0.70315325", "0.67525756", "0.67270064", "0.6717746", "0.66373134", "0.6586088", "0.6563755", "0.6522459", "0.64559317", "0.6407964", "0.6320936", "0.6294984", "0.62676066", "0.62274134", "0.6207327", "0.6187857", "0.6102384", "0.60815674", "0.60472...
0.5941753
27
console.log('estado:', deputadosPorEstado); console.log('partido:', deputadosPorPartido);
function calculateColor(uf){ uf = deputadosPorEstado[uf]; var color = ''; var diff= uf.FAVOR - uf.CONTRA; if(diff === 0){ // indeciso return "#ffc107"; } else if( diff > 0 ){ // democrático return "#3f51b5"; } else if ( diff < 0 ){ // golpista return "#4caf50"; } var colorRange=(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reservacion(completo,opciones){\n /* opciones = opciones || {};\n if(completo)\n console.log(opciones.metodoPago);\n else\n console.log('No se pudo completar la operación'); */\n let {metodoPago,cantidad,dias}=opciones\n console.log(metodoPago);\n console.log(cantidad);\...
[ "0.65330416", "0.63887185", "0.638188", "0.63695097", "0.62548435", "0.61450475", "0.6071263", "0.58638805", "0.5851418", "0.58471674", "0.58454746", "0.5810766", "0.5786878", "0.5772935", "0.57442033", "0.5712702", "0.5690157", "0.5678077", "0.56699264", "0.5664137", "0.5637...
0.0
-1
Draw ship on canvas
function drawShip() { ctx.beginPath(); ctx.arc(ship.x, ship.y, ship.size, 0, Math.PI * 2); ctx.fillStyle = "#0095dd"; ctx.fill(); ctx.closePath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawShip(x, y, a, color = \"#fff\") {\n\tcontext.strokeStyle = color;\n\tcontext.lineWidth = shipSize / 20;\n\tcontext.beginPath();\n\tcontext.moveTo(\n\t\tx + 5 / 3 * ship.r * Math.cos(a),\n\t\ty - 5 / 3 * ship.r * Math.sin(a)\n\t);\n\tcontext.lineTo(\n\t\tx - ship.r * (2 / 3 * Math.cos(a) + Math.sin(a))...
[ "0.73307246", "0.7292945", "0.7240514", "0.70968914", "0.70679927", "0.70678055", "0.69460505", "0.69313395", "0.6819617", "0.68084806", "0.6673084", "0.66211444", "0.6565242", "0.6541813", "0.6518426", "0.6476916", "0.646885", "0.6449862", "0.6442341", "0.64351207", "0.64258...
0.7736465
0
Draw missile on canvas
function drawMissile() { ctx.beginPath(); ctx.arc(missile.x, missile.y, missile.size, 0, Math.PI * 2); ctx.fillStyle = "#0095dd"; ctx.fill(); ctx.closePath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Missile( options ){\n \tthis.startX = options.startX;\n \tthis.startY = options.startY;\n \tthis.endX = options.endX;\n \tthis.endY = options.endY;\n \tthis.color = options.color;\n \tthis.trailColor = options.trailColor;\n \tthis.x = options.startX;\n \tthis.y = options.startY;\n \tthis.state = ...
[ "0.6862109", "0.6411843", "0.6185355", "0.6176331", "0.61517423", "0.6122696", "0.6122202", "0.61017275", "0.6084033", "0.6066001", "0.6053716", "0.6047882", "0.6027432", "0.6023979", "0.60232294", "0.6017285", "0.6011078", "0.60078675", "0.59658724", "0.59592927", "0.5908518...
0.7736583
0
Move missile on canvas
function moveMissile() { missile.y += missile.dy; requestAnimationFrame(moveMissile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function move_missiles()\n{\t\t\t\n\tmissile_timer -= 1;\n\tfor(var i = 0;i<missiles.length;i++)\n\t{\n\t\tif (missiles[i]['direction'] == 'right')\n\t\t{\n\t\t\tmissiles[i]['position'][0] += 10;\n\t\t}\n\t\telse if (missiles[i]['direction'] == 'left')\n\t\t{\n\t\t\tmissiles[i]['position'][0] -= 10;\n\t\t}\n\t\tel...
[ "0.7381109", "0.6911517", "0.68255615", "0.6734111", "0.6728306", "0.66694015", "0.65017676", "0.648861", "0.64335585", "0.6285051", "0.628246", "0.62708956", "0.6267049", "0.6234154", "0.62236005", "0.6216867", "0.6204717", "0.61236006", "0.61117524", "0.6107199", "0.6106169...
0.76470906
0
Move ship on canvas
function moveShip() { ship.x += ship.dx; // Wall collision (right/left) if (ship.x + ship.size > canvas.width) { ship.x = canvas.width - ship.size; } if (ship.x < 0) { ship.x = 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateShip() {\n\tif (shipX <= 0) {\n\t\tshipX = 0;\n\t}\n\tif (shipX + ship.width >= canvas.width) {\n\t\tshipX = canvas.width - ship.width;\n\t}\n\tshipX = shipX + shipDx;\n\tif (shipY <= 0) {\n\t\tshipY = 0;\n\t}\n\tif (shipY + ship.height >= canvas.height) {\n\t\tshipY = canvas.height - ship.height;\n...
[ "0.7938656", "0.7266769", "0.7181889", "0.7178855", "0.715526", "0.7044651", "0.7015255", "0.70127255", "0.70070595", "0.69112563", "0.6906098", "0.68490624", "0.6842384", "0.68394476", "0.6830848", "0.68249065", "0.6810121", "0.67809856", "0.67587775", "0.6752165", "0.674693...
0.78305084
1
Update canvas drawing and animation
function update() { moveShip(); // Draw everything draw(); requestAnimationFrame(update); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animate() {\n\treqAnimFrame(animate);\n\tcanvasDraw();\n}", "function update() {\r\n if (!animating) return;\r\n draw();\r\n requestAnimationFrame(update);\r\n }", "function updateCanvas() {\n clearGraph();\n\n updatePoints();\n}", "function animate() {\n update();\n ...
[ "0.7890532", "0.78426087", "0.76418555", "0.75344515", "0.74478054", "0.74158657", "0.74130356", "0.73673016", "0.73492616", "0.72663087", "0.72492373", "0.7226727", "0.7204215", "0.7154049", "0.7119781", "0.71090126", "0.71090126", "0.71090126", "0.70958084", "0.7063793", "0...
0.0
-1
Generate a new easing function. function to avoid JS Hint error "Don't make functions within a loop"
function generateNewEasingFunc(resumePercent, remainPercent, scale, originalEasing) { return function easingFunc(percent) { const newPercent = resumePercent + remainPercent * percent; return scale(originalEasing(newPercent)); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static out(easing) {\n return t => 1 - easing(1 - t)\n }", "static out(easing) {\n return t => 1 - easing(1 - t);\n }", "function makeEaseOut(timing) {\n return function (timeFraction) {\n return 1 - timing(1 - timeFraction);\n }\n}", "function createEasingFunction(easing, ea...
[ "0.70288706", "0.6972033", "0.6958702", "0.67244637", "0.6699543", "0.6690426", "0.6625007", "0.6615669", "0.6559035", "0.65099674", "0.65099674", "0.64860874", "0.6348254", "0.6333551", "0.6297691", "0.6293978", "0.6261518", "0.62466514", "0.6244351", "0.62174404", "0.612744...
0.6322568
14
Evaluate: | a[0] a[1] 1 | | b[0] b[1] 1 | | x y w |
function testPoint(a, b, x, y, w) { var d0 = robustSum([a[1]], [-b[1]]) var d1 = robustSum([a[0]], [-b[0]]) var d2 = det([a, b]) t.ok(validate(d2), "validate det") var p0 = robustProduct(x, d0) var p1 = robustProduct(y, d1) var p2 = robustProduct(w, d2) t.ok(validate(p0), "validate p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Q(a,b){return R(a,W(b))}", "function elementwise(op, a, b) {\n if (b && a.length != b.length) {\n console.warn(\"dimension mismatch, blindly trying anyway\")\n }\n let r = []\n for (let i = 0; i < Math.min(a.length, b.length); i++) {\n r[i] = op(a[i], b[i])\n }\n return r...
[ "0.5965039", "0.5856262", "0.5719725", "0.5668233", "0.5633823", "0.561806", "0.56178045", "0.55805516", "0.55649936", "0.55529296", "0.55400306", "0.5537692", "0.5537692", "0.5534493", "0.5525577", "0.54827875", "0.54826474", "0.54730874", "0.547258", "0.5470823", "0.5467131...
0.5515613
15
for asynchronously running/closing server for test purposes
function runServer() { const port = process.env.PORT || 8080; return new Promise((resolve, reject) => { server = app.listen(port, () => { console.log(`Your app is listening on port ${port}`); resolve(server); }) .on('error', err => { reject(err); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async close() {\r\n\t\tconst close = util.promisify(this.httpServer.close).bind(this.httpServer);\r\n\t\treturn close();\r\n\t}", "async shutdown() { }", "async stop() {\n // 1. Stop listening for connections at http-server \n this.server.close();\n logger.info('Server closed', {\n ...
[ "0.70702136", "0.6977789", "0.6897095", "0.682322", "0.6804936", "0.67646533", "0.6684778", "0.6672225", "0.66364753", "0.66356146", "0.66109574", "0.66072446", "0.6569529", "0.65270543", "0.6490999", "0.6429479", "0.64270943", "0.64199644", "0.6380249", "0.63774383", "0.6376...
0.0
-1
get transfer report data
getTransferReportData() { const transferReportRef = firebase.database().ref('transfer_report'); transferReportRef.on('value', (snapshot) => { let transferReport = snapshot.val(); this.setState({ transferReport: transferReport }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getReport(){\n\n }", "function getReportData() {\n if($scope.selectedInst.startDate !== \"\"){\n reqData = {\n startDate: $scope.selectedInst.startDate,\n instType: $scope.selectedInst.instType\n };\n Dashbo...
[ "0.655407", "0.63894665", "0.60958177", "0.59767705", "0.5866943", "0.5846194", "0.58175516", "0.58014095", "0.57637656", "0.57326686", "0.5726738", "0.57104933", "0.56727636", "0.5631146", "0.56273323", "0.5624737", "0.55972505", "0.55511266", "0.5530202", "0.55037326", "0.5...
0.5229358
49
get expense category data
getExpenseCategoryData() { const expenseCategoryRef = firebase.database().ref('expense_category'); expenseCategoryRef.on('value', (snapshot) => { let expenseCategory = snapshot.val(); this.setState({ expenseCategory: expenseCategory }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllExpenseTypes() {\n try {\n let expenseTypesData = await this.expenseTypeDynamo.getAllEntriesInDB();\n let expenseTypes = _.map(expenseTypesData, (expenseTypeData) => {\n expenseTypeData.categories = _.map(expenseTypeData.categories, (category) => {\n return JSON.parse(categ...
[ "0.6563236", "0.6380393", "0.6363149", "0.62509763", "0.6226267", "0.61631644", "0.61118716", "0.6028993", "0.59869635", "0.59378237", "0.59366494", "0.5919497", "0.5898329", "0.5884228", "0.58358496", "0.58031696", "0.57738197", "0.5770936", "0.5766181", "0.57590383", "0.572...
0.5524757
29
from my representation of block to pathery's 'mapid,x,y' representation
function id_from_block(mapid, block) { var x = block[0]; var y = block[1]; var id = mapid + '\\,' + x + '\\,' + y; return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "convertCoords(regionId, x, y) {\n let xcoord = mapArray[regionId - 3].center[1] - (w / 2) + (w * x);\n let ycoord = mapArray[regionId - 3].center[0] + (k / 2) - (k * y);\n return { xcoord, ycoord };\n }", "geoLayout() {\n this.pieces.forEach((row, i) => row.forEach((piece, j) => {\n let x, y;\n...
[ "0.634676", "0.6181108", "0.61058617", "0.59699154", "0.5957187", "0.5860765", "0.5838135", "0.5838135", "0.58280843", "0.579826", "0.5790928", "0.5756872", "0.5732404", "0.5718984", "0.57145745", "0.5673929", "0.5673929", "0.5659219", "0.56401825", "0.5637809", "0.5630849", ...
0.65771323
0
from pathery's representation to my representation of block
function block_from_block_string(block_string) { var string_coordinates = block_string.split(','); var x = parseInt(string_coordinates[0]); var y = parseInt(string_coordinates[1]); var block = [x, y]; return block; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getBlockAsString(block) {\n return JSON.stringify(block);\n }", "toComponent(block) {\n switch (block.type) {\n case BlockType.Heading:\n return <Heading key={block.key} text={block.text} />;\n case BlockType.Text:\n return <Paragraph key={block.key} text={block.text} />;\n ...
[ "0.6233432", "0.61434066", "0.608808", "0.60601807", "0.6017449", "0.59777105", "0.59724015", "0.5886264", "0.5886264", "0.5886264", "0.5886264", "0.5886264", "0.5886264", "0.5886264", "0.5886264", "0.5886264", "0.5822866", "0.5785202", "0.5656537", "0.5651493", "0.5649363", ...
0.50244623
70
also updates the current mapid
function get_mapid() { var old_mapid = exports.mapid; var outer_grid = $('.shown-maps .grid_outer'); if (outer_grid.length > 0) { exports.mapid = parseInt(outer_grid.attr('id').split(',')[0]); } else { exports.mapid = -1; // mapeditor mapid } if (old_mapid !== exports.mapid) {refre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateMap() {\n\t\t\tid = trail_select.value;\n\t\t\tconsole.log(id);\n\t\t\tvar newlayer = layer.getLayer(id);\n\t\t\tnewlayer.removeFrom(map);\n\t\t\tnewlayer.setStyle({\n\t\t\t\t\tweight: 5,\n\t\t\t\t\tcolor: '#00ff00',\n\t\t\t\t\topacity: 1.0\n\t\t\t});\n\t\t\tnewlayer.addTo(map)\n\t\t\tvar prevlayer ...
[ "0.6699316", "0.66740304", "0.66334426", "0.6628178", "0.66269815", "0.6623925", "0.66216576", "0.6619243", "0.661313", "0.66003704", "0.65701693", "0.65673083", "0.6557646", "0.6527192", "0.6525528", "0.65135986", "0.64707476", "0.6466153", "0.64304066", "0.64272076", "0.635...
0.58749706
70
SOLUTION SAVING /////////////////////////////////////////// //////////////// html5 storage
function HTML5_SolutionStorage() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _save(){\n try{\n _storage_service.jStorage = json_encode(_storage);\n // If userData is used as the storage engine, additional\n if(_storage_elm) {\n _storage_elm.setAttribute(\"jStorage\",_storage_service.jStorage);\n _storage_elm.sav...
[ "0.695352", "0.6910278", "0.67380065", "0.6736166", "0.654777", "0.65023375", "0.64908814", "0.6462967", "0.6460841", "0.64599866", "0.64467144", "0.64265186", "0.64206463", "0.6419226", "0.6419226", "0.6419226", "0.64183664", "0.6417796", "0.6390357", "0.6382935", "0.6373133...
0.65942293
4
var phil_link = " add_message("Wu's philosophy on the assist") TODO: autosave best TODO: clear solutions for past maps?
function save_current_solution() { var mapid = get_mapid(); var solution = get_current_solution(); var name = $('#mt_save_solution_name').val(); $('#mt_save_solution_name').val(''); function add_solution() { solution_storage.add_solution(mapid, solution, name); } if (!name) { // choose name base...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showPhrase(link, path, trans, lang, explan) {\r\n}", "function makeLink() {\n// var a=\"http://www.geocodezip.com/v3_MW_example_linktothis.html\"\n/*\n var url = window.location.pathname;\n var a = url.substring(url.lastIndexOf('/')+1)\n + \"?lat=\" + mapProfile.getCenter(...
[ "0.60552365", "0.56925845", "0.5669718", "0.5622623", "0.55885786", "0.5587947", "0.55799043", "0.55766654", "0.55523086", "0.55512524", "0.55025804", "0.5492828", "0.5480845", "0.5456547", "0.54282576", "0.5425289", "0.54234797", "0.5408568", "0.5407849", "0.5406813", "0.540...
0.0
-1
BLOCK PLACEMENT HISTORY ////////////////////////////////////////// ////////////////////////////////////////// SINGLE BLOCK MOVE
function BlocksDiffMove(mapid, blocks) { // click (add or remove) the block this.mapid = mapid; this.blocks = blocks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "moveBlock(block) {\n block.state.pos.add(block.state.spe);\n }", "function moveBlock() {\n //check if block can move down\n if (canMove()) {\n clearGrid();\n\n var pos = curBlock.pos;\n var num = blockNames.indexOf(curBlock.name) + 1;\n var shape = curBlock.type;\n fo...
[ "0.67173564", "0.6515419", "0.6442989", "0.63859284", "0.6370058", "0.6278556", "0.62516564", "0.6248915", "0.6209492", "0.6167708", "0.61214566", "0.6110167", "0.6105487", "0.6103156", "0.60723543", "0.6056209", "0.6019085", "0.60071355", "0.6006816", "0.59972024", "0.597256...
0.65394604
1
TODO: make this work for builtin loadBest
function ChangeBoardMove(mapid, old_blocks, new_blocks) { // change entire board, e.g. load solution, reset this.mapid = mapid; this.old_blocks = old_blocks; this.new_blocks = new_blocks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load() {\r\n var score = Utilities.getObject('bejeweled_high_score');\r\n if (score !== null) {\r\n BEST_SCORE = score;\r\n }\r\n }", "function forceLoad() {}", "load() {}", "load() {}", "function load()\n{\n setupParts();\n\tbgn();\n}", "get loadType() {}",...
[ "0.5831975", "0.5743614", "0.571259", "0.571259", "0.5631153", "0.55469173", "0.5405571", "0.5396429", "0.53283215", "0.524157", "0.52403224", "0.52094436", "0.52094436", "0.5198371", "0.50743294", "0.5073847", "0.5073642", "0.50535744", "0.504593", "0.50432163", "0.5036096",...
0.0
-1
logic for determining what squares to consider for paint_line_to returns array of blocks to consider
function line_candidates(from_block, to_block) { var x_diff = to_block[0] - from_block[0]; var y_diff = to_block[1] - from_block[1]; var candidates = []; var niters = Math.max(Math.abs(x_diff), Math.abs(y_diff)) var xinc = Math.min(Math.abs(x_diff / y_diff), 1) * (x_diff > 0 ? 1 : -1); var yinc = Math.min...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightSquare(evt) {\n var id = evt.target.getAttribute(\"id\");\n id = id.replace(\"square_aux_\", \"\");\n var idSplited = id.split('.');\n var i = parseInt(idSplited[0]);\n var j = parseInt(idSplited[1]);\n if (i < width && j < height) {\n var verticalLine = document.getEleme...
[ "0.59378713", "0.5858817", "0.57538754", "0.5723327", "0.57110673", "0.5702433", "0.5671079", "0.5641562", "0.56382596", "0.56337255", "0.5617977", "0.5607673", "0.5596192", "0.5584646", "0.5545794", "0.55362993", "0.5531646", "0.5503764", "0.5500345", "0.54985636", "0.547320...
0.64591575
0
NOTE: this is unused
function click_block(mapid, block) { var id = id_from_block(mapid, block); $("#" + id).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "transient final protected i...
[ "0.74040616", "0.73645556", "0.7150411", "0.6979429", "0.6942979", "0.68783736", "0.6705218", "0.65452915", "0.64838815", "0.6467706", "0.64219797", "0.64040905", "0.6365586", "0.63431096", "0.6319178", "0.62969124", "0.6284792", "0.6205623", "0.61862403", "0.6120282", "0.603...
0.0
-1
Filter by individual country
function countrySearch() { // Get the input element const ctryInput = document.getElementById("ctry"); //Add Event listener ctryInput.addEventListener("keyup", e => { const ctryClone = ctryInput.value.toLowerCase(); const names = document.querySelectorAll("main h1"); const content = docum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCountryFilter(country) {\n var uppercase = country.toUpperCase();\n if(uppercase === \"ALL\") {\n activeSheet.applyFilterAsync(\n \"Country / Region\",\n \"\",\n tableau.FilterUpdateTyp...
[ "0.7640313", "0.75982517", "0.7276434", "0.7147836", "0.70501894", "0.6906618", "0.6873157", "0.6818389", "0.6805732", "0.67788434", "0.6760752", "0.67075807", "0.66809344", "0.65569794", "0.6519352", "0.6515951", "0.64517975", "0.6359275", "0.63262796", "0.63070476", "0.6279...
0.0
-1
compile the viewerspecific LESS into CSS and inject it into the viewer iframe's style element
injectStyle() { const lessFile = path.join( atom.packages.getLoadedPackage('pdfjs-viewer').path, 'pdfjs', 'web', 'viewer.less') var css = atom.themes.loadLessStylesheet(lessFile) const invertColors = atom.config.get('pdfjs-viewer.invertColors') if (invertColors) { css += '.page, .thumb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _loadStyles() {\n var request = new XMLHttpRequest();\n request.open(\"GET\", \"LiveDevelopment/main.less\", true);\n request.onload = function onLoad(event) {\n var parser = new less.Parser();\n parser.parse(request.responseText, function onParse(err, tree) {\n ...
[ "0.63505733", "0.6074779", "0.60326767", "0.5979328", "0.5803666", "0.5728204", "0.56845677", "0.56368285", "0.56267446", "0.5598583", "0.5589148", "0.55604345", "0.5513008", "0.5513008", "0.55022913", "0.55022913", "0.5498674", "0.5455775", "0.54467833", "0.54233986", "0.540...
0.7658661
0
handle clicks on external links
handleLink(event) { // only left click, no modifiers, on 'a' element with '_top' target // 'meta' is not actually detected, and 'alt' clicks never make it here if ((event.button == 0) && !event.ctrlKey && !event.shiftKey && // !event.altKey && !event.metaKey && (event.target.tagName ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleClickedLink( url, view ) {\n\t// return true if the link was handled or to prevent other plugins or Colloquy from handling it\n\treturn false;\n}", "function handleHowExternalLinksOpen() {\n document.onclick = function (e) {\n e = e || window.event;\n var e...
[ "0.7435591", "0.73822165", "0.7276288", "0.7089854", "0.7081115", "0.70706743", "0.69614434", "0.69111794", "0.68936294", "0.6805468", "0.6712781", "0.6707126", "0.66212225", "0.661823", "0.6616171", "0.6605452", "0.6589971", "0.65685534", "0.656483", "0.6558894", "0.65319514...
0.6878175
9
determine page position of mouse click, and call SyncTeX to obtain (La)TeX source line number
handleSynctex(event) { // get enclosing page div const page = event.target.closest('div.page') if (!page) { return } // get page number const pageNo = parseInt(page.getAttribute('data-page-number'), 10) if (isNaN(pageNo)) { return } // compute mouse coordinates relative t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reportClick2(output, event) {\n event = event || window.event;\n var target = event.target || event.srcElement;\n var pageX = event.pageX, pageY = event.pageY;\n if (pageX == undefined) {\n pageX = event.clientX + document.body.scrollLeft;\n pageY = event.clientY + document.body.scrollTop;\n }\...
[ "0.59780824", "0.59627783", "0.5914543", "0.59109586", "0.5907357", "0.58666945", "0.5854666", "0.58488786", "0.58023095", "0.57441294", "0.56991583", "0.56912565", "0.5659724", "0.56488675", "0.5641135", "0.56135595", "0.56122005", "0.5597734", "0.5592026", "0.55906373", "0....
0.6215773
0
parse SyncTeX output for values
synctexStdout (output, synctex){ // split buffered lines lines = output.split(/\r?\n/g) for (let line of lines) { if (line.startsWith('Input:')) { synctex.input = line.substr(6) // if (process.platform == 'win32') { // // attempt to fix issue #6 // synctex.input = s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getS() {\r\n let unparseS = this.#rawtext[4];\r\n let unparseMatrix = [];\r\n let s = [];\r\n\r\n for(let line of unparseS.split('\\n')) {\r\n unparseMatrix.push(line.split('\\t'));\r\n }\r\n\r\n for(let i in unparseMatrix) {\r\n if(i > 2) {\r\n s.push(unparseMatrix[i].slice(1).m...
[ "0.5583674", "0.5481091", "0.546047", "0.54369694", "0.53631705", "0.5265229", "0.5221531", "0.5221531", "0.5220149", "0.5220149", "0.5165086", "0.51272595", "0.510016", "0.5081256", "0.5077846", "0.50710964", "0.50604916", "0.50460374", "0.50460374", "0.50460374", "0.5021681...
0.5483062
1
upon SyncTeX exit, open source file at line number
synctexExit(code, synctex) { if (code == 0) { console.log('PdfjsViewerView: Opening SyncTeX result: line ' + synctex.line + ' of ' + synctex.input) atom.workspace.open(synctex.input, { initialLine: synctex.line - 1, searchAllPanes: true }) } else { console.log('Pd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function go_to(line_number) {\r\n\tPC = line_number;\r\n}", "function openMark(c_index) {\n saveLastOpenedMark(true);\n updateMarksOnPage(c_index);\n //If it's already open, then openClose() will close it\n if (findCurrentOpenedMark() !== c_index) {\n openClose(c_index);\n }\n let page =...
[ "0.5987039", "0.5235687", "0.5198589", "0.5099201", "0.5098465", "0.5062345", "0.50511545", "0.50328106", "0.5024142", "0.5022267", "0.5010141", "0.5007535", "0.49936023", "0.49933314", "0.49846554", "0.4977844", "0.4977844", "0.4977844", "0.4977844", "0.4977844", "0.49366385...
0.6738871
0
handle changes to PDF file
handleFilechange(event, path) { console.log('PdfjsViewerView: file', event, path) this.reloadPdf() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateCorsiPDF(pdf) {\n\twaitingDialog.show(\"Salvataggio in corso...\", {progressType: \"primary\"}); // Show waiting dialog\n\n\t// FormData Object to pass to XMLHTTP request\n\tvar formData = new FormData();\n\tformData.append(\"corsi_pdf\", pdf);\n\n\tvar link = server + \"php/upload.php\";\n\tvar req...
[ "0.6356933", "0.62800014", "0.6055446", "0.6046855", "0.60111886", "0.60051256", "0.59805006", "0.5924107", "0.58593285", "0.5762046", "0.57152253", "0.5710921", "0.5679001", "0.56706864", "0.5608449", "0.55970854", "0.5580664", "0.5548116", "0.55222666", "0.55112606", "0.550...
0.79413074
0
When the user clicks on the button, toggle between hiding and showing the dropdown content
function myFunction() { document.getElementById("myDropdown-3").classList.toggle("show"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropDownShowClick(){\n document.getElementById(\"forDropDown\").style.display=\"block\";\n document.getElementById(\"dropDownShowBtn\").style.display=\"none\";\n document.getElementById(\"dropDownHideBtn\").style.display=\"block\";\n}", "function btn_show() {\n document.getElementById(\"drop...
[ "0.78088385", "0.7671879", "0.74918294", "0.73910683", "0.7350857", "0.73457146", "0.7332308", "0.7264288", "0.72625244", "0.7242689", "0.72131056", "0.72122794", "0.7175608", "0.71719986", "0.71553904", "0.7151304", "0.7146252", "0.71220434", "0.71034634", "0.7098101", "0.70...
0.0
-1
call the constructor method
constructor(props){ //Call the constructor of Super class i.e The Component super(props); //maintain the state required for this component this.state = { restaurant_ID: props.match.params.restaurant_ID, customer_ID: cookie.load('customer'), restaurant_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _construct()\n\t\t{;\n\t\t}", "function _ctor() {\n\t}", "constructur() {}", "function Constructor() {\n // All construction is actually done in the init method\n if ( this.initialize )\n this.initialize.apply(this, arguments);\n }", "function Constructor() {}", "function Con...
[ "0.80362153", "0.79341316", "0.78611135", "0.7843023", "0.78206825", "0.78206825", "0.78206825", "0.76931036", "0.7557418", "0.7528882", "0.7528882", "0.7528882", "0.7528882", "0.7528882", "0.7528882", "0.7528882", "0.7507304", "0.74755096", "0.7461952", "0.7433301", "0.74325...
0.0
-1
Call the Will Mount to set the auth Flag to false
componentDidMount(){ this.fetchCurrentOrder(); this.fetchCustomerAddresses(this.state.customer_ID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillMount() {\r\n this.setState({\r\n authFlag: false\r\n })\r\n }", "componentWillMount() {\n this.setState({\n authFlag: false\n });\n }", "componentWillMount() {\n this.setState({\n authFlag: false\n });\n }", "componentWillMount() {\n this.setState({\n ...
[ "0.6273045", "0.62575996", "0.62575996", "0.62575996", "0.62296814", "0.62161314", "0.6198508", "0.6198508", "0.6163718", "0.6163718", "0.6163718", "0.6163718", "0.6154516", "0.6154516", "0.6154516", "0.6154516", "0.61041677", "0.58749634", "0.57465154", "0.569418", "0.564655...
0.0
-1
After click the play again button, the hidden html "overlay" will appear on the window.
function playAgain(){ document.getElementsByClassName("overlay")[0].style.visibility="hidden"; startGame(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playAgain(){\n popupCongratulation.classList.remove(\"show-overlay\");\n loadGame();\n}", "function playAgain() {\n\n\tpopup.classList.remove('show')\n\tpairs = 0;\n\tremoveDeck();\n\tstartGame();\n}", "function playAgain() {\n modal.classList.remove(\"show\");\n restartGame();\n}", "fun...
[ "0.7780991", "0.72885054", "0.72417444", "0.7235191", "0.71318823", "0.71163476", "0.7110868", "0.70990336", "0.709509", "0.70827276", "0.70741004", "0.70714086", "0.70578796", "0.7020413", "0.6933276", "0.6924758", "0.68858945", "0.68850267", "0.68788856", "0.6858991", "0.68...
0.75544494
1
Each time can only open two cards, these two cards will be push in an empty array openedCards=[] These two cards will be checked if they are matched or not If matched, add "match" to these two cards' classList, then remove "open" and "show " from classList and last empty openedCards array If unmatched, add "unmatch" to...
function disable(){ Array.prototype.filter.call(cards, function(card){ card.classList.add("disabled"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToOpen() {\n\n const openCards = []; //new array for open cards\n\n //add open cards to the array\n for (let i = 0; i < cards.length; i++) {\n if (cards[i].classList.contains('open') === true) {\n openCards.push(cards[i]);\n }\n }\n\n //check if the open cards ma...
[ "0.8527311", "0.8450938", "0.83253723", "0.8284278", "0.8243474", "0.8178937", "0.80482256", "0.803405", "0.8031876", "0.80090535", "0.7998909", "0.7990161", "0.79812586", "0.79804987", "0.79663175", "0.7946321", "0.79305094", "0.78772813", "0.7871123", "0.78702027", "0.78498...
0.0
-1
After each click, update moves to html.
function moveCounter(){ moves++; counter.innerHTML= moves; //start timer on first click if(moves == 1){ second = 0; minute = 0; hour = 0; startTimer(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onClick(){\n\t\tposition++;\n\t\tdisplayHTML();\n\t}//close onClick function", "function moveBeadHTML(from, to, status){\n $(\"#spot\"+from).html(\"\"); \n $(\"#spot\"+from).attr(\"data-counter\", \"false\"); \n let beadImageHtml= `<img class=\"counter img-fluid\" src=\"images/counter.jpeg\">`;...
[ "0.70394015", "0.60370624", "0.59498453", "0.59007156", "0.58966523", "0.5770067", "0.57499725", "0.5731504", "0.57087374", "0.56685567", "0.5652493", "0.5648376", "0.55988604", "0.55916744", "0.55724144", "0.5571498", "0.554922", "0.55333424", "0.55217797", "0.5519179", "0.5...
0.0
-1
Display cards:Adding class name (open, show and dsabled) to clicked card Add "disabled" to the card's class, make this card cannot be click again.
function display (){ this.classList.toggle("open"); this.classList.toggle("show"); this.classList.toggle("disabled"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCard(card) {\n card.className = \"card open show disable\";\n}", "function showCard() {\n if (openCards.length < 2) {\n this.classList.toggle(\"open\");\n this.classList.toggle(\"show\");\n this.classList.toggle(\"disable\");\n } else {\n return false;\n }\n }", "function showCa...
[ "0.7942892", "0.7788179", "0.7614285", "0.75181973", "0.74819666", "0.74685025", "0.73658013", "0.73390496", "0.7325463", "0.73128897", "0.72914094", "0.7288503", "0.72718424", "0.722628", "0.7213351", "0.7177964", "0.7171591", "0.71244156", "0.7082135", "0.7081296", "0.70737...
0.0
-1
From coords get real address and put that value in form.
function reverseGeocode(coords) { fetch('http://nominatim.openstreetmap.org/reverse?format=json&lon=' + coords[0] + '&lat=' + coords[1]) .then(function (response) { return response.json(); }).then(function (json) { // TOWN console.log(json.address); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function coordsToAdress(coords) {\n const url =`https://www.mapquestapi.com/geocoding/v1/reverse?key=${GAPI_KEY}&location=${coords.coords.latitude},${coords.coords.longitude}`;\n console.log(coords);\n $.getJSON(url, function (response) {\n const addressObject = response.results[0]....
[ "0.7384958", "0.72573787", "0.6567199", "0.6301241", "0.62114316", "0.61138624", "0.6036717", "0.6017119", "0.59860843", "0.5897298", "0.5798293", "0.5747296", "0.5746853", "0.57357055", "0.5715914", "0.5712867", "0.5679946", "0.5673366", "0.5614941", "0.5613038", "0.5608402"...
0.51299584
85
corresponding functions for Trigger commands
function createTrigger(params) { crTrgg.register(ow, context, log, props); crTrgg.createTrigger(params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Trigger() { }", "function setFunctions() {\r\n var commands = [\r\n { command: \"command1\", description: \"description1\" },\r\n { command: \"command2\", description: \"description2\" },\r\n ];\r\n messagePayload.commands = commands;\r\n\r\n console.log(\r\n JSON.stringify(\r\n sendPa...
[ "0.700767", "0.6369062", "0.62516713", "0.62066096", "0.6206276", "0.6040072", "0.6014924", "0.59824985", "0.59630746", "0.5904428", "0.5865967", "0.58563113", "0.58233804", "0.5815685", "0.57950693", "0.57894164", "0.5776049", "0.57479304", "0.56944287", "0.5687543", "0.5645...
0.0
-1
maybe add heatmap later?
function initMap() { var myLatLng = { lat: 42.886386, lng: -78.878176 }; var map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center: myLatLng }); var marker = new google.maps.Marker({ position: { lat: 42.892424, lng: -78.871549 }, map: map, t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialHeatmaps(){\r\n setupHeatmap(jsonData.length);\r\n setupGlbHeatmap();\r\n}", "function addHeatmap(map) {\n\t/* Data points defined as an array of LatLng objects */\n\tvar heatmapData = genHeatMapData();\n\tvar heatmap = new google.maps.visualization.HeatmapLayer({\n\t\tdata : heatmapData,\n...
[ "0.7394071", "0.7203954", "0.7078096", "0.6931978", "0.6873112", "0.66278", "0.660872", "0.656308", "0.6461581", "0.64137334", "0.6408689", "0.6403958", "0.6357345", "0.63014454", "0.6301063", "0.6275814", "0.626229", "0.62617016", "0.62357455", "0.62218213", "0.6216079", "...
0.0
-1
Function for Stop Timer
function stopTimer() { window.clearInterval(timeinterval); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopTimer(){ clearInterval(interval)}", "function stopTimer() {clearTimeout(startTimer)}", "function stopTimer(){\r\n clearInterval(timer);\r\n }", "function stop() {\n timer.stop();\n}", "function stopTimer(){\n clearInterval(timer);\n }", "function stopTimer() {\n ...
[ "0.85853267", "0.8535992", "0.8379098", "0.83345544", "0.8325101", "0.82884747", "0.82776463", "0.8268185", "0.82477003", "0.8234251", "0.8226573", "0.82136273", "0.82091016", "0.8206621", "0.8200573", "0.81922984", "0.81810564", "0.8164908", "0.8151197", "0.8133498", "0.8103...
0.78749055
44
Matrix Utilities: Rotation Matrix about xaxis
function rotationX(angle) { var matrix = [[1, 0, 0], [0, Math.cos(angle), -Math.sin(angle)], [0, Math.sin(angle), Math.cos(angle)]]; return matrix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xyRotMatrix(a){\r\n\treturn [[Math.cos(a), Math.sin(a), 0],[-Math.sin(a), Math.cos(a), 0],[0,0,1]];\r\n}", "rotate(axis, angle) {\n let x = axis[0];\n let y = axis[1];\n let z = axis[2];\n let n = Math.sqrt(x * x + y * y + z * z);\n x /= n;\n y /= n;\n z ...
[ "0.74874014", "0.7400532", "0.7212825", "0.7147966", "0.68759817", "0.68364817", "0.6832825", "0.68203175", "0.6795999", "0.67957824", "0.6670489", "0.66588515", "0.6623146", "0.66074044", "0.6599422", "0.6539136", "0.65385276", "0.6498271", "0.6468815", "0.6468251", "0.64582...
0.7098199
4
Rotation Matrix about yaxis
function rotationY(angle) { var matrix = [[Math.cos(angle), 0, Math.sin(angle)], [0, 1, 0], [-Math.sin(angle), 0, Math.cos(angle)]]; return matrix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rotate_y() {\n curr_sin = Math.sin(map.degree);\n curr_cos = Math.cos(map.degree);\n var x = (this.x * curr_cos) + (this.z * curr_sin);\n this.z = (this.x * (-curr_sin)) + (this.z * (curr_cos));\n this.x = x;\n }", "function Matrixes4_rotationY(angle) {\n var c = ...
[ "0.75722575", "0.75469136", "0.7020137", "0.6915297", "0.6842812", "0.669447", "0.6645827", "0.6561925", "0.6555012", "0.6459236", "0.6432163", "0.6390815", "0.6384799", "0.6337545", "0.6303303", "0.6213811", "0.6162408", "0.61519396", "0.61120486", "0.6109272", "0.6088077", ...
0.7362744
2
Rotation Matrix about zaxis
function rotationZ(angle) { var matrix = [[Math.cos(angle), -Math.sin(angle), 0], [Math.sin(angle), Math.cos(angle), 0], [0, 0 ,1]]; return matrix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rotate_z() {\n curr_sin = Math.sin(map.degree);\n curr_cos = Math.cos(map.degree);\n var x = (this.x * curr_cos) + (this.y * (-curr_sin));\n this.y = (this.x * curr_sin) + (this.y * (curr_cos));\n this.x = x;\n }", "function rotation (x, y, z) {\n let so = [[0, -z...
[ "0.79612166", "0.75073725", "0.7394705", "0.7359525", "0.73549765", "0.7288484", "0.7208845", "0.7128654", "0.7094069", "0.7092742", "0.70920163", "0.702741", "0.70166767", "0.6990136", "0.68694955", "0.68568695", "0.685571", "0.6805478", "0.6793507", "0.6783463", "0.6750606"...
0.76899934
1
Scalation Matrix in xdirection
function scaleX(factor) { var matrix = [[factor, 0, 0], [0, 1, 0], [0, 0, 1]]; return matrix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scale(x,y) {\n matrix[0] *= x;\n matrix[1] *= x;\n matrix[2] *= y;\n matrix[3] *= y;\n }", "function translateX(matrix, x) {\n return [matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5], matrix[6], matrix[7], matrix[8]...
[ "0.66815245", "0.6278486", "0.5726937", "0.56945854", "0.5693284", "0.56524473", "0.56499267", "0.55592173", "0.55340105", "0.55210155", "0.5518534", "0.54775256", "0.54387766", "0.5425288", "0.5391684", "0.5372343", "0.5362993", "0.53526", "0.5339748", "0.53265846", "0.53245...
0.58400965
2
Scalation Matrix in ydirection
function scaleY(factor) { var matrix = [[1, 0, 0], [0, factor, 0], [0, 0, 1]]; return matrix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getYScalTransform(animParams, height, chartData) {\n\t\tlet i = animParams.chartIndex;\n\t\tlet l = animParams.labelsXInfo[i].start;\n\t\tlet r = animParams.labelsXInfo[i].end;\n\t\tif (l == r) {\n\t\t\treturn animParams.finalTransforms[i];\n\t\t}\n\t\tlet yRangeLocal = getYRange(chartData, l, r);\n\t\tle...
[ "0.65562284", "0.6312737", "0.59749705", "0.59121543", "0.56873244", "0.56102264", "0.5593326", "0.553085", "0.54956156", "0.54512185", "0.54490536", "0.5424582", "0.542068", "0.54178613", "0.5376193", "0.53662604", "0.53615594", "0.53567654", "0.5348954", "0.5347519", "0.533...
0.56474674
5
Scalation Matrix in zdirection
function scaleZ(factor) { var matrix = [[1, 0, 0], [0, 1, 0], [0, 0 ,factor]]; return matrix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateMatrix() {\n this.matrix.set(\n 1 - 2 * (Math.pow(this.y, 2) + Math.pow(this.z, 2)),\n 2 * (this.x * this.y - this.s * this.z),\n 2 * (this.x * this.z + this.s * this.y),\n 0,\n 2 * (this.x * this.y + this.s * this.z),\n 1 - 2 * (Math.p...
[ "0.61650944", "0.60390526", "0.58922094", "0.5815004", "0.57519245", "0.57320184", "0.5657857", "0.5637643", "0.56170356", "0.5615397", "0.5559777", "0.55528843", "0.5524574", "0.54968387", "0.54952127", "0.5494612", "0.54929566", "0.548553", "0.5477501", "0.54729635", "0.541...
0.6909256
0
It enable undo and reset buttons.
function enableUndoReset() { $("#undo").prop("disabled",false); $("#reset").prop("disabled",false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetUndoButtons () {\n\t\tdocument.getElementById(\"undoButton\").disabled = true;\n\t\tdocument.getElementById(\"redoButton\").disabled = true;\n\t}", "function resetUndoButtons () {\n\t\tdocument.getElementById(\"undoButton\").disabled = true;\n\t\tdocument.getElementById(\"redoButton\").disabled = t...
[ "0.8175881", "0.7975978", "0.757982", "0.745943", "0.74001974", "0.73060656", "0.72660065", "0.6706293", "0.65928704", "0.6587759", "0.63854676", "0.63271576", "0.63237226", "0.6306348", "0.6244115", "0.6238874", "0.62248594", "0.6220936", "0.62166125", "0.6208905", "0.617193...
0.8133119
1
It creates rotations animation frames
function animateCommute() { var transformation1; var transformation2; var transformationSelector1 = document.getElementById('TransformationSelector1').value; var transformationSelector2 = document.getElementById('TransformationSelector2').value; var frameSize = 20; var extra = axes.slice()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animate() {\n var timeNow = new Date().getTime();\n if (lastTime != 0) {\n var elapsed = timeNow - lastTime; \n rotAngle= (rotAngle+1.0) % 360;\n }\n var elapsed=timeNow-lastTime;\n lastTime = timeNow;\n \n //when framecount is less than 120, the effect is just rotati...
[ "0.7143087", "0.678111", "0.678111", "0.6762755", "0.67036504", "0.6693846", "0.6605351", "0.65949506", "0.6593068", "0.6542379", "0.6478402", "0.6408935", "0.6405344", "0.63247114", "0.6309393", "0.6267712", "0.6200402", "0.61991596", "0.6194055", "0.6172283", "0.6151421", ...
0.6062617
30
dimIndex is 0 for X, 1 for Y
function slide(amt, dimIndex, posArray, wrapFn){ this.offset[dimIndex] += amt; // figure out if we are wrapping and if so, how many times // wrap rows as neccesary and set their update status var wrapNum; if(this.offset[dimIndex] < 0){ wrapNum = Math.min(this.numRows-1, Math.ceil(Math.abs(t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get dimension() {\r\n return this.cpoints.shape[1];\r\n }", "get dimension() {\r\n return this.cpoints.shape[1];\r\n }", "function index2dArray(x, y, w, h) {\n return x + y * w;\n}", "function GetDimension()\n{\n\treturn m_dimension;\n}", "xy_ij(i, j) {\n if (Array.isArray(i)) [i, j...
[ "0.6050544", "0.6050544", "0.59032375", "0.5829529", "0.57125956", "0.56006765", "0.55944884", "0.5588342", "0.5582964", "0.55672497", "0.5563879", "0.5492976", "0.54185706", "0.5416348", "0.5416348", "0.5416348", "0.5416348", "0.5416348", "0.5416348", "0.5414073", "0.5401366...
0.0
-1
direction is 0 for neg, 1 for pos
function wrap_horizontal(direction){ if(direction) { // this.xPos.push(this.xPos.shift()); this.ptInfo.push(this.ptInfo.shift()); for(var y = 0; y<this.numRows; y++) { this.ptInfo[this.numRows-1][y].update = true; } } else { // this.xPos.unshift(this.xPos.pop()); this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function direction(x, y){ \n\tif (((dirX != 0) && (!x)) || ((dirY != 0) && (!y))) { \n\t\tdirX = x;\n\t\tdirY = y;\n\t}\n}", "get direction() { return this._direction; }", "get direction() { return this._direction; }", "get direction() {\n return {\n 37: -1,\n 38: -1,\n 39: 1,\n 40: 1...
[ "0.73193645", "0.71578246", "0.71578246", "0.6989378", "0.6964537", "0.68913746", "0.68595654", "0.68365294", "0.6748359", "0.670563", "0.6702249", "0.66543555", "0.66543555", "0.66543555", "0.66543555", "0.66543555", "0.6649152", "0.66261476", "0.66083413", "0.66083413", "0....
0.0
-1
direction is 0 for neg, 1 for pos
function wrap_vertical(direction){ if(direction){ // this.yPos.push(this.yPos.shift()); for(var x = 0; x<this.numRows; x++) { this.ptInfo[x].push(this.ptInfo[x].shift()); this.ptInfo[x][this.numRows-1].update = true; } } else { // this.yPos.unshift(this.yPos.pop()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function direction(x, y){ \n\tif (((dirX != 0) && (!x)) || ((dirY != 0) && (!y))) { \n\t\tdirX = x;\n\t\tdirY = y;\n\t}\n}", "get direction() { return this._direction; }", "get direction() { return this._direction; }", "get direction() {\n return {\n 37: -1,\n 38: -1,\n 39: 1,\n 40: 1...
[ "0.73193645", "0.71578246", "0.71578246", "0.6989378", "0.6964537", "0.68913746", "0.68595654", "0.68365294", "0.6748359", "0.670563", "0.6702249", "0.66543555", "0.66543555", "0.66543555", "0.66543555", "0.66543555", "0.6649152", "0.66261476", "0.66083413", "0.66083413", "0....
0.0
-1
I get all of the friends in the remote collection.
function getSearch() { var request = $http({ method: "get", url: "http://tmb_rpc.qa.pdone.com/search_processor.php?mode=SEARCH&page=1&phrase=e&page_length=100&type=news", }); return( request.then( handleSuccess, handleError ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFriends() {\n var friends = [], friend;\n for (var i = 0, length = user.contacts.length; i < length; i++) {\n if (user.contacts[i].removed == 0) {\n friend = usersFactory.getUserByUsername(user.contacts[i].username);\n if (!Meth...
[ "0.72235197", "0.71988577", "0.7002391", "0.6926407", "0.67752826", "0.6653365", "0.6609451", "0.6558943", "0.6496401", "0.64737797", "0.6412854", "0.63960236", "0.63946396", "0.62490726", "0.6229333", "0.61980224", "0.615326", "0.61139584", "0.61016047", "0.6098154", "0.6094...
0.0
-1
Examples pigIt('Pig latin is cool'); // igPay atinlay siay oolcay pigIt('Hello world !'); // elloHay orldWay !
function pigIt(str){ let newArr = []; let arr = str.split(" "); for (let i=0; i<arr.length; i++) { if (arr[i]!='?' && arr[i]!='!') { let word = arr[i]; let letter = word.charAt(0); let newWord = word.slice(1) + letter + "ay"; newArr.push(newWord); } else { newArr.push(arr[i])...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pigLatinify(sentence) {\n const words = sentence.split(' ');\n\n const translateWord = (word) => {\n vowels = 'aeiou'.split('');\n if (vowels.indexOf(word[0]) != -1) {\n return `${word}ay`;\n } else {\n let phonemeEnd = 0;\n while (!(vowels.index...
[ "0.6590179", "0.64808846", "0.63976747", "0.6396448", "0.6366696", "0.62404877", "0.6236926", "0.6220485", "0.6199845", "0.6181981", "0.61684847", "0.61666036", "0.6131933", "0.6116186", "0.61128724", "0.61021894", "0.60919654", "0.6085303", "0.60636246", "0.60613966", "0.604...
0.5671738
69
Creating the database and posts table definition
async function connectDB () { if (db) { debug(`Database Already Created && Opened`); return db; } const postsTable = await readTable(config.db.create_sql_tables.posts); await new Promise((resolve, reject) => { db = new sqlite3.Database(config.db.dbfile, sqlite3.OPEN_READWRITE | sql...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function seedDB(){\n initializeData(removeExistingPosts,removeExistingComments,createNewPosts(samplePosts,createNewComments,sampleComment));\n}", "up () {\n this.create('posts', (table) => {\n table.increments()\n table.integer('user_id').references('id').inTable('users')\n table.string('...
[ "0.70287937", "0.6920679", "0.67103344", "0.65276265", "0.64656925", "0.6382254", "0.6359012", "0.6344923", "0.62556463", "0.6249585", "0.62180465", "0.62175936", "0.6180406", "0.61482817", "0.61359876", "0.6021464", "0.5996139", "0.59512246", "0.5950814", "0.59443563", "0.59...
0.60948306
15
3. lesson 3 scoping move the variable within functin to global scope
function myApartment() { var myCoffeeMaker = 'Aeropress'; var buildingAddress = '150 E 14th St, New York, NY'; var myCloset = 'Extra coats in the back'; var buildingLaundryCode = 4927; var myRefridgerator = 'Filled with veggies and dark chocolate.'; var myDog = 'Nikko'; var buildingPhone = '(481) 516-2342'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTodo() {\n //whatever code...\n //LOCAL SCOPE\n let bob = 3;\n}", "function addTodo() {\r\n //whatever code...\r\n //LOCAL SCOPE\r\n var bob = 3;\r\n}", "function add()\n{\n var xx = \"sdsjd\"; //variable declared inside function can only be used for that function(function scoped)\n}", "...
[ "0.6653926", "0.6530011", "0.6472656", "0.6366675", "0.6289086", "0.62820464", "0.62709355", "0.6248423", "0.6227793", "0.62263525", "0.62066007", "0.61812264", "0.61794436", "0.6177216", "0.61719537", "0.6168983", "0.61620104", "0.6149353", "0.61308485", "0.6105247", "0.6100...
0.0
-1
el metodo se va a fijar si el boton tiene la clase hide sino se la va a agregar
toggleBtnEmpezar(){ if (btnEmpezar.classList.contains('hide')){ btnEmpezar.classList.remove('hide') } else { btnEmpezar.classList.add('hide') } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hide() {\n toogle = 'hide'\n\n }", "function addHideButton(x) {\n return null\n}", "function showOrHide() {\n bild.classList.toggle('hide')\n}", "onHide() {}", "onHide() {}", "show() {\n this.button.removeClass(\"hidden\");\n }", "hideAddButton() {\n this.buttons.addButt...
[ "0.69361424", "0.6922426", "0.6892546", "0.68413234", "0.68413234", "0.68174666", "0.6815154", "0.67271537", "0.6679472", "0.6679472", "0.66531026", "0.6650131", "0.6636871", "0.66063076", "0.66049194", "0.6604424", "0.66040635", "0.6603668", "0.65889287", "0.65570194", "0.65...
0.6805017
7
se va a llamar en el navegador cuando js lo llame
elegirColor(ev){ /* console.log(ev) */ const NOMBRECOLOR = ev.target.dataset.color; //en el evento click vemos el dataset de cada color. //Debemos transformar ese color al numero correspondiente const NUMEROCOLOR = this.transformarColorANumero(NOMBRECOLOR) this.iluminarColor(NOM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nascer()\n{\n\n estado = 3;\n flag_vida = 1;\n vidas_jogador[jog_activo]--;\n\tsom_inicio.play();\n if(jog_activo == 0)\n move_obj($('jogador_1'),290,320);\n else\n move_obj($('jogador_2'),290,320);\n\n // coloca objectos iniciais\n inicializa_objectos();\n objectos_c...
[ "0.64342034", "0.62411654", "0.62350446", "0.6198248", "0.6154945", "0.6120531", "0.6098895", "0.6076482", "0.60742587", "0.60532326", "0.6035566", "0.6030729", "0.601747", "0.6001825", "0.59999907", "0.59837514", "0.5967992", "0.5950127", "0.59485126", "0.5945351", "0.591417...
0.0
-1
Bullet Logic P1 Bullets
function Bullet(I) { I.active = true; I.xVelocity = 30; I.yVelocity = 0; I.width = 40; I.height = 4; I.color = "#7FFF00"; I.inBounds = function() { return ( I.x >= 0 && I.x <= CANVAS_WIDTH && I.y >= 0 && I.y <= CANVAS_HEIGHT ); }; I.draw = function() { ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spawnBullet(p){\n add([rect(6,18), \n pos(p), \n origin('center'), \n color(0.5, 0.5, 1),\n 'bullet'\n ])\n }", "function Bullet() {\n this.srcX = 331;\n this.srcY = 500;\n this.drawX = -20;\n this.drawY = 0;\n this.width = 16;\n this.height = 14;\n this.explosion = new Explosi...
[ "0.6974338", "0.6816566", "0.6786509", "0.6581971", "0.65330476", "0.6509508", "0.64901364", "0.6480903", "0.6437764", "0.6417107", "0.6401408", "0.6401408", "0.6401408", "0.6401408", "0.639667", "0.6379996", "0.63512826", "0.6341315", "0.6336961", "0.6332688", "0.6331329", ...
0.0
-1
Update icon for tab
function updateTabIcon(tab, options) { let icon; let badge; let badgeColor = '#555'; try { if (options) { icon = options.icon; badge = options.badge; } else { var blocked; var disabled; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_icon()\n {\n const icon = bookmarks.is_unlocked() ? \"unlocked-bookmarks.svg\" :\n \"locked-bookmarks.svg\";\n const path = `/icons/main/${icon}`;\n browser.browserAction.setIcon({\n path:\n {\n ...
[ "0.765455", "0.7623679", "0.7577989", "0.7161192", "0.71154404", "0.70820993", "0.7038623", "0.7014906", "0.689834", "0.6853722", "0.68132484", "0.6805539", "0.67853904", "0.67818785", "0.67736995", "0.6765114", "0.6765114", "0.6751297", "0.6729748", "0.67239493", "0.67184263...
0.7298236
3
Creates context menu item
function addMenu(title, options) { var createProperties = { contexts: ["all"], title: adguard.i18n.getMessage(title) }; if (options) { if (options.id) { createProperties.id = options.id; } if (options.parentId) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMainMenu() {\n chrome.contextMenus.create({\n id: 'parentMenu',\n title: 'Search \"%s\" on:',\n contexts: ['selection']\n });\n}", "function createContextMenuItem(label,onclick,divider) {\n\n\tif (onclick == \"\")\n\t\tvar menuHTML = '<div class=\"contextMenuDivInactive\...
[ "0.71566486", "0.7150466", "0.7148318", "0.71336246", "0.7126788", "0.7009224", "0.6952768", "0.6941859", "0.6928714", "0.69089675", "0.6906397", "0.68632203", "0.6828996", "0.6810401", "0.6771755", "0.6626699", "0.6550772", "0.65260047", "0.65224373", "0.64886695", "0.644197...
0.7236928
0
Update context menu for tab
function updateTabContextMenu(tab) { // Isn't supported by Android WebExt if (!adguard.contextMenus) { return; } adguard.contextMenus.removeAll(); if (adguard.settings.showContextMenu()) { if (adguard.prefs.mobile) { customizeMobileContextM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useContextMenu(tab) {\n if (addOnPrefs.useContextMenu) {\n var url = tab.url;\n var tabId = tab.id;\n destroyPreviousContextMenu(tabId);\n var datawakeInfo = storage.getDatawakeInfo(tabId);\n contextMenus[tabId] = contextMenu.Menu({\n label: \"Datawake Menu...
[ "0.70212114", "0.6927158", "0.6924702", "0.6906198", "0.6843413", "0.67981917", "0.67857164", "0.6707404", "0.6699512", "0.6699512", "0.6597538", "0.65107584", "0.6501404", "0.6436692", "0.6435966", "0.6433753", "0.64157784", "0.6403758", "0.6296309", "0.6295183", "0.6206347"...
0.76073915
0
! betternormalscroll v1.14.1 (c) 20162019 ustbhuangyi Released under the MIT License.
function a(t,i){for(;i+1<t.length;i++)t[i]=t[i+1];t.pop()}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mkdOnWindowScroll() {\n \n }", "function OCM_scrolling() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$offCanvasEl.mousewheel(function (event, delta) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.scrollTop -= (delta * 30);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t...
[ "0.6926268", "0.67611235", "0.6744457", "0.6743667", "0.6718017", "0.6713843", "0.66943103", "0.66943103", "0.66943103", "0.66943103", "0.66652805", "0.66652805", "0.6653458", "0.6641574", "0.6626136", "0.66128874", "0.66128874", "0.66011393", "0.6569429", "0.6566255", "0.652...
0.0
-1
Load Drive API client library.
loadDriveApi() { window.gapi.client.load('drive', 'v3'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadDriveApi() {\n\tgapi.client.load('drive', 'v3', buscarArquivoHoje);\n}", "function apiClientLoad() {\n\n //gapi.client.load('oauth2', 'v2', apiClientLoaded);\n gapi.client.load('plus', 'v1', apiClientLoaded);\n}", "loadDriveApi() {\n var event = new CustomEvent(\"startloaddrive\");\n ...
[ "0.78346795", "0.6759061", "0.6677482", "0.66763383", "0.6563972", "0.6477016", "0.63805455", "0.63769317", "0.6372109", "0.6365058", "0.6361253", "0.6345905", "0.6345905", "0.6345905", "0.63422436", "0.6339838", "0.6326001", "0.6326001", "0.6326001", "0.6326001", "0.6326001"...
0.77509207
1
Build the Jekyll Site
function jekyllBuild() { browserSync.notify(messages.jekyllBuild); if (env === 'prod') { return cp.spawn(jekyll, ['build'], { stdio: 'inherit' }); } else { return cp.spawn( jekyll, ['build', '--config', '_config.yml,_config.dev.yml'], { stdio: 'inherit', }, ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "build(source){\n const paths = Helpers.files(source);\n const view = Helpers.includes(paths.includes);\n\n //build _site directory, unless it already exists\n const sitePath = paths.site;\n fs.mkdir(sitePath, (err) => {\n if (err) {\n if (err.code === 'EEXIST') console.log('the _site fol...
[ "0.7367393", "0.6933835", "0.6828492", "0.66889805", "0.65909195", "0.64345425", "0.6205691", "0.61614203", "0.61429024", "0.60682553", "0.6061803", "0.6045798", "0.60446155", "0.60264015", "0.5986318", "0.59101593", "0.5895866", "0.58575934", "0.58570063", "0.580719", "0.576...
0.59983224
14
Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
function getCFunc(ident) { var func = Module['_' + ident]; // closure exported function if (!func) { try { func = eval('_' + ident); // explicit lookup } catch(e) {} } assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)'); return func; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCFunc(ident) {\n try {\n var func = Module['_' + ident]; // closure exported function\n if (!func) func = eval('_' + ident); // explicit lookup\n } catch (e) {}\n assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)');\n ...
[ "0.75231504", "0.75231504", "0.7520175", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906", "0.75044906",...
0.7469628
42
Sets a value in memory in a dynamic way at runtime. Uses the type data. This is the same as makeSetValue, except that makeSetValue is done at compiletime and generates the needed code then, whereas this function picks the right code at runtime. Note that setValue and getValue only do aligned writes and reads! Note that...
function setValue(ptr, value, type, noSafe) { type = type || 'i8'; if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit switch(type) { case 'i1': HEAP8[((ptr)>>0)]=value; break; case 'i8': HEAP8[((ptr)>>0)]=value; break; case 'i16': HEAP16[((ptr)>>1)]=value; break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setValue(ptr, value, type, noSafe) {\n type = type || 'i8';\n if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit\n switch(type) {\n case 'i1': HEAP8[(ptr)]=value; break;\n case 'i8': HEAP8[(ptr)]=value; break;\n case 'i16': HEAP16[((ptr)>>1)]=value; break;\n ...
[ "0.70037204", "0.69912416", "0.69912416", "0.69912416", "0.69762725", "0.69762725", "0.69762725", "0.6955605", "0.6955605", "0.6955605", "0.6955605", "0.6949471", "0.6949471", "0.6949471", "0.6913426", "0.6913426", "0.6913426", "0.69094163", "0.68989986", "0.6898297", "0.6898...
0.6889543
22
allocate(): This is for internal use. You can use it yourself as well, but the interface is a little tricky (see docs right below). The reason is that it is optimized for multiple syntaxes to save space in generated code. So you should normally not use allocate(), and instead allocate memory using _malloc(), initialize...
function allocate(slab, types, allocator, ptr) { var zeroinit, size; if (typeof slab === 'number') { zeroinit = true; size = slab; } else { zeroinit = false; size = slab.length; } var singleType = typeof types === 'string' ? types : null; var ret; if (allocator == ALLOC_NONE) { ret =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _allocate(bytes) {\n var address = Module._malloc(bytes.length);\n Module.HEAPU8.set(bytes, address);\n\n return address;\n }", "constructor() {\n this.length = 0;\n this._capacity = 0;\n // Sets up the pointer where the memory is allocated\n this.ptr = memory.allocat...
[ "0.68709147", "0.6681199", "0.63991416", "0.6207962", "0.6196632", "0.6175716", "0.61651045", "0.61509424", "0.6149775", "0.6102238", "0.60735273", "0.60699433", "0.60699433", "0.60699433", "0.60699433", "0.60543585", "0.6044165", "0.603227", "0.6024579", "0.5928423", "0.5928...
0.60528016
19
Given a pointer 'ptr' to a nullterminated UTF16LEencoded string in the emscripten HEAP, returns a copy of that string as a Javascript String object.
function UTF16ToString(ptr) { var i = 0; var str = ''; while (1) { var codeUnit = HEAP16[(((ptr)+(i*2))>>1)]; if (codeUnit == 0) return str; ++i; // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through. str += String.fromCharCode(cod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UTF16ToString(ptr) {\n var i = 0;\n\n var str = '';\n while (1) {\n var codeUnit = HEAP16[(((ptr) + (i * 2)) >> 1)];\n if (codeUnit == 0)\n return str;\n ++i;\n // fromCharCode constructs a character from a UTF-16 code unit, s...
[ "0.71345544", "0.71345544", "0.71065223", "0.71065223", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.7089183", "0.697702", "0.6938373", "0.69288766", "0.69288766", "0.689808",...
0.7106646
13
Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', nullterminated and encoded in UTF16LE form. The copy will require at most (str.length2+1)2 bytes of space in the HEAP.
function stringToUTF16(str, outPtr) { for(var i = 0; i < str.length; ++i) { // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP. var codeUnit = str.charCodeAt(i); // possibly a lead surrogate HEAP16[(((outPtr)+(i*2))>>1)]=codeUnit; } // Null-terminate the pointe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringToUTF16(str, outPtr) {\n for (var i = 0; i < str.length; ++i) {\n // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP.\n var codeUnit = str.charCodeAt(i); // possibly a lead surrogate\n HEAP16[(((outPtr) + (i * 2)) >> 1)...
[ "0.80290776", "0.7993579", "0.7993579", "0.7931322", "0.7931322", "0.7931322", "0.7931322", "0.7931322", "0.7931322", "0.7487391", "0.7394279", "0.739367", "0.739367", "0.73627746", "0.7355913", "0.7355913", "0.7355913", "0.7355913", "0.7355913", "0.7355913", "0.7355913", "...
0.794772
15
Given a pointer 'ptr' to a nullterminated UTF32LEencoded string in the emscripten HEAP, returns a copy of that string as a Javascript String object.
function UTF32ToString(ptr) { var i = 0; var str = ''; while (1) { var utf32 = HEAP32[(((ptr)+(i*4))>>2)]; if (utf32 == 0) return str; ++i; // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __getString(ptr) {\n if (!ptr) return null;\n const buffer = memory.buffer;\n const id = new Uint32Array(buffer)[ptr + ID_OFFSET >>> 2];\n if (id !== STRING_ID) throw Error(`not a string: ${ptr}`);\n return getStringImpl(buffer, ptr);\n }", "function UTF32ToString(ptr) {\n var i =...
[ "0.70205736", "0.68332297", "0.68074226", "0.68074226", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6767575", "0.6676319", "0.6656409", "0.6656409", "0.6656409", "0.6656409",...
0.67930496
11
Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr', nullterminated and encoded in UTF32LE form. The copy will require at most (str.length+1)4 bytes of space in the HEAP, but can use less, since str.length does not return the number of characters in the string, but the number of U...
function stringToUTF32(str, outPtr) { var iChar = 0; for(var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) { // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap. var codeUnit = str.ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringToUTF32(str, outPtr) {\n var iChar = 0;\n for (var iCodeUnit = 0; iCodeUnit < str.length; ++iCodeUnit) {\n // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the he...
[ "0.79397404", "0.78454715", "0.78454715", "0.78064543", "0.78064543", "0.78064543", "0.78064543", "0.78064543", "0.78064543", "0.76360685", "0.76156414", "0.7611457", "0.7611457", "0.757421", "0.7559589", "0.7559589", "0.7559589", "0.7559589", "0.7559589", "0.7559589", "0.755...
0.78261834
15
dynamic area handled by sbrk
function enlargeMemory() { abort('Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_McDonaldAlloc(size) {\n size = roundUp(size, this._alignment);\n\n for (let i = 0; i < this._chunkCount; ++i) {\n const chunk = this._chunks[i];\n let isFound = false;\n let start = chunk.start;\n\n if (start + size <= chunk.end) {\n isFou...
[ "0.50616634", "0.49353954", "0.49187168", "0.4819843", "0.4819843", "0.47982058", "0.47443765", "0.47317523", "0.47197354", "0.47161573", "0.47159427", "0.4697439", "0.46973792", "0.46959123", "0.46869344", "0.4674198", "0.46555442", "0.46497506", "0.46371117", "0.46344137", ...
0.0
-1
Tools This processes a JS string into a Cline array of numbers, 0terminated. For LLVMoriginating strings, see parser.js:parseLLVMString function
function intArrayFromString(stringy, dontAddNull, length /* optional */) { var ret = (new Runtime.UTF8Processor()).processJSString(stringy); if (length) { ret.length = length; } if (!dontAddNull) { ret.push(0); } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function intArrayFromString(stringy, dontAddNull, length /* optional */ ) {\n var ret = (new Runtime.UTF8Processor()).processJSString(stringy);\n if (length) {\n ret.length = length;\n }\n if (!dontAddNull) {\n ret.push(0);\n }\n return ret;\n }", ...
[ "0.58884805", "0.581145", "0.581145", "0.5556285", "0.5541743", "0.55156434", "0.54336584", "0.54336584", "0.5410302", "0.5410302", "0.5410302", "0.5203161", "0.51673627", "0.5165204", "0.5140153", "0.51294726", "0.51294726", "0.51086026", "0.51017606", "0.50933874", "0.50669...
0.5820682
30
Write a Javascript array to somewhere in the heap
function writeStringToMemory(string, buffer, dontAddNull) { var array = intArrayFromString(string, dontAddNull); var i = 0; while (i < array.length) { var chr = array[i]; HEAP8[(((buffer)+(i))>>0)]=chr; i = i + 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function write(array, stream) {\n array = array.slice()\n function next() {\n while(array.length)\n if(stream.write(array.shift()) === false)\n return stream.once('drain', next)\n \n stream.end()\n }\n\n next()\n}", "writeValue(buffer, value) {\n assert.isBuffer(buffer);\n ...
[ "0.5939622", "0.59226626", "0.5787374", "0.57775414", "0.57775414", "0.571348", "0.5663694", "0.5645978", "0.56428266", "0.5637981", "0.5614834", "0.56105554", "0.55599105", "0.555978", "0.55525315", "0.5546563", "0.5522782", "0.5521473", "0.5513374", "0.5513374", "0.5513374"...
0.0
-1
Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.
function LazyUint8Array() { this.lengthKnown = false; this.chunks = []; // Loaded chunks. Index is the chunk number }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LazyUint8Array() {\n this.lengthKnown = false;\n this.chunks = []; // Loaded chunks. Index is the chunk number\n }", "function LazyUint8Array() {\nthis.lengthKnown = false;\nthis.chunks = []; // Loaded chunks. Index is the chunk number\n}", "function LazyUint8Array() {\r\n this.l...
[ "0.81654984", "0.81491023", "0.8149054", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.8143981", "0.81040406", "0.81040406", "0.81040406", "0.81040406...
0.81542194
27
======== compiled code from system/lib/compilerrt , see readme therein
function ___muldsi3($a, $b) { $a = $a | 0; $b = $b | 0; var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0; $1 = $a & 65535; $2 = $b & 65535; $3 = Math_imul($2, $1) | 0; $6 = $a >>> 16; $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0; $11 = $b >>> 16; $12 = Math_imul($11, $1) | 0; return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compile() {\n\n}", "function VersionCompiler() {\n}", "Compile() {\n\n }", "function Compiler() {\n}", "function compileLibC () {\n console.log('compileLibC');\n\n /* compile a fake program that uses c library */\n execSync(\n 'cl65 -T -t c64 -O -Os ' +\n '-Ln build/libc.lbl ' +\n ...
[ "0.6403422", "0.63883287", "0.57854426", "0.5650239", "0.56429785", "0.5586955", "0.5580404", "0.556086", "0.54912066", "0.5480425", "0.5451898", "0.54312015", "0.53887993", "0.53754646", "0.53143036", "0.5301165", "0.5294658", "0.5280735", "0.5278442", "0.5240244", "0.523989...
0.0
-1
return new, unset BigInteger
function nbi() { return new BigInteger(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BigInteger(a, b) {\n if (a != null) this.fromString(a, b);\n} // return new, unset BigInteger", "clone() {\n return new BigInteger(this.digits.slice());\n }", "clone() {\n return new BigInteger(this.digits.slice());\n }", "function nbi()\n{\n return new BigInteger(null);\n}", ...
[ "0.7428058", "0.69610363", "0.69610363", "0.64015156", "0.6362602", "0.6362602", "0.623988", "0.623988", "0.6111579", "0.6111579", "0.6111579", "0.60725933", "0.60725933", "0.60725933", "0.60725933", "0.60725933", "0.6041273", "0.60077846", "0.5987963", "0.5987963", "0.597454...
0.6249981
74
am: Compute w_j += (xthis_i), propagate carries, c is initial carry, returns final carry. c < 3dvalue, x < 2dvalue, this_i < dvalue We need to select the fastest one that works in this environment. am1: use a single mult and divide to get the high bits, max digit bits should be 26 because max internal value = 2dvalue^2...
function am1(i,x,w,j,c,n) { while(--n >= 0) { var v = x*this[i++]+w[j]+c; c = Math.floor(v/0x4000000); w[j++] = v&0x3ffffff; } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n var v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n\n return c;\n} // am2 avoids a big mult-and-extract completely.", "function am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n ...
[ "0.72942585", "0.7269491", "0.72358465", "0.7231032", "0.7231032", "0.7231032", "0.7231032", "0.7231032", "0.7231032", "0.7231032", "0.7170475", "0.7158511", "0.7143046", "0.71355367", "0.7131832", "0.7131832", "0.7131832", "0.7131832", "0.7131832", "0.7124021", "0.7124021", ...
0.7009762
86
am2 avoids a big multandextract completely. Max digit bits should be <= 30 because we do bitwise ops on values up to 2hdvalue^2hdvalue1 (< 2^31)
function am2(i,x,w,j,c,n) { var xl = x&0x7fff, xh = x>>15; while(--n >= 0) { var l = this[i]&0x7fff; var h = this[i++]>>15; var m = xh*l+h*xl; l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); w[j++] = l&0x3fffffff; } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function am2(i,x,w,j,c,n){var xl=x&0x7fff,xh=x>>15;while(--n>=0){var l=this[i]&0x7fff;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&0x3fffffff;}return c;}// Alternately, set max digit bits to 28 since some", "function am2(i, x, w, j, c,...
[ "0.6851531", "0.6258883", "0.6119003", "0.6056417", "0.5773433", "0.5773433", "0.5708519", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "0.5693391", "...
0.5683907
57
Alternately, set max digit bits to 28 since some browsers slow down when dealing with 32bit numbers.
function am3(i,x,w,j,c,n) { var xl = x&0x3fff, xh = x>>14; while(--n >= 0) { var l = this[i]&0x3fff; var h = this[i++]>>14; var m = xh*l+h*xl; l = xl*l+((m&0x3fff)<<14)+w[j]+c; c = (l>>28)+(m>>14)+xh*h; w[j++] = l&0xfffffff; } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function limitDigitDisplay(numb){\n return new Intl.NumberFormat('en-US', {minimumFractionDigits: 0,maximumFractionDigits: 8}).format(numb);\n}", "function am2(i,x,w,j,c,n){var xl=x&0x7fff,xh=x>>15;while(--n>=0){var l=this[i]&0x7fff;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3ffffff...
[ "0.63417995", "0.60637635", "0.59968776", "0.59458524", "0.5878678", "0.58499455", "0.5831066", "0.57583326", "0.57344615", "0.571807", "0.57118917", "0.5695717", "0.5691538", "0.5676504", "0.5668075", "0.5662858", "0.5655844", "0.56378764", "0.5586695", "0.5567974", "0.55679...
0.0
-1
(protected) copy this to r
function bnpCopyTo(r) { for(var i = this.t-1; i >= 0; --i) r[i] = this[i]; r.t = this.t; r.s = this.s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "copyR(rv) {\nthis._r.setFromRQ(r);\nreturn this;\n}", "copyRV(rv) {\nRQ.setQV(this._r.xyzw, rv);\nreturn this;\n}", "copyFrom(source) {\n this.r = source.r;\n this.g = source.g;\n this.b = source.b;\n this.a = source.a;\n return this;\n }", "setR(r) {\nthis._r = r;\nretu...
[ "0.75497603", "0.72476476", "0.72389024", "0.7011037", "0.6864913", "0.64402145", "0.64402145", "0.6410029", "0.6410029", "0.63942933", "0.63942933", "0.63565814", "0.63523525", "0.63438", "0.63438", "0.63438", "0.63438", "0.63438", "0.63438", "0.63438", "0.63438", "0.63438...
0.6274418
66
(protected) set from integer value x, DV <= x < DV
function bnpFromInt(x) { this.t = 1; this.s = (x<0)?-1:0; if(x > 0) this[0] = x; else if(x < -1) this[0] = x+DV; else this.t = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set x(value) {this._x = value;}", "set x(v) {}", "set setX (x) {\n this.x = x;\n }", "set x(value) {}", "function fromInt(o,x) {\r\n o.t = 1;\r\n o.s = (x<0)?-1:0;\r\n if(x > 0) o[0] = x;\r\n else if(x < -1) o[0] = x+DV;\r\n else o.t = 0;\r\n}", "function numberInSet() {\n\n}", "static s...
[ "0.5840981", "0.5767726", "0.56658965", "0.5584814", "0.5517628", "0.5415022", "0.5413354", "0.53563", "0.5282238", "0.52688783", "0.5221515", "0.52208304", "0.5156121", "0.5138402", "0.5137577", "0.5112822", "0.50835586", "0.504482", "0.50268924", "0.501813", "0.50094223", ...
0.0
-1
return bigint initialized to value
function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nbi() { return new BigInteger(null); }", "function nbi() { return new BigInteger(null); }", "function nbi() { return new BigInteger(null); }", "function nbi() { return new BigInteger(null); }", "function nbi() { return new BigInteger(null); }", "function nbi() { return new BigInteger(null); }", ...
[ "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "0.6788916", "...
0.0
-1
(protected) set from string and radix
function bnpFromString(s,b) { var k; if(b == 16) k = 4; else if(b == 8) k = 3; else if(b == 256) k = 8; // byte array else if(b == 2) k = 1; else if(b == 32) k = 5; else if(b == 4) k = 2; else { this.fromRadix(s,b); return; } this.t = 0; this.s = 0; var i = s.length, mi = fal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setFromStr(name, value) {\n//---------\nreturn this.set(FourCC.fourCCInt(name), value);\n}", "static fromString(str, unsigned, radix) {\n if (str.length === 0)\n throw Error('empty string');\n if (str === 'NaN' || str === 'Infinity' || str === '+Infinity' || str === '-Infinity')\n ...
[ "0.59506947", "0.5796183", "0.5756244", "0.571688", "0.5703274", "0.56444424", "0.56098574", "0.54871666", "0.5446435", "0.54307956", "0.54285616", "0.5418904", "0.54126376", "0.536724", "0.53525347", "0.53468573", "0.5345744", "0.53238094", "0.53238094", "0.53238094", "0.530...
0.0
-1
(protected) clamp off excess high words
function bnpClamp() { var c = this.s&this.DM; while(this.t > 0 && this[this.t-1] == c) --this.t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truncateWords(longText, wordLimit) {\n // longText (a String with several words in it)\n // wordLimit (an Integer that sets the number of words you want in the returned text)\n\n // declaration, assignments\n var splitWords = [];\n var numWords = 0;\n var numWords_Short = 0;\n // var ...
[ "0.6410447", "0.62497896", "0.6212312", "0.61360306", "0.6088829", "0.602778", "0.60098094", "0.59800375", "0.5962549", "0.5930364", "0.59274495", "0.5911854", "0.58764017", "0.5866618", "0.5858178", "0.584635", "0.5839283", "0.58268946", "0.58057034", "0.58053905", "0.579874...
0.0
-1
(public) return string representation in given radix
function bnToString(b) { if(this.s < 0) return "-"+this.negate().toString(b); var k; if(b == 16) k = 4; else if(b == 8) k = 3; else if(b == 2) k = 1; else if(b == 32) k = 5; else if(b == 4) k = 2; else return this.toRadix(b); var km = (1<<k)-1, d, m = false, r = "", i = this.t; v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bigInt2StrHelper(bi, r) {\n return bi.toString(r);\n}", "function arrayToString(arr,radix) {\n return Array.from(arr).map(c=>(c%radix).toString(radix)).join(\"\")\n}", "toString() {\n let res = '';\n for (let i = this.digits.length - 1; i >= 0; i--) {\n res += this.digits[...
[ "0.6569635", "0.6452269", "0.6398552", "0.6398552", "0.63979465", "0.63979465", "0.63979465", "0.63979465", "0.63979465", "0.63979465", "0.63979465", "0.6391342", "0.63456917", "0.63456917", "0.63392365", "0.6335141", "0.63327986", "0.63327986", "0.6324256", "0.63225746", "0....
0.63123995
45
(public) return + if this > a, if this < a, 0 if equal
function bnCompareTo(a) { var r = this.s-a.s; if(r != 0) return r; var i = this.t; r = i-a.t; if(r != 0) return (this.s<0)?-r:r; while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function value(a,b) {\r\na = a[1]+a[0];\r\nb = b[1]+b[0];\r\nreturn a == b ? 0 : (a < b ? -1 : 1)\r\n}", "gt(other) { return this.cmp(other) > 0; }", "function bnCompareTo(a) {\n var r = this.s-a.s;\n if(r != 0) return r;\n var i = this.t;\n r = i-a.t;\n if(r != 0) return (this.s<0)?-r...
[ "0.70131725", "0.6956428", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447", "0.66924447",...
0.66477484
59
returns bit length of the integer x
function nbits(x) { var r = 1, t; if((t=x>>>16) != 0) { x = t; r += 16; } if((t=x>>8) != 0) { x = t; r += 8; } if((t=x>>4) != 0) { x = t; r += 4; } if((t=x>>2) != 0) { x = t; r += 2; } if((t=x>>1) != 0) { x = t; r += 1; } return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bitSize(x) {\n var j,z,w;\n for (j=x.length-1; (x[j]==0) && (j>0); j--);\n for (z=0,w=x[j]; w; (w>>=1),z++);\n z+=bpe*j;\n return z;\n }", "function bitSize(x) {\n var j, z, w;\n for (j = x.length - 1; (x[j] == 0) && (j > 0); j--);\n for (z = 0, w = x[j]; w; (w >>= 1...
[ "0.833884", "0.8291418", "0.7555619", "0.7480939", "0.74747205", "0.74659693", "0.74659693", "0.74595004", "0.74595004", "0.74595004", "0.74595004", "0.74595004", "0.74595004", "0.74595004", "0.74572974", "0.7455497", "0.7445271", "0.7445271", "0.7444451", "0.74419636", "0.74...
0.72613025
51
(public) return the number of bits in "this"
function bnBitLength() { if(this.t <= 0) return 0; return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bnBitCount() {\n\t var r = 0, x = this.s&this.DM;\n\t for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n\t return r;\n\t }", "function bnBitCount() {\n\t var r = 0, x = this.s&this.DM;\n\t for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);\n\t return r;\n\t }"...
[ "0.7724705", "0.7724705", "0.7695087", "0.7681344", "0.7667404", "0.7667404", "0.76382494", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", "0.7611839", ...
0.0
-1
(protected) r = this << nDB
function bnpDLShiftTo(n,r) { var i; for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; for(i = n-1; i >= 0; --i) r[i] = 0; r.t = this.t+n; r.s = this.s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function db_wrapper(idb) {\n\t\tObject.defineProperty(this, \"_db\", {\n\t\t\tconfigurable: false,\n\t\t\tenumerable: false,\n\t\t\twritable: false,\n\t\t\tvalue: idb,\n\t\t});\n\n\t\tstores.forEach(function (store) {\n\t\t\tObject.defineProperty(this, store, {\n\t\t\t\tconfigurable: false,\n\t\t\t\tenumerable: tr...
[ "0.5814989", "0.5600617", "0.5564867", "0.55613804", "0.5514192", "0.54521364", "0.5375183", "0.5350181", "0.532378", "0.5322483", "0.5318495", "0.5165761", "0.5160849", "0.5160849", "0.5146469", "0.51333195", "0.5132165", "0.512582", "0.5124944", "0.509832", "0.50938004", ...
0.0
-1