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
Private methods and variables like bookData
function generateTitle() { // randomize title here. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BookDataHelper() { }", "function storeBookInfo() {\n}", "function Book(book) {\n this.title =data.volumeInfo.title ;\n this.author=data.volumeInfo.author;\n this.description=data.volumeInfo.description || *** Description current unavailable ***;\n this.thumbnail = data.volumeInfo.imageLinks.thumbn...
[ "0.7818797", "0.681391", "0.658174", "0.6324804", "0.63079816", "0.62763166", "0.62568235", "0.62521565", "0.62461656", "0.62140465", "0.6202714", "0.6201409", "0.6192725", "0.6156387", "0.61377424", "0.6136291", "0.6127779", "0.61053634", "0.61035705", "0.60954094", "0.60919...
0.0
-1
Extract best quality audio
function getBestAudio(info) { // Get only results that contain audio only in their // format description const audioResultsOnly = info.formats.filter( result => result.format.includes('audio only') && result.acodec == 'opus' ); // Check the higher quality one of all audio urls const bestQualityAudio = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get quality() {}", "function extractAudio(bytes) {\n var tree = helpers_1.parse(bytes);\n var finder = new finder_1.Finder(tree);\n var offset = 8 * 6;\n var ftyp = {\n majorBrand: \"M4A \",\n minorVersion: 1,\n compatibleBrands: [\"isom\", \"M4A \", \"mp42\"]\n };\n ftyp.b...
[ "0.6619311", "0.6506723", "0.6180661", "0.6175253", "0.6138329", "0.61019284", "0.61019284", "0.61019284", "0.61019284", "0.5951181", "0.58793116", "0.58793116", "0.57722557", "0.57455707", "0.57431114", "0.57304496", "0.57113695", "0.56581986", "0.56581986", "0.5641899", "0....
0.75430024
0
Inicio Consulta servicio rest
function readData() { console.log("Estado Session:", sessionService.estadoSesion); if(sessionService.estadoSesion !== 00){ jAlert(mensajeTexto.sesionExpirada, mensajeTexto.controlAcces, function () { $state.go('login'); }); }else{ readDataSel(); readDataQueue(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init () {\n var url = 'http://localhost:3000/api/empleado';\n $http({\n method: 'GET',\n url: url\n }).then(function success(response) {\n vm.empleados = response.data\n }).catch(function err(error) {\n console.log(error)\n })\n }", "function estGet(req, res, next) {\...
[ "0.675213", "0.6678388", "0.665837", "0.6532185", "0.6498831", "0.64477384", "0.6415703", "0.63390386", "0.63238496", "0.6316926", "0.63082427", "0.6287418", "0.6275428", "0.62703466", "0.625267", "0.62493056", "0.623366", "0.6207532", "0.6198893", "0.6181779", "0.6169386", ...
0.0
-1
Inicio de metodos Fijos para mantener actualizado la informacion
function responseDataOK(parData){ if(parData.codigo == "00"){ console.log("responseDataOK", parData); $scope.responseRestTag = "success"; $scope.responseRest = parData.descripcion; $scope.hideAlert = false; readData(); limpiarCampos(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reiniciarConteo() {\n this.ultimo = 0;\n this.tickets = [];\n this.grabarArchivo();\n this.ultimos4 = []\n console.log('Se ha inicializado el sistema');\n \n }", "materializar() {\n\t\t// Se pueden agregar comprobaciones para evitar que haya campos en blanco cuando se...
[ "0.6564565", "0.601746", "0.60074663", "0.5943356", "0.5888446", "0.58563083", "0.5825366", "0.57846653", "0.57627", "0.5755758", "0.5747441", "0.57426685", "0.57322913", "0.5713008", "0.56966704", "0.5668679", "0.5667813", "0.56660855", "0.5634319", "0.56261617", "0.5617759"...
0.0
-1
! vuex v3.6.0 (c) 2020 Evan You
function n(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:i});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[i].concat(t.init):i,n.call(this,t)}}function i(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.pare...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFieldVuex() {\n return store.getters.dataField;\n }", "getProfileVuex() {\n return store.getters.dataProfile;\n }", "function vuexInit(){var options=this.$options;// store injection\n\tif(options.store){this.$store=options.store;}else if(options.parent&&options.parent.$store){this.$store=options.par...
[ "0.676508", "0.67111856", "0.66720235", "0.63250494", "0.6317965", "0.6252473", "0.6252473", "0.6252473", "0.6244129", "0.62418526", "0.6170557", "0.61376673", "0.60729456", "0.60639745", "0.60639745", "0.60639745", "0.60639745", "0.60639745", "0.6055192", "0.6047041", "0.603...
0.0
-1
! ZRender, a high performance 2d drawing library. Copyright (c) 2013, Baidu Inc. All rights reserved. LICENSE
function Ur(t){delete Gr[t]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSurface() {\n wgl.takeBufferData(positionLocation, positionBuffer, 3, gl.FLOAT, false, 0, 0);\n wgl.takeBufferData(normalLocation, normalBuffer, 3, gl.FLOAT, false, 0, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6 * (map.points.length - 1) * (map.points.length - 1));\n }", "render(r...
[ "0.6583039", "0.6547794", "0.65222603", "0.65222603", "0.65222603", "0.64967453", "0.64541835", "0.64263207", "0.64233935", "0.6347886", "0.63345075", "0.63138425", "0.63111806", "0.63008744", "0.6300165", "0.6281807", "0.62758803", "0.62758803", "0.62675637", "0.62675637", "...
0.0
-1
! vuerouter v3.4.9 (c) 2020 Evan You
function i(t,e){0}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}", "func...
[ "0.60503", "0.59507215", "0.58249056", "0.5712553", "0.5692891", "0.562912", "0.55860776", "0.5570525", "0.55457586", "0.55428934", "0.5538341", "0.55169755", "0.5515085", "0.5511451", "0.5447086", "0.5444384", "0.54371136", "0.5422698", "0.5417933", "0.5397287", "0.53945696"...
0.0
-1
Issue fix to prevent accesses attack method not in uae
function changeText() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Protect() {\r\n}", "function isForbiddenMethod(m) {\n m = byteUpperCase(m);\n return m === 'CONNECT' || m === 'TRACE' || m === 'TRACK';\n }", "denyAllMethods() {\n addMethod.call(this, 'deny', '*', '*', null);\n }", "function attack() {\n // Do something...\n}", "allow() {\n thr...
[ "0.5685647", "0.56036717", "0.5595878", "0.55675477", "0.5544918", "0.5537702", "0.55196536", "0.55066955", "0.54995126", "0.5467559", "0.54406804", "0.5437618", "0.5379696", "0.53704685", "0.5333226", "0.5313107", "0.53059673", "0.52864915", "0.5286038", "0.52853036", "0.528...
0.0
-1
To set Initial Values
getInitialValues(inputs) { const initialValues = {}; inputs.forEach(field => { if (!initialValues[field['fieldName']]) { initialValues[field['fieldName']] = field.value; } }); return initialValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setInitialValues() {\n // you can decide on some initial values\n}", "setupInitialValues() {\n this.__xSpacingInput.value = \"1.0\";\n this.__ySpacingInput.value = \"1.0\";\n\n this.__xDimInput.value = 5;\n this.__yDimInput.value = 1;\n }", "function initialValues() {\n...
[ "0.81227", "0.7261634", "0.7230976", "0.7056884", "0.7021107", "0.7020232", "0.69778794", "0.6851979", "0.6826238", "0.68106747", "0.6742969", "0.666752", "0.66635007", "0.6628926", "0.6628902", "0.6596395", "0.64728284", "0.6420702", "0.6358474", "0.63334507", "0.6332616", ...
0.0
-1
level 1: random ghost, level 2: if in sight, if possible, switch direction to get the pacman
function Ghost(x, y, direct, speed, level) { this.speed = speed; this.x = x; this.y = y; this.direct = direct; this.level= level; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sethp(newLevel) {\n // if (flg) {\n // for (var i = 0; i < MAXY; i++) {\n // for (var j = 0; j < MAXX; j++) {\n // var monster = player.level.monsters[j][i];\n // if (monster)\n // monster.awake = false;\n // }\n // }\n // }\n\n /* if teleported and found level 1 ...
[ "0.6937599", "0.68095285", "0.6553131", "0.653559", "0.65335786", "0.65164095", "0.642598", "0.63985604", "0.6334228", "0.6294424", "0.6266932", "0.62642515", "0.6232652", "0.6223286", "0.6215918", "0.62148285", "0.62124693", "0.62119746", "0.6204752", "0.61274683", "0.611636...
0.0
-1
run through a series of drags of the same annotation findDragger: fn that returns the element to drag on (either textDrag or ArrowDrag) autoshiftX, autoshiftY: how much does the annotation anchor shift moving between one region and the next. Zero except if autoanchor is active, ie paperreferenced with no arrow coordSca...
function checkDragging(findDragger, autoshiftX, autoshiftY, coordScale) { var bboxInitial = textBox().getBoundingClientRect(); // first move it within the same auto-anchor zone return dragAndReplot(findDragger(), 30, -30) .then(function() { var bbox = textBox().getBoundingCli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startDraggingAnchors(element) {\n const mousedown = (mouse, anchor) => {\n this.scalable = true;\n this.mouse = mouse;\n\n if (element.type === \"line\") {\n const P1 = element.bounding.P1;\n const P2 = element.bounding.P2;\n\n this.bound = {\n x1: P1.x + this.props....
[ "0.63215864", "0.6277626", "0.6133196", "0.6075818", "0.599135", "0.5977667", "0.58628434", "0.5840314", "0.5840314", "0.57365304", "0.5716232", "0.5682521", "0.5682521", "0.5668765", "0.56674314", "0.56596166", "0.5605617", "0.55894095", "0.558355", "0.5578541", "0.5570398",...
0.701338
0
for annotations with arrows: check that dragging the text moves only ax and ay (and the textbox itself)
function checkTextDrag() { var ann = gd.layout.annotations[0]; var x0 = ann.x; var y0 = ann.y; var ax0 = ann.ax; var ay0 = ann.ay; var bboxInitial = textBox().getBoundingClientRect(); return dragAndReplot(textDrag(), 50, -50) .then(function() { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkDragging(findDragger, autoshiftX, autoshiftY, coordScale) {\n var bboxInitial = textBox().getBoundingClientRect();\n // first move it within the same auto-anchor zone\n return dragAndReplot(findDragger(), 30, -30)\n .then(function() {\n var bbox = textBox().getB...
[ "0.67492634", "0.5896007", "0.5808486", "0.57950497", "0.5791616", "0.56492203", "0.55928886", "0.55792594", "0.5477705", "0.5474508", "0.5468094", "0.54387933", "0.54265773", "0.5367287", "0.5353409", "0.5328003", "0.53273976", "0.53262854", "0.5323825", "0.53200346", "0.529...
0.7144813
0
function that creates the Json object to be passed to the payload
function _createJsonErrorObject(msg, pointer, httpCode, code, title, meta) { let error = { detail: msg, status: httpCode.toString(), title: title, code: 'IRIS_' + code.toString() }; if (pointer) { error.source = { pointer: pointer }; } if (meta) { error.meta = meta; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function packIntoJson(userId, ingredientId, ingredientName, quantity){\n\tvar cartJson = new Object();\n\tcartJson.userId = userId;\n\tcartJson.ingredientId = ingredientId;\n\tcartJson.ingredientName = ingredientName;\n\tcartJson.quantity = quantity;\n\tconsole.log(\"JSON\");\n\tconsole.log(cartJson);\n\t//console...
[ "0.70466936", "0.7042999", "0.6773907", "0.66954917", "0.66285986", "0.6480152", "0.6430737", "0.64083076", "0.64059573", "0.6323546", "0.6303449", "0.6285484", "0.6246742", "0.61925805", "0.61924446", "0.6179293", "0.6176082", "0.61747277", "0.6154243", "0.61473966", "0.6070...
0.0
-1
users nested array with four object ends here getUsers function list of users start here
function getUsers() { var output = ""; _.forEach(users, function(element) { output += element.id + " - " + element.firstName + " " + element.lastName + " is " + element.age + ", " + element.gender + "\n"; }); console.log(output); return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUsers(json) { return json.map(function (obj){ return obj.user; } ); }", "function getUsers(users) {\n\tconst userList = JSON.parse(users);\n\tgetRepos(userList);\n\tdisplayUser(userList)\n}", "function getUsers(data){\n users = JSON.parse(data).results;\n renderUsers();\n}", "async retrieveUse...
[ "0.7821822", "0.7748059", "0.77356994", "0.7614336", "0.75784016", "0.7567266", "0.7471854", "0.7459153", "0.74541664", "0.73923284", "0.73557353", "0.73258656", "0.7307976", "0.7286379", "0.7256788", "0.72354686", "0.7230566", "0.7222238", "0.72165155", "0.7213553", "0.72128...
0.0
-1
getUsers function list of users ends here
function findUserById(id) { try { // add appropiate code here var user = _.find(users, function(o) { return o.id === id}); if (user === undefined) throw "Cannot read property 'id'"; var iFindUser = user.id + " - " + user.firstName + " " + user.lastName + " is " + user.ag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUsers(){\n\t\t\tgetUsersService.getUserList().then(function(data){\n\t\t\t\tlc.listOfUser = data;\n\t\t\t})\n\t\t\t.catch(function(message){\n\t\t\t\texception.catcher('getUserList Service cannot succeed')(message);\n\t\t\t});\n\t\t}", "function getallusers() {\n\n\t}", "function getUsers() {\n ...
[ "0.8676472", "0.8469194", "0.8311772", "0.82710236", "0.8270171", "0.8198895", "0.8181739", "0.8167393", "0.8165971", "0.81309175", "0.8082017", "0.8073498", "0.80667484", "0.8028951", "0.79980725", "0.7989349", "0.7984464", "0.7959858", "0.7956429", "0.79535663", "0.79353094...
0.0
-1
Returns the height, based on current window size, without taking the keyboard into account.
getBasicMessagesContainerHeight(composerHeight = this.state.composerHeight) { return this.getMaxHeight() - this.calculateInputToolbarHeight(composerHeight); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getWindowHeight() {\n\t\treturn _getWindowDimension('height');\n\t}", "function getWindowHeight() {\n return windowHeight;\n }", "function winheight() {\n return window.innerHeight ? window.innerHeight : $(window).height();\n }", "function winheight() {\n\t\treturn window.innerHeight ...
[ "0.7845233", "0.7767367", "0.7621012", "0.7476248", "0.7476248", "0.7476248", "0.7476248", "0.7476248", "0.74411136", "0.7421738", "0.7354726", "0.7339032", "0.73194855", "0.73194855", "0.73194855", "0.7292969", "0.72801167", "0.72460675", "0.724095", "0.72379845", "0.7229556...
0.0
-1
Returns the height, based on current window size, taking the keyboard into account.
getMessagesContainerHeightWithKeyboard(composerHeight = this.state.composerHeight) { return this.getBasicMessagesContainerHeight(composerHeight) - this.getKeyboardHeight() + this.getBottomOffset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getWindowHeight() {\n\t\treturn _getWindowDimension('height');\n\t}", "function getWindowHeight() {\n return windowHeight;\n }", "function winheight() {\n return window.innerHeight ? window.innerHeight : $(window).height();\n }", "function getWinHeight() {\n\treturn win_dimension()[1]...
[ "0.7691441", "0.76659733", "0.74605376", "0.73652476", "0.734151", "0.7326748", "0.7326748", "0.7326748", "0.7326748", "0.7326748", "0.72786045", "0.7171043", "0.7163419", "0.7132189", "0.71280235", "0.7117458", "0.7117458", "0.7117458", "0.70925844", "0.7082178", "0.70694786...
0.0
-1
function to write README file
function writeToFile(fileName, data) { return fs.writeFileSync(path.join(process.cwd(), fileName), data) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeREADME(savefileName, data) {\n fs.writeFile(savefileName, data, () => {});\n \n console.log('Your README has been generated, check the dist folder')\n}", "function writeToFile() {\n fs.writeFile(\"README.md\", \"\", function(err){console.log(err || \"File written successfully!\")})\n}", "func...
[ "0.8015377", "0.7684734", "0.7674064", "0.76685166", "0.76557654", "0.7618611", "0.7577375", "0.7530927", "0.75165516", "0.74807274", "0.7430796", "0.74250484", "0.74225116", "0.7401885", "0.7380425", "0.7353119", "0.7345033", "0.7313819", "0.730648", "0.7302795", "0.7292332"...
0.0
-1
This line will make a function that makes write README files
function writeToFile(fileName, data) { return fs.writeFileSync(path.join(__dirname, fileName), data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeTheFile(name, data){\n fs.writeFile('README.md', data, (err) => {\n if (err){\n console.log(err);\n }\n console.log(\"README has been successfully generated.\")\n })\n }", "function generateREADME(answers) {\n\nreturn `# ${answers.titl...
[ "0.76706046", "0.7529248", "0.7515407", "0.7432469", "0.74146265", "0.7411377", "0.73355764", "0.7333751", "0.72822297", "0.7274387", "0.72690004", "0.7268146", "0.7199796", "0.7189737", "0.7145951", "0.71350616", "0.7118532", "0.71176845", "0.7061629", "0.70184857", "0.69941...
0.0
-1
This line cause the function to initialize the program
function init() { // then make the function inquirer.prompt(qSection) .then((answers) => { console.log("Success!! Generating README..."); writeToFile("README.md", generateMarkdown({ ...answers })) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setupProgram(program) {\n }", "function initialize() {}", "initialise () {}", "static initialize() {\n\t\tconsole.log(whereami() + \" script initializing\");\n\n\t}", "function init() {\n\n// reset();\n lastTime = Date.now();\n main();\n }", "function init() {}", "function in...
[ "0.7300365", "0.72221375", "0.70331156", "0.70178735", "0.69933397", "0.69406074", "0.69406074", "0.69406074", "0.69406074", "0.69406074", "0.69406074", "0.69406074", "0.69406074", "0.69406074", "0.69406074", "0.69360924", "0.69267124", "0.69267124", "0.68893754", "0.6864602", ...
0.0
-1
Check for the end of the video and show play icon
function onProgress(evt) { if (parseInt(evt.duration, 10) === parseInt(evt.position, 10)) { $(overlayControls).css('background-img', 'url(http://tempur-pedic.proto.hugeinc.com/video-test/video-controls-play.png)', 'background-size', '10%'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playEnding() {\n var splitItem = getCurrentSplitItem();\n if (splitItem != null) {\n pauseVideo();\n var clipEnd = splitItem.clipEnd;\n setCurrentTime(clipEnd - 2);\n\n clearEvents();\n editor.player.on(\"play\", {\n duration: 2000,\n endTime:...
[ "0.7313915", "0.704752", "0.68828946", "0.6773152", "0.6739365", "0.67017937", "0.660949", "0.659516", "0.6561196", "0.6545598", "0.6544034", "0.6487142", "0.6479214", "0.64703983", "0.64624435", "0.6461886", "0.64416724", "0.64370805", "0.6413243", "0.6405418", "0.63986444",...
0.59801334
77
for home blade file
function getAllOpenAuctions(){ console.log('all open auctions'); $.ajax({ type : 'GET', url : api_url + 'auction/open/all', data : {}, dataType : 'json' }).done(function(data){ console.log('success'); console.log(data); if(data.success){ va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function home(){\n\tapp.getView().render('vipinsider/insider_home.isml');\n}", "_homeRoute () {\n this.currentView = views.HOME\n }", "function displayHome(ctx) {\n if (!auth.isAuth()) {\n ctx.loadPartials({\n header: './templates/common/header.hbs',\n ...
[ "0.699127", "0.67287976", "0.6677953", "0.6572665", "0.65409076", "0.63468885", "0.6344268", "0.63116425", "0.6256043", "0.62461936", "0.6127334", "0.6111976", "0.60199046", "0.6003642", "0.5973899", "0.59692264", "0.59614855", "0.59462714", "0.5942083", "0.59292835", "0.5926...
0.0
-1
get auction details for details blade file take auction id
function getAuctionDetails(id){ console.log('auction details'); $.ajax({ type : 'GET', url : api_url + 'auction/' + id, data : {}, dataType : 'json' }).done(function(data){ console.log('success'); if(data.success){ var result = data.result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function seeAuctionsWithNameAndImage() {\n\n}", "async getAuctionInfo(ctx,auctionID){\n let {origin,destination} = await ctx.stub.getState(auctionID);\n return {origin,destination}\n }", "function getBeerDetails() {\n\t$('.pic').click(function(event) {\n\t\tvar eventId = event.target.id;\n\t\t...
[ "0.6306875", "0.62957805", "0.6134046", "0.6043489", "0.6019744", "0.601336", "0.59691054", "0.59376216", "0.58945", "0.5890361", "0.5874897", "0.5714403", "0.5669941", "0.5669154", "0.56541234", "0.5648463", "0.5648429", "0.5647195", "0.5633912", "0.5633704", "0.5579628", ...
0.57907003
11
to get user bid from prompt then check if it's valid or not then call addBid() auction id
function getUserBid(id){ console.log('user bid'); var bid = prompt("Please enter Bid value:"); if(bid != null){ bid = parseFloat(bid); if(isNaN(bid)){ $("#successMessage").hide(); $('#dangerMessage').show().text("invalid Bid value!"); }else{ addBid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bid() {\r\n //query db with *\r\n connection.query('SELECT * FROM autions', function (err, res) {\r\n if (err) throw err;\r\n console.log(err);\r\n //prompt user for bid\r\n inquirer\r\n .prompt([{\r\n name: 'selection',\r\n type: ...
[ "0.76281357", "0.724317", "0.7037395", "0.7028873", "0.6944251", "0.6894834", "0.68506104", "0.6821898", "0.66927534", "0.66907597", "0.6642476", "0.66091335", "0.6554184", "0.6417659", "0.6386866", "0.63729584", "0.6329591", "0.63145804", "0.6301148", "0.6230578", "0.6214475...
0.78358215
0
when change auction state from closed to open to get new Bid end date from prompt from admin then check if it's valid or not then call changeState() auction id , new auction state
function getNewEndDate(id , state){ console.log('new end date'); if(state == 'closed') changeState(id , state , null); else{ var today = new Date(); var date = prompt("Please enter New Bid End Date in this format: YYYY-mm-dd", today.getDate()+"-"+(today.getMonth()+1)+"-"+today.getFul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeState(id ,state , endDate){\n console.log('change state');\n $.ajax({\n type : 'POST' ,\n url : api_url + 'auction/state/change',\n data : {\n 'token' : $.cookie('token'),\n 'id' : id,\n 'state' : state,\n 'endDate' : endDate\n ...
[ "0.6486989", "0.61906254", "0.5670156", "0.5655323", "0.56247723", "0.5621855", "0.5591601", "0.5564142", "0.5539767", "0.5518231", "0.5511944", "0.5476714", "0.5476058", "0.5474211", "0.546847", "0.5450164", "0.5447874", "0.5430934", "0.5380479", "0.5377651", "0.5369316", ...
0.7434677
0
add new bid auction id bid value
function addBid(id , newBid){ console.log('add bid'); $.ajax({ type : 'POST', url : api_url + 'auction/new/bid', data : { 'token' : $.cookie('token'), 'bid' : newBid, 'id' : id }, dataType : 'json' }).done(function(data){ co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async bid(ctx, auctionID, costOfHire, driverName, truckNumber){\n let {origin,destination,bids} = await ctx.stub.getState(auctionID);\n let bid={}\n bid['CostOfHire']=costOfHire\n bid['DriverName']=driverName\n bid['TruckNumber']=truckNumber\n bids.push(bid)\n let a...
[ "0.7393716", "0.713303", "0.7087336", "0.7019175", "0.6887606", "0.6595429", "0.65768194", "0.64597505", "0.64404523", "0.6354096", "0.6200853", "0.61425495", "0.608996", "0.5858085", "0.58527", "0.5837069", "0.5792529", "0.5784165", "0.57467186", "0.5729371", "0.5727011", ...
0.7075836
3
to get all open closed auctions and load them into table in admin.index blade file for admin panel
function getAllAuctions(){ console.log('all auctions'); $.ajax({ type : 'GET' , url : api_url + 'auction/all', data : {}, dataType : 'json', }).done(function(data){ console.log('success'); console.log(data); if(data.success){ var panelhtml ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllOpenAuctions(){\n console.log('all open auctions');\n $.ajax({\n type : 'GET',\n url : api_url + 'auction/open/all',\n data : {},\n dataType : 'json'\n }).done(function(data){\n console.log('success');\n console.log(data);\n if(data.success){...
[ "0.59501326", "0.57196295", "0.5641876", "0.5627337", "0.56215", "0.5478288", "0.54529667", "0.5431167", "0.541324", "0.53296053", "0.5327123", "0.5319485", "0.5259852", "0.5226529", "0.5222443", "0.5213245", "0.5212653", "0.5210751", "0.5208844", "0.5193144", "0.51894623", ...
0.53770435
9
for admin panel used to change auction state open closed if it changed from open to close endDate = null otherwise endDate will be the new bid end date
function changeState(id ,state , endDate){ console.log('change state'); $.ajax({ type : 'POST' , url : api_url + 'auction/state/change', data : { 'token' : $.cookie('token'), 'id' : id, 'state' : state, 'endDate' : endDate }, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNewEndDate(id , state){\n console.log('new end date');\n if(state == 'closed')\n changeState(id , state , null);\n else{\n var today = new Date();\n var date = prompt(\"Please enter New Bid End Date in this format: YYYY-mm-dd\", today.getDate()+\"-\"+(today.getMonth()+1)+\...
[ "0.69623107", "0.6583742", "0.6020991", "0.58996266", "0.5837011", "0.5685982", "0.5618669", "0.55962366", "0.5591179", "0.5493091", "0.5479204", "0.5459964", "0.538413", "0.52926123", "0.52726287", "0.5242663", "0.5201932", "0.5199038", "0.51764536", "0.51580447", "0.5140979...
0.5464979
11
export Student Sign Up Component
function mapStateToProps(state) { return { studentDetails : state.login.studentDetails } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function studentSignup(req, res){\n res.render(\"signup\", {});\n}", "async signupStudent(testController, username, password) {\n await this.isDisplayed(testController);\n await testController.typeText('#signup-form-email', username);\n await testController.typeText('#signup-form-password', password);\...
[ "0.6636535", "0.6384283", "0.63198495", "0.63135195", "0.62371486", "0.62198424", "0.6214501", "0.62075335", "0.6142956", "0.6112817", "0.6059416", "0.60498327", "0.60488284", "0.6027693", "0.60129493", "0.6001681", "0.5974998", "0.5967724", "0.59644365", "0.594788", "0.59459...
0.0
-1
Display person and dictator object values
function displayObject() { var output = Object.values(person) + "<br>" + Object.values(dictator); document.getElementById("displayobj").innerHTML=output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayPerson(person){\n let personInfo = \"First Name: \" + person.firstName + \"\\n\";\n personInfo += \"Last Name: \" + person.lastName + \"\\n\";\n personInfo += \"Weight: \" + person.weight + \"\\n\";\n personInfo += \"Height: \" + person.height + \"\\n\";\n personInfo += \"Eyeco...
[ "0.6936298", "0.6589195", "0.65675044", "0.6469341", "0.640952", "0.6407272", "0.64021915", "0.63805217", "0.6342746", "0.6342746", "0.6329681", "0.6326023", "0.6318084", "0.63103974", "0.6249138", "0.6244144", "0.623845", "0.62327504", "0.6224328", "0.61951137", "0.6191274",...
0.7953797
0
add a method to display name and country together
function createMethod() { person.display = function(){return this.name + " " + this.name;}; country.display = function(){return this.country + " " + this.country;}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHonorific() {\n return getTitle() + street;\n\n}", "function displayCountry(sysKey, sysValue) {\n if(sysKey == \"country\") {\n $(\"#country\").html(sysValue);\n }\n}", "function displayCountry(event) {\n const code = event.target.id;\n console.log(code)\n console.log(countriesByCode...
[ "0.6207975", "0.61587155", "0.61155266", "0.59706503", "0.59216684", "0.5917417", "0.5897673", "0.5893414", "0.5886253", "0.58856446", "0.588398", "0.5866505", "0.58641326", "0.5857773", "0.58571446", "0.5839488", "0.5838707", "0.5830559", "0.5803649", "0.57958823", "0.572852...
0.61989135
1
display object with new method
function addMethod() { createMethod(); output = person.display() + "<br>" + dictator.display(); document.getElementById("methoddiv").innerHTML=output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "display() {\n this.object.display();\n }", "function shownewcar()\r\n{ var r = \"\" ;\r\n for (var i in this)\r\n r += i + \" = \" + this[i] + \"\\n\" ;\r\n return r ;\r\n}", "function shownewcar() {\r\n var r = \"\";\r\n for (var i in this) {\r\n r += i + \" = \" + this[i] + \"\\n\...
[ "0.73040825", "0.6826423", "0.66561794", "0.66561794", "0.66561794", "0.66561794", "0.64593035", "0.64299077", "0.6370124", "0.6305757", "0.6192307", "0.61599517", "0.6156255", "0.61414", "0.6139109", "0.60526", "0.6041772", "0.6032892", "0.59990424", "0.597995", "0.59467566"...
0.56301713
61
It will help prevent your address from being harvested on your web site. You may use this script or modify with your own encryption technique. Please send your comments to Robert Laurie at bob (at) guam . uog . edu Link to JavaScript file from any XHTML/HTML document by placing in element the following element. element...
function RevSting(StrIn) { var StrOut= new String(""); for(var i=StrIn.length-1; i>=0; i--) StrOut += StrIn.charAt(i); return StrOut; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AntiSpam(Tpld, User, Domn, Subj, Hlnk)\n{\n // <A> Element components\n var AElmt = new Array('<a href=\\\"ma', '</a>', 'ilto:', '?subject=', '\\\">');\n // Reverse character order for each component of address\n var At2 = \"4;\", At1 = \"&#6\"; // at symbol\n var Addr, LinkObj;\n Addr = RevSt...
[ "0.83234906", "0.7023229", "0.63283765", "0.6280965", "0.6127224", "0.585333", "0.56223357", "0.55945176", "0.5579796", "0.5554605", "0.5522377", "0.5415925", "0.5391084", "0.53586066", "0.5309103", "0.52715737", "0.52605253", "0.52432203", "0.51809984", "0.5142319", "0.51117...
0.0
-1
AntiSpam function encodes hyperlinked email address to hide from spammers
function AntiSpam(Tpld, User, Domn, Subj, Hlnk) { // <A> Element components var AElmt = new Array('<a href=\"ma', '</a>', 'ilto:', '?subject=', '\">'); // Reverse character order for each component of address var At2 = "4;", At1 = "&#6"; // at symbol var Addr, LinkObj; Addr = RevSting(User); Addr +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function noSpam() {\n\tvar link = noSpam.arguments[0]; // text for the link\n\tvar subject = noSpam.arguments[1]; // if there's a subject line to the message\n\n\tvar myat = String.fromCharCode(64); // @\n\tvar mydot = String.fromCharCode(46); // .\n\tvar addr = '';\n\n\t// starting from the third argument,\n\t...
[ "0.7214658", "0.70550376", "0.6563289", "0.6237429", "0.6200038", "0.61483663", "0.6098", "0.6009122", "0.5944954", "0.59367347", "0.59194416", "0.5892886", "0.5856741", "0.584612", "0.5796083", "0.5707871", "0.5667368", "0.56647617", "0.56604844", "0.565518", "0.55960035", ...
0.7657109
0
Grab and format a row from the table
function grabRow(i,row){ var $row = $(row); //for some reason $cols = $row.find('td') || $row.find('th') won't work... var $cols = $row.find('td'); if(!$cols.length) $cols = $row.find('th'); ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function row () {\n // TODO: also register row number during parsing\n return undefined;\n }", "function RenderRow() {}", "function formatRows(rows){return rows.get().join(tmpRowDelim).split(tmpRowDelim).join(rowDelim).split(tmpColDelim).join(colDelim);}", "function tableRow(ctx, node, index...
[ "0.67747974", "0.6491517", "0.6395766", "0.6384984", "0.63427883", "0.6246581", "0.6242224", "0.6221988", "0.6210127", "0.6204155", "0.61543214", "0.6136547", "0.6083133", "0.60593265", "0.6031452", "0.5994521", "0.5978048", "0.5966988", "0.59512234", "0.59500545", "0.5946833...
0.62256294
8
Grab and format a column from the table
function grabCol(j,col){ var $col = $(col), $text = $col.text(); return $text.replace('"', '""'); // escape double quotes }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function grabCol(j,col){\n var $col = $(col),\n $text = $col.text();\n return $text.replace('\"', '\"\"'); // escape double quotes\n }", "function grabCol(j,col){\n var $col = $(col),\n $text = $col.text();\n\n return $text.replace('\"'...
[ "0.6704361", "0.6659254", "0.6599826", "0.65792066", "0.65221566", "0.6513685", "0.64249796", "0.6372187", "0.6338804", "0.6296876", "0.62589484", "0.6202678", "0.61761683", "0.6173435", "0.6150255", "0.61322826", "0.6084006", "0.6067026", "0.60272914", "0.5985345", "0.597825...
0.66309357
2
Opens a sidebar in the sheet containing the revisions history interface for looking trough changes that have been done during the time when the addon was active.
function showRevHistorySidebar() { var ui = HtmlService.createHtmlOutputFromFile('RevisionsSidebar') .setTitle('Revision history'); SpreadsheetApp.getUi().showSidebar(ui); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onOpen() {\n SpreadsheetApp.getUi()\n .createAddonMenu() // Add a new option in the Google Docs Add-ons Menu\n .addItem(\"Call the Book Hound\", \"showSidebar\")\n //.showSidebar()\n .addToUi(); // Run the showSidebar function when someone clicks the menu\n}", "function showSidebar() {\n var ui =...
[ "0.6549025", "0.6533375", "0.6473108", "0.63771284", "0.63569045", "0.63507015", "0.60745096", "0.6029234", "0.6009437", "0.6000533", "0.59940684", "0.59867513", "0.5938643", "0.59144646", "0.5901543", "0.5826967", "0.5817008", "0.5722638", "0.5722444", "0.5697481", "0.569019...
0.79773265
0
Opens a sidebar in the sheet containing the reports interface for making and sendig detailed reports about changes for some period of time.
function showReportsSidebar() { var ui = HtmlService.createHtmlOutputFromFile('ReportsSidebar') .setTitle('Reports'); SpreadsheetApp.getUi().showSidebar(ui); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onOpen() {\n var ui = SpreadsheetApp.getUi();\n ui.createMenu(\"Student Data\")\n .addItem(\"Pull Student Data\", 'pullDataFromDump')\n .addItem(\"Student Response Viewer\", 'launchSideBar')\n .addItem(\"Send Feedback\", 'sendAll')\n .addToUi();\n launchSideBar();\n}",...
[ "0.7033049", "0.68663657", "0.6669737", "0.65738714", "0.6410099", "0.6343306", "0.6330067", "0.6330067", "0.6296133", "0.62574", "0.62508005", "0.6213779", "0.6199825", "0.6191615", "0.6159313", "0.6153896", "0.6145891", "0.6144113", "0.61150146", "0.6103599", "0.60933423", ...
0.7655322
0
Opens a sidebar in the sheet containing the addon's user interface for configuring the notifications this addon will produce.
function showConfigurationSidebar() { var ui = HtmlService.createHtmlOutputFromFile('ConfigurationSidebar') .setTitle('Add-on configuration'); SpreadsheetApp.getUi().showSidebar(ui); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onOpen() {\n SpreadsheetApp.getUi()\n .createAddonMenu() // Add a new option in the Google Docs Add-ons Menu\n .addItem(\"Call the Book Hound\", \"showSidebar\")\n //.showSidebar()\n .addToUi(); // Run the showSidebar function when someone clicks the menu\n}", "function showSidebar() {\n var ui...
[ "0.7881254", "0.74793464", "0.72752494", "0.7263995", "0.721917", "0.7106704", "0.70370996", "0.69389206", "0.69389206", "0.6868952", "0.6843207", "0.68135065", "0.6742371", "0.6735899", "0.671337", "0.6698258", "0.66866505", "0.6667538", "0.6662629", "0.6572469", "0.6547978"...
0.7545925
1
Opens a purelyinformational dialog in the form explaining details about this addon.
function showAbout() { var ui = HtmlService.createHtmlOutputFromFile('About') .setWidth(420) .setHeight(270); SpreadsheetApp.getUi().showModalDialog(ui, 'About CTracker'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAboutDialog() {\r\n\tvar dialog = new SimpleDialog(\"About\");\r\n\tdialog.addButton(\"OK\",SimpleDialog.CLOSE_BUTTON);\r\n\tdialog.addMessage(\"ETI Blank\", \"center\");\r\n\tdialog.addMessage(\"Version 0.1.r177\", \"center\");\r\n\tdialog.show();\r\n}", "showInfoBox(title, content, detail) {\r\n ...
[ "0.6991852", "0.6427033", "0.6400311", "0.63839567", "0.6330763", "0.63201743", "0.62964696", "0.6266656", "0.62430376", "0.6240444", "0.62299544", "0.61484283", "0.6126837", "0.6115783", "0.60979563", "0.6091149", "0.6065651", "0.60546637", "0.6052549", "0.60256916", "0.6020...
0.64448214
1
Adjust the onEdit trigger based on user's requests.
function adjustCTrackerTrigger() { var sheet = SpreadsheetApp.getActiveSpreadsheet(); //FIXME: !Critical! Avoid multiple triggers for each user who is configuring the add-on var triggers = ScriptApp.getUserTriggers(sheet); var settings = PropertiesService.getDocumentProperties(); var triggerNeeded = set...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function triggerEditAction() {\n if (!appInfo.triggers) return;\n\n appInfo.triggers.forEach(function (trigger) {\n if (trigger.isEnabled &&\n trigger.type === 'tableEdit' &&\n trigger.action.segment === appInfo.type) {\n $rootScope.$emit('runAction', trigger.actionI...
[ "0.6887213", "0.6659611", "0.6396469", "0.6360315", "0.6162417", "0.6139642", "0.59912705", "0.59868914", "0.5977405", "0.596934", "0.5939006", "0.58967", "0.586862", "0.586862", "0.58529484", "0.5818103", "0.57732517", "0.57687634", "0.57447827", "0.57435656", "0.5737433", ...
0.5971001
9
Called when the user needs to reauthorize. Sends the user of the addon an email explaining the need to reauthorize and provides a link for the user to do so. Capped to send at most one email a day to prevent spamming the users of the addon.
function sendReauthorizationRequest() { var settings = PropertiesService.getDocumentProperties(); var authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL); var lastAuthEmailDate = settings.getProperty('lastAuthEmailDate'); var today = new Date().toDateString(); if (lastAuthEmailDate != today) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reauthorize() {\n if((new Date).getTime() >= expire_time) {\n authorize();\n }\n}", "async requireResendActivation({ view, antl }) {\n return view.render('user.request_email', {\n action: \"UserController.resendActivation\",\n header: antl.formatMessage(\"main.send_activation_e...
[ "0.6940622", "0.6600132", "0.6482118", "0.60631055", "0.58242244", "0.55267966", "0.5500758", "0.5463847", "0.5447903", "0.5437044", "0.53352845", "0.5294882", "0.526211", "0.5253892", "0.52537656", "0.5243128", "0.52103066", "0.5183605", "0.51773053", "0.5158106", "0.5150824...
0.707927
0
Update revision history every time when a user edits cell and this change is saved.
function updateRevisionHistory() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getActiveSheet(); var settings = PropertiesService.getDocumentProperties(); var newcontent = ss.getActiveCell().getValue().toString(); if (newcontent != "") { var cell = ss.getActiveCell().getA1Notation();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "registerChange() {\n if (this.editor && this.editor.save && this.shouldSaveHistory && !this.editor.configuration.readOnly) {\n this.editor.save().then((savedData) => {\n if (this.editorDidUpdate(savedData.blocks)) this.save(savedData.blocks);\n });\n }\n this.shouldSaveHistory = true;\n ...
[ "0.64554703", "0.6267592", "0.59068555", "0.5895909", "0.58721024", "0.58513695", "0.581146", "0.5785097", "0.57826185", "0.5724959", "0.57213163", "0.57147384", "0.56962216", "0.5678547", "0.5622821", "0.55704045", "0.5563706", "0.55080074", "0.5492369", "0.54546493", "0.545...
0.7458599
0
Reset saved revision history from DocumentProperties and saved who did that ToDo: Allow clear history only for EPAM team only
function resetStoreData(){ var resetarray = []; if (isAdmin()) { resetarray.push({ "sheet": "System", "cell": "event", "timestamp": new Date().valueOf(), "date": Utilities.formatDate(new Date(), "GMT+04", "dd MMM, HH:mm"), "author": getOwnName(), "email": Session.getEffective...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setRollbackDocuments() {\n\trbDocuments = swDocuments.slice(0);\n}", "function clearChangeHistory() {\n changeHistory = [];\n historyPosition = 0;\n }", "function resetIndex() {\n PropertiesService.getDocumentProperties().setProperty(\"last\", 1);\n}", "sendDocumentState(){\n ...
[ "0.5748294", "0.5696187", "0.56574386", "0.5533284", "0.5496715", "0.5485573", "0.5444561", "0.5421761", "0.53823173", "0.5372795", "0.5354006", "0.5328463", "0.52780294", "0.52761936", "0.5223556", "0.5192938", "0.5191474", "0.5187129", "0.5143248", "0.5141402", "0.5141402",...
0.6097411
0
Initialize the session, picking up identity from either cookie or local storage
_initSession () { const session = this.get('session'); return session.fetch() .then(() => { debug('User has been automatically logged in... '); return {success: true, status: 'authenticated'}; }) .catch((ex) => { debug(`No cookie/localstorage entry was found, user is an...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initializeSession() {}", "initSession(cfg) {\n this.set('store', cfg.store);\n let auth_token = Cookies.get('user_session');\n\n if (auth_token) {\n return this._getAndSetCurrentUser(auth_token);\n }\n }", "async function initialise(){\r\n //Set the loader to 1 (on by default)\r\n...
[ "0.7293959", "0.6929852", "0.6920489", "0.6869922", "0.67817116", "0.6781388", "0.67504084", "0.6723375", "0.6698041", "0.6690947", "0.6504436", "0.64596444", "0.64053583", "0.6380625", "0.6363896", "0.63638365", "0.6326985", "0.6319553", "0.62592286", "0.62592286", "0.625922...
0.720203
1
Call the Will Mount to set the auth Flag to false
componentWillMount() { let restId = { restId: JSON.parse( localStorage.getItem('owner')).restaurantId } console.log("restId is : ", restId) this.props.onCookie(restId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillMount() {\r\n this.setState({\r\n authFlag: false\r\n })\r\n }", "componentWillMount() {\n this.setState({\n authFlag: false\n });\n }", "componentWillMount() {\n this.setState({\n authFlag: false\n });\n }", "componentWillMount() {\n this.setState({\n ...
[ "0.6272867", "0.62575024", "0.62575024", "0.62575024", "0.6229629", "0.6215943", "0.6198348", "0.6198348", "0.6163631", "0.6163631", "0.6163631", "0.6163631", "0.6154456", "0.6154456", "0.6154456", "0.6154456", "0.61039996", "0.5874577", "0.57449794", "0.5692988", "0.56444925...
0.0
-1
component to fetch a list & generate a checkboxes grid
function ListPicker(props) { const { source } = props; const dispatch = useDispatch(); const selected = useSelector(state => state.filters[source]) || []; const list = useSelector(state => state.lists[source]) || []; const listCheckBoxes = () => { return list.map(element => { return (<label ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){\n\t\treturn (\n <div>\n <ul className=\"cs-grid-bulk-links\">\n <li><a href=\"#\" onClick={this.updateAllCheckboxes.bind(this, true)}>Select Visible</a></li>\n <li><a href=\"#\" onClick={this.updateAllCheckboxes.bind(this, false)}>Select None</a></li>\n </ul>\n <...
[ "0.66912895", "0.6465806", "0.64515644", "0.63420093", "0.63401824", "0.6302955", "0.62857634", "0.6266582", "0.62120235", "0.61914253", "0.6188824", "0.6181275", "0.61309147", "0.6126628", "0.60884494", "0.6052223", "0.60380524", "0.60326123", "0.59782946", "0.5956872", "0.5...
0.5971555
19
calculation: scroll 1x at floor up to 2x at ceiling
function zoomFactor(){ var percentOffFloor = (transform.position.y - zoomFloor)/zoomCeiling; return percentOffFloor + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "p(pos) { return Math.ceil((pos-1)/this.d); }", "function calculateScrollPos(cm, x1, y1, x2, y2) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (y1 < 0) y1 = 0;\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var sc...
[ "0.65770453", "0.6333764", "0.6327366", "0.63204604", "0.6285661", "0.62071687", "0.6203019", "0.6191806", "0.6191806", "0.6191806", "0.6191806", "0.6167561", "0.6114112", "0.6102365", "0.60894966", "0.60727113", "0.6058695", "0.60536677", "0.60536677", "0.60500443", "0.60330...
0.55502135
73
function to handle map
function mapHandler() { var map = new BMap.Map("map"); map.centerAndZoom("成都", 15); // 初始化地图,设置中心点坐标和地图级别 map.addControl(new BMap.MapTypeControl()); //添加地图类型控件 map.setCurrentCity("成都"); // 设置地图显示的城市 此项是必须设置的 map.enableScrollWheelZoom(true); var geolocation = new BMap.Geolocation(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function map() {\n\n}", "function Map() {}", "handleMapLoad(map) {\n }", "function MAP() {\n\n}", "function Map() {\n\t\n}", "function Map() {\n\t\n}", "function MapIterator() {}", "function mapTest() {\n return \"Hello\"\n}", "map(id, source) {}", "function checkMap(){\n console.table(map...
[ "0.75574976", "0.73583525", "0.7134152", "0.6999506", "0.68877035", "0.68877035", "0.6607119", "0.6413944", "0.6392939", "0.6389464", "0.6365838", "0.6365498", "0.63112384", "0.63002634", "0.62671185", "0.62522614", "0.62522614", "0.62309533", "0.62309533", "0.6222784", "0.61...
0.0
-1
function to handle sending message
function sendMessage() { var patternEmail = /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; var patternPhone = /^1[3|4|5|7|8][0-9]{9}$/; var oUserName = $("#username"); var oEmail = $("#email"); var oPhone = $("#phone"); var oMessage = $("#message"); var flag1 = false;//for ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendMessage(){}", "sending () {\n }", "function sendMessage () {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n var senddata = message.split(\"|\");\n var targetid = senddata[0];\n message = senddata[1];\n //...
[ "0.7884095", "0.7710768", "0.7674925", "0.75942546", "0.7433353", "0.73520124", "0.7317461", "0.7312408", "0.72800153", "0.72800153", "0.72800153", "0.72800153", "0.7229085", "0.72210133", "0.7209409", "0.7176897", "0.7152981", "0.7136131", "0.7128004", "0.71111375", "0.71111...
0.0
-1
named row because thats the default value would name it item
renderLesson(row) { return ( <View style={Styles.lessonCol}> <TouchableHighlight onPress={this.playSound.bind(this, row)}> <Image source={{ uri: 'http://amharicteacher.com/images/' + row + '.png' }} style={{width: 115, height: 110}} /> </TouchableHighlight> <Text style={Styles.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function row () {\n // TODO: also register row number during parsing\n return undefined;\n }", "function row(name, value, start, end) {\n return {\n name: name,\n value: value,\n start: start,\n end: end\n };\n }", "function row(name, value, start, end) {\n return...
[ "0.6823429", "0.65041494", "0.65041494", "0.6459762", "0.6459762", "0.6421046", "0.639044", "0.6197762", "0.61565095", "0.60882485", "0.60855585", "0.60762715", "0.6015277", "0.60066915", "0.59510607", "0.5944178", "0.5938308", "0.5926591", "0.5921281", "0.58923817", "0.58885...
0.0
-1
Try to find the given profile `name` in `profiles` to make sure it exists. If found, return `name`, indicating that it's a valid name. If it isn't a valid name (or is falsy), try to find the default profile name, and return it if it's in `profiles`. If that fails, return null, indicating that no profile name applies to...
function resolveProfileName(config, name) { if (!name) { return null; } var profiles = config.profiles; if (name && profiles[name]) { return name; } var defaultProfileName = config.defaultProfile; if (defaultProfileName && profiles[defaultProfileName]) { return defaultProfileName; } consol...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProfile(profileName) {\n var file = chain(profilesFolder, function (profilesFolder) {\n var fileUri = path.join(profilesFolder, profileName + \".json\")\n return fs.readFile.bind(null, fileUri)\n })\n\n return chain(file, safeParse)\n}", "function getProfile(profileName, callba...
[ "0.62826335", "0.62535524", "0.6080748", "0.6055145", "0.59039855", "0.55076724", "0.53462064", "0.5245011", "0.5189024", "0.5012883", "0.49678478", "0.49203727", "0.48809", "0.48721752", "0.48673418", "0.48553297", "0.48389035", "0.48270202", "0.47996122", "0.47780642", "0.4...
0.7600987
0
Given a profile name, return the filename for images in that profile, or the original filename if the profile name is falsy.
function profileNameToFileName(baseFileName, profileName) { var prefix = ""; if (profileName) { prefix = profileName + "-"; } return path.join( path.dirname(baseFileName), prefix + path.basename(baseFileName) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolveProfileName(config, name) {\n if (!name) {\n return null;\n }\n var profiles = config.profiles;\n if (name && profiles[name]) {\n return name;\n }\n var defaultProfileName = config.defaultProfile;\n if (defaultProfileName && profiles[defaultProfileName]) {\n return defaultProfileNam...
[ "0.6775392", "0.62636214", "0.6145599", "0.60986185", "0.5990172", "0.57893836", "0.57416034", "0.57196486", "0.57171667", "0.57127184", "0.5674621", "0.567148", "0.5618406", "0.55974305", "0.55794674", "0.54976994", "0.54898334", "0.5478353", "0.54401946", "0.53950906", "0.5...
0.7265581
0
Given a weak configuration object and a strong one that should take precendence, find the value of `weakPropertyName`, which might be called `strongPropertyName` in the stong config if `strongPropertyName` is specified.
function override(weakConfig, strongConfig, weakPropertyName, strongPropertyName) { strongPropertyName = strongPropertyName || weakPropertyName; if (strongConfig.hasOwnProperty(strongPropertyName)) { return strongConfig[strongPropertyName]; } return weakConfig[weakPropertyName]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findPropertyNamed(aName){\n for(let i = 0; i < this._properties.length; i++){\n let prop = this._properties[i];\n if(prop.matchesNameOrAlias(aName)){\n return prop;\n }\n }\n return null;\n }", "function findProperty(obj, propertyName) {\n\t...
[ "0.48765734", "0.47950628", "0.47771308", "0.462827", "0.45744866", "0.45038334", "0.43964353", "0.43963143", "0.43912193", "0.4345776", "0.43297598", "0.43275976", "0.4303709", "0.42862773", "0.42805445", "0.42805445", "0.4278828", "0.42716992", "0.42716992", "0.42074323", "...
0.720641
0
This function takes in a reference to the hexo object and returns a function to interpret imsize tags. The Hexo Tag API is documented at
function factory (hexo) { return function imsizeTag (args, content) { var config = hexo.config.image_sizes; debug(args); debug(content); var doc; try { doc = yaml.safeLoad(content); } catch (err) { console.error(err); return; } var src = doc.src; var profileNa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function size(hex) {\n return Math.ceil((hex.length - 2) / 2);\n}", "function parseTags(nodes, size) {\n //Locate Object Styles defined in document\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var figureWidth = String(textFrameWidth * (columnSizes[size] / 100)) + \"in\"; //wid...
[ "0.52838886", "0.5243496", "0.520961", "0.5207372", "0.51812637", "0.51812637", "0.51812637", "0.51812637", "0.51812637", "0.51812637", "0.51812637", "0.51812637", "0.51812637", "0.51812637", "0.51812637", "0.5161705", "0.50639594", "0.49744534", "0.49065143", "0.4901757", "0...
0.62296355
0
SELECT FROM cuisine_type WHERE id=3
function findById(id) { return db('cuisine_type') .where({ id }) .first() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUserType({ id }, result) {\r\n let query = \"select idType from user where idUser = \" + id;\r\n\r\n sql.query(query, (err, rows, fieds) => {\r\n if (err) {\r\n result(err, rows);\r\n return;\r\n }\r\n\r\n result(null, rows);\r\n });\r\n }", "async function obtenerTodasC...
[ "0.62568176", "0.57703066", "0.5705989", "0.56802714", "0.56465435", "0.55557865", "0.55488133", "0.55057174", "0.5493364", "0.54853857", "0.544783", "0.53989285", "0.5363066", "0.53486365", "0.5329789", "0.52786803", "0.5222019", "0.52144724", "0.5206504", "0.5196054", "0.51...
0.6938478
0
SELECT FROM cuisine_type as CT WHERE CT.restaurant_id = 4
function findByRestaurant(id) { return db('cuisine_type') .where('restaurant_id', id) .first() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fetchRestaurantByCuisine (cuisine) {\r\n return DBHelper.fetchRestaurants()\r\n .then(restaurants => {\r\n // Filter restaurants to have only given cuisine type\r\n return restaurants.filter(r => r.cuisine_type == cuisine)\r\n })\r\n }", "function queryDb(restaurant_id) {\n}", ...
[ "0.6607396", "0.64678705", "0.62552947", "0.61941075", "0.61359364", "0.60858953", "0.6074611", "0.6051825", "0.5994814", "0.5921231", "0.5921231", "0.5921231", "0.5921231", "0.5921231", "0.5921231", "0.5921231", "0.5921231", "0.5921231", "0.5921231", "0.5921231", "0.5921231"...
0.70914817
0
Changes background colors automatically with fade effect
function animBgdFadeAuto($element, $colors) { var count = 0; setInterval(function() { if (count == 0) { $element.css({ 'background-color': $colors[count], 'transition': '2s' }); count++; } else if (count == 1) { $el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorFade() {\n var color = [];\n\n for (var i = 0; i < 3; i++) {\n var pickNum = Math.floor(Math.random() * 255);\n color.push(pickNum);\n }\n\n $(\"body\").css({\n backgroundColor: \"rgb(\" + color[0] + \", \" + color[1] + \", \" + color[2] + ...
[ "0.77113444", "0.7509368", "0.73721987", "0.73047215", "0.72596717", "0.7198622", "0.71602273", "0.7154888", "0.705831", "0.6997711", "0.6978766", "0.68817705", "0.6868204", "0.68539137", "0.6837012", "0.68296", "0.68077767", "0.6785978", "0.6762355", "0.6747276", "0.6708012"...
0.6971667
11
navifgate to AddStudentDetailsScreen for update student detail
moveToAddStudentDetailsScreen() { const { state, navigate } = this.props.navigation; var studentData = this.state.studentData; navigate("AddStudentDetailsScreen", { data: "Update", title: "Update Student", studentUserId: studentData._id, firstName:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editStudent() {\n\t// console.log('editing student!');\n\tgetMultipleValuesFromStorage(['CATEGORY', 'ADMISSION_DATE'])\n\t.then(function(keys) {\n\t\tvar cat = keys[0];\n\t\tvar date = keys[1];\n \n\t\tvar FT = getFieldTranslator();\n\n\t\t// student category\n\t\tif (cat !== \"\") {\n\t\t\tinsertValue( g...
[ "0.7214322", "0.69526035", "0.6933229", "0.6912932", "0.6854037", "0.6838361", "0.6816697", "0.6638352", "0.66312116", "0.6565122", "0.64867735", "0.6449584", "0.6345177", "0.63007855", "0.62998545", "0.6289377", "0.62872374", "0.6234212", "0.6219375", "0.614961", "0.6141296"...
0.7026569
1
it will help to get we are going to edit student action from action
_handleEditAction(isShareDetailActionSheet = false) { if (isShareDetailActionSheet) { if (!this.state.isShareDetailActionSheet) { //this.props.navigation.state.params.isheaderRightShow = false this.props.navigation.setParams({ isheaderRightShow: fa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editStudent() {\n\t// console.log('editing student!');\n\tgetMultipleValuesFromStorage(['CATEGORY', 'ADMISSION_DATE'])\n\t.then(function(keys) {\n\t\tvar cat = keys[0];\n\t\tvar date = keys[1];\n \n\t\tvar FT = getFieldTranslator();\n\n\t\t// student category\n\t\tif (cat !== \"\") {\n\t\t\tinsertValue( g...
[ "0.731092", "0.6911917", "0.6882446", "0.6882446", "0.6882446", "0.6882446", "0.6882446", "0.6882446", "0.6882446", "0.68048257", "0.6725922", "0.67037904", "0.66161156", "0.6601597", "0.6587053", "0.65182376", "0.6493778", "0.64719117", "0.6463986", "0.6461883", "0.6448565",...
0.0
-1
loginUser does a post to our "api/login" route and if successful, redirects us the the members page
function loginUser(email, password) { $.post("/api/login", { email: email, password: password }) .then(() => { window.location.replace("/members"); // If there's an error, log the error }) .catch(err => { console.log(err); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loginUser(email, password) {\n $.post(\"/api/login\", {\n email: email,\n password: password\n })\n .then(() => {\n window.location.replace(\"/members\");\n // If there's an error, log the error\n })\n }", "function loginUser(email, password) {\n $.post('/api/...
[ "0.74853575", "0.7310804", "0.7244195", "0.68388283", "0.6829254", "0.6773237", "0.67725635", "0.67631567", "0.67436033", "0.6732409", "0.67159325", "0.6668806", "0.666371", "0.66569996", "0.6656362", "0.6634564", "0.6611189", "0.66014194", "0.6551275", "0.65445733", "0.65311...
0.741271
1
Does a post to the signup route. If successful, we are redirected to the members page Otherwise we log any errors
function signUpUser(email, password, car_make, name, car_model, license_plate) { $.post("/api/signup", { email: email, password: password, car_make: car_make, name: name, car_model: car_model, license_plate: license_plate }) .then(() => { window.location.replace...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signUpUser(email, password) {\n $.post(\"/api/signup\", {\n email: email,\n password: password\n })\n .then(() => {\n window.location.replace(\"/members\");\n // If there's an error, handle it by throwing up a bootstrap alert\n })\n .catch(handleLoginErr);\n }...
[ "0.7517872", "0.7517872", "0.73045665", "0.73035085", "0.7220847", "0.7214652", "0.7212984", "0.7202011", "0.71545815", "0.70982814", "0.7040131", "0.7022936", "0.7020009", "0.69571984", "0.69265574", "0.6897466", "0.684772", "0.6838749", "0.68335813", "0.68201506", "0.679957...
0.66587657
34
canvas will be created in the container div, the container div will have a class of the cnvas + '_cntainer'
render(){ //createDom (tag, type, name, value, domClass, id, parent) this.containerDom = this.htmlHelper.createDom('div', this.parentDom,this.domClass + '_conatiner') this.dom = this.htmlHelper.createDom('canvas', this.containerDom); this.dom.style.touchAction="none"; // prevent default ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createCanvas() {\n\n const canvasId = \"xeokit-canvas-\" + math.createUUID();\n const body = document.getElementsByTagName(\"body\")[0];\n const div = document.createElement('div');\n\n const style = div.style;\n style.height = \"100%\";\n style.width = \"100%\";\n ...
[ "0.7249621", "0.70148486", "0.6908057", "0.68753654", "0.6834402", "0.6769435", "0.6720816", "0.67084736", "0.6689993", "0.6649195", "0.6643357", "0.6595961", "0.656229", "0.65487903", "0.6540103", "0.6523382", "0.6502116", "0.6501528", "0.6442239", "0.6424342", "0.64034015",...
0.6897509
3
classes Room: if channel, pass (id,true). else pass (number)
function Room(number, is_channel) { this.users = {}; //holds User objects, index is sess id //this.events = new Array(); //holds Event objects this.is_channel = (is_channel === true); if(this.is_channel) { this.id = number; this.channel_info = CHANNELS[this.id]; this.title = th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeReadStatus(id) {\n //console.log(\"gfd\");\n let rooms = this.state.rooms;\n let msg = '';\n \n for (let i in rooms){\n if (rooms[i].roomId === id){\n let lastMessage = rooms[i].lastMessage !== null ? rooms[i].lastMessage : { \"Body\": \"\", \"time...
[ "0.5983826", "0.5823101", "0.5810573", "0.5804648", "0.57612085", "0.5703432", "0.56849176", "0.56278026", "0.5603941", "0.5594721", "0.5593251", "0.5539647", "0.5537089", "0.55108", "0.55048865", "0.54836994", "0.54288316", "0.541586", "0.541089", "0.5380671", "0.53661793", ...
0.5552596
11
returns unix epoch time in seconds
function gettime() { //return Math.round(new Date().getTime() / 1000); return Math.round(Date.now() / 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function epochSeconds() { return new Date().getTime() / 1000 }", "static epoch_seconds() {\n return new Date().getTime() / 1000.0;\n }", "function epoch() {\n\tvar date = new Date();\n\tvar time = Math.round(date.getTime() / 1000);\n\treturn time;\n}", "function getSecondsFromEpoch() {\n return...
[ "0.8658087", "0.83096546", "0.82686436", "0.80192393", "0.777136", "0.7428476", "0.7428476", "0.70911753", "0.70911753", "0.70911753", "0.7053084", "0.70513844", "0.70513844", "0.70513844", "0.70513844", "0.70513844", "0.70513844", "0.70448226", "0.7042123", "0.69942224", "0....
0.62325865
54
returns whether the string given is strictly numeric
function isnum(num) { return (/^\d+$/.test(num + "")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNumeric(string) {\n\treturn isNumeric1(string, false);\n}", "function isNum(str) {\n return !isNaN(str.toString());\n}", "function isNumeric(s) {\n return !isNaN(s - parseFloat(s));\n }", "function isNum(str) {\r\n\t\t\tif(str) {\r\n\t\t\t\treturn str.match(/^-?(\\d+|\\d+\\.?\\d*|\\d*\\.?\\d+...
[ "0.83445734", "0.8054813", "0.8025463", "0.80037475", "0.7960468", "0.7934974", "0.774652", "0.76911885", "0.7650339", "0.7632045", "0.7632045", "0.7632045", "0.76274294", "0.76167154", "0.75845784", "0.7582936", "0.7487021", "0.7485622", "0.74603266", "0.7436093", "0.7421054...
0.0
-1
returns whether the string given is strictly numeric or decimal
function isdecimal(num) { return (/^\d+(\.\d+)?$/.test(num + "")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNumeric(string) {\n\treturn isNumeric1(string, false);\n}", "function isNumeric(s) {\n return !isNaN(s - parseFloat(s));\n }", "function isNum(str) {\r\n\t\t\tif(str) {\r\n\t\t\t\treturn str.match(/^-?(\\d+|\\d+\\.?\\d*|\\d*\\.?\\d+)$/);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "function is...
[ "0.7631674", "0.75638634", "0.74909484", "0.74380547", "0.74128705", "0.74038005", "0.7368505", "0.73490644", "0.7342916", "0.73060906", "0.7297967", "0.7297967", "0.7281334", "0.72450966", "0.7136474", "0.7136474", "0.7136474", "0.70990753", "0.7098897", "0.70807016", "0.707...
0.7653857
0
returns whether the string is a valid room ID, but does not check for existance
function is_room_id(str) { return (/^[a-z]{5}$/.test(str + "")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidID(id){\n if(typeof id != 'string'){\n console.log(\"db: ID must be a string\");\n return false;\n }\n if(id == \"\"){\n console.log(\"db: ID cannot be blank\");\n return false;\n }\n if(/[^a-zA-Z0-9_-]/.test(id)){\n console.log(\"db: ID can only co...
[ "0.7285735", "0.69805896", "0.67523384", "0.6695636", "0.64717567", "0.6465168", "0.6409337", "0.6406256", "0.64055157", "0.6356303", "0.6232171", "0.62170637", "0.61828524", "0.6132161", "0.6123328", "0.6089573", "0.60785526", "0.603513", "0.6031953", "0.6031802", "0.5935654...
0.7994185
0
returns whether the string is a valid channel ID, but does not check for existance
function is_channel_id(str) { return (/^[a-z0-9]+$/.test(str + "")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isChannel( selectedId ) {\n let isChannel = new RegExp('^[#]').test( selectedId ); //determines if selected id is a channel\n\n if ( isChannel ) {\n return true;\n }\n\n return false;\n}", "function isValidID(id){\n if(typeof id != 'string'){\n console.log(\"db: ID must be a...
[ "0.68289924", "0.64593506", "0.6327871", "0.61708844", "0.6152435", "0.60113347", "0.59421575", "0.591644", "0.5889988", "0.58863026", "0.5882416", "0.5863766", "0.5802456", "0.575888", "0.57214314", "0.56568706", "0.5635532", "0.56138456", "0.5605476", "0.55735105", "0.55677...
0.86894155
0
converts a base10 number into a base26 string
function room_num2id(num) { var str = base(num, ROOM_ID_CHARS); while(str.length < ROOM_ID_LEN) str = "a" + str; return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encode(num){\n\tvar encoded = '';\n\twhile(num) {\n\t\tvar r = num % base;\n\t\tnum = Math.floor(num / base);\n\t\tencoded = alphabet[r].toString() + encoded;\n\t}\n\treturn encoded;\n}", "toBase10(value, b = 62) {\n const limit = value.length;\n let result = base.indexOf(value[0]);\n for (let ...
[ "0.7483454", "0.712461", "0.70493996", "0.6984318", "0.67808247", "0.6728247", "0.671545", "0.66843647", "0.6650078", "0.6564938", "0.64712644", "0.64598346", "0.64369553", "0.642267", "0.63930357", "0.6376811", "0.63677996", "0.63438004", "0.63190323", "0.62796783", "0.62732...
0.0
-1
converts a base26 string into a base10 number
function room_id2num(str) { var num = 0, mul = 1; for(var i = str.length - 1; i >= 0; i--) { var pos = ROOM_ID_CHARS.indexOf(str.charAt(i)); if(pos == -1) return null; num += pos * mul; mul *= ROOM_ID_CHARS.length; } return num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function string64to10(str) {\n var order = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\";\n var base = order.length;\n var num = 0, r;\n while (str.length) {\n r = order.indexOf(str.charAt(0));\n str = str.substr(1);\n num *= base;\n num += r;\n }\n return num;\n}", "lett...
[ "0.71215516", "0.6799276", "0.6797332", "0.67905223", "0.6762466", "0.66611606", "0.6645632", "0.6636093", "0.65434074", "0.65363455", "0.65063334", "0.6443867", "0.6372202", "0.6365627", "0.63176864", "0.62272704", "0.62272704", "0.62272704", "0.62272704", "0.62272704", "0.6...
0.0
-1
taken from: Sample usage for decimal to hex: base(255, '0123456789ABCDEF') == 'FF'
function base(dec, base) { var len = base.length; var ret = ''; while(dec > 0) { ret = base.charAt(dec % len) + ret; dec = Math.floor(dec / len); } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toHex(n){return (n<16?\"0\":\"\")+n.toString(16);}", "base32tohex(base32) {\n var base32chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';\n var bits = '';\n var hex = '';\n\n for (var i = 0; i < base32.length; i++) {\n var val = base32chars.indexOf(base32.charAt(i).toUpp...
[ "0.71351105", "0.7070958", "0.69431925", "0.6915753", "0.6876852", "0.6865429", "0.6786702", "0.677663", "0.6773036", "0.6733476", "0.67240816", "0.66805774", "0.66638094", "0.6652427", "0.66390693", "0.66327155", "0.66247356", "0.66247356", "0.66247356", "0.66247356", "0.662...
0.6601194
65
oops, had to rewrite for node 0.2 errors will kill node, how to catch? it isn't emitted, nor does a try/catch work this function does an HTTP GET request, but uses caches
function http_get(host, path, callback) { path = path.replace(/ /g, "%20"); debug("internal get: " + host + path); var cache_key = sha1(host + path) + sha1(path); //I dont know the chance of an sha1 collision if(CACHE_TYPE === "memcache") { mc.get(cache_key, function (err, result) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unableToResolve() {\n console.log(\"WORKER: fetch request failed in both cache and network.\");\n return new Response(errorText, {\n status: 503,\n statusText: \"Service Unavailable\",\n headers: new Headers({\n \"Content-Type\": \"text/html; charset=utf...
[ "0.6403494", "0.61122257", "0.6080058", "0.6070314", "0.60508007", "0.60455924", "0.60416085", "0.6028825", "0.59668934", "0.59537274", "0.5952329", "0.59464633", "0.5939264", "0.59080285", "0.5857707", "0.58332765", "0.5751709", "0.5749995", "0.57315135", "0.57315135", "0.57...
0.65445715
0
puts videos like s1e1p1, s1e1p2
function fix_video_order(list) { //var last_ep = null, last_part = null; var curr_ep, curr_part; for(var i = 0; i < list.length; i++) { //let's find this current ep str var matches = _ep_str_matches(list[i].title); if(matches != null) { //debug("matched"); cur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tellPlayerTheyAreBadAtVideGames (playerName, videoGames) {\n console.log(\n `You know, ${playerName}, you\\`re not actually very good at ${videoGames}.`\n );\n}", "function playVideos() {\n var p = document.createElement('p');\n var t = document.createTextNode(\"Played!\");\n p.appendChild...
[ "0.6622067", "0.6424757", "0.63905674", "0.62550986", "0.6038565", "0.60318524", "0.60318524", "0.58972776", "0.5894235", "0.58761567", "0.5849326", "0.5840724", "0.58090717", "0.57893544", "0.57826203", "0.5773339", "0.5772098", "0.57528365", "0.5743444", "0.57238", "0.57145...
0.0
-1
I'm pretty sure this function doesn't work the way I intended it to.
function _ep_str_matches(str) { var matches = str.match(/(s\d+e\d+)p0*(\d+)/i); if(matches != null) return matches; //try to do looser matches matches = str.match(/(s(eason)? ?\d+ ?ep? ?\d+)/i); if(matches == null) return null; //match part x of y and stuff var temp = str.match(/(\(|...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "static private protected inter...
[ "0.64218485", "0.61098444", "0.59320277", "0.5635314", "0.55671006", "0.5498247", "0.5461939", "0.5404262", "0.5388279", "0.53118604", "0.51965535", "0.5129974", "0.51273453", "0.51147646", "0.5085393", "0.5077582", "0.5061399", "0.49792162", "0.49502155", "0.4932785", "0.492...
0.0
-1
fetches a file from the static dir, compresses it, and returns it (compressed or not). caches data to memory, cause memoization is pro
function fetch_file_compressed(filename, want_gzipped, callback) { if(compressed_http_files[filename] != undefined) return callback(false, compressed_http_files[filename][want_gzipped ? 'gzip' : 'raw']); fs.readFile(filename, function (err, data) { if(err) return callback(true); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "minifyFile(file) {\n // The hash meteor provides seems to change more than\n // necessary, so we create our own here based on only what \n // affects the minified output\n let key\n Profile.time('hash', () => {\n key = this._deepHash({\n content: file.getContentsAsString(),\n sour...
[ "0.6155461", "0.6135769", "0.58864313", "0.5799399", "0.5708906", "0.5691029", "0.5620731", "0.5576018", "0.5528256", "0.55231184", "0.5508921", "0.54937553", "0.54557157", "0.54545504", "0.5446024", "0.54217345", "0.5410556", "0.5375134", "0.53447264", "0.53440714", "0.53215...
0.58103377
3
can't finish part sample
function CantFinishLook() { $('.create-finish').fadeOut(400); $('.create-finish').delay(1500).fadeIn(400); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "readSample() {\n return 0;\n }", "function loopRecordedSample(name) {\n }", "function makeSampleFinish () {\n var finishResponses = [\n {finishVal: 'A',\n finishMessage: 'BERLIN',\n finishImage: 'static/berlin.jpeg'\n },\n\n {finishVal: 'B',\n finishMessage: 'SEOUL',\n finish...
[ "0.5866816", "0.58329266", "0.55191827", "0.54557204", "0.54473764", "0.5441648", "0.53929645", "0.5384223", "0.53826225", "0.53817934", "0.5313958", "0.5295779", "0.52864504", "0.5265043", "0.5258696", "0.5257465", "0.5246576", "0.5170008", "0.5160179", "0.51527065", "0.5131...
0.0
-1
idea by PeterPaul Koch & Alex Tingle.
function findPosY(obj) { var top = 0; while (obj.offsetParent) { top += obj.offsetTop; obj = obj.offsetParent; } if (obj.y) { top += obj.y; } return top; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "static private internal fun...
[ "0.6989787", "0.6952084", "0.67725796", "0.64438856", "0.6359681", "0.62939095", "0.62374717", "0.61116886", "0.603516", "0.6026718", "0.6020385", "0.5929346", "0.5840641", "0.5840622", "0.58255213", "0.5825147", "0.5823077", "0.5803843", "0.5750239", "0.56430125", "0.5626918...
0.0
-1
Append (prepend) the given child to the parent with white spacing (so when saved it's pretty)
function indentedAppend(parent, child) { var indent = "", elem = parent; while(elem && elem !== document.body) { indent += " "; elem = elem.parentNode; } // Prepend the element (so the oldest posts are at the top, like a book would read) if(parent.hasChildNodes() &...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertSpace(child) {\n if (isString(child.type) && isTwoCNChar(child.props.children)) {\n return preact_compat_default.a.cloneElement(child, {}, child.props.children.split('').join(' '));\n }\n if (isString(child)) {\n if (isTwoCNChar(child)) {\n child = child.split('').j...
[ "0.66469353", "0.66045696", "0.6598806", "0.6589731", "0.6589731", "0.65879405", "0.65879405", "0.6581699", "0.6560591", "0.654375", "0.654375", "0.654375", "0.654375", "0.64884967", "0.633416", "0.633109", "0.633109", "0.633109", "0.633109", "0.633109", "0.633109", "0.6302...
0.71320534
0
this binding Actor 1 : callee
function greet() { console.log(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "apply() {\n this.engine.receive([this])\n }", "on(...args){\n let emitter = privateMembers.get(this).emitter;\n emitter.on(...args);\n }", "on(...args){\n let emitter = privateMembers.get(this).emitter;\n emitter.on(...args);\n }", "emit(...args){\n let emitter = privateMembers.get(this)...
[ "0.57473105", "0.565478", "0.565478", "0.56321585", "0.56321585", "0.55341125", "0.5516003", "0.5464165", "0.5428669", "0.5383134", "0.53535867", "0.53535867", "0.5351434", "0.5344157", "0.5315321", "0.5305124", "0.5304489", "0.5296835", "0.5280499", "0.5276163", "0.5274303",...
0.0
-1
get the interpreter Convenience function for writing output messages
function tell(msg) { $(".output").val(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "enterProgram(ctx) { console.log(\" %s: %s\", __function, ctx.getText()); }", "get output() {\n\t\treturn this.__l_out.result(this.contexts[this.__l_out.index])\n\t}", "function StdOut() {\r\n}", "gatherOutput(text) {\n this.programOutput += text;\n }", "function getReply(...
[ "0.62078077", "0.59841436", "0.59160393", "0.5789091", "0.56550294", "0.5649197", "0.5591486", "0.5591486", "0.55079037", "0.54882777", "0.5393907", "0.53450906", "0.533865", "0.53319997", "0.5321483", "0.5315235", "0.53114045", "0.5271139", "0.5257474", "0.52468926", "0.5211...
0.0
-1
Main action: Result of clicking "Calculate" button Most of this behavior relates to checking against the expected answer for giving credit to the obsolete exercise.
function CreateHash() { var data = $("#tablesize").val(); var blockNum = $("#blockNum").val(); tell(sha256(blockNum, data)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Evaluate() {\n var formula = document.getElementById('FormulaDisplay').getElementsByTagName('span')[0].innerHTML;\n if (formula == \"Formula\") {\n return;\n }\n\n var status = document.getElementById('AlgoSwitchBtn').innerHTML;\n var ret = 0;\n if (status == \"eval()\") {\n ret = EvaluateWith...
[ "0.71057314", "0.6839441", "0.68254274", "0.67169994", "0.67125833", "0.66567546", "0.6640629", "0.6590694", "0.655809", "0.6548686", "0.651124", "0.6510724", "0.6509294", "0.65068245", "0.6506613", "0.6504986", "0.6501285", "0.64895374", "0.6485364", "0.6479543", "0.64787376...
0.0
-1
This function checks if the incoming request should be delayed based on the provided Env Variables
function mainGremlinPhaseOne(s) { var delayTime = 0; var delayRatio = Number(s.variables.UPSTREAM_DELAY_RATIO); if (delayRatio > 100){ s.error(`ERROR: UPSTREAM_DELAY_RATIO (${delayRatio}) is greater than 100`); s.deny(); } else { var isDelayed = JSON.parse(weightedSearch({true:d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkState3(newState, req) {\n\tvar result = true;\n\tvar i;\n\tvar closedTasks;\n\tif ((newState != 'waiting') && (req != '')) {\n\t\treq = req.split(',');\n\t\tclosedTasks = getClosedTasks();\n\t\tfor (i=0; i<req.length; i++) {\n\t\t\tif (closedTasks.indexOf(req[i]) < 0) {\n\t\t\t\tresult = false;\t\t\t...
[ "0.5490675", "0.54126406", "0.54090476", "0.5309154", "0.52057964", "0.51756436", "0.51730704", "0.5121753", "0.5106206", "0.5079253", "0.507419", "0.507419", "0.5071691", "0.506572", "0.50652367", "0.50633955", "0.5050708", "0.50458306", "0.50458306", "0.50458306", "0.504583...
0.0
-1
This function checks if the outgoing response should be modified based on the provided Env Variables
function mainGremlinPhaseTwo(s) { s.on('upload', function (data, flags) { if (!flags.last) { var responseDrp = Number(s.variables.UPSTREAM_RESPONSE_DRP_WEIGHT); var response2XX = Number(s.variables.UPSTREAM_RESPONSE_2XX_WEIGHT); var response3XX = Number(s.variables.UPSTRE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasEnv(req) {\n\t// check header\n\tif (req.headers[Conf.sourceSysField])\n\t\treturn true;\n\n\t// check GET params\n\tif (req.query[Conf.sourceSysField])\n\t\treturn true;\n\n\tif (req.session && req.session.returnTo) {\n\t\tvar parsed = url.parse(req.session.returnTo, true);\n\t\tif (parsed.query && pa...
[ "0.5989963", "0.57076585", "0.5536514", "0.53040946", "0.52717394", "0.5226891", "0.5183361", "0.51366204", "0.5065588", "0.5064183", "0.5056088", "0.502153", "0.49780142", "0.49381214", "0.4926342", "0.4921091", "0.49185875", "0.49111417", "0.49043253", "0.4886056", "0.48842...
0.0
-1
Function that tracks the currently displayed comment.
function tracker() { $('.tracker').removeClass('tracker'); $('.current').eq(i).addClass('tracker'); }//tracker
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onCommentClick() {\n if (showComment) {\n setShowComment(false);\n } else {\n setShowComment(true);\n }\n }", "handleComments(event) {\n this.feedbackComments = event.detail.value;\n }", "function displayComment(id, timestamp, name, text, picUrl) {\n var div = document...
[ "0.6466039", "0.62463367", "0.6221919", "0.6184523", "0.617933", "0.6145061", "0.609856", "0.60835975", "0.6076652", "0.6073521", "0.60600597", "0.6043336", "0.60206133", "0.60137475", "0.59207547", "0.5896023", "0.5876745", "0.58708805", "0.5860634", "0.5860634", "0.584874",...
0.0
-1
Function that appends current comment on the DOM
function appendDom() { var $el = $('.ajax-data'); var balerion = data.omicron[i]; $('.ajax-data').fadeOut("slow", function(){ $('.ajax-data').children().remove(); $el.append('<h1>' + balerion.name + '</h1>'); $el.append('<h2>' + balerion.git_username + '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showComment(){\n //this function add new li element inside div and shows last comment\n let newLi = document.createElement('li');\n commentID.appendChild(newLi);\n newLi.innerText = commentList[commentList.length-1];\n}", "function addComments(id) {\n\n //dynamically create a element to add...
[ "0.7191998", "0.7122558", "0.7038803", "0.6990079", "0.69419235", "0.6922553", "0.6874572", "0.6820532", "0.68131435", "0.6812385", "0.6793247", "0.67729926", "0.67265755", "0.6724085", "0.6688769", "0.6649167", "0.6624439", "0.6597178", "0.65937555", "0.6547003", "0.6529474"...
0.0
-1
Function that empties the DOM
function emptyDom(){ $('.ajax-data').empty(); } //emptyDom
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearDOM() {\n Ul.innerHTML = \"\";\n}", "clear() {\n\t\twhile (this.getElement().firstChild) {\n\t\t\tthis.getElement().removeChild(this.getElement().firstChild)\n\t\t}\n\t}", "function emptyDOM (elem){\n\twhile (elem.firstChild) elem.removeChild(elem.firstChild);\n}", "function emptyDOM (elem){...
[ "0.8163029", "0.7861213", "0.7781057", "0.77684546", "0.7550969", "0.753077", "0.747004", "0.7433651", "0.73330396", "0.72592914", "0.7250396", "0.7232871", "0.7191636", "0.718245", "0.7169429", "0.71666765", "0.7142818", "0.71324974", "0.7128819", "0.7117583", "0.71064126", ...
0.746411
7
Ensure that current position doesn't increment over or decrement below omicron array elements
function checkPosition(){ if (i > (data.omicron.length - 1)) { i = 0; } else if (i < 0) { i = (data.omicron.length - 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "if (!this._array.hasOwnProperty(index)) {\n if (index >= this._array.length || index < 0) {\n throw new RangeError('Out of range index');\n }\n // find the next or previous open slot\n if (this._direction) {\n index = this._count;\n } else {\n index = this._array.lengt...
[ "0.6032548", "0.600382", "0.5892131", "0.5826019", "0.57841295", "0.573367", "0.57229203", "0.57177866", "0.5706321", "0.57044554", "0.56933427", "0.568951", "0.5654023", "0.5654023", "0.5648689", "0.5643036", "0.56381893", "0.5591037", "0.559059", "0.5588136", "0.55676717", ...
0.6565241
0
Next Button Reset Timer Function
function reset(){ clearTimeout(stopper); stopper = setInterval(timer, 10000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetTimer(){\n clearInterval(timerInterval);\n timerInterval = null;\n startButton.attr('disabled', false);\n minutes.text('00');\n seconds.text('08');\n itsTimeFor.text('Time to do some work!');\n }", "function resetTimer(){\n\n time = 31;\n }", "function nextBtn(){\n ...
[ "0.7241294", "0.72160876", "0.7128043", "0.7102528", "0.7100987", "0.7003756", "0.69654703", "0.69558024", "0.6936309", "0.69083756", "0.6895812", "0.6895171", "0.68920064", "0.6877491", "0.68140584", "0.68097687", "0.67900217", "0.67898", "0.6762644", "0.67489135", "0.673482...
0.65862465
31
Basic autocomplete taken from
function autocomplete(inp, arr) { const matchList = document.getElementById('rest-match'); var currentFocus; /*execute a function when someone writes in the text field:*/ inp.addEventListener("input", function (e) { var val = this.value currentFocus = -1; let matches = arr.filter...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autocomplete() {\n jQuery(function() {\n var names = baby.Name.toString().split(\",\");\n jQuery(\"#inputfordropdown\").autocomplete({\n source: names\n }); //testing SVC git\n });\n }", "function setupDialogAutoComplete(cm, inpElt) { \n function getSearch...
[ "0.73374975", "0.6883497", "0.6873897", "0.6846526", "0.6837358", "0.67960507", "0.67739666", "0.6736201", "0.6734703", "0.6696366", "0.66881615", "0.6659035", "0.66464627", "0.66411954", "0.6599931", "0.6599285", "0.657549", "0.6539571", "0.65224314", "0.6474412", "0.6466988...
0.59743387
59
function to protect pages
function isAuthenticated(){ return function(req, res, next){ if (req.isAuthenticated()){ return next(); } res.redirect('/signin'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Protect() {\r\n}", "function validate_access() {\n if (!is_logged_in()) {\n window.location = \"index.html\";\n }\n}", "function checkPage() {\n var path = window.location.pathname;\n if (path.search('/$') == -1\n && path.search('index.html') == -1\n && path.search('signup.html') == -1)\n...
[ "0.7118378", "0.6539635", "0.5965863", "0.5933599", "0.5882106", "0.5874757", "0.5829188", "0.5788631", "0.5767558", "0.57648396", "0.57573605", "0.571943", "0.5674187", "0.5650006", "0.5612966", "0.5592759", "0.5588221", "0.55760306", "0.5554228", "0.55512875", "0.5551114", ...
0.0
-1
load config for lumserver from etc/config.json and store it in the global lumServer.config
loadConfig() { lumServer.config = require('../etc/config.json').lumServer || {}; lumServer.config.serverName = lumServer.config.serverName || "lum-server"; lumServer.config.port = (!isNaN(process.env.APPPORT) && Number(process.env.APPPORT)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadCustomConfig() {\n try {\n const config = require(`${process.cwd()}/config/server.js`) || {};\n\n this._config = merge.all([this._config, config]);\n } catch (err) {\n if (!err.code || err.code !== 'MODULE_NOT_FOUND') {\n throw err;\n }\n }\n }", "static loadConfig(appHoo...
[ "0.7644056", "0.7245281", "0.71067226", "0.70471716", "0.6865423", "0.6844766", "0.68001646", "0.67878276", "0.6785573", "0.6763861", "0.6736187", "0.6725147", "0.67032886", "0.67015505", "0.6665547", "0.66532236", "0.66236377", "0.65582734", "0.6538686", "0.6508008", "0.6487...
0.84372705
0
Sort the recipients by their full name (first name sorted first, before last name)...
function sortFullNamesAsc(a, b) { var toUserKey = Sentrana.Models.ReportRecipients.toUserKey, fa = that.userInfoMap[toUserKey(a.userID)].fullName, fb = that.userInfoMap[toUserKey(b.userID)].fullName; return (fa < fb) ? -1 : ((fa > ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortContactsByLastName()\n{\n\tcontactArray.sort(sortContactsLName);\n\tfunction sortContactsLName(a, b)\n\t{\n\t\tvar contactLastNameA = a.lastName.toLowerCase();\n\t\tvar contactLastNameB = b.lastName.toLowerCase();\n\n\t\tif(contactLastNameA > contactLastNameB)\n\t\t{\n\t\t\treturn 1\n\t\t}\n\t\telse i...
[ "0.73829824", "0.7227308", "0.6960064", "0.6617892", "0.65948594", "0.6550906", "0.626592", "0.6185305", "0.6153325", "0.6119843", "0.607358", "0.607358", "0.60635686", "0.60614794", "0.6048144", "0.604638", "0.6013113", "0.59179157", "0.5890059", "0.5811137", "0.5798843", ...
0.70189214
2
Helper function for changing the question and updating the buttons
function change_question() { self.questions[current_question_index].render(question_container); $('#prev-question-button').prop('disabled', current_question_index === 0); $('#next-question-button').prop('disabled', current_question_index === self.questions.length - 1); // Determine ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function change_question() {\n self.questions[current_question_index].render(question_container);\n $('#prev-question-button').prop('disabled', current_question_index === 0);\n $('#next-question-button').prop('disabled', current_question_index === self.questions.length - 1);\n\n // Determine if all que...
[ "0.78046393", "0.7744357", "0.7622589", "0.7587966", "0.75544304", "0.7496913", "0.7463695", "0.7453523", "0.74531955", "0.7403185", "0.740091", "0.73441654", "0.73287416", "0.73203593", "0.73100454", "0.7309726", "0.7286362", "0.7286072", "0.7271451", "0.72706103", "0.726104...
0.7782228
1
This function retrieves the current pathname, it uses the static propTypes defined above and sets the state with the retrieved location parameter.
getCurrentPath(){ const { match, location, history } = this.props // retrieves the static propTypes this.setState({location: location.pathname}) // sets the state with the location pathname this.getLastNumberOfString(this.state.location) //console.log(this.state.location); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get locationPathName() {}", "componentDidMount() {\n this.setState({ current: location.pathname.replace('/', '') || this.state.current });\n }", "componentWillReceiveProps(newProps) {\r\n // update location state\r\n this.setState({ loc: newProps.location.pathname.split(\"/\").pop() });...
[ "0.63224715", "0.6144412", "0.6084833", "0.5903826", "0.5824849", "0.5803807", "0.57733965", "0.56818396", "0.5584812", "0.5536643", "0.5524263", "0.5485838", "0.5483414", "0.54647964", "0.5441288", "0.54239273", "0.5405357", "0.53893006", "0.5384966", "0.53730726", "0.536696...
0.7320932
0
this function constructs the new image url
getLastNumberOfString(str){ let allNumbers = str.replace(/[^0-9]/g, ' ').trim().split(/\s+/); let id = parseInt(allNumbers[allNumbers.length - 1], 10); this.setState({movieID: id}) return parseInt(allNumbers[allNumbers.length - 1], 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareUrl(imgObject) {\n return 'https://farm8.staticflickr.com/' + imgObject.server + '/'+ imgObject.id + '_' + imgObject.secret + '.jpg';\n}", "function add_img(url_end) {\r\n return \"http://i.imgur.com/\" + url_end;\r\n }", "function genImageURL(imageDatasArr){\n\tfor (var i = 0; i <...
[ "0.704027", "0.6889411", "0.68550277", "0.6814034", "0.6751601", "0.67151135", "0.66979873", "0.6680084", "0.6680084", "0.6564232", "0.65375483", "0.65226597", "0.6443272", "0.6432209", "0.6427541", "0.6406117", "0.63710666", "0.63697517", "0.6333213", "0.63279957", "0.630686...
0.0
-1
Take a single trade, and subscription record, return updated bar
function updateBar(data, resolution) { var _lastBar; _lastBar = { time: data.kTime * 1000, low: data.low, high: data.high, open: data.open, close: data.close, volume: data.amount }; return _lastBar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateBar(data, sub) {\n var lastBar = sub.lastBar\n let resolution = sub.resolution\n if (resolution.includes('D')) {\n // 1 day in minutes === 1440\n resolution = 1440\n } else if (resolution.includes('W')) {\n // 1 week in minutes === 10080\n resolution = 10080\n...
[ "0.6421734", "0.62529474", "0.56971", "0.5535278", "0.5516361", "0.5492701", "0.5328003", "0.5300349", "0.52785605", "0.527703", "0.5254242", "0.52353185", "0.52314824", "0.52262884", "0.5203603", "0.5191279", "0.518966", "0.51799315", "0.517052", "0.5156748", "0.51523864", ...
0.55598426
3
Agrega los tweets actuales a localStorage
function sincronizarStorage() { localStorage.setItem('tweets', JSON.stringify(tweets)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function agregatTweetLocalStorage(tweet){\n let tweets;\n tweets = obtenerTweets();\n tweets.push(tweet);\n localStorage.setItem('tweets',JSON.stringify(tweets));\n}", "function saveTweetsOnStorage(tweets){\n localStorage.setItem('tweets',JSON.stringify(tweets));\n //showTweets();\n}", "function ...
[ "0.817646", "0.7973696", "0.78072715", "0.7689771", "0.7684382", "0.76645106", "0.7663226", "0.76608413", "0.7655767", "0.7647255", "0.7641508", "0.76409674", "0.76315564", "0.762372", "0.7620601", "0.7602127", "0.7579787", "0.7574875", "0.75743747", "0.7573179", "0.7571011",...
0.74594843
33
Checking if the user is logged in.
function LoggedIn(req, res, next) { //Making sure the user is authenticated. if (req.isAuthenticated()) { return next(); } else { res.redirect('/login/login'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isLoggedIn() {\n if (user) {\n return true\n } else {\n return false\n }\n }", "function isLoggedIn() {\n return getSession()\n }", "isLoggedIn() {\n\t\treturn this.isAuthenticated() && this.exists()\n\t}", "function isUserLoggedIn() {\n // Replace with your...
[ "0.8455731", "0.80697525", "0.8049953", "0.79858017", "0.79821736", "0.79603356", "0.7906967", "0.78904676", "0.78803205", "0.786483", "0.7831255", "0.78022707", "0.7774302", "0.77600986", "0.77290183", "0.77287114", "0.7723181", "0.7723181", "0.7708356", "0.7704859", "0.7696...
0.0
-1
resize canvas not working on animation
function windowResized() { console.log('resized'); resizeCanvas(windowWidth, windowHeight); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onResize(){\n needResizeCanvas = true;\n // TODO have the render call into the core\n //if (!animationFrameScheduled) {\n // window.requestAnimationFrame(drawNextFrame);\n //}\n }", "function resize_canvas() {\n\t\t\tcanvas_elem.width = window.innerWidth / 2;\n\t\t\tcanvas_e...
[ "0.7679941", "0.76558244", "0.7631023", "0.7552944", "0.7538323", "0.7382673", "0.7333458", "0.7324398", "0.73145723", "0.73066086", "0.7289081", "0.72817796", "0.72726595", "0.72198725", "0.7215375", "0.7191586", "0.719106", "0.71857756", "0.71428925", "0.7141331", "0.712466...
0.679902
95