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
visualizing elements reached by scrolling
function visualize(element) { element.style.transition = "opacity 1s"; if (onReach(element)) { element.style.opacity = "1"; } else { element.style.opacity = "0"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onScroll() {\n\t\t// unique tick id\n\t\t++ticks;\n\n\t\t// viewport rectangle\n\t\tvar top = jWindow.scrollTop(),\n\t\t\tleft = jWindow.scrollLeft(),\n\t\t\tright = left + jWindow.width(),\n\t\t\tbottom = top + jWindow.height();\n\n\t\t// determine which elements are in view\n// + 60 accounts for ...
[ "0.7065407", "0.7065407", "0.7065407", "0.7065407", "0.7038434", "0.6998758", "0.6960314", "0.68359435", "0.68188715", "0.68097436", "0.66706586", "0.66706586", "0.66706586", "0.6668278", "0.6648375", "0.66422015", "0.6624766", "0.66133225", "0.6589826", "0.65834355", "0.6583...
0.0
-1
Given a list of objects and a list of keys that should exist on the objects, get the cartesian product of the values and return objects with the result of each product
function cartesianProductOnObjects(list, keys) { if(!Object.isArray(list)) { list = [list]; } return keys.reduce(singleProduct, list); function singleProduct(list, key) { return list.concatMap(function(obj) { var values = obj[key]; if(!Object.is...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function combinate(obj) {\n let combos = [];\n for (var key in obj) {\n const values = obj[key];\n const all = [];\n for (let i = 0; i < values.length; i++) {\n for (let j = 0; j < (combos.length || 1); j++) {\n const newCombo = { ...combos[j], [key]: values[i] };\n all.push(newCombo)...
[ "0.6237503", "0.6106201", "0.6100294", "0.5999242", "0.59773624", "0.59390116", "0.59228", "0.5914543", "0.5869984", "0.54772985", "0.546213", "0.54477197", "0.53849643", "0.53737587", "0.5331082", "0.52698576", "0.52605706", "0.5248929", "0.5245514", "0.52426815", "0.5182724...
0.83767265
0
fix bug con el sticky desbordandose en ciertas resoluciones restandole 2px al contenedor
function fix_sticky() { // var fixSticky = $('#main div:last-child') var fixSticky = $('.is_stuck').parent() setTimeout(function() { fixSticky.addClass('columns small-12 medium-3') },50) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_setSticky() {\n var _this = this,\n stickTo = this.options.stickTo,\n mrgn = stickTo === 'top' ? 'marginTop' : 'marginBottom',\n notStuckTo = stickTo === 'top' ? 'bottom' : 'top',\n css = {};\n\n css[mrgn] = `${this.options[mrgn]}em`;\n css[stickTo] = 0;\n css[notStuckTo] =...
[ "0.6983477", "0.6920942", "0.68275756", "0.6763236", "0.6758993", "0.6748625", "0.66816354", "0.6655788", "0.6643164", "0.6615296", "0.6596065", "0.6569063", "0.65547544", "0.65525085", "0.65378094", "0.6529408", "0.6527748", "0.65242803", "0.6519464", "0.651942", "0.6507515"...
0.62218785
55
complemento del paralax con css
function paralax() { var parallax = document.querySelectorAll(".fondo"), speed = 0.19; window.onscroll = function(){ [].slice.call(parallax).forEach(function(el,i){ var windowYOffset = window.pageYOffset/7, elBackgrounPos = "50% " + (windowYOffset * speed) + "px"; el.style.backgroundPosit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertCss() { }", "function add_css(target) {\n\t\tappend_styles(target, \"svelte-1gtarpt\", \".hide-div.svelte-1gtarpt.svelte-1gtarpt{visibility:hidden}.fabs.svelte-1gtarpt.svelte-1gtarpt{bottom:0;position:fixed;margin:1em;right:0;z-index:998}.fab.svelte-1gtarpt.svelte-1gtarpt{display:block;width:56px;height:56...
[ "0.65367997", "0.63109493", "0.6170607", "0.61182636", "0.6099655", "0.6090432", "0.5974579", "0.59627485", "0.5928927", "0.5921838", "0.5910156", "0.5878556", "0.58778363", "0.5872957", "0.5867001", "0.5853917", "0.58452636", "0.5818563", "0.58109", "0.57984394", "0.5786463"...
0.0
-1
Three points on quadratic curve f:Y>X in xyplane are (0,0), (x1,y1), (x1,y1) where x1 > 0. Construct a lathe on n samples on [y1,y1] around the axis x = X if X 0 for a convex band Function has form x = ay^2, solved by a = x1 / (y1)^2
function createQuadBandGeometry(x1, y1, X, density=100, segments=12) { let a = x1 / (y1 * y1); let f; if (X < 0) f = (y) => a * y * y - X; else f = (y) => -(a * y * y - (X + x1)); let ys = MyUtils.linspace(-y1, y1, density); let xs = ys.map(f); let vecs = []; for (let i =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw_adjusted_quadratic_fn(){\n\n\tvar x_increments = parseFloat(document.getElementById('x_inc').value)\n\tvar y_increments = parseFloat(document.getElementById('y_inc').value)\n\tvar min = parseFloat(-1)*25*x_increments; // Minimum x\n\tvar max = 25*x_increments; // Maximum x\n\tvar xstep = 0.1; // How ...
[ "0.5985217", "0.5935601", "0.58938706", "0.5852145", "0.57922214", "0.5762235", "0.5761715", "0.5751006", "0.57218534", "0.56612015", "0.5628332", "0.5601056", "0.55914253", "0.5585821", "0.558573", "0.55816495", "0.5581147", "0.55766386", "0.55766386", "0.55675775", "0.55675...
0.5698925
9
Hey! Rewrite in the new style. Your code will wind up looking very similar, but try not not reference your old code in writing the new style.
constructor() { //initialize currIndex to -1 this.currIndex = -1; //initialize empty storage this.storage = {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected internal function m252() {}", "function StupidBug() {}", "private internal function m248() {}", "transient final protected internal function m174() {}", "transient protected internal function m189() {}", "private public function m246() {}", "static final private internal function m106() {}", ...
[ "0.6210443", "0.59942484", "0.58970547", "0.58393115", "0.57954025", "0.5758581", "0.5730021", "0.56818193", "0.55284005", "0.552316", "0.55128217", "0.55045223", "0.54930145", "0.54649293", "0.54636693", "0.5438312", "0.54160804", "0.5408919", "0.5408919", "0.5408919", "0.53...
0.0
-1
$("skillsh3").prepend(skillsStart); create function displayWork()
function displayWork(){ if (bio.skills.length>0) { $("#header").append(HTMLskillsStart); for (var i = 0; i < bio.skills.length; i++) { var skillsList=HTMLskills.replace("%data%", bio.skills[i]); $("#skills").append(skillsList + ","); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function skillDisplay() {\n if (skillListCount == skillList.length - 1) {\n skillListCount = 0;\n }\n else {\n skillListCount++;\n }\n $('.skill').text(skillList[skillListCount]);\n}", "function displayWork(){\n //Evalution of bio.skills and append of skills\n if(bio.skills.lenght ...
[ "0.6958536", "0.68217665", "0.66899556", "0.66899556", "0.66899556", "0.66899556", "0.66899556", "0.6365331", "0.63278425", "0.63126487", "0.6297043", "0.6271256", "0.6199293", "0.61044776", "0.60920507", "0.60590374", "0.60527045", "0.60454607", "0.60341793", "0.60092795", "...
0.6725505
2
Cookie type Set cookie `name` to `value`.
function set(name, value, options) { options = options || {}; var str = encode(name) + '=' + encode(String(value)); if (null == value) { options.maxage = -1; } if (options.maxage) { options.expires = new Date(+new Date() + options.maxage); } if (options.path) str += '; path=' + options.path; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set(name, value) {\n\n // if no value then remove\n if (!value) {\n remove(name);\n return;\n }\n\n if (localStorage) {\n try {\n localStorage.setItem(name, value);\n }\n catch (ex) {}\n }\n\n _...
[ "0.76711434", "0.76472193", "0.7572795", "0.7547246", "0.74842995", "0.7412434", "0.74099517", "0.738236", "0.7368527", "0.7341581", "0.7339411", "0.7306232", "0.7304269", "0.7287281", "0.7239593", "0.723876", "0.719751", "0.71495503", "0.7126816", "0.71008366", "0.7096244", ...
0.7135898
18
Return all cookies. This is isomorphic and may be called from the serverside though it will return nothing.
function all() { var str; try { str = document.cookie; } catch (err) { return {} } return parse(str) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllCookies() {\n return await new Promise((resolve, reject) => {\n this.dbg.sendCommand('Network.getAllCookies', {}, (error, result) => {\n this.assertError(error, 'Network.getAllCookies');\n resolve(result);\n });\n });\n }", "functio...
[ "0.73198944", "0.72208923", "0.72050583", "0.70933646", "0.6921958", "0.6921958", "0.68687177", "0.6765901", "0.65649694", "0.653564", "0.6522168", "0.6512799", "0.64345783", "0.6388018", "0.6388018", "0.6343585", "0.63420856", "0.62622386", "0.62582237", "0.62377924", "0.623...
0.7763535
0
Connect to the database
async function connect() { mongoose.Promise = global.Promise; // establish Connection mongoose.connect(process.env.DATABASE, { useUnifiedTopology: true, useNewUrlParser: true }); mongoose.set('useCreateIndex', true); //Mongoose events //Successfull Connection mongoose.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connectToDatabase () {\n this.database = pgp(connectionDatas)\n _checkDatabaseConnection(this.database)\n }", "async connectToDatabase () {\n if (await this.shouldConnect()) {\n await Database.connect()\n }\n }", "connect(){\r\n\t\t// Initiate connection w/parameters\r\n\t\tthis.db_connectio...
[ "0.8039009", "0.7681044", "0.7596305", "0.74826425", "0.7353234", "0.73087215", "0.7239359", "0.72298354", "0.72261065", "0.72102803", "0.71463954", "0.71453094", "0.7129957", "0.71242404", "0.69964737", "0.69930327", "0.69498926", "0.6934921", "0.69273555", "0.692155", "0.68...
0.6393821
67
rendering to the main page
function taskMain(data) { let len = document.getElementsByClassName('rend').length const html = ` <div class="row rend" style="margin-bottom:0px !important;"> <div class="col"> <span><i class="material-icons white-text" id="${len}" style="margin-top: 1.5r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderPage() {}", "renderPage() {\t\t\n\t\tswitch (this.props.data.active) {\n\t\t\tcase 'user': \n\t\t\t\treturn this.renderUserInfo(this.props.data.body);\t\t\t\n\t\t\tcase 'repos': \n\t\t\t\treturn this.renderRepos(this.props.data.body);\n\t\t\tcase 'about': \n\t\t\t\treturn this.renderAbout();\t\t\t\t\t\n\t\...
[ "0.7644496", "0.75501615", "0.7536524", "0.7349632", "0.7319987", "0.7229487", "0.71957386", "0.7188985", "0.71886045", "0.71274096", "0.7124228", "0.7046149", "0.69937736", "0.69937736", "0.69608873", "0.69598985", "0.6895616", "0.6848563", "0.6840733", "0.67986923", "0.6791...
0.0
-1
to store html collection
function getClick(e) { e = e || window.event; return e.target || e.srcElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function JsontoHTML() {\n $(\"ul.items\").empty()\n all_html = []\n for (let i = 0; i < databaseObj.length; i++) {\n c = databaseObj[i];\n let keywrd = (JSON.parse(c[\"keywords\"]))\n kwrds = []\n for (let a = 0; a < keywrd.length; a++) {\n ...
[ "0.6647457", "0.60552174", "0.6002884", "0.59399605", "0.5838625", "0.5827081", "0.57855606", "0.57566094", "0.57293445", "0.56944954", "0.56539434", "0.5632229", "0.561834", "0.55992216", "0.55947566", "0.5586075", "0.5570778", "0.55579096", "0.55519974", "0.5530367", "0.551...
0.0
-1
We've separated the `seed` function from the `runSeed` function. This way we can isolate the error handling and exit trapping. The `seed` function is concerned only with modifying the database.
async function runSeed() { console.log('seeding...') try { await seed() } catch (err) { console.error(err) process.exitCode = 1 } finally { console.log('closing db connection') await db.close() console.log('db connection closed') } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function runSeed() {\n console.log(\"seeding...\");\n console.log(\"HERE!!!\");\n try {\n await seed();\n } catch (err) {\n console.error(err);\n process.exitCode = 1;\n } finally {\n console.log(\"closing db connection\");\n await db.close();\n console.log(\"db connection closed\");\n...
[ "0.79851043", "0.7964306", "0.7939044", "0.7939044", "0.7939044", "0.7939044", "0.7939044", "0.7939044", "0.7938258", "0.7938258", "0.7938258", "0.7938258", "0.7938258", "0.7938258", "0.7938258", "0.79326856", "0.7923604", "0.78971183", "0.7885811", "0.7885811", "0.78702193",...
0.7975426
53
hago mis funciones para cada boton
function videoProperties() { // r = video1.width/video1.height; w = video1.width; h = video1.height; // console.log(w,h); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function activarBotones() {\r\n botones.forEach((valor, index) => {\r\n document.querySelector(\".\" + botones[index]).onclick = function() {\r\n clickBoton(index);\r\n };\r\n });\r\n}", "function alternar() {\n //buscamos todos los botones\n for (let numero = 1; numero <= 8; numero++) {\n ...
[ "0.70142555", "0.6457931", "0.6429148", "0.63977444", "0.63619024", "0.63480407", "0.6338245", "0.6312208", "0.62270004", "0.61841613", "0.61580515", "0.6118978", "0.61043125", "0.6101118", "0.60777396", "0.606824", "0.5990095", "0.5972925", "0.5947832", "0.59340566", "0.5933...
0.0
-1
get random item functions
function getRandomIndex(array) { return Math.floor(Math.random() * array.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function random_item(items) {\n\n return items[Math.floor(Math.random() * items.length)];\n\n}", "random (items) {\n return items[Math.floor(Math.random() * items.length)]\n }", "function randomItem(level){ return randomSomthing(level, \"item\"); }", "function Choice(items){\n //we'll use Math.ran...
[ "0.688297", "0.6862639", "0.68197256", "0.65283126", "0.6502996", "0.6396536", "0.62695515", "0.61840713", "0.61354643", "0.60645837", "0.604388", "0.6016131", "0.5985316", "0.59425807", "0.59263", "0.5926043", "0.5926043", "0.59184164", "0.5903982", "0.5899362", "0.58891785"...
0.0
-1
Check if there is a connection already from the same client, and if there is, force disconnect the old connection.
init() { this.get('socketId').then((oldSocketId) => { if (oldSocketId !== null && this._io['sockets']['connected'].hasOwnProperty(oldSocketId)) { this.logger.log('detected a new connection from the same client' + ' | disconnecting the old connection of socket id: ' + this._soc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeConnection(connection) {\n if(connection.connectionString in this._connections) {\n delete this._connections[connection.connectionString];\n return true;\n } else {\n // redunadncy in case the off case the client doesnt realize that it already holds a connect\n...
[ "0.6567873", "0.6537074", "0.63737917", "0.6300937", "0.6189861", "0.60704637", "0.59791964", "0.59401953", "0.59080607", "0.5843559", "0.5828843", "0.5800123", "0.5777553", "0.57633066", "0.5751648", "0.574256", "0.5738429", "0.5731314", "0.5723127", "0.5723127", "0.5723127"...
0.6450499
2
Get value of the key in session, or return everything..
get(key) { var promise = new Promise((resolve, reject) => { this._get().then((data) => { if (typeof key !== 'undefined') { if (data.hasOwnProperty(key)) { resolve(data[key]); } else { resolve(null); } } else { resolve(data); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSessionValue(key) {\n\treturn sessionStorage[key];\n}", "function getSessionItem(key) {\n\treturn sessionStorage.getItem(key);\n}", "function getValueFromSession(key){\n\tif (hasStorage()) {\n\t\treturn thisX.eval('__xstorage = ' + sessionStorage.getItem(window.xuser.id + '|' + key) + ';');\n\t}\n\...
[ "0.8162683", "0.77573425", "0.7740047", "0.7552712", "0.7402659", "0.73634684", "0.73337257", "0.72498274", "0.7086788", "0.7067165", "0.7067165", "0.70278287", "0.6982234", "0.6917735", "0.67651117", "0.67651117", "0.66501456", "0.66137654", "0.652771", "0.6526782", "0.65252...
0.0
-1
Set key/value to session.
set(key, value) { var promise = new Promise((resolve, reject) => { this._get().then((data) => { data[key] = value; this._redisClient.set(this._key, JSON.stringify(data), (err) => { if (err) { reject(); } else { resolve(); } }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSession(key, value) {\n sessionStore.setItem(key, value);\n }", "function setSessionValue(key, value) {\n\tsessionStorage[key] = value;\n}", "setToSession(key, value) {\n // Save data to sessionStorage\n sessionStorage.setItem(key, value);\n // this.set(key, value);\n }"...
[ "0.83486366", "0.81298137", "0.80939436", "0.7683613", "0.76821077", "0.7557644", "0.74724144", "0.70550966", "0.7008804", "0.700811", "0.69940907", "0.69334", "0.685903", "0.6709836", "0.6709836", "0.6698501", "0.6698501", "0.667598", "0.66574883", "0.66574883", "0.66163284"...
0.0
-1
The main node definition most things happen in here
function SonarNode(n) { // Create a RED node RED.nodes.createNode(this,n); this.period = n.period; // Command for starting to listen sonar sensor's values var command = '/usr/bin/mindstorm_send sonar_set'; exec(command, function(err, stdout, stderr) { if(err) { console.log('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NodeDef(){}", "function NodeDef() {}", "function NodeDef() {}", "function NodeDef() {}", "function node(){}", "function NodeDef() { }", "function NodeDef() { }", "function Node(){}", "function RNode() {}", "function RNode() {}", "function RNode() {}", "function RNode(){}", "functio...
[ "0.7636373", "0.7487461", "0.7487461", "0.7487461", "0.7426555", "0.7321752", "0.7321752", "0.721537", "0.71851975", "0.71851975", "0.71851975", "0.71680415", "0.71431184", "0.69844556", "0.6979275", "0.6979275", "0.6979275", "0.69661963", "0.69443053", "0.69443053", "0.69197...
0.0
-1
the intro screen will be the curtain and upon scroll we also want to trigger zoomin from finished scroll
function unwrap(selector) { var el = document.querySelector(selector); // select element to unwrap (the container element) var parent = el.parentNode; // get the element's parent node while (el.firstChild) parent.insertBefore(el.firstChild, el); // move all children out of the element parent.removeChild(el); //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scroll() {\n var myElement = $(\"#heede_wrapper\");\n\n var interactiveWatcher = scrollMonitor.create(myElement, {\n top: -RH,\n bottom: -0.5 * RH\n });\n\n interactiveWatcher.enterViewport(function() {\n setTimeo...
[ "0.66593075", "0.65615803", "0.6503119", "0.6341455", "0.63289356", "0.6274056", "0.6254943", "0.6224395", "0.6217232", "0.61960644", "0.61517626", "0.6145413", "0.6139692", "0.6110351", "0.6099453", "0.6094187", "0.60563153", "0.6023642", "0.6022608", "0.6001916", "0.5992827...
0.0
-1
ringCalculations() === Get simulation data ===
function getData(clusterNumber, nodeNumber, clusterCenter, circleRadius) { var nodes = []; d3.range(clusterNumber).forEach(function(el) { d3.range(nodeNumber).forEach(function(elt) { var obj = {}; obj.cluster = el; obj.radius = 2; obj.colour = '#fff'; obj.x = clusterCenter[el][0] + circleRadius *...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getData() {\n return {\n ergReps: ergReps,\n bikeReps: bikeReps,\n repRate: repRate,\n totTime: totTime,\n Distance: Distance\n }\n }", "startData() { return {\r\n unlocked: false,\r\n points: new Decimal(0),\r\n ...
[ "0.628747", "0.58880615", "0.58424807", "0.58331215", "0.58284396", "0.57857466", "0.57830083", "0.5749388", "0.5711974", "0.5668126", "0.56492573", "0.56367224", "0.56002665", "0.55680627", "0.55644697", "0.55311763", "0.5511586", "0.55056113", "0.5501736", "0.5446827", "0.5...
0.0
-1
=== Databind and draw ===
function databind(data) { var join = custom.selectAll('custom.circles') .data(data); var enterSel = join.enter() .append('custom') .classed('circles', true) .attr('cx', function(d) { return d.x; }) .attr('cy', -10) .attr('r', function(d) { return d.radius; }) .attr('fillStyle', '#5892A9'); join .m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw(){\n\t\t// Needed to comply with Tool Delegate design pattern\n\t}", "function dnObj() {\n\t\t\t\tvar selectOb = canvas.getActiveObject();\n\t\t\t\tcanvas.sendBackwards(selectOb).renderAll();\n\n\t\t}", "function updateDraw(){\r\n //ToDo\r\n }", "function finalDraw() {\n\t Shap...
[ "0.62853", "0.62206763", "0.60891074", "0.60401195", "0.6034586", "0.5984512", "0.59230936", "0.59017193", "0.58932287", "0.58891493", "0.5857327", "0.579818", "0.57762235", "0.57578236", "0.573638", "0.5735609", "0.5714709", "0.57014287", "0.5698252", "0.5682272", "0.5682272...
0.5890392
9
component did mount calls searchEmployees
componentDidMount() { this.searchEmployees(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.searchEmployees();\n }", "componentDidMount() {\n this.searchEmployees();\n }", "componentDidMount() {\n this.searchEmployees();\n }", "componentDidMount() {\n this.searchEmployee();\n }", "componentDidMount() {\n this.searchEmployee();\n }...
[ "0.8424598", "0.8424598", "0.8401629", "0.8119443", "0.81176484", "0.79893565", "0.78469884", "0.74311364", "0.73612654", "0.73603374", "0.71982276", "0.71300673", "0.7074379", "0.6984284", "0.69299835", "0.6890568", "0.68832576", "0.6866486", "0.6767482", "0.67548186", "0.67...
0.8287258
3
Map over this.state.cards and render a cardCard component for each card object
render() { return ( <Wrapper> <Hero score={this.state.score} message={this.state.message} /> <Columns> {this.state.legos.map(card => ( <Card // clickCount={this.clickCount} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderCards(cards) {\n return cards.map((card, i) => <Card key={i} payload={card.structValue} />);\n }", "renderCards(cards) {\n return cards.map((card, i) => <Card key={i} payload={card.structValue} />);\n }", "render() {\n \treturn (\n //provide unique key such as for example the id picke...
[ "0.82561547", "0.8069084", "0.801956", "0.8008297", "0.7630746", "0.76042116", "0.7575124", "0.75222844", "0.74754983", "0.7452784", "0.74199533", "0.74195683", "0.73907095", "0.72774017", "0.72405106", "0.7231358", "0.7223577", "0.7144392", "0.7119147", "0.7084314", "0.70750...
0.0
-1
Show upto the last 20 tweets and when they were created at in your terminal/bash window.
function myTweets(action) { if (action == undefined) { action = ""; } //setting action to be to be a defualt account, but the user can also pass in any other account var params = { screen_name: action }; client.get('statuses/user_timeline', params, function(error, tweets, response) { if (!error) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twitter(){\n//This will show your last 20 tweets and when they were created at in your terminal/bash window//\n }", "function tweets(){\n\tclient.get('statuses/user_timeline', { count: '20'}, function(error, tweets, response) {\n \t\tif(error) throw error;\n \t\tconsole.log(\"Here are your most recent...
[ "0.85189277", "0.7761693", "0.75400275", "0.73976356", "0.72856855", "0.7274222", "0.725666", "0.7246203", "0.70837957", "0.70671034", "0.7027064", "0.7019523", "0.7017081", "0.6946556", "0.6943415", "0.6922747", "0.69169444", "0.6897989", "0.68628275", "0.6861856", "0.684743...
0.63773435
58
node liri.js spotifythissong '': This will show the following information about the song in your terminal/bash window: ~Artist(s) / ~song's name / ~Preview link of the song from Spotify / ~The album that the song is from If no song is provided then your program will default to "The Sign" by Ace of Base.
function spotifyThisSong() { var songName = ""; //move over all of the entered words to for (var i = 3; i < input.length; i++) { if (i > 3 && i < input.length) { songName = songName + "+" + input[i]; } else { songName += input[i]; } } if (songName ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displaySpotify() {\n if (process.argv[3]) {\n spotifySong = process.argv[3];\n }\n spotify\n .search({ type: 'track', query: spotifySong })\n .then(function (response) {\n\n dataOutPut = \"\\n\" + commandRequest + \"\\n----------------------------------------------...
[ "0.7789368", "0.77548826", "0.7749857", "0.7712233", "0.76860404", "0.7679788", "0.7636584", "0.7633553", "0.76106334", "0.7604339", "0.7596033", "0.7533625", "0.7532804", "0.75259835", "0.7507958", "0.7481", "0.7477045", "0.74714977", "0.74568754", "0.74454", "0.7443952", ...
0.7248379
40
node liri.js moviethis '': This will output the following information to your terminal/bash window: Title of the movie. Year the movie came out. IMDB Rating of the movie. Rotten Tomatoes Rating of the movie. Country where the movie was produced. Language of the movie. Plot of the movie. Actors in the movie. If the user...
function movieThis() { var movieName = ""; //move over all of the entered words to for (var i = 3; i < input.length; i++) { if (i > 3 && i < input.length) { movieName = movieName + "+" + input[i]; } else { movieName += input[i]; } } if (movieName ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMovieInfo() {\n\n\t//If the movie name is longer than one word, join the words together on one line so that the movie name is all one string.\n\t//Rather than having separate lines for each word.\n\tfor (var i = 3; i < input.length; i++) {\n\n\t\tif (i > 2 && i < input.length) {\n\t\t\tmovieName = movi...
[ "0.825228", "0.8142008", "0.8133631", "0.8052461", "0.8026667", "0.79922473", "0.7982133", "0.79661363", "0.7954981", "0.7948924", "0.7945095", "0.79416364", "0.79280037", "0.78970027", "0.7894333", "0.7879086", "0.7842748", "0.78318053", "0.7827883", "0.78166074", "0.7800807...
0.7793543
22
node liri.js dowhatitsays: Using the fs Node package, LIRI will take the text inside of random.txt and then use it to call one of LIRI's commands.: It should run spotifythissong for "I Want it That Way," as follows the text in random.txt. Feel free to change the text in that document to test out the feature for other c...
function doWhatItSays() { fs.readFile("random.txt", "utf8", function(error, data) { if (error) { return console.log(error); } //push the information into a variable holder and split the information on the "," var txtData = data.split(","); //push the information i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doWhatItSays() {\n fs.readFile(\"random.txt\", \"utf8\", function(err, data) {\n if (err) return err;\n console.log(data);\n var commands = data.split(\"\\n\");\n // console.log({ commands });\n\n commands.forEach(function(commandStr) {\n var args = commandStr.split(\", \");\n va...
[ "0.76567644", "0.7494304", "0.7490158", "0.7461731", "0.73773575", "0.73390967", "0.73259604", "0.7306511", "0.73010725", "0.72985995", "0.7258707", "0.72417134", "0.7235221", "0.7202775", "0.7183959", "0.71504205", "0.71437776", "0.71081376", "0.70916325", "0.7083938", "0.70...
0.0
-1
output: a new array, even positions come from the first array, odd positions from 2nd array. algorithm: create new array. loop through, if the index is even,push the element with index at the same position from the first array, if the index is odd, push the element with index at that position from 2nd array.
function combinedArray(even, odd) { var combined = []; var i; for (i = 0; i < even.length; i += 1) { combined.push(even[i], odd[i]); } return combined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function oddIndexed() {\n\tfor (i = 0; i < oldArray.length; i++) {\n\t\tif (i % 2 !== 0) {\n\t\t\tnewArray.push(oldArray[i] * 2);\n\t\t}\n\t\telse {\n\t\t\tnewArray.push(oldArray[i]);\n\t\t}\n\t}\n}", "function mergeTwo(arr1, arr2) {\n let output = [];\n let i = 0;\n let j = 0;\n let current = 0;\n\n...
[ "0.7115503", "0.7071525", "0.6998084", "0.68876916", "0.6797167", "0.678355", "0.67319965", "0.6657531", "0.66248316", "0.6593792", "0.6587433", "0.6579081", "0.6545414", "0.65397155", "0.65178794", "0.6503802", "0.64705086", "0.64605075", "0.6443706", "0.6442548", "0.6418176...
0.7055097
2
Build `states` list of key/value pairs
function loadAll() { var allStates = '2016, 2015, 2014, 2013, 2012, 2011, 201O, 2009,\ 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000'; return allStates.split(/, +/g).map( function (state) { return { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildPropertyStates() {\n // create an object to eventually return (it starts out empty)\n // iterate over all of the KEYS of whatever's exported from 'game/utils/name.js'\n // given a key from name.js, figure out if it is state-worthy (i.e., property, utility)\n // if it is --> '3': new Propert...
[ "0.65534747", "0.61932826", "0.61635494", "0.60413367", "0.5995308", "0.5913922", "0.58329886", "0.5785845", "0.57713485", "0.5703642", "0.5703642", "0.5647769", "0.56358826", "0.56301814", "0.5626067", "0.55810326", "0.55712867", "0.5570318", "0.55534786", "0.5551865", "0.55...
0.56616473
11
Create filter function for a query string
function createFilterFor(query) { var lowercaseQuery = angular.lowercase(query); return function filterFn(state) { return (state.value.indexOf(lowercaseQuery) === 0); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter() {\n //Create a copy of the queryStr\n const queryStrCopy = {...this.queryStr};\n\n //Removing different types of filters from the queryStrCopy\n const removeFields = ['sort', 'fields', 'q', 'limit', 'page'];\n removeFields.forEach( el => delete queryStrCopy[el])\n\n ...
[ "0.71450585", "0.7033664", "0.6854716", "0.6826466", "0.6811337", "0.6803393", "0.6778003", "0.67749566", "0.67666936", "0.6743364", "0.6740141", "0.6726036", "0.67157257", "0.67148614", "0.67112994", "0.6707268", "0.6705722", "0.6705116", "0.66998726", "0.66976374", "0.66929...
0.6849926
3
si un numero x > 0 = x && x <= 0 = x
function valorAbsoluto(num){ if(num <= 0){ console.log((-1)); }else{ console.log(num); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function positive(x) {\r\n return x > 0;\r\n}", "function lessThanOrEqualToZero(num) {\n if(num <= 0){\n return true;\n } else{\n return false;\n }\n}", "function printUpTo(x){\n if(x<0){\n console.log(\"Number is negitive\")\n return false;\...
[ "0.7241525", "0.6892473", "0.6860904", "0.6839835", "0.67420936", "0.6727268", "0.66913927", "0.6677115", "0.6662001", "0.66602325", "0.6638233", "0.6635955", "0.66259474", "0.6624965", "0.6584612", "0.6584612", "0.6572138", "0.6558908", "0.6555556", "0.65533197", "0.6549994"...
0.6057618
71
[1, 2, 3], [7, 4, 1], [2][0] [1][0] [0][0] [4, 5, 6], ==> [8, 5, 2], === [2][1] [1][1] [0][1] [7, 8, 9] [9, 6, 3] [2][2] [1][2] [0][2] This works but could prob be better
function rotate(mat) { var rotated = new Array(mat.length).fill().map(() => Array(mat.length).fill()); for (let i = 0; i < mat.length; ++i) { var y = mat.length - 1 - i; for (let j = 0; j < mat[i].length; ++j) { // [0][0] => [0][2] [1][0] => [0][1] // [0][1] => [1][2] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bustOpenPairs(arr){\n for (let y = 0; y < arr.length; y++) { // Moving between items and searching arrays who have 2 items and they are the same on x.\n for (let x = 0; x < arr[y].length; x++) {\n if (typeof arr[y][x] === \"object\" && arr[y][x].length === 2) { \n for (let m = 0; m...
[ "0.61629885", "0.6144879", "0.6035891", "0.6028729", "0.60186344", "0.59980017", "0.5914234", "0.58659375", "0.5865844", "0.5852113", "0.5818686", "0.57500446", "0.57478064", "0.57477003", "0.57410216", "0.57366866", "0.57211226", "0.57149744", "0.5713056", "0.5710488", "0.57...
0.0
-1
fixing error runtime vue
extend(config, ctx) { config.resolve.alias['vue'] = 'vue/dist/vue.common'}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vt(e,t){if(!e){throw new Error(\"[vue-router] \"+t)}}", "function JV(e,t){\"undefined\"!=typeof console&&(console.warn(\"[vue-i18n] \"+e),t&&console.warn(t.stack))}", "function e(t,n){if(!t)throw new Error(\"[vue-router] \"+n)}", "function e(n,t){if(!n)throw new Error(\"[vue-router] \"+t)}", "func...
[ "0.6678918", "0.65346354", "0.63690346", "0.6344937", "0.63356966", "0.63356966", "0.63356966", "0.63356966", "0.63356966", "0.63356966", "0.63356966", "0.63356966", "0.63356966", "0.6282999", "0.6282999", "0.6282999", "0.6282999", "0.6282999", "0.6282999", "0.6282999", "0.62...
0.0
-1
calls input and output functions on button click
function onButton(){ input(); output(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleBtn() {\r\n let inputValue = inputElement.value;\r\n getDataFromApi(inputValue);\r\n}", "click() {\n console.log('the input', this.theInput, this.theInput.value);\n getData(this.theInput.value);\n }", "function processClickFunction(){\n alert(\"Thomas Fracassi: \" + inputvar.value);\...
[ "0.6696698", "0.66290516", "0.6616131", "0.65889233", "0.64748734", "0.63376355", "0.63063973", "0.62672776", "0.6232879", "0.6215237", "0.6174942", "0.61359745", "0.61305875", "0.61274254", "0.61235523", "0.611441", "0.60919684", "0.6059933", "0.6017966", "0.6010443", "0.600...
0.8336926
0
data from html to java
function input() { month = parseInt(document.getElementById("month").value); day = parseInt(document.getElementById("day").value); signNum = giveSignNum (month,day); console.log(signNum); name = document.getElementById("name").value; console.log(name); printSign=sign(signNum); console.lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTableDataFromHtml() {\n\n }", "set data(html: string) {\n const data = parseHtml(html, {\n onTransform: this.transformNode,\n allowScript: true,\n });\n this._data = data;\n }", "getElement(data){\n var html = \n `<div class=\"singl...
[ "0.5959145", "0.57122505", "0.56928587", "0.56787944", "0.566221", "0.54746956", "0.5465645", "0.53507876", "0.53297114", "0.5307876", "0.53056145", "0.5244824", "0.52390206", "0.52288103", "0.5216923", "0.521374", "0.5203925", "0.519119", "0.51802206", "0.51314497", "0.50957...
0.0
-1
Assings a number to corrospond to sign
function giveSignNum (month,day){ console.log(month); console.log(day); if ((month==3 && day>=21) || (month==4 && day<=19)){ signNum=0 } if ((month==4 && day>=20) || (month==5 && day<=20)){ signNum=1 } if ((month==5 && day>=21) || (month==6 && day<=20)){ signNum=2 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSignOfNumber ( number ) {\n\treturn number >= 0 ? \"+\" : \"-\";\n}", "function sign(num) {\n\tlet numSign;\n\tif (num < 0) {\n\t\tnumSign = -1;\n\t} else if (num > 0) {\n\t\tnumSign = 1;\n\t} else {\n\t\tnumSign = 0;\n\t}\n\n\treturn numSign;\n}", "function sign(val){return val >= 0?1:-1;}", "fu...
[ "0.76371044", "0.7585839", "0.7557663", "0.7395186", "0.7285106", "0.7236088", "0.72120714", "0.7199292", "0.71785975", "0.71244305", "0.712061", "0.7103724", "0.7101299", "0.7101299", "0.7101299", "0.708035", "0.7033033", "0.7033033", "0.70201284", "0.70004994", "0.69958395"...
0.0
-1
assigns message for sign
function getMessage (signNum){ var messageIndex=["You will succeed in computer programing.", "You will die alone.", "There is someone standing right behind you.", "You will not get a 4.0 in highschool.", "Your shirt doesn't match your pants.", "You would be well advised to avoid boats this year.", "Your best frien...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sign(message,key = this.seckey){\n return ticCommon.sign(message,key)\n }", "async signMessage(msg){\n let key = await this.getPrivateKey()\n msg.signMessage(key);\n return msg;\n }", "sign() {\n this.app.post(\"/messages/sign\", async (req, res) => {\n const { address...
[ "0.6936009", "0.6681865", "0.6608691", "0.6485637", "0.63528115", "0.6258827", "0.62561953", "0.6240948", "0.5869541", "0.5837002", "0.58103955", "0.5803334", "0.5799624", "0.57103324", "0.568001", "0.56226206", "0.56109494", "0.55569965", "0.55477095", "0.55447894", "0.55127...
0.52323097
46
compiles name, sign, and message into one sentance
function finalMessage (name, printSign, message){ return ("Hello " + name + "! Your sign is " + printSign + " and your horoscope message is: " + message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_message_to_sign(param_types, params, nonce, function_name, sender){\n params.push(nonce);\n param_types.push(\"uint256\");\n params.push(function_name);\n param_types.push(\"string\");\n //var encoded_a = abi.rawEncode([ \"address\",\"uint256\", \"string\"], [ wallet2, nonce, \"add_sign...
[ "0.58214945", "0.5782968", "0.57680917", "0.5603462", "0.5533218", "0.5524376", "0.5520772", "0.5520772", "0.5520772", "0.5520772", "0.5520772", "0.5520772", "0.5438814", "0.53923845", "0.53489256", "0.5296913", "0.5293699", "0.5236054", "0.5179622", "0.5173541", "0.51450366"...
0.63725543
0
data from java to html
function output (){ document.getElementById("finalMessage").innerHTML = finalMessage(name, printSign, message); document.getElementById("image").innerHTML = "<img src= img/"+ getImage(signNum)+ "/>"; document.getElementById("birthdayMessage").innerHTML = getBirthday(month,day); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render(data){\n //Map: crea un nuevo arreglo, y por cada elemento devuelve un string, se junta en un string grande(pero queda muy desprolijo y feo), entonces para eso se usa join\n let html = data.map(mje =>{\n return (`\n <p> \n <strong class= \"autor_txt\">${mje.a...
[ "0.64942545", "0.62405145", "0.62362045", "0.6135475", "0.60663", "0.60496694", "0.6003418", "0.5906477", "0.5865653", "0.57986885", "0.57591045", "0.5737431", "0.5737141", "0.5705842", "0.5695359", "0.56814635", "0.56591177", "0.5624671", "0.5579259", "0.55792", "0.55775034"...
0.0
-1
Q5: Check Odd or Even.......................
function oddEven() { for(i=0;i<=15;i++) { if(i==0) { console.log(i+" even"); document.getElementById("output5").innerHTML+=i+" is"+" Even"+'<br>'; } else if(i%2==0) { console.log(i+" Even"); document.getElementById("output5").innerHTML+=i+" is"+...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function oddChecker(num){\n\treturn num % 2 !== 0\n}", "function check_Even_or_Odd(n){\n\nif (n%2==0)\n{\nreturn false\n}\nelse \nsum_even_numbers(n)\nreturn \n}", "function odd(num){\n return !even(num)\n}", "function isOdd( value ){ return (value & 1); }", "function odd(n) {\n return n % 2 !== 0;\n ...
[ "0.7858251", "0.76506984", "0.7618666", "0.76131964", "0.7607526", "0.7598464", "0.75815964", "0.75537246", "0.755275", "0.7541538", "0.7525213", "0.75205314", "0.7513772", "0.75091136", "0.7496663", "0.7494925", "0.7491767", "0.7477698", "0.7469589", "0.74683785", "0.7452345...
0.0
-1
Q8: Arrange array in alphabetical order.............
function arrange() { var x,output=""; var str=document.getElementById("txt8").value; var strArray=str.split(","); console.log(strArray); out=strArray.sort(); console.log(out); for(x in strArray) { output+=strArray[x]+"<br>"; } document.getElementById("output8").innerHTML=output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alphabeticalOrder(array) {\n if (array instanceof Array) {\n let localArray = [...array];\n localArray.sort();\n return localArray;\n } else {\n return \"Invalid\";\n }\n}", "function orderAlphabetically() {}", "function alphabeticalOrder(arr) {\n // Add your code below this line\n ...
[ "0.753595", "0.74100167", "0.7403669", "0.73385555", "0.73274106", "0.72700804", "0.71873486", "0.708484", "0.70484686", "0.703326", "0.70307744", "0.7020067", "0.70169127", "0.70079553", "0.6973268", "0.6956585", "0.69557405", "0.69406056", "0.69274825", "0.6890585", "0.6868...
0.64943546
59
Configure tabs for Inventory
function setTabs(){ jQuery("#tabs").tabs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ConfigureTabs() {\n\n // hide/show pricing tab\n var priceTab = $find(tabStripId).findTabByValue(\"pricing\");\n var accountsTab = $find(tabStripId).findTabByValue(\"accounting\");\n if (GetRegTypeValue() == \"Fee\") {\n priceTab.set_enabled(true);\n accou...
[ "0.6656722", "0.64531296", "0.63520277", "0.6124666", "0.6010859", "0.59803325", "0.594273", "0.5819842", "0.57819176", "0.5776663", "0.57462245", "0.5714419", "0.5616951", "0.5599215", "0.5542902", "0.55240494", "0.55220926", "0.55181473", "0.54789394", "0.5477724", "0.54731...
0.0
-1
Center popup in middle of window relative to window size
function centerPopup(popup){ var windowWidth = document.documentElement.clientWidth; var windowHeight = document.documentElement.clientHeight; var popupHeight = jQuery("#" + popup).height(); var popupWidth = jQuery("#" + popup).width(); jQuery("#" + popup).css({ //Look at adjusting popup positi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function centralizar() {\r\n $(\".popup\").css(\"position\",\"absolute\");\r\n $(\".popup\").css(\"top\", Math.max(0, (($(window).height() - $(\".popup\").outerHeight()) / 2) + $(window).scrollTop()) + \"px\");\r\n $(\".popup\").css(\"left\", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) + $(wind...
[ "0.8005676", "0.79704136", "0.7915119", "0.7613415", "0.756602", "0.7414494", "0.7098407", "0.70918614", "0.7022467", "0.69493955", "0.6891255", "0.674802", "0.67475975", "0.67325985", "0.67039174", "0.65814334", "0.6579933", "0.6575506", "0.6533796", "0.6504571", "0.65011936...
0.8194461
0
Open, close and style popup windows
function openPopup(popup){ if(popupStatus == 0){ jQuery("#opaque").css("opacity", "0.1"); centerPopup(popup); jQuery("#" + popup).fadeIn("slow"); popupStatus = 1; jQuery(".popupClose").click(function(){ closePopup(); }); jQuery(".popupClose").mouseover(function(){ jQuery(".popupC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function popWin(url) {\n closePopup();\n curPopupWindow = window.open(url,\"win\",\"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=550,height=300\",false);\n}", "function popup(windowname){\n\tblanket_size(windowname);\n\twindow_pos(windowname);\n\ttoggle('blanket');\n...
[ "0.742013", "0.7391881", "0.7358941", "0.7112776", "0.7095622", "0.69862944", "0.69623494", "0.69587636", "0.6952958", "0.6952891", "0.6938023", "0.68944603", "0.68891674", "0.68474627", "0.68278956", "0.6818579", "0.6807119", "0.6794812", "0.67832017", "0.6780603", "0.677412...
0.0
-1
Change Search field color based on value
function isEmail(email) { var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; return regex.test(email); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchNhighlight(searchvalue, search, color)\r\n{\r\n var sub = searchvalue.toLowerCase();\r\n var elements = document.getElementsByClassName(search);\r\n if(sub != '') //if the text box is not empty\r\n for(var i = 0; i < elements.length; i++)\r\n {\r\n var se...
[ "0.68209964", "0.68019265", "0.67109776", "0.6506211", "0.6368782", "0.62993306", "0.6213887", "0.6213887", "0.61666363", "0.6138208", "0.61299765", "0.610301", "0.59531915", "0.59266454", "0.5859204", "0.58336294", "0.582058", "0.57977134", "0.57974577", "0.57761735", "0.577...
0.0
-1
Simplifies and returns Poke details
getPokeDetails(){ let pokeData = this.props; return { name: pokeData.name, imgData: this.getPokeImgs(pokeData.sprites), type: this.getPokeType(pokeData.types), hp: pokeData.base_experience } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function implant(pk){\n let Poke = new Pokemon(pk.name, pk.abilities, pk.sprites, pk.types);\n let move = \"\";\n let poketype = \"\";\n for(let x= 0; x< Poke._abilities.length; x++){\n move = move + \" \" + Poke._abilities[x].ability.name + \", \";\n }\n move = move.substring(0,move.leng...
[ "0.5771344", "0.53551674", "0.52909726", "0.52709305", "0.5257364", "0.52265143", "0.51820433", "0.518163", "0.5153218", "0.5140872", "0.51337135", "0.50499296", "0.50345886", "0.5021291", "0.50030327", "0.49772432", "0.4975256", "0.49246016", "0.4900759", "0.48648953", "0.48...
0.6549477
0
Create the CSV files for the Site Survey selected for export
function makeCSV() { var siteID = $.surveyPkr.getSelectedRow(0).siteID; var siteName = $.surveyPkr.getSelectedRow(0).title; try{ // Query the database based on the siteID selected var db = Ti.Database.open('ltemaDB'); // Get the transects for the site var transects = db.execute('SELECT prk.park_name, tc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "export_trial_data() {\n let trial_data = jsPsych.data.get().filterCustom(function (row) {\n return row.block_type === \"practice\" || row.block_type === \"test\";\n })\n // These are variables forced on by jsPsych\n .ignore('stimulus')\n .ignore('key_press')\n ...
[ "0.67240846", "0.6203851", "0.6203617", "0.6168871", "0.60751146", "0.60606205", "0.58707017", "0.58707017", "0.5850612", "0.58265334", "0.581807", "0.57714266", "0.5737404", "0.571241", "0.5699233", "0.56726193", "0.5603721", "0.5591227", "0.557519", "0.5571167", "0.5556114"...
0.73103434
0
Salva os dados do SAP HANA no
async async_salva_hana_on_sqlite( data, unidade, callback ){ console.log('Iniciou importacao do hana', data); const conn = hana.createConnection(); const qry_mapa_descarregamento = ` SELECT TOP 100 B."TKNUM" AS "ID", B."Plant" AS "Unidad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearTablaEscalerasValoresObservacionFinal(){\n db.transaction(function (tx) {\n tx.executeSql('CREATE TABLE escaleras_valores_finales (k_codusuario,k_codinspeccion,o_observacion)');\n }, function (error) {\n console.log('transaction error: ' + error.message);\n }, function () {\n $('#texto_ca...
[ "0.60184234", "0.595322", "0.59145766", "0.59101003", "0.5882649", "0.58446604", "0.57853156", "0.560531", "0.55924225", "0.5582849", "0.55770564", "0.5569637", "0.5526476", "0.55175066", "0.5514931", "0.5500096", "0.54997975", "0.5489457", "0.5483207", "0.5417846", "0.541541...
0.59572774
1
Modulo para atualizar um dado dentro do sqlite
async atualiza_status_descarregamento( request, response ){ const { ID, Status, Peso, Comentario, Atualizado_por } = request.body; const [{ Unidade, Placa, Dia, Chegada }] = await connection('fDescarregamento') .select('*') .where...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async salva_descarregamento_sqlite_v2({ ID, Unidade, Placa, Dia, Transportadora, Modal, Nome, Materiais }){\n\n const Atualizado = module.exports.agora();\n\n // Procura um item igual no sqlite\n const db_caminhao = await connection('fDescarregamento')\n .s...
[ "0.66924256", "0.6516059", "0.60039616", "0.59462565", "0.5925077", "0.59049106", "0.5886685", "0.5882217", "0.58759713", "0.5859265", "0.58523387", "0.5818558", "0.581654", "0.5793042", "0.57884634", "0.5755156", "0.5746383", "0.5726665", "0.57159305", "0.57083017", "0.57041...
0.5293576
89
Modulo para buscar os dados referentes a um caminhao especifico no sqlite
async busca_todos_os_dados( caminhoes ){ const caminhoes_c_dados = Promise.all( caminhoes.map( async (item) => { const caminhao = await connection('fDescarregamento') .select('*') .where( 'ID', '=', item...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CargarListado(tx) {\n\tif(busqueda!=null){\t\n\t console.log(\"SELECT sub.id_linea, sub.id_sublinea, art.nom_articulo, art.referencia, art.serie, placa_nueva, placa_anterior, art.id_envio, marca, id_estado, art.id_articulo,art.fecha_fabricacion FROM publicarticulo art LEFT JOIN publicsublinea sub...
[ "0.6462117", "0.62710875", "0.6162549", "0.61422867", "0.61124766", "0.6067161", "0.59347683", "0.59283954", "0.5902369", "0.5882863", "0.5879493", "0.5860903", "0.5817895", "0.5812593", "0.58124524", "0.58117926", "0.57959205", "0.57691115", "0.57636905", "0.5758871", "0.574...
0.58889157
9
DEPRECATED Modulo para salvar os dados do SAP no sqlite
async salva_descarregamento_sqlite({ ID, Unidade, Placa, Dia }){ const Atualizado = module.exports.agora(); // Procura um item igual no sqlite const db_caminhao = await connection('fDescarregamento') .select('*') .where(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async salva_descarregamento_sqlite_v2({ ID, Unidade, Placa, Dia, Transportadora, Modal, Nome, Materiais }){\n\n const Atualizado = module.exports.agora();\n\n // Procura um item igual no sqlite\n const db_caminhao = await connection('fDescarregamento')\n .s...
[ "0.6331277", "0.6013895", "0.5997384", "0.5890087", "0.58760947", "0.5791504", "0.57533145", "0.57485366", "0.5743116", "0.5728402", "0.5728335", "0.57131445", "0.56857914", "0.5682907", "0.56681234", "0.5662801", "0.56538296", "0.56477875", "0.56355816", "0.56218153", "0.562...
0.61849344
1
Modulo para salvar os dados do SAP no sqlite
async salva_descarregamento_sqlite_v2({ ID, Unidade, Placa, Dia, Transportadora, Modal, Nome, Materiais }){ const Atualizado = module.exports.agora(); // Procura um item igual no sqlite const db_caminhao = await connection('fDescarregamento') .select('*') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async salva_descarregamento_sqlite({ ID, Unidade, Placa, Dia }){\n\n const Atualizado = module.exports.agora();\n\n // Procura um item igual no sqlite\n const db_caminhao = await connection('fDescarregamento')\n .select('*')\n ...
[ "0.6512805", "0.6381617", "0.63596934", "0.6298334", "0.61984426", "0.6086247", "0.60558325", "0.60523593", "0.6036676", "0.60270673", "0.60247296", "0.60230285", "0.60046566", "0.5980455", "0.5946923", "0.59460694", "0.5942791", "0.5930297", "0.58864135", "0.58840185", "0.58...
0.6631732
0
DEPRECATED Modulo para organizar os dados vindos do SAP
formata_dados( resposta_HANA ){ const reducer = (r, row) => { const key_caminhao = `${row.ID} - ${row.Unidade} - ${row.Nome} - ${row.Placa} - ${row.Transportadora} - ${row.Modal} - ${row.Dia}`; const key_entrega = `${row.Item_pedido} - ${row.Cod_Material} - ${row.Material} - ${row.Remess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listar(ok,error){\n console.log(\"Funcionlistar DAO\")\n helper.query(sql,\"Maestro.SP_SEL_ENTIDAD_FINANCIERA\",[],ok,error)\n}", "VOIPLineServices(packName) {\n let url = `/pack/xdsl/${packName}/voipLine/services`;\n return this.client.request('GET', url);\n }", "abrirSessao(bd...
[ "0.5608964", "0.5510801", "0.5314692", "0.52516353", "0.5221136", "0.5219674", "0.51650697", "0.51529825", "0.51329887", "0.50991696", "0.5083607", "0.50792783", "0.50792783", "0.50463504", "0.50439066", "0.5012365", "0.50074065", "0.5006899", "0.49941325", "0.49922448", "0.4...
0.0
-1
Modulo para organizar os dados vindos do SAP
formata_dados_v2( resposta_HANA ){ const reducer = (r, row) => { const key_caminhao = `${row.ID} - ${row.Unidade} - ${row.Nome} - ${row.Placa} - ${row.Transportadora} - ${row.Modal} - ${row.Dia} - ${row.Transportadora} - ${row.Modal} -${row.Nome}`; const key_entrega = `${row...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abrirSessao(bd, usuario, hashSenha) {\n var resLogin = [];\n var papelUsuario = \"\";\n var colunasProjetadas = [\"nomeusuario\", \"senha\", \"carteira\"];\n var nomeColunaCarteira = \"carteira\";\n\n configuracoes.tabelas.forEach(function (nomeTabela, indice) {\n var resLoginTemp = interfaceBD...
[ "0.6104295", "0.57650167", "0.5743869", "0.5643411", "0.5506648", "0.54617786", "0.5446998", "0.54388493", "0.5428355", "0.54161197", "0.5391834", "0.5369109", "0.53348005", "0.53271025", "0.53168684", "0.53102624", "0.530381", "0.5273239", "0.52569884", "0.52569884", "0.5256...
0.0
-1
DEPRECATED Modulo para buscar os dados do SAP e mandar para o frontend
async get_descarregamento_data(request, response){ const { data, unidade } = request.body; console.log('Iniciou descarregamento', data); const conn = hana.createConnection(); const qry_mapa_descarregamento = ` SELECT TOP 100 B."TKNUM" AS "ID", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getData() {\n let cleanService = await CleanServiceModel.getCleanServiceById(id);\n setDitta(cleanService.ditta);\n setEmail(cleanService.email);\n setTelefono(cleanService.numeroTel);\n setDataAssunzione((new Date(cleanService.dataAssunzione.seconds * 1000)).toLoc...
[ "0.59037614", "0.5673321", "0.56270915", "0.5598368", "0.55840206", "0.55840206", "0.5548397", "0.5474095", "0.5444064", "0.5443036", "0.54264534", "0.54233754", "0.53886706", "0.5384939", "0.5336597", "0.53275365", "0.5325055", "0.5319158", "0.5301467", "0.5292288", "0.52806...
0.55606776
6
Modulo para retornar os dados de descarregamento do sqlite para o frontend
async get_descarregamento_data_v2( request, response ){ const { data: Dia, unidade: Unidade } = request.body; console.log('Iniciou descarregamento', Dia); const result = await connection('fDescarregamento') .select('*') .where({ Dia,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pet_view_db(tx){\n tx.executeSql('SELECT * FROM Pet',[], pet_view_data, errorDB);\n}", "function getEntries() {\n\n //\talert(\"getEntries\");\n dbShell.transaction(function (tx) {\n tx.executeSql(\"CREATE TABLE IF NOT EXISTS autos (id INTEGER PRIMARY KEY AUTOINCREMENT, Name TEXT NOT...
[ "0.69387364", "0.66940194", "0.66005355", "0.6515859", "0.65053326", "0.6432217", "0.6373373", "0.6369109", "0.63448423", "0.63264626", "0.63120997", "0.6301184", "0.6301184", "0.62811965", "0.6221423", "0.6215327", "0.6197023", "0.61850077", "0.6184969", "0.6128269", "0.6123...
0.65278345
3
add the class name to an element
function addClass(elem, className) { if (elem.classList) elem.classList.add(className) else { var oldClassName = elem.getAttribute('class'); elem.setAttribute('class', oldClassName.replace(className,'')+' '+className ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function classAdd(element, name) {\n var className;\n if (classContains(element, name)) {\n return;\n }\n className = element.className;\n if (className === '' || className === null || className === undefined) {\n element.className = name;\n } else {\n element.className = className...
[ "0.812218", "0.8113463", "0.80117786", "0.7778777", "0.77668816", "0.77140814", "0.7682305", "0.76712227", "0.7665977", "0.76588297", "0.7603758", "0.7603314", "0.759557", "0.75891906", "0.75891906", "0.75891906", "0.75891906", "0.75891906", "0.75891906", "0.75891906", "0.758...
0.0
-1
remove the class name from an element
function removeClass(elem, className) { if (elem.classList) elem.classList.remove(className) else elem.setAttribute('class', elem.getAttribute('class').replace(className,'') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeClassName(element, name) {\n if (hasClassName(element, name)) {\n var c = element.className;\n element.className = c.replace(new RegExp(\"(?:^|\\\\s+)\" + name + \"(?:\\\\s+|$)\", \"g\"), \"\");\n }\n }", "unsetClass(el, classname) {\n el.className = el.cl...
[ "0.8234219", "0.82137334", "0.8182005", "0.8112979", "0.80704224", "0.80704224", "0.80704224", "0.8065679", "0.80535096", "0.80535096", "0.80535096", "0.80535096", "0.80535096", "0.80535096", "0.80535096", "0.80521625", "0.8052133", "0.8052133", "0.8052133", "0.8052133", "0.8...
0.7607438
96
Merge two sorted linked lists and return it as a new sorted list. The new list should be made by splicing together the nodes of the first two lists. Example: Input: 1>2>4, 1>3>4 Output: 1>1>2>3>4>4
function ListNode(val, next) { this.val = val === undefined ? 0 : val; this.next = next === undefined ? null : next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeLists(head1, head2) {\n let node1 = head1;\n let node2 = head2;\n\n while (node1 && node2) {\n if (node1.value < node2.value) {\n if (node1.next) {\n if (node1.next.value > node2.value) {\n const temp0 = node1.next;\n node1.next = new Node(node2.value);\n ...
[ "0.79883623", "0.7769539", "0.76760453", "0.7549013", "0.75257874", "0.7443419", "0.7425601", "0.7297307", "0.71436346", "0.7096677", "0.70873326", "0.7074937", "0.6994918", "0.6965916", "0.6907927", "0.6854569", "0.6836009", "0.6789854", "0.67781544", "0.6772139", "0.6737962...
0.0
-1
Lee datos Producto por Producto que sigue
function readProducto() { const data = order[item] ? { codProd: order[item].codProducto, producto: order[item].nomProducto, rack: order[item].numRack, posicion: order[item].posicion, nivel: order[item].numNivel, estado: order[item].estado, } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "leerDatosProducto(producto){\n const infoProducto = {\n imagen : producto.querySelector('img').src,\n titulo: producto.querySelector('h6').textContent,\n precio: producto.querySelector('.precio span').textContent,\n id: producto.querySelector('a').getAttribute('da...
[ "0.7525786", "0.7420106", "0.7318005", "0.7011265", "0.6964633", "0.6921452", "0.68995684", "0.6884558", "0.6884558", "0.68692666", "0.68423784", "0.67959476", "0.6779908", "0.6738439", "0.67373705", "0.672569", "0.6708703", "0.669891", "0.6679086", "0.6654869", "0.6651583", ...
0.6892138
7
Verificaremos si es el codigo Producto es correcto
function confirmCodeProducto() { const code = finalTranscript; order.forEach((element) => { if (element.codProducto == code) { console.log(code, "Correcto"); resetTranscript(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buscaProductoDetalleOrdenVenta(){\n\t\t//var codigoProducto = $.trim($('#txtCodigoProducto').val());\n\t\tvar codigoProducto = $('#txtCodigoProducto').val();\n\t\tvar existe = $(\"#tblDetalleOrdenVenta .codigo:contains('\"+codigoProducto+\"')\").length;\n\t\tif(existe > 0){\n\t\t\t$.msgbox(msgboxTitle,'El...
[ "0.63825274", "0.6222945", "0.6222351", "0.60653496", "0.6041777", "0.60345083", "0.60285866", "0.59753716", "0.59662706", "0.59587246", "0.5838279", "0.5817305", "0.5814788", "0.58071053", "0.58058274", "0.5783495", "0.5772158", "0.57641035", "0.57456094", "0.5733546", "0.56...
0.7277256
0
Pasar Texto A Voz
function activeVoice(type, data) { let speech; let msgIntro; switch (type) { case "ubicar": msgIntro = "Ubicar: "; break; case "cantidad": msgIntro = "Cantidad: "; break; case "completo": msgIntro = "Completado Siguiente"; break; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertidor(text) {\n let convrtm = text.toLowerCase();\n let frLett = convrtm.charAt(0);\n let convrtM = frLett.toUpperCase();\n let restTxt = convrtm.substr(1,9999);\n console.log(`Your converted phrase is: ${convrtM}${restoTxt}`);\n // console.log(`Su frase convertida es: ${convrtM}${...
[ "0.63636", "0.6139515", "0.6042811", "0.5984622", "0.59709287", "0.59164584", "0.5898637", "0.5867756", "0.5853168", "0.5851762", "0.57651496", "0.57433087", "0.57059234", "0.57059234", "0.57059234", "0.5682321", "0.56741923", "0.56741923", "0.5619738", "0.5600792", "0.558737...
0.0
-1
set height if open on load (for animation)
function openMenuSetHeight(el) { var level2 = el, height = 0; level2.children('.navigation__item').each(function(){ height += $(this).outerHeight(); }); level2.css('height', height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowcaseHeightSet() {\n\t\t$(\".showcase_stage-wrapper\").css(\"height\", $(\".showcase_stage-active\").height() );\n\t}", "function on_load() {\r\n $(\"#page_title_container\").css(\"height\", window_height + \"px\");\r\n $(\"#content01\").css(\"height\", window_height + \"px\");\r\n $(\"#content02\...
[ "0.7235156", "0.71013284", "0.70827365", "0.6949417", "0.6899233", "0.6899233", "0.68705505", "0.66733307", "0.66672784", "0.6642601", "0.6637107", "0.6630909", "0.66308963", "0.6619418", "0.6561815", "0.6547099", "0.6501686", "0.64945287", "0.64913875", "0.647732", "0.647226...
0.65606284
15
update dots on horizontal scroll
function checkScrollPos() { $('.scrollslider__inner').each(function(){ var slider = $(this), sliderPos = slider.scrollLeft(), sliderElOffsets = [], parentOffset = slider.offset().left; slider.children().each(function(){ var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onHorizontalScroll() {\n // ResizeMonitor triggers scroll during render, make sure we have been drawn some other way before redrawing\n if (this.isDrawn) {\n this.scheduleDraw(false);\n }\n }", "function updateXTickCount() {\n // console.log(\"data -> \" + JSON.stringify(data));\n // console...
[ "0.69798374", "0.62836564", "0.6252842", "0.6251042", "0.6225029", "0.6200365", "0.61847436", "0.61733544", "0.6142544", "0.6139298", "0.6084536", "0.60839397", "0.6066804", "0.6063069", "0.6053334", "0.5970849", "0.59618247", "0.59186745", "0.5896971", "0.58838415", "0.58712...
0.5549594
75
Object Fit fallback (used in scroll slider, news detail page) IE/Edge fallback for responsive images while 'objectfit' property is not supported
function ObjectFitIt() { $('.news-detail__media .imageslider__image').each(function(){ var imgSrc = $(this).attr('src'); var fitType = 'contain'; /*if($(this).data('fit-type')) { fitType = $(this).data('fit-type'); }*/ $(this).parent()....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function objectFitFallBackForIe() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n if (\n msie > 0 ||\n (!!navigator.userAgent.match(/Trident.*rv\\:11\\./) &&\n $(\".photo-callout-widget__img\").length)\n ) {\n $(\"img.photo-callout-widget__...
[ "0.78958493", "0.7759707", "0.7759707", "0.77339685", "0.7730659", "0.7664459", "0.7614171", "0.74683094", "0.72130376", "0.6724694", "0.6116929", "0.6093312", "0.60843664", "0.5949885", "0.5930149", "0.5672575", "0.56041896", "0.55223763", "0.551872", "0.55120754", "0.549436...
0.7206047
9
Powermail, show uploaded File Name
function powermailFileUploadLabel(){ var inputs = document.querySelectorAll( '.form__input--file' ); Array.prototype.forEach.call( inputs, function( input ) { var label = input.nextElementSibling; var labelVal = label.lastChild.innerHTML; input.addEventLis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_file_name(event) {\n // alert(event.fpfile.filename );\n $('.uploaded_file_name').text(event.fpfile.filename)\n}", "function filename()\n{ \n var fileName = document.getElementById(\"blog_image\").files[0].name;\n document.getElementById('image_label').innerText=fileName;\n}", "funct...
[ "0.7153502", "0.64337015", "0.62393695", "0.6211715", "0.62017864", "0.61997986", "0.6150391", "0.61146724", "0.6036697", "0.6035335", "0.60318583", "0.6029284", "0.6013232", "0.6005397", "0.5991346", "0.5991346", "0.5979587", "0.597705", "0.59184355", "0.5915994", "0.5893641...
0.691614
1
scan for valuable info
function scan(packet, path) { var text = packet.data.toString('utf8').replace(/( |-|,)/gi, '').toLowerCase(); if (text.indexOf('[password]') >= 0) { console.log('WARNING: PASSWORD' + path); // console.log(text); } if (text.indexOf('[first name]') >= 0) { console.log('WARNING: F...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_validateParsedData() {\n let doubleVals = this.parsedCfgInfos.filter(el => this.parsedCfgInfos.find(el2 => (el.stackKey === el2.stackKey) && (el.lineNr !== el2.lineNr)));\n if (doubleVals.length > 0) {\n console.error('!!!!!!!!!!!!! Double keys in CFG found cant use it ! Stoping !!!!!!!!!!!!!');\n ...
[ "0.53390217", "0.5290223", "0.5104385", "0.50873446", "0.5080341", "0.49823102", "0.49740222", "0.49702632", "0.4960253", "0.49234477", "0.4922623", "0.49123558", "0.48996642", "0.4887679", "0.48540255", "0.48473722", "0.48184383", "0.47952357", "0.47836357", "0.47773704", "0...
0.0
-1
function to switch the player
function switchPlayer() { // Set the current score to 0 and display it document.getElementById(`current--${activePlayer}`).textContent = 0; currentScore = 0; // Switch the player activePlayer = activePlayer === 0 ? 1 : 0; // Change the background color based on the active player player0.classList.toggle('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playerswitch() {}", "function switchPlayer() {\n if (currentPlayer === player1){\n currentPlayer = player2;\n }\n else {\n currentPlayer = player1;\n }\n}", "function switchPlayer(){\n\t\tif (player === 'X') {\n\t\t\tplayer = 'O'\n\t\t}else{\n\t\t\tplayer = 'X'\n\t\t}\n\t\tdisplay.innerText ...
[ "0.80482507", "0.8010843", "0.7821031", "0.7790184", "0.76236767", "0.7623592", "0.76204437", "0.7609344", "0.75900626", "0.7539319", "0.748507", "0.74278086", "0.74168336", "0.73983824", "0.73795116", "0.7373384", "0.7359131", "0.7350691", "0.72806376", "0.72786623", "0.7267...
0.7385314
14
Contract for processors and transforms
function Polygon (vectors, color) { this.vectors = vectors this._color = this.color = color || [255, 255, 255] // Underscore is for read only }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function Transform() {}", "function unified() {\n var attachers = []\n var transformers = trough()\n var namespace = {}\n var frozen = false\n var freezeIndex = -1\n...
[ "0.6273985", "0.6104836", "0.6104836", "0.6104836", "0.6104836", "0.6104836", "0.5708343", "0.5684578", "0.5684578", "0.56577224", "0.5621372", "0.5621372", "0.5621372", "0.5621372", "0.5621372", "0.5613912", "0.5567237", "0.5519001", "0.54363424", "0.53836775", "0.53836775",...
0.0
-1
Represents the polygon cluster.
function Cluster () { const _polygons = [] const _processors = [] const _disposableProcessors = [] this.add = (vectors, color) => { _polygons.push(new Polygon(vectors, color)) } // Interface for adding processors (not disposable by default) this.use = (fn, disposable) => { if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Clustering() {}", "clutterNoClustering () {\n\t\tlet maxX = this.params.maxX;\n\t\tlet maxY = this.params.maxY;\n\t\tlet minX = this.params.minX;\n\t\tlet minY = this.params.minY;\n\n\t\tlet dataSize = this.dataIn.length;\n\n\t\tlet clusters = {\n\t\t\tclusters: [],\n\t\t\tdataLabel: [],\n\t\t\tnumClusters: ...
[ "0.6553636", "0.602165", "0.5866655", "0.58556986", "0.5741506", "0.571699", "0.5648727", "0.5518786", "0.545144", "0.5410368", "0.54090506", "0.5406615", "0.53901476", "0.53619385", "0.5345927", "0.5322515", "0.5262026", "0.52555215", "0.52410007", "0.523043", "0.52260643", ...
0.73376137
0
Sanitize text of post
function sanitize(s) { var t = s; Object.keys(sanitizeReplacements).forEach(function(key) { var val = sanitizeReplacements[key]; t = t.replace(new RegExp(key, 'gmi'), val); }); return t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanPost(post) {\n post[\"words\"] = [];\n if (post[\"caption\"] != null && post[\"caption\"][\"text\"] != null && post[\"tags\"] != null) {\n var cap = post[\"caption\"];\n var text = post[\"caption\"][\"text\"];\n text = text.toLowerCase();\n var tags = post[\"tags\"];...
[ "0.68393165", "0.6743855", "0.6738035", "0.66972613", "0.64717084", "0.63865525", "0.63822514", "0.6307513", "0.61824024", "0.6092642", "0.6049861", "0.59951127", "0.59651583", "0.595752", "0.59406286", "0.59305084", "0.59285045", "0.58631617", "0.582223", "0.58190864", "0.58...
0.5492859
57
Convert to Octopress filename convention
function convertToFileName(s) { var c = s.split('/'); return c[0] + '-' + c[1] + '-' + c[2] + '-' + c[3] + '.md'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFilename() {\n var dt = new Date();\n toString()\n \n return 'oya' + dt.getTime().toString().substr(-8) + '.ino';\n}", "function beautifyFilename(filename) {\n\tvar tokens = filename.split('.');\n\tvar tripped = tokens[0];\n\tvar ext = tokens[tokens.length - 1].toLowerCase();\n\ttokens = ...
[ "0.6297201", "0.61306953", "0.60151505", "0.60151505", "0.5838316", "0.5803661", "0.5752193", "0.57107884", "0.5679424", "0.56789136", "0.56599474", "0.5649333", "0.5617464", "0.55793303", "0.5538227", "0.55229837", "0.5490051", "0.5483585", "0.54427224", "0.54173785", "0.537...
0.622548
1
Helper method for defining associations. This method is not a part of Sequelize lifecycle. The `models/index` file will call this method automatically.
static associate({ Order, Position }) { // define association here // В списке блюд заказа одна запись соответствует только одному заказу OrderPosition.belongsTo(Order); // В списке блюд заказа в одной записи может быть // только одна позиция любое количество раз (поле quantity) Ord...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n // define association here\n // This is how Sequelize knows to create \"magic methods\"\n // These are functions that can automatically pull\n // related data.\n // For example: If I have a User object\n // I can call `await user.getContacts()` to get an\n...
[ "0.7641299", "0.75082797", "0.73139536", "0.73065066", "0.73065066", "0.73065066", "0.72952354", "0.72845256", "0.7278983", "0.72590315", "0.72590315", "0.72590315", "0.72590315", "0.72590315", "0.72590315", "0.72590315", "0.72590315", "0.72590315", "0.72590315", "0.72590315", ...
0.0
-1
const cuma bisa di pake sekali
function getNama() { return nama; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bl(e,t,n,i){var o=e+\" \";switch(n){case\"s\":return t||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return o+=1===e?t?\"sekundo\":\"sekundi\":2===e?t||i?\"sekundi\":\"sekundah\":e<5?t||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return t?\"ena minuta\":\"eno minuto\";case\"mm\":return o+=1===e?t...
[ "0.667067", "0.65768087", "0.6565528", "0.6477102", "0.64102644", "0.635809", "0.63475764", "0.63255423", "0.6322716", "0.6313455", "0.62905055", "0.62773716", "0.62701803", "0.62693375", "0.62693375", "0.62693375", "0.62693375", "0.62693375", "0.62692714", "0.62692714", "0.6...
0.0
-1
Test filter; removes all translations with a code comment that does not include the string '/frontend/'
function _filter(gt, domain, callback) { var clientSideSource = '/frontend/'; var err; gt.listKeys(domain).forEach(function(key) { var comment = gt.getComment(domain, "", key); if (comment) { if (comment.code && comment.code.indexOf(clientSideSource) === -1) { gt.deleteTranslation(domain, "", key); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testFilter(gt, locale, callback) {\n const clientSideSource = '/frontend/';\n const domain = 'messages';\n const { translations } = gt.catalogs[locale][domain];\n gt.setLocale(locale); // Needed for when getComment is called\n\n Object.keys(translations).forEach((ctxt) => {\n Object.keys(translati...
[ "0.69535965", "0.6155432", "0.5699807", "0.56351435", "0.5544667", "0.5520703", "0.5502635", "0.5498266", "0.547563", "0.5452323", "0.54361814", "0.53823787", "0.53739625", "0.5242769", "0.5242769", "0.5242769", "0.52394974", "0.5234537", "0.52236015", "0.5221845", "0.5181533...
0.59101397
2
Detailed Form Population for Kerbals
function detail_kerbal(id){ id = encodeURIComponent(id); var new_div = document.getElementById("detail_div"), temp_table, new_table, new_row, new_cell, text, button, url, response = []; //Makes request to PHP for Kerbal Details. request = new XMLHttpRequest(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFormValuesAndDisplayResults() {\n}", "function applyToForm(){\n\tvar divId = GLOBAL.CurrentAnalysisDivId;\n\tvar probesAgg = document.getElementById(\"probesAggregation\");\n\tvar snpType = document.getElementById(\"SNPType\");\n\t\n\tvar subsetCount = multipleSubsets()?2:1;\n\tfor(var idx = 1; idx<=...
[ "0.5918735", "0.581161", "0.537477", "0.5374713", "0.53485227", "0.5324865", "0.531408", "0.5308591", "0.5281826", "0.5256836", "0.52409434", "0.51814336", "0.51450926", "0.5138596", "0.51354706", "0.5135179", "0.51302785", "0.5129541", "0.51197195", "0.5092119", "0.50722086"...
0.0
-1
Detailed Form Population for Ships
function detail_ship(id){ id = encodeURIComponent(id); var new_div = document.getElementById("detail_div"), temp_table, new_table, new_row, new_cell, text, url, response = []; //Makes request to PHP for Ship Details. request = new XMLHttpRequest(); if (!request) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showShipping() {\n // Show Shipping form & hide the rest\n $('.shipping-info').attr(\"hidden\", false);\n\n // Grab the user's choices one at a time and append to recipt1\n let userChoices = ($(\"#choices\").serializeArray());\n userChoices.forEach((e) => {\n $(\"#recipt1\").append(...
[ "0.5786603", "0.5696233", "0.5541401", "0.5489386", "0.54486024", "0.5442168", "0.53910345", "0.5387849", "0.5273263", "0.52474606", "0.5222896", "0.5194452", "0.5170861", "0.5163734", "0.5159048", "0.5137031", "0.5102329", "0.51019734", "0.5079758", "0.5057246", "0.50395566"...
0.0
-1
Detailed Form Population for Planets
function detail_planet(id){ id = encodeURIComponent(id); var new_div = document.getElementById("detail_div"), temp_table, new_table, new_row, new_cell, text, url, response = []; //Makes request to PHP for Planet Details. request = new XMLHttpRequest(); if (!request) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Planets(){\n\t// Heliocentric Osculating Orbital Elements Referred to the Mean Equinox and Ecliptic of Date for 2013: http://asa.usno.navy.mil/static/files/2013/Osculating_Elements_2013.txt\n\t// Values of the Osculating Orbital Elements for 8th August 1997: http://www.stargazing.net/kepler/ellipse.html\n...
[ "0.59722733", "0.57868797", "0.566625", "0.5237968", "0.5216699", "0.51879823", "0.51550347", "0.50935966", "0.5087739", "0.50798297", "0.50413066", "0.50358766", "0.50322914", "0.5028899", "0.50180125", "0.501051", "0.5002803", "0.49932903", "0.497876", "0.49751547", "0.4968...
0.0
-1
Detailed Form Population for Moons
function detail_moon(id){ id = encodeURIComponent(id); var new_div = document.getElementById("detail_div"), temp_table, new_table, new_row, new_cell, text, url, response = []; //Makes request to PHP for Planet Details. request = new XMLHttpRequest(); if (!request) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateJs2Form(){\n\t//Primero determinamos el modo en el que estamos;\n\tvar mode = getMMGMode(get('maeEstatProduFrm.accion'), \n\t\tget('maeEstatProduFrm.origen'));\n\n\n\tset('maeEstatProduFrm.id', jsMaeEstatProduId);\n\tset('maeEstatProduFrm.paisOidPais', [jsMaeEstatProduPaisOidPais]);\n\tset('maeEst...
[ "0.6192575", "0.6110311", "0.59928614", "0.5951787", "0.58813584", "0.58627915", "0.5833379", "0.5800016", "0.57829666", "0.576628", "0.57524943", "0.57519466", "0.57490563", "0.57384974", "0.57295907", "0.5717285", "0.56850916", "0.56790894", "0.56697124", "0.56697124", "0.5...
0.0
-1
create seaport service when server stream comes up
function createServer(serverName) { console.log("creating server", serverName) var server = servers[serverName] = net.createServer(handleConnection) ports.service(serverName, listen) function handleConnection(connection) { console.log("got incoming connection", connection) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async prepareServer() {\n this.options.server && (this.server = await this.addService('server', new this.ServerTransport(this.options.server))); \n }", "maybeStartAdsStream() {\n if (this.client === null) {\n return;\n }\n if (this.adsCall !== null) {\n return;\...
[ "0.5676446", "0.5613046", "0.5574332", "0.5572262", "0.5550758", "0.554434", "0.55177176", "0.5503602", "0.54861885", "0.5453297", "0.5450114", "0.5446168", "0.5441478", "0.54190516", "0.54069775", "0.540408", "0.53720516", "0.53643066", "0.5358956", "0.5349313", "0.53323007"...
0.0
-1
close servers when server stream goes down
function cleanupServer(serverName) { var server = servers[serverName] server && server.close() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n if (this.server !== null && this.server !== undefined) {\n this.server.close();\n }\n }", "shutdown () {\r\n for (let ix = 0; ix < this._sockets.length; ix++) {\r\n this.close(this._sockets[ix]);\r\n }\r\n this._sockets.length = 0;\r\n }", "closeServer() {...
[ "0.7279202", "0.71735895", "0.71032596", "0.7092752", "0.70805603", "0.6894117", "0.6892296", "0.6809311", "0.67691076", "0.67647135", "0.67227525", "0.67048", "0.6588713", "0.658415", "0.65574706", "0.6545345", "0.6541465", "0.65260595", "0.6461238", "0.64595336", "0.6429525...
0.6986308
5
Drop crate at airpad.
function dropCrate() { // If this is the first hit, store the time. if (isFirstAirpad) { landTime = Date.now(); isFirstAirpad = false; playerBarShow(landTime, DROP_TIME); } playerBarUpdate(DROP_TIME); // Crate Delivered. if (Date.now() >= completeTime) { // TODO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropArds(){\n\tvar db = openDatabase ('ManobraMassiva', '1.0', 'Banco local Manobra Massiva', 2 * 1024 * 1024);\n\tdb.transaction (function (tx) {\n\t\t\ttx.executeSql (\"drop table ARDS\");\n\t\t\ttx.executeSql (\"CREATE TABLE IF NOT EXISTS ARDS (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, uf, cidade,...
[ "0.571237", "0.54655874", "0.5335817", "0.52984667", "0.52975434", "0.52871835", "0.52569914", "0.52569914", "0.51717514", "0.5141214", "0.51203525", "0.5103813", "0.51024497", "0.5090272", "0.50847536", "0.5082796", "0.50775874", "0.5071404", "0.50504905", "0.50426555", "0.5...
0.5740397
0
Adds the notes title to the header notesTitle.addEventListener("change", headerTitleChange) Puts the title of the notes on the header and title of the page
function headerTitleChange() { headerText.innerHTML = "E-Notes - " + notesTitle.value; pageTitle.innerHTML = "E-NOTES - " + notesTitle.value.toUpperCase(); if (notesTitle.value == "") { headerText.innerHTML = "E-Notes"; pageTitle.innerHTML = "E-NOTES"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeHeaderTitle(newTitle){\n headerTitleDiv.innerHTML = newTitle;\n }", "attachHeader () {\n this.header = idel(document.body, 'header')\n this.pokeNote = idel(document.body, 'pokeNote')\n this.tooltip = idel(document.body, 'tooltip')\n const pg = this.page = Doc.parsePage(this.h...
[ "0.70403135", "0.6803739", "0.66602385", "0.6592188", "0.64893496", "0.647031", "0.64696145", "0.63445055", "0.63415825", "0.6279597", "0.6269386", "0.6269386", "0.6269386", "0.6269386", "0.6269386", "0.6269386", "0.62459034", "0.6204133", "0.6185961", "0.6185961", "0.6185961...
0.82238704
0
Loads your notes and title that you have previously worked on if you saved them
function load() { let savedNotes = localStorage.getItem("dataNotes"); let savedTitle = localStorage.getItem("dataTitle"); if (savedNotes) { notes.value = savedNotes; } if (savedTitle) { notesTitle.value = savedTitle; headerTitleChange() } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadNotes() {\n if (localStorage.notes != undefined) {\n var contents = JSON.parse(localStorage.getItem(\"notes\"));\n\n for (var i = 0; i < contents.length; i ++) {\n addNote(contents[i]);\n }\n }\n}", "function loadNotes() {\n noteId = 0;\n idx = 1;\n notes = [];\n...
[ "0.77895725", "0.7684364", "0.7006875", "0.69683474", "0.6958067", "0.68833107", "0.67124486", "0.6698978", "0.66145444", "0.6601031", "0.65840554", "0.65792096", "0.6570375", "0.65680057", "0.6545838", "0.6491327", "0.6474396", "0.6433839", "0.6392272", "0.637528", "0.636413...
0.7528935
2
Function for Google map with Bangalore Latitude & Longitude
function myMap() { var mapProp= { center:new google.maps.LatLng(12.9716,77.5946), zoom:5, }; var map = new google.maps.Map(document.getElementById("googleMap"),mapProp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMap(latitude, longitude) {\n \n \n var mapOptions = {\n center: new google.maps.LatLng(0, 0),\n zoom: 1,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n \n map = new google.maps.Map\n (document.getElementById(\"map\"), mapOptions);\n \n \n var latLong = new google...
[ "0.72349846", "0.7071706", "0.6916028", "0.6910222", "0.6824813", "0.67802066", "0.6777752", "0.6731987", "0.6703552", "0.6703552", "0.66778535", "0.6669778", "0.66624177", "0.66600525", "0.6649196", "0.6630522", "0.66220856", "0.6616233", "0.65797853", "0.6575948", "0.657584...
0.0
-1
Event listener for HTTP server 'error' event.
function onError(error) { debugErr(error) if (error.syscall !== 'listen') { throw error } // handle specific listen errors with friendly messages switch (error.code) { case 'EACCES': throw new Error(config.port + ' requires elevated privileges') case 'EADDRINUSE': throw new Error(config.port + ' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function httpOnError(error) {\n if (error.syscall !== 'listen') {\n throw error;\n }\n\n var bind = typeof port === 'string'\n ? 'Pipe ' + port\n : 'Port ' + port;\n\n // handle specific listen errors with friendly messages\n switch (error.code) {\n case 'EACCES':\n console.error(bind + '...
[ "0.71492577", "0.71186477", "0.7096255", "0.7089851", "0.7035249", "0.6910358", "0.6845737", "0.6839852", "0.6836518", "0.68321294", "0.68297654", "0.6824357", "0.68228453", "0.68135136", "0.68021303", "0.6761951", "0.67578894", "0.67292446", "0.6711724", "0.6683549", "0.6669...
0.6440963
59
Event listener for HTTP server 'listening' event.
function onListening() { var addr = server.address() var bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port debug('HTTP server listening on ' + bind) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onListeningHTTP () {\n var addr = server.address()\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port\n debug('HTTP - Listening on ' + bind)\n}", "function onListening() {\n var addr = server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' +...
[ "0.78381765", "0.78073025", "0.77128875", "0.7588416", "0.73990464", "0.7391843", "0.73789746", "0.7350933", "0.73380953", "0.7318751", "0.7305358", "0.7261634", "0.7256006", "0.72303", "0.7220717", "0.7210836", "0.71729904", "0.71706134", "0.71697086", "0.7167747", "0.716216...
0.75956756
3
Next, create a function that will take the first and last letter of the sentence, capitalize them, and return this as a new string.
function firstAndLast(word) { var firstLastLetter = word.charAt(0)+word.charAt(word.length-1); return firstLastLetter.toUpperCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static capitalize(sentence){\n let a= sentence.toUpperCase().charAt(0);\n return a+sentence.substr(1);\n }", "function firstLetterCapitalized (word){//function that capitalizes first letter of one word\n var letterOne = word.substring(0,1)//finds first letter\n var capitalizedLetter = letterOne.toUp...
[ "0.80654365", "0.77094877", "0.7658929", "0.76567787", "0.762578", "0.7590499", "0.75625086", "0.75320953", "0.7525393", "0.75066006", "0.7458307", "0.74286234", "0.7427987", "0.7426551", "0.74107397", "0.73917013", "0.7385087", "0.73834187", "0.73834187", "0.73770595", "0.73...
0.0
-1
Create another function that will reverse the order of these two letters and return the result.
function reverse(word) { var newWord = word.charAt(1)+word.charAt(0); return newWord; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reverse(str) {\n \n}", "function reverse(str) {\n \n}", "function reverse(str){\n // YOUR CODE HERE\n}", "function reverse2(str) {\n let lettersArray = str.split('');\n let reversedLettersArray = lettersArray.reverse();\n return reversedLettersArray.join('');\n}", "function reverseStr...
[ "0.73971117", "0.73412883", "0.7314367", "0.72529954", "0.7136665", "0.70015633", "0.69826853", "0.6947452", "0.6946342", "0.6907071", "0.68538094", "0.6840645", "0.68351966", "0.6833572", "0.68114537", "0.6763094", "0.67626274", "0.6739679", "0.67221516", "0.67092484", "0.67...
0.67350125
18
Add code to your third function to concatenate the new twoletter string together with the original phrase. It should add the twoletter string at the end, forming the final result "I am a sentenceEI."
function concatenation(reWord,addingWord){ var reWord2 = reWord+addingWord return reWord2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printLatinWord(word){\r\n\t// combine the word without its first letter, then the first letter, then 'ay'.\r\n\treturn word.slice(1) + word.slice(0, 1) + \"ay \";\r\n}", "function wordCaseChanger(word){\r\n\tlet output='';\r\n\tlet changedLetter='';\r\n\tfor(let i=0; i<word.length; i++){\r\n\t\tchangedL...
[ "0.6831398", "0.6602297", "0.65966916", "0.6580164", "0.64670426", "0.6451935", "0.6430335", "0.6425463", "0.6416946", "0.64137673", "0.640953", "0.63629985", "0.6353075", "0.63286793", "0.63245934", "0.6311564", "0.62992615", "0.6283607", "0.6271265", "0.62467486", "0.623848...
0.6199963
23
Create a fourth function to count the number of letters in the original sentence, divide it by two (rounding down if necessary), and output the letter at this index. Concatenate this letter at the beginning of the original sentence. For example, if "I am a sentence" is my original input, and it has 15 total characters ...
function fourthFunction(fourth){ var count=fourth.length; var conv = parseFloat(count); var avg = conv/2; return avg.floor(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concatFront(){\n var half = userInput.length / 2;\n halfPosition = parseFloat(half.toFixed());\n var firstLetter = userInput.charAt(halfPosition);\n var finalOutPut = firstLetter + concatWithInput;\n alert(finalOutPut);\n }", "function encrypter(sentence) {\n\n // split sentence into array of...
[ "0.68514335", "0.6744852", "0.6415918", "0.6359672", "0.6350515", "0.6193911", "0.61066383", "0.6087503", "0.6086314", "0.60815924", "0.60511446", "0.60367674", "0.6024052", "0.6003242", "0.59928817", "0.59535444", "0.5952139", "0.5951075", "0.5923507", "0.5919786", "0.591273...
0.0
-1
Check if jQuery's loaded
function GM_wait() { if (typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait, 100); } else { $ = unsafeWindow.jQuery; letsJQuery(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForJqueryPresents(){\n\t\t\tif(typeof jQuery == \"undefined\")\n\t\t\t\tthrow new Error(\"jQuery library not included\");\n\t\t}", "function checkAndLoadJquery() {\n if (window.jQuery === undefined || window.jQuery.fn.jquery !== '2.2.4') {\n loadScript(\"http://ajax.googleapis.com...
[ "0.7964887", "0.78342223", "0.75959057", "0.72162086", "0.70616096", "0.6911541", "0.68357533", "0.66507906", "0.66306186", "0.65993136", "0.6576148", "0.6576148", "0.6572374", "0.65344787", "0.6486709", "0.64643043", "0.64116114", "0.63366556", "0.6314393", "0.6307149", "0.6...
0.0
-1
All your GM code must be inside this function
function letsJQuery() { // Solver on/off $(document.body).append($("<input />").attr('type', 'button').attr('value', 'DWPS on').css("position", "absolute").css("zIndex", "99").click(function () { ativo = !ativo; if (ativo) { $(this).val("DWPS on"); $(this).blur(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GM_main() {\n\tonload();\n}", "function GM_main() {\n\tonload();\n}", "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 t...
[ "0.73553216", "0.73553216", "0.64632565", "0.6163122", "0.6058484", "0.60022897", "0.59531987", "0.5951938", "0.59381944", "0.5903361", "0.5903361", "0.5869348", "0.58493596", "0.5845381", "0.58405536", "0.582298", "0.5820066", "0.57811546", "0.57631177", "0.57468724", "0.571...
0.0
-1
endguibuttons main explore function
function verificaExploracao() { if (!ativo || document.getElementById("transdiv")) { return; } // 'take all' button in bank screen if ($("span.subtabon").html() && $("span.subtabon").html() == "Bank") { $("#widthdrawamount").val(parseInt($("span.statsvcred:not(#curcoins)").html()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateButtons() {\n explainButtonElm.css('display', 'none');\n collapseButtonElm.css('display', 'none');\n if(step.containsExplanation() || step.containsSteps()) {\n if (explanationExpanded) {\n collapseButtonElm.css('display', 'block');\n...
[ "0.6197899", "0.61180997", "0.59333897", "0.5933018", "0.59015596", "0.5864834", "0.585515", "0.58370274", "0.5830884", "0.5825619", "0.58202386", "0.5806153", "0.5695467", "0.5681703", "0.56668335", "0.5651484", "0.5642337", "0.5625148", "0.56244045", "0.561831", "0.5610997"...
0.0
-1
Conversion functions: UNIX to natural date, and conversely. Note: natural dates are given as arrays of strings: [day, month, year].
function unixToNatural(unix) { unix -= unix % secs_in_day; var days = unix / secs_in_day; var fourYearBlocks = Math.floor(days / (365*3 + 366)); var daysToCount = days - fourYearBlocks*(365*3 + 366); var year; if (daysToCount >= 365*2 + 366) { year = 1970 + 4*fourYearBlocks + 3; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function naturalToUnix(date) {\n return moment(date, \"MMMM, D YYYY\").format(\"X\");\n }", "function natToUnix(date) {\n return moment(date, \"MMMM D, YYYY\").format(\"X\");\n }", "function unixToNatural(date) {\n return moment.unix(date).format(\"MMMM, D YYYY\");\n }", "function unixToNatural(u...
[ "0.7254824", "0.7102566", "0.7009566", "0.68551177", "0.6696738", "0.6662559", "0.6644533", "0.66025734", "0.6484277", "0.6403201", "0.636744", "0.60680264", "0.5920807", "0.5775441", "0.57366544", "0.5688072", "0.5630584", "0.5588301", "0.55782473", "0.55417776", "0.5535843"...
0.7436427
0
Parse string into [unix, day, month, year]. 'unix' is a number, the rest are strings. If can't parse, return with no value.
function parseDate(str) { str = decodeURI(str); var day, month, year; // In case user let numbers run together, e.g. "March62013", search for a // string of 5 or 6 numbers. var fiveOrSixFound = false; var sixIndex = str.search( /[0-9][0-9][0-9][0-9][0-9][0-9]/ ); if (sixIndex >= 0) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseUnix(str) {\n var unix = parseInt(str);\n if (isNaN(unix)) {return;}\n return [unix].concat(unixToNatural(unix));\n}", "function parse(str) {\n var y = Number(str.substr(0,4));\n var m = Number(str.substr(4,2) - 1);\n var d = Number(str.substr(6,2))\n var D = new Date(y,m,d);\n...
[ "0.76201606", "0.6270393", "0.6101615", "0.5980124", "0.59262234", "0.5918727", "0.5871179", "0.5871179", "0.5871179", "0.5871179", "0.5871179", "0.5871179", "0.5871179", "0.5871179", "0.5845234", "0.5813536", "0.5813536", "0.57244384", "0.57232124", "0.57232124", "0.57232124...
0.57962984
17
Parse string as a unix timestamp.
function parseUnix(str) { var unix = parseInt(str); if (isNaN(unix)) {return;} return [unix].concat(unixToNatural(unix)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseTimestamp(str)\n{\n\tvar ts = new moment(str, \"DD.MM.YYYY HH:mm:ss.SSS\");\n\tif(!ts.isValid())\n\t\treturn moment.unix(0);\n\treturn ts;\n}", "function toUnixTimestamp(time) {\n\t // tslint:disable-next-line triple-equals\n\t if (typeof time === 'string' && +time == time) {\n\t retur...
[ "0.72129774", "0.6698329", "0.6612364", "0.6513135", "0.62760174", "0.62065804", "0.61487097", "0.6133637", "0.6133637", "0.6133637", "0.6133637", "0.6133637", "0.6133637", "0.6118458", "0.61179364", "0.6116143", "0.6105362", "0.6105362", "0.6105362", "0.61017317", "0.6092193...
0.6661282
2
Create function that takes in two strings and returns them concatenated
function fullName(first, last) { const nameArr = [first, last]; return nameArr.join(" "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concatsss(string1, string2){\n return string1.concat(string2)\n}", "function combineTwoStrings(one,two){\n one.toString(); two.toString();\nreturn one.concat(two);\n}", "function twoStrings (string1, string2) {\nreturn string1.concat(string2);\n}", "function concatenateTwoStrings(str1, str2) {\n ...
[ "0.8000459", "0.7844772", "0.7795714", "0.7717675", "0.76895916", "0.7667291", "0.76444924", "0.7609159", "0.7589509", "0.7588681", "0.7509859", "0.75059783", "0.7481501", "0.7422115", "0.73795915", "0.7243157", "0.7119856", "0.7113071", "0.70866793", "0.7037844", "0.6996949"...
0.0
-1
Create a function to take in three arguments and builds a new Date from them
function dateWriter (year, month, day) { return new Date(year, month, day); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function date() {\n return new Date(year, ...arguments)\n }", "function newDate(x) {\n return new Date(x);\n }", "function Create_Date(Month,Day,Year,Time){\r\n\tvar D_String = Month+\" \"+Day+\" \"+Year+\" \"+Time;\r\n\tvar New_Date = new Date(D_String);\r\n\treturn New_Date;\r\n}", "function ...
[ "0.6715635", "0.65673786", "0.63978434", "0.6243179", "0.62234235", "0.6218766", "0.6168738", "0.61218965", "0.5989463", "0.59827656", "0.59547174", "0.5943462", "0.5943462", "0.5943462", "0.5943462", "0.59362626", "0.5933632", "0.5919714", "0.59099853", "0.5850145", "0.58067...
0.59365433
15